You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ja...@apache.org on 2013/09/16 22:46:23 UTC

git commit: [CB-4826] Fix XCode 5 capture plugin warnings

Updated Branches:
  refs/heads/dev d93852dd8 -> 81ad45820


[CB-4826] Fix XCode 5 capture plugin warnings

-fix selector warnings


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/commit/81ad4582
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/tree/81ad4582
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/diff/81ad4582

Branch: refs/heads/dev
Commit: 81ad45820696c8b370dffe12d4348763a9dc9e96
Parents: d93852d
Author: James Jong <wj...@gmail.com>
Authored: Mon Sep 16 15:57:47 2013 -0400
Committer: James Jong <wj...@gmail.com>
Committed: Mon Sep 16 15:57:47 2013 -0400

----------------------------------------------------------------------
 src/ios/CDVCapture.m | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/81ad4582/src/ios/CDVCapture.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVCapture.m b/src/ios/CDVCapture.m
index 50bf0e7..564a047 100644
--- a/src/ios/CDVCapture.m
+++ b/src/ios/CDVCapture.m
@@ -88,9 +88,11 @@
 
         self.inUse = YES;
 
-        if ([self.viewController respondsToSelector:@selector(presentViewController:::)]) {
+        SEL selector = NSSelectorFromString(@"presentViewController:animated:completion:");
+        if ([self.viewController respondsToSelector:selector]) {
             [self.viewController presentViewController:navController animated:YES completion:nil];
         } else {
+            // deprecated as of iOS >= 6.0
             [self.viewController presentModalViewController:navController animated:YES];
         }
     }
@@ -139,9 +141,11 @@
         // CDVImagePicker specific property
         pickerController.callbackId = callbackId;
 
-        if ([self.viewController respondsToSelector:@selector(presentViewController:::)]) {
+        SEL selector = NSSelectorFromString(@"presentViewController:animated:completion:");
+        if ([self.viewController respondsToSelector:selector]) {
             [self.viewController presentViewController:pickerController animated:YES completion:nil];
         } else {
+            // deprecated as of iOS >= 6.0
             [self.viewController presentModalViewController:pickerController animated:YES];
         }
     }
@@ -255,9 +259,11 @@
         // CDVImagePicker specific property
         pickerController.callbackId = callbackId;
 
-        if ([self.viewController respondsToSelector:@selector(presentViewController:::)]) {
+        SEL selector = NSSelectorFromString(@"presentViewController:animated:completion:");
+        if ([self.viewController respondsToSelector:selector]) {
             [self.viewController presentViewController:pickerController animated:YES completion:nil];
         } else {
+            // deprecated as of iOS >= 6.0
             [self.viewController presentModalViewController:pickerController animated:YES];
         }
     }