CMSensorRecorder for gyroscope data - ios

iOS lets you specify that accelerometer data should be recorded, and then allows you access to the recordings at a later date:
https://developer.apple.com/documentation/coremotion/cmsensorrecorder
But, is there the equivalent for the gyroscope?

No, but of course you can watch the gyroscope at any time. The reason is that the gyroscope, unlike the core motion sensor, is very battery-heavy and doesn't even run unless some app asks it to.

Related

How to change CBAdvertisementDataLocalNameKey value from objective C?

I have multiple accelerometer sensors and I need to update the advertisementData name (CBAdvertisementDataLocalNameKey) of the each sensors for the first time of starting to use that sensors. What is the best way to update that from iOS (Objective-C or Swift) app?
You cannot control this data from your app as this data arrives directly "as is" from the remote BLE device. In this case, this is the name of the device that you are scanning for. Have a look at this:-
CBAdvertisementDataLocalName Apple Developer page
The Ultimate Guide to Apple's Core Bluetooth
The only way you can actually change this is if you have access to the accelerometer sensors' source code, and then changing the name will be dependent on the specific software running on these sensors.

Apple watch's gyroscope.available always return false

I'm able to get accelerometer data from Apple watch, but I'm unable to get gyroscope and magnetometer data. gyroscope.available always return false. Has anyone found a way around this?
As of watchOS 2, while the core motion API's exist the gyroscope and magnetometer are not available. There is no way around what you are seeing. Developers currently only have access to the accelerometer.

Is it possible to get the current healthkit status of an iOS user?

For instance if I wanted to respond to when a user was walking/running/sedentary/bicycle/etc is that possible in current SDKs?
Lucked upon the answer. In CMMotionActivityManager:
The CMMotionActivityManager class provides access to the motion data stored by a device. Motion data reflects whether the user is walking, running, in a vehicle, or stationary for periods of time. A navigation app might look for changes in the current type of motion and offer different directions for each.

Collecting iPhone GPS data

So I know that there are all these plug-ins for apps that use GPS data, but that is not what I am asking...I wrote a Python library that uses GPS data, and I was wondering if the iPhone stores your GPS data somewhere I can access.
What I want to do:
I essentially want to plug my iPhone into my computer, and generate a CSV of GPS data since I always have location on I figured it might store GPS data somewhere.
I have done research and all that comes up are the different ways to access current locations and use locations in apps, but nothing on how to grab all existing GPS data. Is this possible, and if so, where can I find this data?
iOS itself doesn't store GPS data, actually GPS is disabled by default (as it need a lot of energy, to safe battery life). In fact Developers are advised to use gps only when needed, and when not in use gps hardware get off.
Of course, you could build your own app that could store GPS data when running, also in background, and user will be asked permission to use GPS.
Done this, you could upload/use YOUR app data (not system datas that "probably" don't exist, and if exist are not accessible, anyway)
You can do this only if you upload your own App to iphone which enables GPS and somehow forwards the GPS data.
But you are limited to following GPS attribtes:
time, latitude, longitude, speed, course, altitude, heading (from compass), horicontalAcc. verticalAcc
(Which is sufficient for most applications)

iOS - Assisted GPS

How would I go about figuring the position of someone inside (or outside) of a given area (such as a building) using assisted GPS with IOS app?
Is it possible to have it accurate enough withing a few feet?
Is this the right way to go about it?
Is it possible to utilize more than one wifi connection in the calculation?
Your app can use the Core Location framework to determine the device location. Core Location will use whatever hardware is at its disposal to determine the device location to the degree that you request. For example, some devices have WiFi but no GPS; others have WiFi, GPS, and cellular radios. Future devices may have other location technologies built in.
The point is that as an application programmer, you don't worry about that. Instead, you say: "give me a location that's accurate to 100 meters" or "let me know when the device has moved from the current spot by more than 10 meters" or "give me the location with the best accuracy you can manage."
Again, take a look at Apple's Core Location documentation to get a better idea of how it all works.
If you're looking to track a device with, say, 1-meter resolution inside a building, you're not likely to get that from Core Location. There's been research on triangulating position using known locations of WiFi transceivers, but nothing that's implemented in any commercial smart phone that I know of. I don't believe that iOS gives you easy access to the data you'd need to do this, so it's probably not a possibility. You could, however, go the other way: program several WiFi receivers around the building to listen for any nearby devices, use that information to triangulate the devices' positions, and then make that information available via some web service.

Resources