AppStore submission architecture error 9000 armv7 - ios

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.

Related

why the armv7s / arm64e architectures don't increase the package size?

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?

iOS Security.framework arm64 architecture issue

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.

VALID_ARCHS = arm64 armv7 armv7s not generating any armv7s

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.

iOS XCODE on ipa generation says symbols not found for architecture armv7

on running command from terminal lipo -info /_PATH/XYZ_LIB.framework/XYZ_LIB tells that
it supports armv7 arm64 as output on terminal is
Architectures in the fat file: /_PATH/XYZ_LIB.framework/XYZ_LIB are: armv7 arm64
But on generating ipa it says symbols not found for architecture armv7.
What can be the probable cause?

ios static library Undefined symbols for architecture x86_64

lipo -info libXxxx.a
Architectures in the fat file: libXxxx.a are: armv7 i386 arm64
But compiler in the dependant project is giving linking error,
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_ClassXXXX", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Am I missing something?
All the lib project's target have Architectures: Standard Architectures (armv7, arm64)
and Valid Architectures arm64, armv7, armv7s
in my lipo command while making universal binary I am lipo-ing both from iphonesimulator and iphoneos folder.
Your main clue is that it says "symbol(s) not found for architecture x86_64" instead of "symbol(s) not found for architecture i386".
The fix is to tweak your build settings to allow a 32-bit build.
1) Select your project file in the Project Navigator (the left sidebar)
2) Select your project's target (first entry under TARGETS in the panel that just came up)
3) Find the "Architectures" setting (make sure "All" is selected if you can't find "Architectures")
4) Change it from "Standard Architectures" to "Universal" (or explicitly "32-bit" if you prefer)
You should be able to build after doing this.
You need to create a universal binary including following architectures in your static library project. The architectures should be including 64-bit, armv7, armv7s, arm64.
Now when you do a lipo -info anyStaticLibrary.a on terminal - you should see armv7 armv7s i386 x86_64 arm64 architectures for your fat binary.
Also note that the project which uses the above static library can work fine with the default settings of the architectures.

Resources