diff --git a/Classes/ImagePickerView.m b/Classes/ImagePickerView.m
index cacd57211..584f4088a 100644
--- a/Classes/ImagePickerView.m
+++ b/Classes/ImagePickerView.m
@@ -229,8 +229,12 @@ static UICompositeViewDescription *compositeDescription = nil;
[sheet addButtonWithTitle:NSLocalizedString(@"Camera", nil)
block:^() {
if([AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo] == AVAuthorizationStatusAuthorized ){
- block(UIImagePickerControllerSourceTypeCamera);
- }else{
+ if([PHPhotoLibrary authorizationStatus] != PHAuthorizationStatusDenied ){
+ block(UIImagePickerControllerSourceTypeCamera);
+ }else{
+ [[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Photo's permission", nil) message:NSLocalizedString(@"Photo not authorized", nil) delegate:nil cancelButtonTitle:nil otherButtonTitles:@"Continue", nil] show];
+ }
+ }else {
[[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Camera's permission", nil) message:NSLocalizedString(@"Camera not authorized", nil) delegate:nil cancelButtonTitle:nil otherButtonTitles:@"Continue", nil] show];
}
}];
@@ -238,10 +242,10 @@ static UICompositeViewDescription *compositeDescription = nil;
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) {
[sheet addButtonWithTitle:NSLocalizedString(@"Photo library", nil)
block:^() {
- if([PHPhotoLibrary authorizationStatus] == PHAuthorizationStatusAuthorized ){
+ if([PHPhotoLibrary authorizationStatus] != PHAuthorizationStatusDenied ){
block(UIImagePickerControllerSourceTypePhotoLibrary);
}else{
- [[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Camera's permission", nil) message:NSLocalizedString(@"Camera not authorized", nil) delegate:nil cancelButtonTitle:nil otherButtonTitles:@"Continue", nil] show];
+ [[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Photo's permission", nil) message:NSLocalizedString(@"Photo not authorized", nil) delegate:nil cancelButtonTitle:nil otherButtonTitles:@"Continue", nil] show];
}
}];
}
diff --git a/linphone-Info.plist b/linphone-Info.plist
index 53b0d6bde..67db86bf4 100644
--- a/linphone-Info.plist
+++ b/linphone-Info.plist
@@ -53,7 +53,7 @@
CFBundleVersion
- 9
+ 10
ITSAppUsesNonExemptEncryption
ITSEncryptionExportComplianceCode
@@ -68,6 +68,8 @@
Make calls with your friends
NSMicrophoneUsageDescription
Use microphone to make audio calls
+ NSPhotoLibraryAddUsageDescription
+ Add photo you shoot by yourself
NSPhotoLibraryUsageDescription
Share photos with your friends and customize avatars
NSVoIPUsageDescription