cmaltimeter

CMAltimeter callback never fires

♀尐吖头ヾ 提交于 2019-12-23 22:47:49
问题 Using my 6+ I've been trying to read the relative altitude and pressure using CoreMotion's new CMAltimeter. However the callback is never firing. I have a very similar setup which instead uses the accelerometers, gyros, and magnetometers. They all seem to work fine. Was wondering if anyone out there has managed to get a reading? - (void)viewDidLoad { [super viewDidLoad]; if([CMAltimeter isRelativeAltitudeAvailable]){ CMAltimeter *altimeterManager = [[CMAltimeter alloc]init]; [altimeterManager

Measure iPhone altitude whilst running in background

て烟熏妆下的殇ゞ 提交于 2019-12-12 04:57:44
问题 I am using Swift to write an iPhone App which tracks an aircraft taking off and landing (as indicated by a change in air pressure). For this I need to measure the iPhone's air pressure whilst it is running in the background. I need to measure the pressure at intervals of at least once every minute for a period of an hour or 2. I have read the Apple Developer Background Execution guide, but I don't think any of the background modes are relevant; for example, a finite-length task does not last