I'm having a question about the compilation on iOS. I'm generating a framework and it used to generate arm64, armv7 and armv7s (+ simulators with lipo and fun).
The thing is, armv7s is not present in the binary anymore.
Architectures in the fat file are: i386 x86_64 armv7 arm64
But I clearly asks in my XCConfig for VALID_ARCHS = arm64 armv7 armv7s. I verified that the XCConfig was indeed used and not overridden.
I tried various google search but most of the time we find people not understanding why their app is not compiling with the wrong version of the lib.
So now, I'm coming here, the last chance to understand why no armv7s lib is being created for my framework. Maybe it's as simple as "it's not possible anymore".
XCode has dropped support for armv7s since XCode 6 I think, the ${ARCHS_STANDARD} now only include armv7, arm64 and simulator will include i386, x86_64, so your fat static library/framework will only include them.
To support armv7s, add it under ${ARCHS_STANDARD} in Architectures field and build again.
Related
we know that, if valid architectures in build settings of Xcode project are armv7 and arm64, it will generate a fat binary file which contains both armv7 and arm64 executable instruction, and the binary file size will doubled. but why the armv7s / arm64e architectures don't perform like that?
I am trying to compile an app on an iPhone 6 device under iOS 11.4.
This app uses a framework of my own compiled for architectures armv7 and arm64 (confirmed with lipo -info) and targetted for iOS8+.
In this framework, I use kSecImportExportPassphrase, SecPKCS12Import and kSecImportItemIdentity from the Security.framework of iOS.
When I compile in Xcode 10.2, I get this error:
If someone get an idea of what is going on?
It is like the Security.framework is not compiled for arm64 which is quite impossible.
Regards.
A couple of things to try:
Set Architectures to armv7 armv7s, Build Active Architecture Only to NO, for every target in the project, including every one in Pods:
ARCHS = armv7 armv7s
VALID_ARCHS = armv6 armv7 armv7s arm64
Clean project, shutdown Xcode, then find your application in ~/Library/Developer/Xcode/DerivedData/ and move it trash then empty it.
I have created a project that uses linphone successfully in armv7 and arm64. When I try to add armv7s files included at the link below, it doesn't let me support arm64. How can I easily add it?
https://github.com/onmyway133/linphone-iphone/tree/master/liblinphone-sdk/armv7s-apple-darwin
You need to build liblinphone SDK for armv7s as well by running:
./prepare.py arm64 armv7s armv7 [your other options]
make
But I'm afraid armv7s is not supported by Linphone yet, so you won't be able to do so. You should try reach them on their mailing list.
I've already pushed few versions of app in past few months. However now I have an error about architectures, while I didn't change anything.
My project:
Architectures: armv7, arm64 - $(ARCHS_STANDARD)
Valid Architecures: arm64, armv7, armv7s
My target:
Architectures: armv7, arm64 - $(ARCHS_STANDARD)
Valid Architecures: arm64, armv7
Subproject target:
Architectures: armv7, arm64 - $(ARCHS_STANDARD)
Valid Architecures: armv7
Subproject target:
Architectures: armv7, arm64 - $(ARCHS_STANDARD)
Valid Architecures: arm64, armv7
Pods target:
Architectures: Standerd Architectures (64-bit Intel) (x84_64) - $(ARCHS_STANDARD)
Valid Architecures: i386 x86_64
Pods targets (all the same):
Architectures: armv7, arm64 - $(ARCHS_STANDARD)
Valid Architecures: arm64, armv7, armv7s
The thing is even more strange as first time I've validated the build it passed and was ok. Then when I've tried to submit there was an error. When I've tried to validate again the same build I've got an error. When I've archived again with exactly the same settings, validation of new archive also doesn't work.
What to do to fix it? Thank you for any help.
Try to archive without your device pluged in (yes, disconnect iPhone). Or better: set Build Active Architectures to No.
I'm using the new OData4ObjC framework for IOS 6, but when I try to run it keeps telling me this error.
I have followed the instructions found here https://github.com/ElizabethDuncan/OData4ObjC.
I also changed the framework to an older one to see if that is the problem. I don't know if I'm missing something.
In the future, to check what architectures a library/executable is compiled for you should use the lipo -info command. Like so:
mitchellge$ lipo -info /Users/mitchellge/Downloads/libMSODataLib.a
--> Architectures in the fat file:
/Users/mitchellge/Downloads/libMSODataLib.a are: armv6 armv7
As you can see, the library (libMSODataLib.a) that is bundled with OData4ObjC is compiled for the armv6 and armv7 architectures and not the armv7s. One fix is to go into your project's build settings and change Valid Architectures from armv7 armv7s to just armv7