What's difference between NSPhotoLibraryAddUsageDescription and NSPhotoLibraryUsageDescription?

前端 未结 5 1351
情深已故
情深已故 2020-12-18 18:17

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

5条回答
  •  爱一瞬间的悲伤
    2020-12-18 18:52

    As I can see in the document, the difference between two is:

    • NSPhotoLibraryAddUsageDescription: You have permission to write only, no read.

    • NSPhotoLibraryUsageDescription: You can both read and write to Photos.

    From Apple documentations for NSPhotoLibraryUsageDescription:

    "Although this keys governs read and write access to the user’s photo library, it’s best to use NSPhotoLibraryAddUsageDescription if your app needs only to add assets to the library and does not need to read any assets."

提交回复
热议问题