You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2015/12/23 02:54:10 UTC

cordova-plugin-camera git commit: CB-10241 - App Crash cause by Camera Plugin ios 7

Repository: cordova-plugin-camera
Updated Branches:
  refs/heads/master e1911a3c7 -> e8fa1695c


CB-10241 - App Crash cause by Camera Plugin ios 7


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/commit/e8fa1695
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/tree/e8fa1695
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/diff/e8fa1695

Branch: refs/heads/master
Commit: e8fa1695c44c6c414859728cdd62606729595a02
Parents: e1911a3
Author: Shazron Abdullah <sh...@apache.org>
Authored: Tue Dec 22 17:54:07 2015 -0800
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Tue Dec 22 17:54:07 2015 -0800

----------------------------------------------------------------------
 src/ios/CDVCamera.m | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/blob/e8fa1695/src/ios/CDVCamera.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVCamera.m b/src/ios/CDVCamera.m
index 57f4924..850f447 100644
--- a/src/ios/CDVCamera.m
+++ b/src/ios/CDVCamera.m
@@ -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,7 +219,12 @@ static NSString* toBase64(NSData* data) {
 {
     // If Settings button (on iOS 8), open the settings app
     if (buttonIndex == 1) {
-        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
+#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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org