通知
本站点除 Legacy 产品与方案外,已迁移至 声网新文档中心 ,当前页面不再维护
Documentation
All
Console 官网 Community Technical support

Why do I receive error messages after integrating the iOS SDK through CocoaPods and run the pod lib lint command?

Type: Integration issues    Platform: iOS   Last Updated: 2022/09/14 23:35:57

Problem

On Xcode 12 or later, if you integrate the iOS SDK 3.3.0 or later through CocoaPods and run the pod lib lint command, you may receive the following error message:

[iOS] xcodebuild: warning: [CP] Unable to find matching .xcframework slice in ' true ios-armv7_arm64/AgoraRtcKit.framework ios-x86_64-simulator/AgoraRtcKit.framework' for the current build architectures (arm64 x86_64).

Reason

CocoaPods is not compatible with Xcode 12 or later versions, so the .xcframework frameworks cannot be linked in your project.

Solution

To solve the problem, do the following:

  1. Install a version earlier than Xcode 12 (for example, Xcode 11).

  2. In Terminal, run the following command to switch the Xcode version.

    // Replaces <xcode_path> with the path of Xcode 11. 
    sudo xcode-select -s <xcode_path>
  3. Run the pod lib lint command to check whether the .xcframework framework is successfully linked.