24

Just upgraded to Xcode 5.1, getting the following error:

ignoring file ...Dependencies/SalesforceNetworkSDK/libSalesforceNetworkSDK.a, missing required architecture arm64 in file ...Dependencies/SalesforceNetworkSDK/libSalesforceNetworkSDK.a (3 slices)

If I turn off build active archs only and remove arm64 from valid archs I get:

Build/Products/Debug-iphoneos/libPods.a, file was built for archive which is not the architecture being linked (armv7)

Mani
  • 17,549
  • 13
  • 79
  • 100
Bradley Thomas
  • 4,060
  • 6
  • 33
  • 55
  • 1
    I discovered that for some reason my Pods Build Settings were reset to OSX default i386, overriding them with armv7 and armv7s got it to build, ?! – Bradley Thomas Mar 11 '14 at 17:26
  • 1
    This might be relevant: http://cameronspickert.com/2014/01/20/remove-the-arm64-architecture-from-cocoapods-targets.html – matt Mar 12 '14 at 02:18
  • @matt, yes thanks that looks useful & relevant. I notice that it's also updated for xcode 5.1 as well. – Bradley Thomas Mar 12 '14 at 04:33
  • 1
    Yes, Xcode 5.1 is insisting on 64-bit for devices that have it, and this is having a lot of surprise consequences for people. - If you have ended up solving your own problem, feel free to answer your own question; that's perfectly acceptable, and might help others. – matt Mar 12 '14 at 04:35
  • Check my answer here: http://stackoverflow.com/questions/22323039/arm64-architecture-in-xcode-5-1/22580609#22580609 – jsherk Mar 22 '14 at 17:03

4 Answers4

42

According to apple's release note, see the following note point.

Note:

Be aware of the following architectures issues when opening your existing projects in Xcode 5.1:

  • When building for all architectures, remove any explicit architectures setting and use the default Standard Architectures setting. For projects that were previously opted-in using “Standard Architectures Including 64-Bit”, switch back to the “Standard architectures” setting.
  • When opening an existing project for the first time, Xcode 5.1 may display a warning about the use of the Xcode 5.0 architectures setting. Selecting the warning provides a workflow to revise the setting.
  • Projects not able to support 64-bit need to specifically set the architectures build setting to not include 64-bit.

So you've to set architecture as below to support libs architecture.

enter image description here

Reference from this post.

Update: From May 15, you've to take build from 5.1.1, see this post.

Community
  • 1
  • 1
Mani
  • 17,549
  • 13
  • 79
  • 100
  • Thank you for this detailed answer. It helped me resolve my issue. Additionally, for anyone using Cordova, make sure you are doing this on your app and not on the CordovaLib.xcodeproj dependency. I ended up doing it on both and that resolved my issue. – JimTheDev Aug 29 '14 at 17:41
  • before doing anything first try this command. i was having linking issues – Waleed Arshad May 09 '18 at 14:07
8

Don't know previous iOS but Setting Build Active Architecture Only to YES in iOS 8 did the trick.

enter image description here

Vaibhav Saran
  • 12,848
  • 3
  • 65
  • 75
5

I ended up getting my project to build by (1) turning off build active archs only (2) removing arm64 from valid archs and (3) making sure that the Pods project was building for only armv7 and armv7s.

Also worth noting here, that at the time of writing this edit, Salesforce mobile SDK was not available for arm64

Bradley Thomas
  • 4,060
  • 6
  • 33
  • 55
2

I just changed the Debug from Yes to No,

Build Settings -> Architectures -> Build Active Architecture Only -> Debug -> NO.

This one fixed my error.enter image description here

arunit21
  • 670
  • 1
  • 11
  • 25
  • It could work but build time would take a lot more time, there is a reason why on debug it is set to YES, to save time on your build time. – OhadM Dec 03 '15 at 09:38