Can you make Xcode 5.1 target dependencies build only valid architectures? - ios

With Xcode 5.1 Apple has made $(ARCHS_STANDARD) include arm64. If your project does not support arm64 you can simply change the architecture build setting to $(ARCHS_STANDARD_32_BIT) and it will not build arm64.
However if you have a target dependency that uses $(ARCHS_STANDARD) it will build arm64 and you will get an error because your project is expecting symbols that are not arm64.
Is there a way to make your target dependency aware what you are building against so it will build the valid architecture?

Our quick fix was to leave the Architectures entry as $(ARCHS_STANDARD) but change Valid Architectures to armv7 and armv7s until the third party libraries we're using are updated.

Related

The Mystery of the Missing Architectures

I'm following a tutorial on building a multi-platform iOS framework -- it mentions these architecture names:
In my Xcode build Settings, I set my architectures like so:
$(ARCHS_STANDARD)
i386
x86_64
arm7s
armv7
armv7s
However, upon building I get the following errors:
Anyone have a clue why?
There is no arm7s, the only one I know of thats similar is armv7s.
Remove the mention of arm7s and try rebuild.
The particular tutorial you're looking at is incorrect. The supported iOS device architectures are:
armv7
armv7s
arm64
For the simulator:
i386
There's an Apple Reference Doc for build settings that makes a mention of some of these. It hasn't been updated since 2010, so theres no armv7s or armv64, but you can see what else has been supported. No mention of arm7, or arm7s.

Xcode 6.3 missing required architecture arm64 [duplicate]

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)
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.
Reference from this post.
Update: From May 15, you've to take build from 5.1.1, see this post.
Don't know previous iOS but Setting Build Active Architecture Only to YES in iOS 8 did the trick.
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
I just changed the Debug from Yes to No,
Build Settings -> Architectures -> Build Active Architecture Only -> Debug -> NO.
This one fixed my error.

How can I disable building archive for arm64 CPU on Xcode?

I have too many warnings on building for archive. And no errors on building for x32 devices or simulator.
How can I disable building archive for arm64 CPU on Xcode?
I've tried to set Architectures and Valid Architectures on project's Build Settings to armv7 armv7s or $(ARCHS_STANDARD_32_BIT) and Build Active Architecture Only to YES but with no success.
Try Build Active Architecture Only to YES in Build Settings
Also set $(ARCHS_STANDARD_32_BIT) or armv7 and armv7s in Architectures and remove the $(ARCHS_STANDARD).
Do it in every single place and on all dependent projects in your workspace

iOS architectures vs Valid Architectures and repercussions of settings

I have a library that is not 64 bit ready, so I removed arm64 from "architectures". I was then able to use the application on 64 bit platforms in the simulator. (It didn't work until I made that change. It would just crash)
When I was going to create an archive for my app to send to the store, I got the following error:
(null): File is universal (3 slices) but does not contain a(n) armv7s slice: /Users/cmuench/Desktop/PHP-Point-Of-Sale-Repos/PHP-Point-Of-Sale-iOS/PHP Point Of Sale/starSDK/StarIO.framework/StarIO file '/Users/cmuench/Desktop/PHP-Point-Of-Sale-Repos/PHP-Point-Of-Sale-iOS/PHP Point Of Sale/starSDK/StarIO.framework/StarIO' for architecture armv7s
I think this is because the another framework I use I am using for a receipt printer doesn't support armv7s.
3 questions:
Why was it able to work in debugging environment but then fail when creating an archive? The only way I could get the archive to work was by removing armv7s from "valid architectures"
Will my application work on newer hardware that uses the armv7s platform? (I don't have the newer hardware)
What is the difference between "architectures" and "Valid Architectures" in build 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.

Failed Xcode build: no rule to process file for architecture armv6

Building my iOS App in Xcode 4.5 results in Dependency Analysis Warnings for every source file:
warning: no rule to process file of type sourcecode.c.objc for architecture armv6
This eventually results in a missing binary. Any ideas what's wrong here?
Build settings: armv6 armv7 Valid Architectures and iOS 4.3 Deployment Target.
Xcode 4.5 does not support building armv6 binaries anymore.
Set Valid Architectures to armv7.

Resources