gpt4 book ai didi

ios - XCode 6.2 - CLAuthorizationStatus.Type 没有名为 'Authorized' 的成员

转载 作者:搜寻专家 更新时间:2023-10-31 22:16:00 24 4
gpt4 key购买 nike

升级到 XCode 6.2 后,我的工作代码突然开始抛出此错误

错误:CLAuthorizationStatus.Type 没有名为“Authorized”的成员

错误就在这一行

CLAuthorizationStatus.Authorized:"应用已获得使用定位服务的授权。",CLAuthorizationStatus.AuthorizedWhenInUse:"您已授权仅当应用对您可见时才使用您的位置。"]

最佳答案

看起来他们在 CLAuthorizationStatus 中用 AuthorizedAlways 替换了 Authorized。参见 here .您还可以命令单击 CLAuthorizationStatus 以查看其定义:

enum CLAuthorizationStatus : Int32 {

// User has not yet made a choice with regards to this application
case NotDetermined

// This application is not authorized to use location services. Due
// to active restrictions on location services, the user cannot change
// this status, and may not have personally denied authorization
case Restricted

// User has explicitly denied authorization for this application, or
// location services are disabled in Settings.
case Denied

// User has granted authorization to use their location at any time,
// including monitoring for regions, visits, or significant location changes.
@availability(iOS, introduced=8.0)
case AuthorizedAlways

// User has granted authorization to use their location only when your app
// is visible to them (it will be made visible to them if you continue to
// receive location updates while in the background). Authorization to use
// launch APIs has not been granted.
@availability(iOS, introduced=8.0)
case AuthorizedWhenInUse
}

关于ios - XCode 6.2 - CLAuthorizationStatus.Type 没有名为 'Authorized' 的成员,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29184417/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com