-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash in iOS14 if requestAuthorization PHAccessLevel set to .addOnly #94
Comments
Hi, can you provide the crash stack information? |
Logs: 2020-12-14 09:26:29.030164+0800 PickerTest[1738:38344] 💥AssetsManager.fetchDefaultAlbums:714 - Is this case could happen? Please raise an issue if you've met this message. Thread information: #0 0x00007fff2f41fac0 in swift_runtime_on_report () A demo video about crash is here. https://youtu.be/dI-vQ-xMtyk Crash reason is because .addOnly setting will lead two authorization request in iOS 14. If you deny the first but allow the second ,then will crash. To fix it just set .addOnly to .readWrite in file AssetManager.swift. By the way, this crash is not just happens on Simulator. Using simulator to create the demo video just for convenience. |
Thank you for the information, I will try to reproduce and see if I can fix this issue. |
@gezihuzi I encountered the same crash and investigated the issue upon which I also came to same conclusion as suggested by @Hastingou. Kindly update the library with the same changes. |
@gezihuzi Did you get a chance to check and test the suggested change? |
AddOnly is a wrong setting in this framework, change it to readWrite please.
When Photo Setting set to addOnly, this lead to cameraRollAlbum in AssetsManager to nil, then crash
The text was updated successfully, but these errors were encountered: