在iOS 8上本地化用户 [英] Localizing the user on iOS 8

查看:105
本文介绍了在iOS 8上本地化用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hullo,
我开始将我的应用程序移植到iOS 8,我很快就陷入了CLLocationManager的问题。基本上应用程序不再将地图集中在用户的位置上,而是提出错误:

Hullo, I am starting to port my apps to iOS 8 and I soon bounced into a problem with CLLocationManager. Basically the app no longer centers the map on the user's location and instead proposed error:


尝试启动MapKit位置更新而不提示位置授权。必须先调用 - [CLLocationManager requestWhenInUseAuthorization]或 - [CLLocationManager requestAlwaysAuthorization]。

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

执行

 [CLLocationManager requestAlwaysAuthorization]

什么都不做,甚至没有在应用程序的Info.plist中插入
NSLocationAlwaysUsageDescription 键几乎没有任何变化。
实际上,操作的唯一明显效果是首选项中的位置设置,在运行应用程序时,其值已从我输入的值重置。

does nothing and even inserting the NSLocationAlwaysUsageDescription key in the app’s Info.plist changes nearly nothing. In fact the only apparent effect of the operation is the location setting in the preferences that, upon running the app, has its value reset from the value I had entered.

推荐答案

我遇到了同样的问题。我编辑了XXX 测试 -Info.plist文件而不是XXXInfo.plist文件。现在我开始工作,头上的头发少了。

I was having the same problem. I had edited the XXXTest-Info.plist file instead of XXXInfo.plist file. Now I got it working, with little less hair on my head.

这篇关于在iOS 8上本地化用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆