forked from mirrors/linphone-iphone
request Photo authorization earlier to avoid crash
This commit is contained in:
parent
f2b1e7bc29
commit
bb85becf49
1 changed files with 10 additions and 0 deletions
|
|
@ -281,6 +281,16 @@
|
|||
}
|
||||
}
|
||||
|
||||
if ([PHPhotoLibrary authorizationStatus] != PHAuthorizationStatusAuthorized) {
|
||||
[PHPhotoLibrary requestAuthorization:^(PHAuthorizationStatus status) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
if ([PHPhotoLibrary authorizationStatus] != PHAuthorizationStatusAuthorized) {
|
||||
[[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Photo's permission", nil) message:NSLocalizedString(@"Photo not authorized", nil) delegate:nil cancelButtonTitle:nil otherButtonTitles:@"Continue", nil] show];
|
||||
}
|
||||
});
|
||||
}];
|
||||
}
|
||||
|
||||
BOOL background_mode = [instance lpConfigBoolForKey:@"backgroundmode_preference"];
|
||||
BOOL start_at_boot = [instance lpConfigBoolForKey:@"start_at_boot_preference"];
|
||||
[self registerForNotifications]; // Register for notifications must be done ASAP to give a chance for first SIP register to be done with right token. Specially true in case of remote provisionning or re-install with new type of signing certificate, like debug to release.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue