Xcode settings: architecture vs valid architecture
When set to 'Native architecture of the Build Machine', you might want to specify which architectures your app works on.
For example, if you have an app that isn't ready for 64-bit environment (it might compile, but it would crash), you put valid architectures just 32-bit, so it won't build the 64-bit section even on 64-bit computer.
As for your Sparkle question - you'll need to ask Sparkle devs, but I bet it's just a value that comes from days when PPC was still widely used.
iOS architectures vs Valid Architectures and repercussions of settings
- In the simulator, the architecture is i386 not armv7 or armv7s. You would only get this error if you tried to run a debug session in a iOS device which had an armv7s chip.
- Yes, arm64 and armv7s will run armv7 binaries.
- Build Setting Reference describes all the build settings.
- ARCHS (Architectures): Space-separated list of identifiers. Specifies the architectures (ABIs, processor models) to which the binary is targeted. When this build setting specifies more than one architecture, the generated binary may contain object code for each of the specified architectures.
- VALID_ARCHS (Valid Architectures): Space-separated list of identifiers. Specifies the architectures for which the binary may be built. During the build, this list is intersected with the value of ARCHS build setting; the resulting list specifies the architectures the binary can run on. If the resulting architecture list is empty, the target generates no binary.
Xcode 5 and iOS 7: Architecture and Valid architectures
Set the architecture in build setting to Standard architectures(armv7,armv7s)
iPhone 5S is powered by A7 64bit processor. From apple docs
Xcode can build your app with both 32-bit and 64-bit binaries included. This combined binary requires a minimum deployment target of iOS 7 or later.
Note: A future version of Xcode will let you create a single app that supports the 32-bit runtime on iOS 6 and later, and that supports the 64-bit runtime on iOS 7.
From the documentation what i understood is
- Xcode can create both 64bit 32bit binaries for a single app but the
deployment target should be iOS7. They are saying in future it will
be iOS 6.0 - 32 bit binary will work fine in iPhone 5S(64 bit processor).
Update (Xcode 5.0.1)
In Xcode 5.0.1 they added the support to create 64 bit binary for iOS 5.1.1 onwards.
Xcode 5.0.1 can build your app with both 32-bit and 64-bit binaries included. This combined binary requires a minimum deployment target of iOS 5.1.1 or later. The 64-bit binary runs only on 64-bit devices running iOS 7.0.3 and later.
Update (Xcode 5.1)
Xcode 5.1 made significant change in the architecture section. This answer will be a followup for you.
Check this
What should I include in Xcode build settings in Architectures section
In Architectures
, you'll be fine with armv7, armv7s, arm64, i386
, where i386
is for the Simulator. The rest can be left default values.
UPDATE: It is not required to mention desktop architectures (i386
, x86_64
) in order to support the build for iOS Simulator. Given Simulator is supported just by including respective ARM architecture. Hence, Architectures
are fine if populated just with armv7 armv7s arm64
. By observing, since Xcode 6.3 it might even cause build to fail if the setting contains any of the desktop architectures.
Valid architectures
can be set individually for each target, Xcode will make intersection of the global Architectures
setting with this. If you are not interested, leave it untouched, Xcode will cope with that on its own without problems.
In case your code is not 64bit ready, remove arm64
from Architectures
. App will still run on iOS 8 and all the recent 64bit devices.
As for the Build Active Architecture Only
, I recommend setting it to No
. This property affects what Xcode decides to build e.g. based on currently connected device. But it may happen problems arise: you may end-up with some targets are built for different architecture, resulting in linking errors. Nevertheless, if you would like to use the pros of the feature, set it to Yes
just for Debug
or some sort of configuration used only for testing, not the final release. Xcode will build all binaries only for one of all the architectures you have set in Architectures
x Valid
then.
Xcode 10: No setting for Valid Architectures
It's hidden under 'Basic'. Click 'All' to see it
Related Topics
Ios8 Photos Framework: How to Get the Name(Or Filename) of a Phasset
iPhone App Under Test Crashes After a Few Days
Monotouch/Wcf: How to Consume the Wcf Service Without Svcutil
Swift Countelements() Return Incorrect Value When Count Flag Emoji
Nsurlconnection Get Request Returns -1005, "The Network Connection Was Lost"
Perform Background Tasks When App Is Terminated
How to Give an "Identifier" to a View Controller Within My Storyboard
It's Possible to Change Push Notification Message Before Display on Device from iOS Side
How I Get Whatsapp Abid to Compose a Message to a Specific User in iOS
[Nsobject:Anyobject]' Does Not Have a Member Named 'Subscript' Error in Xcode 6 Beta 6
Auto-Renewable Subscription in iOS7
How to Remove HTML Tags from Nsstring in Iphone
Using Scrollview Programmatically in Swift 3
How to Add Http Headers in Request Globally for iOS in Swift
How to Update a Localized Storyboard's Strings