iOS 9 地图定位崩溃 n: 'Invalid parameter not satisfying: !stayUp || CLClientIsBackgroundable(internal->fClient)'

报错详情:

*** Assertion failure in -[CLLocationManager setAllowsBackgroundLocationUpdates:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreLocationFramework_Sim/CoreLocation-1861.0.15/Framework/CoreLocation/CLLocationManager.m:604
2015-11-29 16:31:01.270 测量两点间距离[1481:120483] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: !stayUp || CLClientIsBackgroundable(internal->fClient)'

解决办法:

在XML代码中添加如何代码即可

<key>UIBackgroundModes</key>
   <array>
       <string>location</string>
   </array>
posted @ 2015-11-29 16:34  J_mailbox  阅读(3087)  评论(1编辑  收藏  举报