ios8之后开启定位服务问题

原创
2017/12/14 11:55
阅读数 83

ios8之后定位服务问题

     manager = [[CLLocationManager alloc] init];
    //使用期间
    [manager requestWhenInUseAuthorization];
    //始终开启定位
    [manager requestAlwaysAuthorization];

如果授权方式为 requestWhenInUseAuthorization,
info.plist中需要添加一个 key : Privacy - Location When In Use Usage Description 
弹框为:
             
如果授权方式为 requestAlwaysAuthorization,
info.plist中需要添加三个 key : Privacy - Location Always Usage Description
                                         Privacy - Location When In Use Usage Description 
                                         Privacy - Location Always and When In Use Usage Description
弹框为:
             

展开阅读全文
加载中
点击引领话题📣 发布并加入讨论🔥
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部