Mas*_*zza 11 core-location cllocationmanager ios ios8 ios-app-extension
是否可以访问用户在小部件上的位置?
我使用了新的iOS 8 API
[locationManager requestWhenInUseAuthorization];
Run Code Online (Sandbox Code Playgroud)
我在info.plist文件中添加了密钥
NSLocationWhenInUseDescription
Run Code Online (Sandbox Code Playgroud)
但是,当我请求位置访问时,应该会出现警报,但不会发生.
iOS今天的扩展是否有一些未声明的限制?
除了请求授权之外,您还必须明确要求您的位置经理开始更新位置。
[locationManager requestWhenInUseAuthorization];
[locationManager startUpdatingLocation];
Run Code Online (Sandbox Code Playgroud)