Could not find module 'RxSwift' for target 'x86_64-apple-ios-simulator'; found: arm64, arm64-appl...

M1芯片的iMac,Xcode12运行模拟器,然后报错:
Could not find module 'RxSwift' for target 'x86_64-apple-ios-simulator'; found: arm64, arm64-apple-ios-simulator

网上找了很多配置这配置那的都没用,主要还都一样的(复制黏贴🙄)。

解决方法:

1、通过将下面代码添加到 Podfile 的末尾

post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            # Needed for building for simulator on M1 Macs
            config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
        end
    end
end

2、然后在对应的目录 pod install一下,就可以继续使用模拟器了。

至此,我的这个问题解决了。希望对你有所帮助

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容