Prepare Your App for Submission
Xcode doesn't automatically strip unneeded architectures from dynamic libraries, nor remove some header and utility resources. Apps that don't do this clean up are rejected from the App Store. For example, you might receive the following error from iTunes Connect:
1ERROR ITMS-90085:
2No architectures in the binary. Lipo failed to detect any architectures in the bundle executable.You can resolve this problem by using the script provided in the ServiceCore framework that automatically strips unneeded architectures from the dynamic libraries and then re-signs them.
To use this script:
- Select Build Phases for your project target.
-
Create a Run Script phase to run the script.
Access the prepare-framework script from within the ServiceCore framework in your project directory.
- If you installed the XCFramework files manually, use:
1$SRCROOT/ServiceCore.xcframework/ios-arm64/ServiceCore.framework/prepare-framework - If you installed the SDK with CocoaPods, use:
1$PODS_ROOT/ServiceSDK/Frameworks/ServiceCore.framework/prepare-framework - If you installed the standard framework files with version 224.0.2 or earlier,
use:
1$SRCROOT/ServiceCore.framework/prepare-framework
- If you installed the XCFramework files manually, use:
This build phase must occur after the link phase and all embed phases. If you're using CocoaPods, make sure to put this script after the "[CP] Embed Pods Frameworks" phase.