Issue
I've been testing my Xamarin app on IOS 14 beta 5, and I saw that there is a new privacy feature, where you can control what photos to share with your app. I am using an UIImagePickerController to display the photos, but right now I get all photos(even though I selected only some to be used by my app), and when trying to select one that was not in my selection, the app crashes.(PHImageManager.DefaultManager.RequestImageData return back wiht error code -1 in this case)
My question is, will there be some new features in the next Xamarin iOS framework to support this functionality? Because I've been reading on the IOS developer forum that they are planning to have a new PHAuthorizationStatus-> PHAuthorizationStatusLimited, and maybe based on this status, we could filter our pictures.
Or is there currently a way to filter the photos I present on my UIImagePickerController?
Thanks
Solution
Apparently, in Xamarin.iOS 13.99.0, they introduced the new status: PHAuthorizationStatus.Limited, and also a new type PhotosUI.PHPickerViewController(since UIImagePickerController is obsolete, we will need to use the new PHPicker ).
More details on added or changed types are found here: https://docs.microsoft.com/en-us/xamarin/ios/release-notes/api-changes/ios-13-20-2-13-99-0 If anyone needs to use this version of Xamarin.IOS, they can find it in Visual Studio->"Check For Options"->"Xcode 12 Preview" (Visual Studio 2019 For Mac).
Maybe someone will find this useful.
Answered By - Ana Munte SPB
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.