videokit-ai / natshare

Cross-platform social sharing for Unity Engine.
https://github.com/natmlx/videokit
Apache License 2.0
134 stars 28 forks source link

App not asking for saving permission on iOS #135

Closed Dryra closed 2 years ago

Dryra commented 2 years ago

Hello and thank you for this library! I'm using the new payload-api version 1.3.0, when trying to save on iOS, the await payload.Save() returns a false, with the error

NatShare Error: SavePayload failed to save media because user did not grant authorization

I already added the keys NSPhotoLibraryUsageDescription and NSPhotoLibraryAddUsageDescription to the info.plist of the xcode project.

But the app does not ask for permissions at all when saving.

Unity Version: 2022.1.20f1 iOS Version: 16.1 iPhone 13 Natshare 1.3.0

olokobayusuf commented 2 years ago

Hey there @Dryra , you have to call SavePayload.RequestPermissions first. This was a change we added in 1.3.0. I will update the docs with this info.

Dryra commented 2 years ago

Thank you!