mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-04-13 20:43:13 +08:00
CB-10241 - App Crash cause by Camera Plugin ios 7
This commit is contained in:
parent
e1911a3c78
commit
e8fa1695c4
@ -163,9 +163,12 @@ static NSString* toBase64(NSData* data) {
|
||||
if (authStatus == AVAuthorizationStatusDenied ||
|
||||
authStatus == AVAuthorizationStatusRestricted) {
|
||||
// If iOS 8+, offer a link to the Settings app
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-pointer-compare"
|
||||
NSString* settingsButton = (&UIApplicationOpenSettingsURLString != NULL)
|
||||
? NSLocalizedString(@"Settings", nil)
|
||||
: nil;
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
// Denied; show an alert
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
@ -216,8 +219,13 @@ static NSString* toBase64(NSData* data) {
|
||||
{
|
||||
// If Settings button (on iOS 8), open the settings app
|
||||
if (buttonIndex == 1) {
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-pointer-compare"
|
||||
if (&UIApplicationOpenSettingsURLString != NULL) {
|
||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
|
||||
// Dismiss the view
|
||||
[[self.pickerController presentingViewController] dismissViewControllerAnimated:YES completion:nil];
|
||||
|
Loading…
x
Reference in New Issue
Block a user