相关疑难解决方法(0)

位置服务在iOS 8中不起作用

我在iOS 7上运行良好的应用程序无法与iOS 8 SDK一起使用.

CLLocationManager没有返回位置,我也没有在设置 - > 位置服务下看到我的应用程序.我在这个问题上进行了谷歌搜索,但没有出现任何问题.可能有什么不对?

location objective-c cllocationmanager ios8

606
推荐指数
15
解决办法
27万
查看次数

CLLocationManager.authorizationStatus()始终使用swift&objC app确认CLAuthorizationStatus.NotDetermined

我只能让我的CLLocationManager进行授权.(在ios8下迅速)我甚至添加了一个显式的requestAlwaysAuthorization调用(在ios7下我不需要使用objC)

func finishLaunch() {
    //ask for authorization
    let status = CLLocationManager.authorizationStatus()
    if(status == CLAuthorizationStatus.NotDetermined) {
        self.locationManager.requestAlwaysAuthorization();
    }
    else {
        self.startMonitoring()
    }
    ...
}
Run Code Online (Sandbox Code Playgroud)

回调永远不会得到任何东西,但NotDermined并没有向用户显示UIAlertView.

func locationManager(manager: CLLocationManager!, didChangeAuthorizationStatus status: CLAuthorizationStatus) {
    if(status == CLAuthorizationStatus.NotDetermined) {
        println("Auth status unkown still!");
    }
    self.startMonitoring()
}
Run Code Online (Sandbox Code Playgroud)

我做错了吗? - 对我来说感觉像个臭虫,但我想要一些反馈

cllocationmanager swift ios8

21
推荐指数
1
解决办法
3万
查看次数

标签 统计

cllocationmanager ×2

ios8 ×2

location ×1

objective-c ×1

swift ×1