Details

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

      Description

      cordova 3.4.0-0.1.3
      Xcode Version 5.1 (5B130a)
      IOS 7.1

      After updating command line tools, Xcode and my phone's IOS to 7.1, I can no longer build a project even when creating from scratch.

      I get about 12 errors, some related to plugins:

      ...
      ld: warning: ignoring file /Users/me/Library/Developer/Xcode/DerivedData/project/Build/Products/Debug-iphoneos/libCordova.a, missing required architecture arm64 in file /Users/me/Library/Developer/Xcode/DerivedData/project/Build/Products/Debug-iphoneos/libCordova.a (2 slices)
      Undefined symbols for architecture arm64:
        "_OBJC_CLASS_$_CDVPlugin", referenced from:
      ...
      

      Lot's of Apple Mach-O Linker errors.

      Also see: http://stackoverflow.com/questions/22334680/xcode-5-1-libcordova-a-architecture-problems

      1. conditional_architectures.png
        86 kB
        Shazron Abdullah
      2. 3.5.0_CordovaLib_BuildSettings.png
        135 kB
        Shazron Abdullah

        Issue Links

          Activity

          Hide
          Shazron Abdullah added a comment -

          Fixed in 3.4.1 and 3.5.0

          Show
          Shazron Abdullah added a comment - Fixed in 3.4.1 and 3.5.0
          Hide
          Shazron Abdullah added a comment -

          Alex Lopez see screenshot images attached to this issue - I've already referenced them in my comments.

          In any case, I've posted a blog post regarding all these steps: http://shazronatadobe.wordpress.com/2014/03/12/xcode-5-1-and-cordova-ios/

          Show
          Shazron Abdullah added a comment - Alex Lopez see screenshot images attached to this issue - I've already referenced them in my comments. In any case, I've posted a blog post regarding all these steps: http://shazronatadobe.wordpress.com/2014/03/12/xcode-5-1-and-cordova-ios/
          Hide
          Alex Lopez added a comment - - edited

          Shazron Abdullah I have just downgraded to Xcode 5.0.2, and builded my app on and iPhone 5 and iPad 2 both with OS 7.1 and worked fine, also just Archived my app and sent to iTunes Connect with no problems, so this is an option for me.

          I also could not find "conditional architecture settings" as it is not clear to me where this is so I could not try your fix

          Show
          Alex Lopez added a comment - - edited Shazron Abdullah I have just downgraded to Xcode 5.0.2, and builded my app on and iPhone 5 and iPad 2 both with OS 7.1 and worked fine, also just Archived my app and sent to iTunes Connect with no problems, so this is an option for me. I also could not find "conditional architecture settings" as it is not clear to me where this is so I could not try your fix
          Hide
          Blair Vanderhoof added a comment -

          I've confirmed that Shazron's instructions work for me and my app is running on a device with IOS 7.1 built with Xcode 5.1. You need to make sure you delete all of those options under Architectures as he mentions for both your project and CordovaLib on both Project and Target sections. Make sure to add the arm64 to valid architectures on all of those as well. Finally, you need to make those code changes to the two files after you run cordova build and before you open xcode. Just make sure the files aren't being overwritten on project creation.

          Show
          Blair Vanderhoof added a comment - I've confirmed that Shazron's instructions work for me and my app is running on a device with IOS 7.1 built with Xcode 5.1. You need to make sure you delete all of those options under Architectures as he mentions for both your project and CordovaLib on both Project and Target sections. Make sure to add the arm64 to valid architectures on all of those as well. Finally, you need to make those code changes to the two files after you run cordova build and before you open xcode. Just make sure the files aren't being overwritten on project creation.
          Hide
          Shazron Abdullah added a comment -

          Sebastian Moreno it does work, it has been tested. do a clean or something
          Alex Lopez it's not an option if your device has been upgraded to iOS 7.1, you will need Xcode 5.1

          Show
          Shazron Abdullah added a comment - Sebastian Moreno it does work, it has been tested. do a clean or something Alex Lopez it's not an option if your device has been upgraded to iOS 7.1, you will need Xcode 5.1
          Hide
          Alex Lopez added a comment -

          An alternative while this is released could be downgrading to Xcode 5.0.2 here https://developer.apple.com/downloads/index.action and don't upgrade

          Show
          Alex Lopez added a comment - An alternative while this is released could be downgrading to Xcode 5.0.2 here https://developer.apple.com/downloads/index.action and don't upgrade
          Hide
          Sebastian Moreno added a comment -

          I used the steps but I now get a blank screen as well, just white overall. I also patched the files without improvement

          Show
          Sebastian Moreno added a comment - I used the steps but I now get a blank screen as well, just white overall. I also patched the files without improvement
          Hide
          Shazron Abdullah added a comment -

          Image attached - actually the 3.5.0 Build Settings are different, mainly for legacy purposes (enterprise users that may need to build with the iOS 6 SDK, who knows). The steps in here are still valid, but if you want to be congruent with 3.5.0, see the screenshot.

          Show
          Shazron Abdullah added a comment - Image attached - actually the 3.5.0 Build Settings are different, mainly for legacy purposes (enterprise users that may need to build with the iOS 6 SDK, who knows). The steps in here are still valid, but if you want to be congruent with 3.5.0, see the screenshot.
          Hide
          Blair Vanderhoof added a comment -

          Thanks for the help. Hope we can get an official 3.5 release soon.

          Show
          Blair Vanderhoof added a comment - Thanks for the help. Hope we can get an official 3.5 release soon.
          Hide
          Shazron Abdullah added a comment -

          No, we don't have it on npm yet. From CB-6150 you can just patch/overwrite two files in your 3.4.0 CordovaLib.xcodeproj files:
          https://git-wip-us.apache.org/repos/asf?p=cordova-ios.git;h=82ce4f2

          Show
          Shazron Abdullah added a comment - No, we don't have it on npm yet. From CB-6150 you can just patch/overwrite two files in your 3.4.0 CordovaLib.xcodeproj files: https://git-wip-us.apache.org/repos/asf?p=cordova-ios.git;h=82ce4f2
          Hide
          Blair Vanderhoof added a comment -

          Thanks, how can I use 3.5? Is this something I can install via npm?

          Show
          Blair Vanderhoof added a comment - Thanks, how can I use 3.5? Is this something I can install via npm?
          Hide
          Shazron Abdullah added a comment -

          Not really, just the core. It actually has been fixed for 3.5.0:
          https://issues.apache.org/jira/browse/CB-6150

          Show
          Shazron Abdullah added a comment - Not really, just the core. It actually has been fixed for 3.5.0: https://issues.apache.org/jira/browse/CB-6150
          Hide
          Blair Vanderhoof added a comment -

          Ok, it successfully runs on my device, however I get a blank screen then an exception in Xcode:

          @implementation CDVDevice
          
          - (void)getDeviceInfo:(CDVInvokedUrlCommand*)command
          {
          
          

          EXC_BAD_ACCESS

          Seems like all the plugins need fixing?

          Show
          Blair Vanderhoof added a comment - Ok, it successfully runs on my device, however I get a blank screen then an exception in Xcode: @implementation CDVDevice - (void)getDeviceInfo:(CDVInvokedUrlCommand*)command { EXC_BAD_ACCESS Seems like all the plugins need fixing?
          Hide
          Jamie Perkins added a comment -

          Blair Vanderhoof he means the keys under Debug and under Release - if you hover them you'll see a minus sign. Or you can press delete.

          Show
          Jamie Perkins added a comment - Blair Vanderhoof he means the keys under Debug and under Release - if you hover them you'll see a minus sign. Or you can press delete.
          Hide
          Shazron Abdullah added a comment -

          There is no "Conditional architectures" setting – it's all those conditional settings under Architecture that are specific to iphoneos6, Any iOS SDK etc. Any child item under Debug or Release. Attaching screenshot.

          Show
          Shazron Abdullah added a comment - There is no "Conditional architectures" setting – it's all those conditional settings under Architecture that are specific to iphoneos6, Any iOS SDK etc. Any child item under Debug or Release. Attaching screenshot.
          Hide
          Blair Vanderhoof added a comment -
          6. In the Build Settings for the Project (not Target), delete the conditional architecture settings (hover to see the minus sign)
          

          I don't see a "Conditional architectures" setting.

          Show
          Blair Vanderhoof added a comment - 6. In the Build Settings for the Project (not Target), delete the conditional architecture settings (hover to see the minus sign) I don't see a "Conditional architectures" setting.
          Hide
          Shazron Abdullah added a comment - - edited

          This was already fixed for 3.5.0 for the project template.

          Fix:

          1. Select your Project icon
          2. Choose Build Settings. 
          3. For "Architectures", select $ARCHS_STANDARD - Standard architectures (armv7, armv7s, arm64)
          4. For "Valid Architectures", add "arm64"
          5. Select your CordovaLib.xcodeproj icon
          6. In the Build Settings for the Project (not Target), delete the conditional architecture settings (hover to see the minus sign)
          7. For "Architectures", select $ARCHS_STANDARD - Standard architectures (armv7, armv7s, arm64)
          8. For "Valid Architectures", add "arm64"
          9. Goto 6, but now do it for "Target"
          
          Show
          Shazron Abdullah added a comment - - edited This was already fixed for 3.5.0 for the project template. Fix: 1. Select your Project icon 2. Choose Build Settings. 3. For "Architectures" , select $ARCHS_STANDARD - Standard architectures (armv7, armv7s, arm64) 4. For "Valid Architectures" , add "arm64" 5. Select your CordovaLib.xcodeproj icon 6. In the Build Settings for the Project (not Target), delete the conditional architecture settings (hover to see the minus sign) 7. For "Architectures" , select $ARCHS_STANDARD - Standard architectures (armv7, armv7s, arm64) 8. For "Valid Architectures" , add "arm64" 9. Goto 6, but now do it for "Target"
          Hide
          Shazron Abdullah added a comment -

          Ah ok, I see them now

          Show
          Shazron Abdullah added a comment - Ah ok, I see them now
          Hide
          Blair Vanderhoof added a comment -

          Open the project in Xcode and try to run on a device, there will be errors

          Show
          Blair Vanderhoof added a comment - Open the project in Xcode and try to run on a device, there will be errors
          Hide
          Shazron Abdullah added a comment -

          Seems ok with my tests:

          $ cordova -v
          3.4.0-0.1.3
          $ xcodebuild -version
          Xcode 5.1
          Build version 5B130a
          $ cordova create XC51Test asg.asg.xc51test XC51Test
          Creating a new cordova project with name "XC51Test" and id "asg.asg.xc51test" at location "/Users/shaz/Desktop/XC51Test"
          $ cd XC51Test
          $ cordova platform add ios
          $ cordova build
          [....] ** BUILD SUCCEEDED **
          
          Show
          Shazron Abdullah added a comment - Seems ok with my tests: $ cordova -v 3.4.0-0.1.3 $ xcodebuild -version Xcode 5.1 Build version 5B130a $ cordova create XC51Test asg.asg.xc51test XC51Test Creating a new cordova project with name "XC51Test" and id "asg.asg.xc51test" at location "/Users/shaz/Desktop/XC51Test" $ cd XC51Test $ cordova platform add ios $ cordova build [....] ** BUILD SUCCEEDED **

            People

            • Assignee:
              Shazron Abdullah
              Reporter:
              Blair Vanderhoof
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development