SensorKit

RSS for tag

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

Posts under SensorKit tag

25 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Battery Consumption
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.
0
0
184
May ’24
collision detecting is not working in my Watch app
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.
1
0
389
Apr ’24
How to invoke an Apple Iphone to take screen shot
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.
0
0
359
Mar ’24
Iphone 13 Pro Max unknown Display
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.
1
0
459
Jan ’24
Getting accelerometer data in the app's inactive state in the WatchOS
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
0
0
501
Dec ’23
Can we use Apple Watch sensors all day long with no limit?
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.
1
0
615
Sep ’23
WatchOS 10 cycling speed sensor data issue
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!
4
1
1.9k
Oct ’23
How to check SensorKit data
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.
1
0
607
Aug ’23
RAW IMU Data stops logging on wrist down
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.
0
0
862
Jun ’23
SensorKit example / How to obtain data
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!
5
0
1.6k
Aug ’23