Xcode 6 Standard architectures exclude armv7s
I also filed a bug on this and got a reply stating that this is intentional. If you want to build for armv7s you have to add the architecture manually. I have now idea why this change was made. I'll update this if I get additional information.
Update from the dev forums:
The reason for including armv7s would be marginal backward compatibility. But the general differences between armv7 and armv7s instruction sets are minor. So if you choose not to include armv7s, the targeted armv7 machine code still runs fine on 32 bit A6 devices, and hardly one will notice performance gap.
-- Zhou Yang
Xcode building for iOS Simulator, but linking in an object file built for iOS, for architecture 'arm64'
Basically, you have to exclude arm64
for the simulator architecture, both from your project and the Pod project.
To do that, navigate to Build Settings of your project and add Any iOS Simulator SDK with value
arm64
inside Excluded Architecture.
OR
If you are using custom
XCConfig
files, you can simply add this line for excluding simulator architecture.EXCLUDED_ARCHS[sdk=iphonesimulator*] = arm64
Then
You have to do the same for the Pod project until all the Cocoa pod vendors are done adding following in their Podspec.
s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }You can manually add the Excluded Architecture in your Pod project's Build Settings, but it will be overwritten when you
usepod install
.In place of this, you can add this snippet in your
Podfile
. It will write the necessary Build Settings every time you runpod install
.post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
Xcode building for iOS Simulator, but linking in an object file built for iOS, for architecture 'arm64'
Basically, you have to exclude arm64
for the simulator architecture, both from your project and the Pod project.
To do that, navigate to Build Settings of your project and add Any iOS Simulator SDK with value
arm64
inside Excluded Architecture.
OR
If you are using custom
XCConfig
files, you can simply add this line for excluding simulator architecture.EXCLUDED_ARCHS[sdk=iphonesimulator*] = arm64
Then
You have to do the same for the Pod project until all the Cocoa pod vendors are done adding following in their Podspec.
s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }You can manually add the Excluded Architecture in your Pod project's Build Settings, but it will be overwritten when you
usepod install
.In place of this, you can add this snippet in your
Podfile
. It will write the necessary Build Settings every time you runpod install
.post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
Xcode 12 - No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=arm64e armv7s arm64 arm7)
If you can't see "VALID_ARCHS" in BuildSettings.
You can click the plus button.
click "Add User-Defined Setting"
Input setting name "VALID_ARCHS" , input value "arm64 arm64e armv7 armv7s x86_64"
Xcode 6.1 Missing required architecture X86_64 in file
The first thing you should make sure is that your static library has all architectures. When you do a
lipo -info myStaticLibrary.a
on terminal - you should seearmv7 armv7s i386 x86_64 arm64
architectures for your fat binary.To accomplish that, I am assuming that you're making a universal binary - add the following to your architecture settings of static library project -
- So, you can see that I have to manually set the
Standard architectures (including 64-bit) (armv7, armv7s, arm64)
of the static library project.
- Alternatively, since the normal
$ARCHS_STANDARD
now includes 64-bit. You can also do$(ARCHS_STANDARD)
andarmv7s
. Checklipo -info
without it, and you'll figure out the missing architectures. Here's the screenshot for all architectures -
For your reference implementation (project using static library). The default settings should work fine -
Update 12/03/14
Xcode 6 Standard architectures exclude armv7s.
So, armv7s
is not needed? Yes. It seems that the general differences between armv7 and armv7s instruction sets are minor. So if you choose not to include armv7s, the targeted armv7 machine code still runs fine on 32 bit A6 devices, and hardly one will notice performance gap. Source
If there is a smarter way for Xcode 6.1+ (iOS 8.1 and above) - please share.
How does removing armv7s xCode 4.6 valid architecture project property affect App Store distribution of my iOS apps?
I recently ran into the same problem with a static library. We built for armv7 only until an update to the library was released that was built for armv7s as well.
The only thing that not having armv7s will affect is that the app won't be optimized for any new logic that armv7s brings over armv7. The new arm processors should be backwards compatible with armv7 so future devices should work fine with a build for armv7.
Related Topics
iOS Horizontal Slideview with Vertical Menu
Allow Unverified Ssl Certificate in Uiwebview
Warning Frame for "Navigation Bar" Will Be Different at Run Time Appears in Xcode 8 Swift 3
How to Hide "-" (Delete) Button While Editing Uitableview
How to Call a View Controller Programmatically
Code Signing Is Required for Product Type Unit Test Bundle in Sdk iOS 8.0
Uiview Touch Event in Controller
Linking Child View Controllers to a Parent View Controller Within Storyboard
How to Add a Button to Uinavigationbar
Why Is There an Frame Rectangle and an Bounds Rectangle in an Uiview
Why Is My iOS App Not Showing Up in Other Apps' "Open In" Dialog
iOS - 'Myproject-Swift.H' File Not Found When Running Unit Tests for Swift
iOS Automatically Add Hyphen in Text Field
How to Calculate Actual Font Point Size in iOS 7 (Not the Bounding Rectangle)
Xcode 8.1 Push Notifications in Swift 2.3 with Firebase Integration Not Getting
Conditionally Import a Framework (Such as Speech) Based on iOS Version in Swift