SensorKit

RSS for tag

Retrieve data and derived metrics from iPhone sensors or from a paired Apple Watch.

SensorKit Documentation

Posts under SensorKit tag

27 Posts
Sort by:
Post not yet marked as solved
0 Replies
28 Views
We are developed app based on driver behaviour using location and sensor data. It's working in both background and foreground using region monitoring. Its consume more battery comparing other apps like. Its reduce 5% for every 5 to 10 mins of duration. We are using for our app functionality Location (Always) - every 1sec Sensor - Accelerometer - every 20data for 1sec Background - Region monitoring Time Action - 1sec for 20time Any possible way to reduce battery consuming? If any please suggest your points. Thanks in advance for your comments.
Posted
by
Post not yet marked as solved
1 Replies
88 Views
Is it possible to get access to the class SRWristDetection of the SensorKit Framework in a watchOS app? As part of a project, we need to be able to log in to a service and as soon as the watch is taken off, the user must be logged out.
Posted
by
Post not yet marked as solved
1 Replies
240 Views
Wanted to reach out for some assistance with troublshooting my watch app not detecting collision, I have set up a few breakpoints and determined that it is not running the game over struct even if it had detected the collision, I have also tried to generate a log file when a collision is detected and that does not work either. I have considered that the objects may not be on the same layer so they are now in the same zstack.
Posted
by
Post not yet marked as solved
0 Replies
275 Views
I am working on an application design where I would like to have the Iphone running an app such as Apple Map, and while I might be driving in the car I would like to have my apple Watch invoke a screen shot of the current view of I map showing my location without having to use the iphone. So the Iphone would be active and in a car holder displaying my location on the map. Once I made my route point, such as a waypoint. I would like to press a button on my watch app to do a screen print. Second though is, could I press a button on my Apple Watch app to fire an request to my own IOS Application using WatchConnectivity to capture my Location to a data file. Third thought is could a press a button on my Apple Watch app to interact with an active app, which is an app like a reminder app and create a new Reminder Note in the active app in focus on my Iphone, but is not a component of my IPhone App. Thanks for any insight how I could make a Apple Watch app send Button Presses reliably to my Iphone Application active, so that I. could avoid having to touch my iPhone? Thanks in advance for any guidance.
Posted
by
Post not yet marked as solved
0 Replies
181 Views
Trying to find someone who can tell me how to get the accelerometer data from IPhone 14 that was involved in vehicular homicide. Running out of avenues and hoping for some guidance here
Posted
by
Post not yet marked as solved
1 Replies
324 Views
Hello All, I am building an application that involves the usage of accelerometer data. How I handle the data will change based on the accelerometer specifications. I have been looking all over for the accelerometer specifications for the iPhone13 (the iPhone that I am testing my application on), but I cannot find it anywhere. Is it public knowledge?
Posted
by
Post not yet marked as solved
1 Replies
389 Views
Hello, I'm currently locked out of an old iphone 13 pro max purchased at Apple Store, i've forgotten the icloud account on the device so i can not locate the serial or imei number of the device and i've lost my proof of purchase, the store employee can not access the proof of purchase, the iphone 13 Pro Max is in great condition's. as i turn on the phone it's an Unknown Display. how could i bypass the unknown display or recycle the phone also the phone is running a ios almost 2 year's ago i've payed full price for the device.
Posted
by
Post not yet marked as solved
0 Replies
303 Views
Hi All, I like to develop an watch app which capture IMU data (9 axises) in 10Hz and use a ML model check an event occurred. My app should be on/run in background always. ML model also can be put in an iPhone app. I need a suggestion whether I can run app always in watch to capture the IMU data. Thanks
Posted
by
Post not yet marked as solved
0 Replies
312 Views
I am working on an application that monitors driving pattern of users. It intents to give distraction alerts and warnings. I saw SensorKit with a lot of supporting features but it has been stated for research purpose alone. Can I use it if my app is being used for end user notifications and not just for research? Thanks in advance.
Posted
by
Post not yet marked as solved
0 Replies
442 Views
Hi folks! We are developing a WatchOS companion app which records Accelerometer data. We call CMSensorRecorder.recordAccelerometer(forDuration: _) and retrieve the data by calling CMSensorRecorder.accelerometerData(from: _, to: _). So far so good. But the issue arises when we have a data for say 2 hours. We get the accelerometer data in the SwiftUI Task or using GCD's background queue. The data we get is in the loop, enumerating the CMSensorDataList. The loop goes on when the app is active. But as soon as the Watch app goes to inactive state, say applicationWillResignActive is called, the loop is suspended. I know this is the default behaviour of the OS. But this makes our data parsing so slow that sometimes it takes an hour or so to get 2 hours data. This is making our app not user friendly. Is there a way we can keep our app alive as soon as the data is being processed? Or is there another way for faster data processing that we can send the raw data to phone using WCSession so that the data gets there as soon as recording stops? Thanks
Posted
by
Post not yet marked as solved
1 Replies
544 Views
I'm student from Korea. I'm interested in apple things. I have several questions about Apple Watch sensors such as ECG(Electrocardiogram), Heart rate, Oxygen Saturation, breath rate, atrial fibrillation(afib) and so on. First of all, Can I use these sensors all day long? with no limit? I'm planning to develop some healthcare application using Apple Watch with sensors. I can't find examples of using sensors 24/7. And Second, If I can use the sensors all day long, can I execute the app in background? Finally, If I can execute the app in background, can I activate the sensors in background? Thank you for your help. I have tried searching developer guide, and searching the GitHub.
Posted
by
Post not yet marked as solved
0 Replies
484 Views
I've received a latter from a law firm advising me that my app is infringing on their client's BWE patents. Specifically, the app uses the smartphones sensor based technology without a proper licensing agreement. Has anybody every heard that an app has to pay licensing fees to using the technology with a smartphone?
Posted
by
Post not yet marked as solved
4 Replies
1.7k Views
I have just updated my Apple Watch S7 to WatchOS 10 beta, and I am enjoying the new cycling features that allows me to read cadence/ power/ speed directly on iPhone. The bug is, even though the watch is paired with speed sensor, and allows me set up wheel size, but when cycling, apple watch is actually not using the real-time data from my sensor but GPS data. When cycling in tunnel and underground space, there is no speed data. Could any one explain to me how I show set up my watch? or, this is a bug that need to be fixed? Thx!
Posted
by
Post not yet marked as solved
1 Replies
552 Views
Hi, I've been testing out how SensorKit collects data on iOS for a few days now. To this end, I have been trying to see what the ambient light data that has been collecting for a few days looks, and have been trying to decompress the lz4 file that is exported when I export from Research Sensor & Usage Data on my iPhone. I've tried a few methods to decompress lz4 (like lz4 on the terminal) to no avail. What I tried was: lz4 -d filename.lz4 The error is: Error 44 : Unrecognized header : file cannot be decoded When I try to find out more about the file, file filename.lz4 it simply says data. I am wondering how I can view the contents of this lz4 file.
Posted
by
Post not yet marked as solved
1 Replies
1.8k Views
Hello, I would like to built a phone app (or watch app if it is easier) to get raw data of ECG, spO2, accelerometer... Is it possible with all phone and watch models? Any recommandation ? I am looking for updated feedback compared to this one for instance https://academic.oup.com/sleep/article/42/12/zsz180/5549536 Thanks
Posted
by
uge
Post not yet marked as solved
0 Replies
816 Views
Hello, I'm having a problem on my watchOS app where even though I have instantiated a WKExtendedRuntimeSession the app stops logging IMU data a few seconds after the watch has gone to sleep. This happens on my Apple Watch Series 6, but does not happen on the latest Apple Watch Series 8. CPU usage in both cases does not exceed 70%, so I doubt my app is exceeding the limits thus cancelling the WKExtendedRuntimeSession. To back that up, I am not getting the WKExtendedRuntimeSessionInvalidationReason trigger I was suggested to put in place form the documentation. I have tested a couple of different sample rates, this does not seem to happen with a sample rate as low as 1, but does happen already with a sample rate of 30. Could it be a watch limitation, or am I forgetting something? P.S. I have also set the background mode to physical therapy and ticket the workout processing box.
Posted
by
Post not yet marked as solved
0 Replies
569 Views
There is a description on this document https://developer.apple.com/documentation/sensorkit/srfetchrequest ”SensorKit places a 24-hour holding period on newly recorded data before an app can access it. This gives the user an opportunity to delete any data they don’t want to share with the app. A fetch request doesn’t return any results if its time range overlaps this holding period. “ Does that mean I can't get real-time data from the sensors
Posted
by
Post not yet marked as solved
0 Replies
561 Views
As we're starting to analyze data for the SRDeviceUsageReport we've found a small number of duplicates. Out extraction strategy for SensorKit in general is to keep the date of the last sample retrieved and start the next SRFetchRequest at essentially 1 millisecond after that time so we don't get the same sample again and conceivably don't miss anything in between. On 3 participants looking at iPhone data, with about 5000 samples reviewed, we found about 1 % of samples were seen more than once - spanning an extraction cycle. More troublesome we found about 0.5% were ALMOST equivalent, but overlapping. So since these reports come in 15-minute segments, one might be 2022-05-12 12:00:00 - 12:15:00, but the next one might come in at 2022-05-12 11:59:00 - 12:14:00. And sometimes they have totally different data! Curious if anyone else has experienced this or has any advice on how to avoid/make sense of the data in that situation.
Posted
by