diff --git a/Classes/ImagePickerView.m b/Classes/ImagePickerView.m index 7f8fa79e8..5d9398a02 100644 --- a/Classes/ImagePickerView.m +++ b/Classes/ImagePickerView.m @@ -18,7 +18,8 @@ */ #import - +#import +#import #import "ImagePickerView.h" #import "PhoneMainView.h" @@ -226,7 +227,11 @@ static UICompositeViewDescription *compositeDescription = nil; if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { [sheet addButtonWithTitle:NSLocalizedString(@"Camera", nil) block:^() { - block(UIImagePickerControllerSourceTypeCamera); + if([AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo] == AVAuthorizationStatusAuthorized ){ + block(UIImagePickerControllerSourceTypeCamera); + }else{ + [[[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Camera's permission", nil) message:NSLocalizedString(@"Camera not authorized", nil) delegate:nil cancelButtonTitle:nil otherButtonTitles:@"Continue", nil] show]; + } }]; } if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) { diff --git a/Resources/ar.lproj/Localizable.strings b/Resources/ar.lproj/Localizable.strings index 1296a9a45..d40b2d252 100644 Binary files a/Resources/ar.lproj/Localizable.strings and b/Resources/ar.lproj/Localizable.strings differ diff --git a/Resources/de.lproj/Localizable.strings b/Resources/de.lproj/Localizable.strings index defa01e49..cd6160add 100644 Binary files a/Resources/de.lproj/Localizable.strings and b/Resources/de.lproj/Localizable.strings differ diff --git a/Resources/en.lproj/Localizable.strings b/Resources/en.lproj/Localizable.strings index 2154467a9..2003a2866 100644 Binary files a/Resources/en.lproj/Localizable.strings and b/Resources/en.lproj/Localizable.strings differ diff --git a/Resources/fr.lproj/Localizable.strings b/Resources/fr.lproj/Localizable.strings index 6e4d4297b..c60bc99ce 100644 Binary files a/Resources/fr.lproj/Localizable.strings and b/Resources/fr.lproj/Localizable.strings differ diff --git a/Resources/ja.lproj/Localizable.strings b/Resources/ja.lproj/Localizable.strings index e13263e19..82c5ffced 100644 Binary files a/Resources/ja.lproj/Localizable.strings and b/Resources/ja.lproj/Localizable.strings differ diff --git a/Resources/nl.lproj/Localizable.strings b/Resources/nl.lproj/Localizable.strings index ac90746ac..5a7f11a34 100644 Binary files a/Resources/nl.lproj/Localizable.strings and b/Resources/nl.lproj/Localizable.strings differ diff --git a/Resources/ru.lproj/Localizable.strings b/Resources/ru.lproj/Localizable.strings index f43c8000c..54fd7c84a 100644 Binary files a/Resources/ru.lproj/Localizable.strings and b/Resources/ru.lproj/Localizable.strings differ diff --git a/Resources/zh_TW.lproj/Localizable.strings b/Resources/zh_TW.lproj/Localizable.strings index 83afe2287..d7bcef89c 100644 Binary files a/Resources/zh_TW.lproj/Localizable.strings and b/Resources/zh_TW.lproj/Localizable.strings differ