You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2013/09/27 00:24:20 UTC
[09/20] git commit: [CB-4823] Fix XCode 5 camera plugin warnings
[CB-4823] Fix XCode 5 camera plugin warnings
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/9bcf725e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/tree/9bcf725e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/diff/9bcf725e
Branch: refs/heads/master
Commit: 9bcf725e393e76502253f01b28399c1fa6bd6b5c
Parents: 224e7cf
Author: James Jong <wj...@gmail.com>
Authored: Mon Sep 16 15:13:35 2013 -0400
Committer: James Jong <wj...@gmail.com>
Committed: Mon Sep 16 15:13:35 2013 -0400
----------------------------------------------------------------------
src/ios/CDVCamera.m | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/blob/9bcf725e/src/ios/CDVCamera.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVCamera.m b/src/ios/CDVCamera.m
index e0f195f..19f8148 100644
--- a/src/ios/CDVCamera.m
+++ b/src/ios/CDVCamera.m
@@ -150,9 +150,11 @@ static NSSet* org_apache_cordova_validArrowDirections;
NSDictionary* options = [command.arguments objectAtIndex:10 withDefault:nil];
[self displayPopover:options];
} else {
- if ([self.viewController respondsToSelector:@selector(presentViewController:::)]) {
+ SEL selector = NSSelectorFromString(@"presentViewController:animated:completion:");
+ if ([self.viewController respondsToSelector:selector]) {
[self.viewController presentViewController:cameraPicker animated:YES completion:nil];
} else {
+ // deprecated as of iOS >= 6.0
[self.viewController presentModalViewController:cameraPicker animated:YES];
}
}