- The problem
- Is it an architecture problem? How do I view the framework architecture in ipA?
- How to check whether bitcode is enabled in the FRAMEWORK of ipA?
The problem
When I was trying to upload ipA package, I encountered an error:
ERROR ITMS-90668: "Invalid Bundle Executable.
The executable file 'XXX.app/Frameworks/MXFFI.framework/MXFFI' contains incomplete bitcode.
To compile binaries with complete bitcode, open Xcode and choose Archive in the Product menu."
Copy the code
The framework reporting the error was introduced via POD.
Is it an architecture problem? How do I view the framework architecture in ipA?
I searched the Internet for similar questions, like the one in this article:
ERROR ITMS-90087:"Unsupported Architectures. The executable for Demo.app/DemoSDK.framework contains unsupported Architectures' [x86_64, i386]]."Copy the code
But notice the difference here. The error I encountered was the Contains incomplete bitcode, while the above article contains unsupported architectures, so it should not be an architecture problem. But to prevent omissions, check whether there is a problem with the architecture:
- unlock
ipa
Package, unpackage scheme:ipa
Directory Open the terminal and enter
tar xf xxxxxx.ipa
Copy the code
Note Tar xf in front of the command is fixed, followed by the full ipA.
-
After unlocking the file, the Payload folder is generated in the same directory. Open the Payload folder.
-
When you see xxx. app, right click “Show package contents”
-
Enter the Frameworks directory again, double-click to enter
-
Go to MXFFI. Framework and double-click to access it
-
Open the terminal in the same directory as the MXFFI binary and type the command lip-info MXFFI
The result is:
➜ MXFFI.framework lipo -info MXFFI
Architectures in the fat file: MXFFI are: arm64
Copy the code
The architecture is ARM64 no problem.
How to check whether bitcode is enabled in the FRAMEWORK of ipA?
ENABLE_BITCODE = ENABLE_BITCODE
This article also addresses the 90668 issue, continuing with the terminal input command:
otool -arch arm64 -l ./MXFFI | grep __LLVM | wc -l
Copy the code
Note the arm64 in this command, check your framework first, if it is armv7, then change the arm64 to armv7. The./MXFFI after -l is the path to the binary file.
The result is:
➜ MXFFI. Framework otool - arch arm64 - l. / MXFFI | grep __LLVM | wc - 2 lCopy the code
The result is non-0, indicating that ENABLE_BITCODE is YES.
Look at the compile project and find that this is indeed the problem:
Change ENABLE_BITCODE to NO, generate framework again, update POD, and package IPA.
View the results again
➜ MXFFI. Framework otool - arch arm64 - l. / MXFFI | grep __LLVM | wc - l 0Copy the code
So that’s 0. Bitcode is turned off.
After the arraignment, the problem is solved.