iOS8 地图遇到的问题

1 。不走代理方法

IOS8以后,需要在info.plist文件里面加NSLocationWhenInUseDescription或NSLocationAlwaysUsageDescription。后面的描述随便加。IOS以后需要到CLLocationManager得代理- (void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status来判断用户定位的状态。如果状态为kCLAuthorizationStatusNotDetermined,就调用plist里面的相对应的方法(如果你的plist写的是NSLocationWhenInUseDescription就调用[_locationManager requestWhenInUseAuthorization],如果是NSLocationAlwaysUsageDescription就调用[_locationManager requestAlwaysAuthorization])。定位就用- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations就好了。

2真机测试无法进行发出警告

 No provisioned iOS devices are available with a compatible iOS version. Connect an iOS device with a recent enough version of iOS to run your application or choose an iOS simulator as the destination.

showpic.html.jpg

点击你的项目》》TARGETS》》iOS Deployment Target》》修改为低于你设备的版本号。

 

posted @ 2015-04-13 21:56  谢小锋  阅读(180)  评论(0编辑  收藏  举报