Search code examples
iospermissionsios11

What's difference between NSPhotoLibraryAddUsageDescription and NSPhotoLibraryUsageDescription?


My app get crashed today while updating on Xcode9, testing on iOS11. After adding NSPhotoLibraryAddUsageDescription then it works, even i already had NSPhotoLibraryUsageDescription.

Ive read about them, one supported since iOS6, one iOS11 but Apple didn't mention what's difference between them. https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW73

If i keep the new one (NSPhotoLibraryAddUsageDescription), will it work for iOS 8 also or i have to keep both of them?


Solution

  • To answer the last question on my own:

    You need to declare both NSPhotoLibraryUsageDescription and NSPhotoLibraryAddUsageDescription to get it WORKS on both iOS 9, 10.3 and 11.

    Technically it's different. I used to not declare NSPhotoLibraryUsageDescription, it works fine on iOS 9 and 11 but failed and crashed on iOS 10.3.

    This is a really bad version controlling from Apple while higher version doesn't comply and support older version permission.