wordpress-mobile / MediaPicker-iOS

WPMediaPicker is an iOS controller that allows capture and picking of media assets.
GNU General Public License v2.0
110 stars 37 forks source link

PHPhotoLibrary: Register change observer after asking for permission #376

Closed selanthiraiyan closed 2 years ago

selanthiraiyan commented 2 years ago

Fixes #375

Description

As proposed in https://developer.apple.com/forums/thread/696804 this PR register's PHPhotoLibrary change observer after asking for permission from the user.

Steps to test

Note: I have only tested the above points in a simulator and it would be great if you can test this in a device.

SergioEstevao commented 2 years ago

@jkmassel I've tested this fix and it solves a critical crash on WPMediaPicker for iOS version 15.2

After this PR is merged we should create a new version of the pod and update all the projects that use this pod.

From what I see the issue identified only happens when the apps are installed for the first and it request permissions to access the device Media library. So this may not affect existing users, but can/will affect new users of the apps.