Overview
This knowledge base article addresses the bitcode validation error encountered when using the AgoraAudio_iOS framework in iOS Swift projects with Xcode 16.2. This error prevents successful build uploads to TestFlight and the App Store.
Problem Description
After upgrading to Xcode 16.2, developers integrating the AgoraAudio_iOS framework in their iOS Swift projects may experience build failures during uploads to TestFlight and the App Store. The error messages indicate that certain executables within the AgoraAudio_iOS framework contain bitcode, causing the validation process to fail.
Example Error Messages
- `Invalid Executable. The executable 'Zich.app/Frameworks/AgoraAIDenoiseExtension.framework/AgoraAIDenoiseExtension' contains bitcode.`
- `Invalid Executable. The executable 'Zich.app/Frameworks/AgoraCore.framework/AgoraCore' contains bitcode.`
- Similar errors are observed for other components like AgoraRtcKit and AgoraSoundTouch.
Resolution Steps
Step 1: Upgrade AgoraAudio_iOS Framework
The bitcode issue is resolved in Agora SDK versions v4.5.0 and later. To resolve the issue, follow these steps to upgrade the framework:
1. Open Your Project in Xcode:
- Launch Xcode and open your existing project.
2. Update the Podfile:
- Navigate to the `Podfile` in your project's directory.
- Update the AgoraAudio_iOS pod to the latest version:
pod 'AgoraAudio_iOS', '~> 4.5.0'
3. Install the Updated Pod:
- Open Terminal and navigate to your project directory.
- Run the following command to install the updated pod:
pod install
4. Clean and Rebuild Your Project:
- In Xcode, go to `Product` > `Clean Build Folder` to clear any cached data.
- Rebuild your project by selecting `Product` > `Build`.
Summary:
By following the resolution steps outlined above, you should be able to successfully upload your builds to TestFlight and the App Store without encountering bitcode validation errors. For persistent issues, consider reaching out to Agora Support for further guidance.