LensMediaPickerProvider bug
Hi!
Context:
- I'm using the latest version as of today which is 1.36.1.
- iOS 18.1.1 on an iPhone 16 Pro.
I'm implementing a custom LensMediaPickerProvider for a Background Image lens.
My provider is pretty much dummy since I'm actually using a PHPickerViewController so the user can pick an image from the native camera roll implementation. The way I'm doing this is on the mediaPickerProviderRequestedUIPresentation method I create the view controller and present it. This works perfect. However, I'm experiencing some odd behaviours.
Things I'm experiencing:
-
After applying the lens,
mediaPickerProviderRequestedUIDismissalfrom theLensMediaPickerProviderUIDelegateis called first and thenmediaPickerProviderRequestedUIPresentation. Why is the requested dismissal method called when applying the lens? Shouldn't it only call the request for presentation? -
After canceling the native PHPickerViewController and dismissing it. Trying to apply the lens again succeeds but
mediaPickerProviderRequestedUIPresentationis never called again so I can't show the picker a consecutive time. -
Applying another lens which has nothing to do with a media picker is calling
mediaPickerProviderRequestedUIDismissalon the provider UI delegate. Is this intended? -
Only after this other lens is applied and
mediaPickerProviderRequestedUIDismissalis called, thenmediaPickerProviderRequestedUIPresentationis called again and it goes back to working (I can show thePHPickerViewController).
Sorry if it doesn't qualify as an issue, there's no much documentation on custom providers. The only thing I found was the MediaPickerView implementation which gave me a hint on how I could make this work.
Thanks!
Solved my issue, sorry for the miss report