You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

M1芯片Mac配置react-native-plaid-link-sdk执行pod install报错求助

问题原因

该错误是M1系列芯片的arm64架构与Plaid SDK旧版本对iOS模拟器的架构支持不兼容导致的,Intel芯片Mac默认运行x86_64架构的工具链,因此不会触发该问题。

可尝试的解决方案

  • 使用Rosetta模式运行终端执行安装
    右键点击终端应用,选择「显示简介」,勾选「使用Rosetta打开」,重启终端后进入项目ios目录重新执行pod install即可。
  • 修改Podfile配置适配架构
    如果不想使用Rosetta模式,可在项目ios目录的Podfile文件中,修改post_install代码块,新增Plaid的架构排除配置:
post_install do |installer|
  installer.pods_project.targets.each do |target|
    # 针对Plaid单独配置排除模拟器的arm64架构
    if target.name == 'Plaid'
      target.build_configurations.each do |config|
        config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
        config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64'
      end
    end
    # 保留你原有项目的其他post_install配置
  end
end
  • 清除缓存重新安装依赖
    修改配置后执行以下命令清除原有缓存,再重新安装:
cd ios
rm -rf ~/Library/Caches/CocoaPods
rm -rf Pods Podfile.lock
pod deintegrate
pod install
  • 替换CocoaPods安装源
    如果以上方案都无效,可卸载gem安装的CocoaPods,改用Homebrew安装适配arm64架构的版本:
sudo gem uninstall cocoapods -a
brew install cocoapods

内容的提问来源于stack exchange,提问作者Sebastian Oscar Lopez

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.10.03 00:24:03