cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject ios commit: [CB-1597] Running ./cordova/debug / cordova/emulate causes errors
Date Tue, 23 Oct 2012 20:23:10 GMT
Updated Branches:
  refs/heads/master 977513ecd -> 9e0bb9358


[CB-1597] Running ./cordova/debug / cordova/emulate causes errors


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/9e0bb935
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/9e0bb935
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/9e0bb935

Branch: refs/heads/master
Commit: 9e0bb9358ce5226e740732acd7876a9262569ff6
Parents: 977513e
Author: Shazron Abdullah <shazron@apache.org>
Authored: Tue Oct 23 13:22:51 2012 -0700
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Tue Oct 23 13:22:51 2012 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/CDVCapture.m  |    4 ++++
 CordovaLib/Classes/CDVContacts.m |   12 ++++++++++--
 2 files changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/9e0bb935/CordovaLib/Classes/CDVCapture.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVCapture.m b/CordovaLib/Classes/CDVCapture.m
index 993c81b..07eae1f 100644
--- a/CordovaLib/Classes/CDVCapture.m
+++ b/CordovaLib/Classes/CDVCapture.m
@@ -520,11 +520,13 @@
 
 @implementation CDVAudioNavigationController
 
+#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000
 - (NSUInteger)supportedInterfaceOrientations
 {
     // delegate to CVDAudioRecorderViewController
     return [self.topViewController supportedInterfaceOrientations];
 }
+#endif
 
 @end
 
@@ -682,6 +684,7 @@
     }
 }
 
+#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000
 - (NSUInteger)supportedInterfaceOrientations
 {
     NSUInteger orientation = UIInterfaceOrientationMaskPortrait; // must support portrait
@@ -690,6 +693,7 @@
     orientation = orientation | (supported & UIInterfaceOrientationMaskPortraitUpsideDown);
     return orientation;
 }
+#endif
 
 - (void)viewDidUnload
 {

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/9e0bb935/CordovaLib/Classes/CDVContacts.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVContacts.m b/CordovaLib/Classes/CDVContacts.m
index de79254..e34ecab 100644
--- a/CordovaLib/Classes/CDVContacts.m
+++ b/CordovaLib/Classes/CDVContacts.m
@@ -249,9 +249,13 @@
         // get the info after possible edit
         // if we got this far, user has already approved/ disapproved addressBook access
         ABAddressBookRef addrBook = nil;
+#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000
         if (&ABAddressBookCreateWithOptions != NULL) {
             addrBook = ABAddressBookCreateWithOptions(NULL, NULL);
-        } else {
+        }
+        else
+#endif
+        {
             // iOS 4 & 5
             addrBook = ABAddressBookCreate();
         }
@@ -554,6 +558,7 @@
     // !! caller is responsible for releasing AddressBook!!
     ABAddressBookRef addressBook;
 
+#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000
     if (&ABAddressBookCreateWithOptions != NULL) {
         CFErrorRef error = nil;
         // CFIndex status = ABAddressBookGetAuthorizationStatus();
@@ -572,7 +577,10 @@
                         }
                     });
             });
-    } else {
+    }
+    else
+#endif
+    {
         // iOS 4 or 5 no checks needed
         addressBook = ABAddressBookCreate ();
         workerBlock (addressBook, NULL);


Mime
View raw message