Apache Cordova
  1. Apache Cordova
  2. CB-1360

Conditionally add architectures based on iOS version in CordovaLib

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2.0
    • Component/s: iOS
    • Labels:

      Description

      Once Xcode 4.5 (thus iOS 6 release) goes GM, armv6 support is removed. Conditionally add architectures based on iOS version in CordovaLib.xcodeproj

      armv6 devices: original iPhone, iPhone 3G, iPod Touch 1st Gen, iPod Touch 2nd Gen.

      This is in anticipation of the Sept 12 release of the new iPhone, thus iOS 6.

        Issue Links

          Activity

          Show
          Shazron Abdullah added a comment - Fix commit - http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/07b54f14
          Hide
          Shazron Abdullah added a comment - - edited

          Fix:
          Find the "ARCHS" setting in your CordovaLib's CordovaLib.xcodeproj/project.pbxproj (Show Package Contents -> open in text editor) and replace with:

          "ARCHS[sdk=iphoneos*]" = "armv6 armv7";
          "ARCHS[sdk=iphoneos6.*]" = "armv7 armv7s";
          "ARCHS[sdk=iphonesimulator*]" = i386;
          

          Also, add "armv7s" as the VALID_ARCHS Build Setting.

          The project itself does NOT need to add any of these settings.

          Show
          Shazron Abdullah added a comment - - edited Fix: Find the "ARCHS" setting in your CordovaLib's CordovaLib.xcodeproj/project.pbxproj (Show Package Contents -> open in text editor) and replace with: "ARCHS[sdk=iphoneos*]" = "armv6 armv7" ; "ARCHS[sdk=iphoneos6.*]" = "armv7 armv7s" ; "ARCHS[sdk=iphonesimulator*]" = i386; Also, add "armv7s" as the VALID_ARCHS Build Setting. The project itself does NOT need to add any of these settings.
          Hide
          Shazron Abdullah added a comment -

          Never mind - I had to put quotes around the keys, and its fine now.

          Show
          Shazron Abdullah added a comment - Never mind - I had to put quotes around the keys, and its fine now.
          Hide
          Shazron Abdullah added a comment -

          Andrew, I put those 3 settings in the .pbxproj - Xcode reports a project file parse error. How did you find the documentation to add these settings?

          Show
          Shazron Abdullah added a comment - Andrew, I put those 3 settings in the .pbxproj - Xcode reports a project file parse error. How did you find the documentation to add these settings?
          Hide
          Shazron Abdullah added a comment -
          Show
          Shazron Abdullah added a comment - Good advice regarding arm7s - http://wanderingcoder.net/2012/09/16/no-armv7s-til-tested/
          Hide
          Shazron Abdullah added a comment -

          Per Andrew's findings - conditionally add armv6 for iOS < 6, and add armv7s for iOS >= 6.

          Show
          Shazron Abdullah added a comment - Per Andrew's findings - conditionally add armv6 for iOS < 6, and add armv7s for iOS >= 6.
          Hide
          Shazron Abdullah added a comment -

          @Greg You'll have to modify the .pbxproj (located inside the .xcodeproj) manually, or add these overrides in CordovaBuildSettings.xcconfig

          Show
          Shazron Abdullah added a comment - @Greg You'll have to modify the .pbxproj (located inside the .xcodeproj) manually, or add these overrides in CordovaBuildSettings.xcconfig
          Hide
          Greg added a comment -

          Any guides on how to do this - or what to change?

          Show
          Greg added a comment - Any guides on how to do this - or what to change?
          Hide
          Shazron Abdullah added a comment -

          Nice catch! Definitely we should use these settings for the default project template.

          Show
          Shazron Abdullah added a comment - Nice catch! Definitely we should use these settings for the default project template.
          Hide
          Andrew Grieve added a comment -

          Instead of bumping the minimum support, we could use these settings:

          ARCHS[sdk=iphoneos*] = armv6 armv7
          ARCHS[sdk=iphoneos6.*] = armv7
          ARCHS[sdk=iphonesimulator*] = i386

          I couldn't figure out how to use the UI to set this though, so probably it'd need to be put in an xcconfig file or put in the pbxproj file through a text editor.

          Show
          Andrew Grieve added a comment - Instead of bumping the minimum support, we could use these settings: ARCHS [sdk=iphoneos*] = armv6 armv7 ARCHS [sdk=iphoneos6.*] = armv7 ARCHS [sdk=iphonesimulator*] = i386 I couldn't figure out how to use the UI to set this though, so probably it'd need to be put in an xcconfig file or put in the pbxproj file through a text editor.
          Hide
          Shazron Abdullah added a comment -

          Bumped to critical if not everyone will encounter this on first build on Xcode 4.5/iOS 6 - slated to be released on Sept 12 2012 (most likely)

          Show
          Shazron Abdullah added a comment - Bumped to critical if not everyone will encounter this on first build on Xcode 4.5/iOS 6 - slated to be released on Sept 12 2012 (most likely)

            People

            • Assignee:
              Shazron Abdullah
              Reporter:
              Shazron Abdullah
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development