我在iPhone和Ipad上有一个应用程序访问的晴雨表,当苹果发布iOS 10时,一些iPad用户报告应用程序停止工作。我在我的iPhone 6s iOS 10上进行了测试,它仍然工作正常。搜索Apple Dev,没有API更改。在应用程序中,我使用以下代码来获取气压计传感器信息:
if([CMAltimeter isRelativeAltitudeAvailable]){ // This return false on iPad
[self.altimeterManager startRelativeAltitudeUpdatesToQueue:[NSOperationQueue mainQueue] withHandler:^(CMAltitudeData *altitudeData, NSError *error) {
if (self.delegate){
[self.delegate updatePressure: altitudeData.pressure.doubleValue*10.0];
}
}];
}发布于 2016-09-22 02:13:03
此问题应在iOS 10.1中修复
根据开发人员发布说明,iOS 10.1包含了运动处理的修复。开发人员将能够访问iPad Air2,iPad mini 4和iPad iPad的气压数据。
https://9to5mac.com/2016/09/21/apple-releases-ios-10-1-and-watchos-3-1-beta-seeds-for-developers/
https://stackoverflow.com/questions/39482278
复制相似问题