No architectures to compile for Xcode 6.1 - ios

I am running xcode 6.1
I am upgrading a project that was originally targeted to 4.3 to latest iOS and SDKs. When I run against simulator, it compiles fine against all simulators less than iPhone 5S, it works on iPhone4,4S, iphone5 both (7 & 8). However When I select devices iPhone 5S and iPhone 6, I get the error: No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386).
Settings:

Your valid architectures should read armvv7, armv7s, arm64
Otherwise you do not allow (at least) arm64.
You also do not need to make a difference between debug & release when that is the same

I suggest that you do the following:
Delete local modifications to valid architectures such that it returns to default values.
Delete local modifications to architectures such that it returns to default values.
Make sure that your deployment target is at least 6.0. Setting it to a version older than 6.0 will not allow you to support 64bit.
The default architecture values will just show arm archs. You don't need to include i386 and x86_64. Xcode takes care of translating your arm archs to appropriate intel archs when building for the sim. For example, if you have armv6, armv7, or armv7s in valid archs or archs, that will be internally translated to i386 when building for the sim.

I had to manually remove overwritten VALID_ARCH settings from the project file to get it to build simulator. For whatever reason if you overwrite them at target level it doesn't work (for me at least) and you can't remove them in Xcode as it replaces them with empty instead of inheriting them from project settings.

Related

Error creating LLDB target at path, Xcode 6 GM seed,the screen stuck [duplicate]

I'm getting this error whenever I build in XCode 6 beta 4. It seems to be making my app insanely slow.
Warning: Error creating LLDB target at path
'/***/***/***/***.app'- using an empty LLDB target which
can cause slow memory reads from remote devices.
What exactly does this mean and how do I fix it?
Thanks in advance!
Did you use Architectures=$(ARCHS_STANDARD_32_BIT) and run your app on a 64 bit device? (iPhone 5S or iPhone 5S simulator)
Apple seems to be stricter with apps which don't support 64bit. So if there is no specific reason, I think it's better to include arm64 in your build architecture
NOTE ABOUT 64-BIT ARCHITECTURE
An app extension target must include the arm64 architecture in its Architectures build settings or it will be rejected by the App Store. Xcode includes this architecture with its “Standard architectures” setting when you create a new app extension target.
If your containing app target links to an embedded framework, the app must also include the arm64 architecture or it will be rejected by the App Store.
For more information about 64-bit development, see 64-Bit Transition Guide for Cocoa Touch or 64-Bit Transition Guide for Cocoa, depending on your target platform.
Source: https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/ExtensionCreation.html#//apple_ref/doc/uid/TP40014214-CH5-SW1
This warning is solved by changing Build Settings :
Select Project -> Build Settings
Change 'Architectures' to 'Standard architectures (armv7, arm64) - $(ARCHS_STANDARD)'
This will prompt an alert stating iOS 5.1.1 and above are supported. Click 'Change Deployment Target to 5.1.1'
Repeat steps for Target (if not changed automatically)
Also, this is preferred build setting since Apple is forcing developers to build apps on 64 but architecture. Apple document Link
Double Check Build Settings => Valid Architectures for both Project and Target.
Mine used to say: arm64 armv7 i386 (The one causing the error was i386)
I replaced it to : arm64 armv7
I hope that helps.
In Xcode 6.4 , Swift 1.2. I had to edit both the Project and Target to the correct arm verisons (arm64, armv7 and armv7s). Take a look:
My "Architectures" included arm64 but I had to add arm64 to "Valid Architectures" in the target.
In my case I had to change Build Active Architecture Only to YES for the Debug configuration.

iPhone 5S Specific Error: No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=arm64, VALID_ARCHS=armv7 armv7s)

My app uses a few libraries that are iPhone hardware specific and do not run on the simulator. My app complies and runs fine on an iPhone 5 with iOS 7.1, iPod Touch 5G with iOS 7.0 and iPhone 4 with iOS 6.
However, when I try to compile it to a specific iPhone 5S with iOS 7.1, I get the following error, which doesn't make much sense to me:
No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=arm64, VALID_ARCHS=armv7 armv7s).
As a note, this works on other iPhone 5S's - it's just this specific.
Have you tried looking at your project settings and making sure that under Architectures, Valid Architectures includes arm64? It looks like it's only including armv7 and armv7s. Make sure the architectures are included as such:
You may also decide to set Build Active Architecture Only to No so it can build regardless of what architecture you're connected to.

Cannot compile for armv7s here valid architectures are armv6, armv7 and i386

I tried debugging my ios 6.1 project on the new iPad 4 (A6X, armv7s instruction set). However the build failed with
No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=armv7s, VALID_ARCHS=armv6 armv7 i386).
I'm using XCode5-DP6. App debugs on the latest iPod touch (armv7) and on both iPad and iPhone simulators (both iOS 6.1 and 7.0).
It was my understanding that code built for arm7 should build and run on arm7s, since apps between iPad3 and iPad4 are the same? Any clue what I'm doing wrong?
The last product I know of with armv6 is iPhone 3G, even iPhone 3GS is with armv7.
Apple has removed the support for armv6 in a way you cannot compile to that processor architecture and even if you would successfully compile you would have a problem submitting the app to Apple (the build won't be accepted automatically). Moreover, You cannot compile to an OS below 4.3 (it would give you errors also) so there are some restrictions - I'm saying that because I think old devices also can't support new OS. So, it is just a matter of days that there won't be any old iPhone with an OS you can support with Apple's platform.
So, my recommendation is to change the build and valid architectures to armv7, armv7s & i386 (if you need it).
This shall work and you really don't have a choice. you should know that most users doesn't own those old devices. If you still want to support those maybe you should consider add a new app specific for "new" devices, but know that you couldn't update the old version because of what explained earlier.

No architectures to compile for (ARCHS=, VALID_ARCHS=armv7 armv7s)

I am using Xcode 4.5.2 and have a project which cannot be compiled for an iPhone running iOS 6.0.1 though other projects compile fine with the same settings as shown in the picture below.
Any ideas on how to solve this?
You're probably using some third party lib that doesn't yet support armv7s architecture. You can just remove armv7s from your settings. Your app will still be able to run on iPhone 5 although it might not be taking full advantage of the new architecture.
If on XCODE 12 just goto Build Settings search for VALID_ARCHS. Under the User-Defined section select Valid Architectures and click Delete.
Set valid architecture for iOs simulator to armv7 and armv7s.( simulators are 32 bit ).
for device set to arm64 (64 bit all new ios device).

Why is armv6 a Valid Architecture for iOS 5?

Can someone tell me why creating a new project with an iOS Deployment Target of iOS 5.0 includes armv6 as a Valid Architecture in Project > Build Settings by default? The default info.plist file only lists armv7 in the Required Device Capabilities.
As I understand it, if I am building for iOS 5 or later that will only run on armv7 devices (i.e. iPhone 3GS or later, iPod 3G or later, and the iPads). Thus I should be able to remove all the armv6 references, and set Build Active Architecture Only to YES.
Can anyone confirm or clarify? Thanks.
XCode v4.3.2, Base SDK 5.1, iOS Deployment Target iOS 5.0, iPhone Device Family
PS - I understand that removing armv6 will reduce the size of the binary.
$(VALID_ARCHS) defines the set of architectures that an Xcode target supports. $(ARCHS) tells Xcode what architectures to build. What actually gets built for each target is the intersection of $(VALID_ARCHS) and $(ARCHS).
$(VALID_ARCHS) is typically used to avoid building a target for some architecture that the project as a whole otherwise supports. If you don't need to do that, you can safely ignore it.

Resources