Due to Apple's requirements , Applications that will be launched on April 25, 2023 need to be compiled and packaged using Xcode14.1. AnyThinkiOS uses Xcode14.1 for packaging starting from version 6.1.74. Developers need to use Xcode14.1 version to compile successfully, so please check whether your Xcode meets the requirements.
Since the iOS dependent library Framework file may be damaged when decompressed under Windows, please avoid decompressing the SDK compressed package under Windows. If it is damaged, please ensure that all SDK library files and Xcode dependencies are intact. Delete and reintroduce according to SDK integration documentation.
If your project compiles incorrectly and Xcode sends out some error message like: "Undefined symbols for architecture..." Or "ld: symbol(s) not found for architecture..." :
Your project is missing some modules, please use the error message listed in Xcode to find the missing modules and add them to your project to solve the problem:
In the logs listed by Xcode, you may find messages such as "some_symbols", referenced from:, and referenced from: to find your missing modules. Here is an example 1:
The undefined symbols _res_9_ninit and _res_9_ndestroy are defined in libresolv.9.tbd if you search with Google or Baidu. So to solve this problem, just add libresolv.9.tbd to your project:
1) Navigate to Build Phases and click Link Binary With Libraries:
2) Click the + button, search for resolv, click libresolv.9.tbd, and then click the Add button to add libresolv.9.tbd lib to your project:
Here is an example 2:
The missing symbol is defined in libxml2.tbd (such as _xmlStrlen and _xmlBufferLength) by adding it to your project using the method described above.
Here is an example 3:
A search reveals that the missing symbol is defined in the VideoToolbox.framework. Add it to your project using the above method.
Example 4. Errors referenced from project compilation are referenced from: "___isPlatformVersionAtLeast", referenced from:
If you encounter this error, it is because the Xcode version is too low, and you only need to update to Xcode 11 or higher.
When the application crashes on startup because you are missing some configuration, we give a few examples here:
If you encounter this error, you can navigate to Build Settings, find Other Linker Flags double click on it, hit + and add -ObjC:
Note: Linker Flags needs to be case-sensitive.
You encountered this crash because you added Admob's SDK but did not configure the AppID in Info.plist:
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-**********-********</string>
<key>GADIsAdManagerApp</key>
<true/>
As shown below:
Note: If your application imports Admob's SDK, please ensure that your app is configured with the above operations.
You encountered this crash because the Kuaishou SDK is a dynamic library and needs to be KSAdSDK.framework's Embed change to Embed&Sign.
After modifying Embed, if the compilation still reports an error, as follows:
Solution: Modify Xcode --> Targets -- > Build Settings --> Runpath Search Paths, click to add @executable_path/Frameworks, and make sure that KSAdSDK.framework Import it to the main target of the project. As shown in the picture:
Add in AppDelegate.h window attribute
If your application After importing Kuaishou's SDK, an error occurred when packaging and submitting to the App Store:
This is because Apple only accepts arm products for review. Those that do not support x86, Kuaishou SDK includes x86. The solution is as follows:
InBuild Phase -> New Run Scrip Phase
Add new Run Script Phase, Run Script, and then add a script code inside, as follows:
APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"
# This script loops through the frameworks embedded in the application and
# removes unused architectures.
find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORK
do
FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable)
FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME"
echo "Executable is $FRAMEWORK_EXECUTABLE_PATH"
EXTRACTED_ARCHS=()
for ARCH in $ARCHS
do
echo "Extracting $ARCH from $FRAMEWORK_EXECUTABLE_NAME"
lipo -extract "$ARCH" "$FRAMEWORK_EXECUTABLE_PATH" -o "$FRAMEWORK_EXECUTABLE_PATH-$ARCH"
EXTRACTED_ARCHS+=("$FRAMEWORK_EXECUTABLE_PATH-$ARCH")
done
echo "Merging extracted architectures: ${ARCHS}"
lipo -o "$FRAMEWORK_EXECUTABLE_PATH-merged" -create "${EXTRACTED_ARCHS[@]}"
rm "${EXTRACTED_ARCHS[@]}"
echo "Replacing original executable with thinned version"
rm "$FRAMEWORK_EXECUTABLE_PATH"
mv "$FRAMEWORK_EXECUTABLE_PATH-merged" "$FRAMEWORK_EXECUTABLE_PATH"
done
After adding the script code block, check Run script only when installing, just repackage and submit.
As shown below: