美文网首页iOS 深入
Could not find module 'RxSwift'

Could not find module 'RxSwift'

作者: Bug猫 | 来源:发表于2021-11-04 11:34 被阅读0次

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一下,就可以继续使用模拟器了。

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

相关文章

网友评论

    本文标题:Could not find module 'RxSwift'

    本文链接:https://www.haomeiwen.com/subject/lnzhzltx.html