Moved comment
Post
Replies
Boosts
Views
Activity
Found a workaround but my post is being reviewed.
let recorder = CMSensorRecorder()
recorder.recordAccelerometer(forDuration: 0.1)
Requests permission and gets it working.
Found a workaround. Apparently the issue is that as of 17.4, CMLAltimeter startRelateiveAltitudeUpdates not needs "Motion & Fitness" permission. However, normally in iOS just using a service requiring the permission will initiate the permission prompt by iOS to the user. The trick it to force requesting permission.
let recorder = CMSensorRecorder()
recorder.recordAccelerometer(forDuration: 0.1)
will prompt the user for permission. Once granted, relative altitude data works.
Found a workaround.
Apparently the issue is that as of 17.4, CMLAltimeter startRelateiveAltitudeUpdates not needs "Motion & Fitness" permission. However, normally in iOS just using a service requiring the permission will initiate the permission prompt by iOS to the user.
The trick it to force requesting permission.
let recorder = CMSensorRecorder()
recorder.recordAccelerometer(forDuration: 0.1)
will prompt the user for permission.
Once granted, relative altitude data works.
On Xcode 13.1 tried the above scripts. It didn't stop Spotlight when running SwiftUI in a Playground.