ios8中MapKit问题

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字段。 

原文地址:https://www.cnblogs.com/hanyutong/p/4552562.html