开发者

iOS Location Services - Is there any way to set the authorization status of a location-aware application programmatically?

开发者 https://www.devze.com 2023-03-30 20:38 出处:网络
Just wanted to know, if there is any way in iPhone 3GS (with iOS 4.0) to turn ON/OFF the authorization status of the location-aware application programmatically.

Just wanted to know, if there is any way in iPhone 3GS (with iOS 4.0) to turn ON/OFF the authorization status of the location-aware application programmatically.

+ (CLAuthorizationSta开发者_如何转开发tus)authorizationStatus __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_2);

As we all know, the above class method returns the current authorization status of the calling application in iOS 4.2 and above. I am unable to find any API to be able to set the authorization status of a location-aware app programmatically. Please help.


As has been pointed out to you in the comments, it would be a little crazy - insane, even - if applications could programmatically override user authorization on location. What would be the point of asking a user for their permission to use their current location if the app could just get it without asking?

Apple have made an increasingly bigger deal about permissions and authorization of location information, so this simple isn't possible on the public SDK. Perhaps you could achieve it on jailbroken handsets using private APIs.

0

精彩评论

暂无评论...
验证码 换一张
取 消