Trying to start MapKit location updates without prompting for location authorization. Must call -[CLLocationManager requestWhenInUseAuthorization] or -[CLLocationManager requestAlwaysAuthorization] first.

 

在Supporting Files下得info.plis里面添加NSLocationAlwaysUsageDescription 和 NSLocationWhenInUseDescription 两个String字段,value可以为空,也可以设置YES,

在AppCan里打包时,添加的是NSLocationWhenInUseUsageDescription这个字段。 

这样就解决了,但是还有说没解决的可能加点下面的:

 

 

 就是info.plist中还需要包含Supported interface orientations 这个Array字段。 

 

posted on 2015-06-04 17:59  韩江河  阅读(189)  评论(0编辑  收藏  举报