简体   繁体   中英

ALAssetsLibrary and Location Services in iOS 6

I'm in the process of upgrading one of my apps to support iOS6 and iPhone5 . In the previous version, I had to prompt the user to enable Location Services in order to display photos using the ALAssetsLibrary . I've noticed that in iOS 6, I can disable location services and it still displays all images correctly. Is this something that has changed in iOS6 . The documentation states that you still need Location Services enabled but the documentation also states that it's for iOS4 and above. I can't find any mention regarding iOS6 specifically.

The change is (more or less) documented in the iOS SDK Release Notes for iOS 6 :

In iOS 6, there are improved privacy controls for Calendar, Reminders, Contacts, and Photos. Users will see access dialogs when an app tries to access any of those data types. The user can switch access on and off in Settings > Privacy.

Also, the ALAssetsLibrary has a new method authorizationStatus , which is available since iOS 6.

In iOS 5, there was no privacy setting for Photos, and the user had to allow access to Location Services because a photo might contain location data. This was (I think) annoying and confusing, and I am glad that it is fixed in iOS 6.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM