AFathi / ARVideoKit

Capture & record ARKit videos 📹, photos 🌄, Live Photos 🎇, and GIFs 🎆.
Apache License 2.0
1.62k stars 226 forks source link

Why does the library need NSPhotoLibraryAddUsageDescription and NSPhotoLibraryUsageDescription? #103

Closed JorgeFrias closed 4 years ago

JorgeFrias commented 4 years ago

I cannot understand why are needed both NSPhotoLibraryAddUsageDescription and NSPhotoLibraryUsageDescription?

I think should only need NSPhotoLibraryAddUsageDescription because does not read anything from the library.

Am I wrong?

Thank you.

digitallysavvy commented 4 years ago

@JorgeFrias this may help explain:

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.

https://stackoverflow.com/a/51888019

AFathi commented 4 years ago

Thanks @digitallysavvy for finding this. I believe your answer explains why I recommended to have both permissions in the Info.plist file. So I'll close this issue for now.

JorgeFrias commented 4 years ago

@JorgeFrias this may help explain:

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.

https://stackoverflow.com/a/51888019

Thank you!