苹果M1芯片下,工程修改

非M1芯片下工程:


M1芯片下工程:

1、在 Build Settings中更改,找到Excluded Architectures,设置为arm64


1

2、在Podfile中添加代码,运行pod install

post_install do |installer|

  installer.pods_project.build_configurations.each do |config|

    config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"

  end

end

如果运行“pod install” 时报错,

sudo arch -x86_64 gem install ffi

gem install ffi --version 1.13.1 --user-install

arch -x86_64 pod install


参考链接:https://blog.csdn.net/weixin_43233524/article/details/112565857

你可能感兴趣的:(苹果M1芯片下,工程修改)