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
5 Replies
5.0k Views
Hi, My middle schooler is working on a project for National Science Fair competition to estimate blood pressure from ppg signals. While he is using external database to develop his algorithm, it would be very useful to test it with real time data. I have a Series 6 watch and wondering how I can access my ppg sensor raw data.
Posted
by
Post not yet marked as solved
2 Replies
2.3k Views
Hi, We are a group of PhD student working on developing a health related app using SensorKit and AppleHealth Kit. We submited our research propsal on Feb 16 and have not heard back from apple support. We wonder that how long would be the processing time? Thanks,
Posted
by
Post marked as solved
2 Replies
2.3k Views
Hello, after the apple event I was stoked to find out I could take my Apple Watch diving with me, but I wanted to go a step further. I am attempting to build a companion dive app to my SUUNTO Eon Core as a backup. The only issue is when I try to find where to get a depth reading from the new Apple Watch Ultra sensor, I can't find any documentation. I've been digging around in sensor kit and nothing has caught my eye. Does anyone have any idea where the documentation for it would be? Any help is appreciated. Thanks!
Posted
by
Post not yet marked as solved
4 Replies
2.1k Views
Hi, I am trying to find out the GPS/Location update rate that the iPhone14 can accomplish. Most GPS update rates are 1hz (1 location update per second). I am hoping that the newest iPhones can provide a faster update rate. Also I would like to know the accuracy of the GPS. It is 100meter, 50meter, 10meter, 3meter? Where could I find this information? Thanks, Adam
Posted
by
Post not yet marked as solved
3 Replies
804 Views
Is it possible to get the height (Z location) of an iOS device based on sensor data? I've continuously added the accelerometer data up to infer the location but it results in a cascading error, and the inferred location of the phone "drifts" when the phone is placed still. I want to build an app where users measure the height of something by first zeroing the phone on the floor and then raising the phone to the height of the object, like placing it on the table.
Posted
by
Post not yet marked as solved
5 Replies
1.5k Views
Hi, We are a research team that is just beginning to use SensorKit to collect data for our research. Currently, We've gotten far enough through the process of setting up and using sensorKit to be able to start collecting data through the OS and we've created an SRFetchRequest, but we're just unsure of how to actually go about retrieving the data in a usable form and being able to write it to a file or upload it to a server. We're specifically lost when it comes to SRFetchResult and what to do with that. If anyone was able to provide an example from their own code/somewhere we can find an example, or anything that might help, that would be greatly appreciated. Thank you!
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
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
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
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
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
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
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
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
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
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
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