Post

Replies

Boosts

Views

Activity

Comment on iOS 17.4 (21E217) CMAltimeter not working
Suggest you check [CMMotionActivityManager isActivityAvailable] before invoking this approach, and gracefully handle any exclusions (such as tell the user "barometer data is not available" and do not attempt to query activity). This will avoid problems on the subset of device/OS combinations that do not support Activity features. In addition, be aware that the use of NSDate "now" is fairly new, so if you support deployment prior to iOS 13 you should use [NSDate date] instead.
Mar ’24