You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 16, 2019. It is now read-only.
@vishaldeshai@philippeauriach
You should check/require permission before using GMImagePicker. The problem will be gone, draft codes below:
PHAuthorizationStatus authStatus = [PHPhotoLibrary authorizationStatus];
if (authStatus == PHAuthorizationStatusAuthorized) {
// Have permission -> Open GMImagePicker
}
else if (authStatus == PHAuthorizationStatusDenied) {
// No permission > Let user knows s/he should grant permission to continue
}
else {
[PHPhotoLibrary requestAuthorization:^(PHAuthorizationStatus status) {
BOOL granted = (status == PHAuthorizationStatusAuthorized);
dispatch_async(dispatch_get_main_queue(), ^{
// If Have permission -> Open GMImagePicker
// Else -> Let user knows s/he should grant permission to continue
});
}];
}
That is indeed what I did, but it is not in my opinion a correct solution for your library : as GMImagePicker handles permission asking, it should also handle the "permission denied" case, because developers would expect that from the lib.
Hello,
I need to ask permission before open GMPicker.
If i denied permission then app crash.
thanks in advance.
The text was updated successfully, but these errors were encountered: