For example, /Users/agora/Downloads/Agora_Native_SDK_for_iOS_FULL Replace the sdk_path with the path of the SDK. xcframework files: // Replace the xcframework_path with the path of the xcframework.sh script In Terminal, run the following command to create. Xcodebuild -create-xcframework -framework $framework -framework ALL_ARCHITECTURE/$framework -output $binary_name.xcframework framework file under the ALL_ARCHITECTURE folder xcframework file based on the devices architecture under the libs folder and the. # Use the xcodebuild command to create an. Lipo -remove arm64 ALL_ARCHITECTURE/$framework/$binary_name -output ALL_ARCHITECTURE/$framework/$binary_name Lipo -remove armv7 ALL_ARCHITECTURE/$framework/$binary_name -output ALL_ARCHITECTURE/$framework/$binary_name
framework file under the ALL_ARCHITECTURE folder, and keep the x86-64 or i386 architecture only # Remove the armv7 and arm64 architectures in the. Plutil -replace CFBundleSupportedPlatforms -json "" ALL_ARCHITECTURE/$framework/ist || exit 1 # In the ist file under the ALL_ARCHITECTURE/xxx.framework path, change the CFBundleSupportedPlatforms attribute to x86-64 or i386 only Supported_platforms="\"iPhoneSimulator\""
#Ios simulator xcode code#
Refer to the following steps to use this script:Ĭreate an xcframework.sh file, and add the following code to the file: #!/bin/bash xcframework filesįor the SDK v3.0.0 to v3.2.1, Agora provides an xcframework.sh script to create.
In Xcode, navigate to TARGETS > Project Name > Build Settings > Build Options menu, and set Validate Workspace as Yes. Agora recommends upgrading the SDK to v3.3.0 or later. framework files, which comply with Xcode's requirements and support running projects on iOS physical devices or iOS simulators.
#Ios simulator xcode upgrade#
Solution Solution one: Upgrade the SDKĪs of v3.3.0, the Agora SDK uses. framework files are identified by Xcode as a prohibited configuration when you use an iOS simulator to build a project. To support running a project on an iOS simulator, versions of the Agora SDK earlier than v3.3.0 bundle a library for multiple platforms in a. As of Xcode 12.3, however, Apple no longer allows this instead, you must use an. framework file to bundle a binary framework or library for multiple platforms, although they still allowed it. Starting in Xcode 11.0, Apple recommended against using a single. When you integrate the Agora SDK and use an iOS simulator to build a project in Xcode 12.3 or later, you may receive the following error message: Building for iOS Simulator, but the linked and embedded framework 'xxx.framework' was built for iOS + iOS Simulator.