简体   繁体   English

ios-Xcode 10:Razorpay pod“使用Swift 4.1编译的模块无法由Swift 4.2编译器导入”

[英]ios - Xcode 10: Razorpay pod “module compiled with Swift 4.1 cannot be imported by the Swift 4.2 compiler”

Earlier I was using Xcode 9.3 but yesterday I updated it to Xcode 10 and its giving me compiler error: 之前我使用的是Xcode 9.3,但昨天我将其更新为Xcode 10,这给了我编译器错误:

error: module compiled with Swift 4.1 cannot be imported by the Swift 4.2 compiler: /Users/viraj/Desktop/Vachan app/vachan-ios/Pods/razorpay-pod/Pod/Razorpay.framework/Modules/Razorpay.swiftmodule/x86_64.swiftmodule 错误:使用Swift 4.1编译的模块无法通过Swift 4.2编译器导入:/ Users / viraj / Desktop / Vachan app / vachan-ios / Pods / razorpay-pod / Pod / Razorpay.framework / Modules / Razorpay.swiftmodule / x86_64。 swiftmodule

things which I have tried to resolve it 我试图解决的事情

  • pod update. 广告连播更新。
  • deleting all pods and reinstalling them. 删除所有吊舱并重新安装。

  • deleting derived data. 删除派生数据。

  • In Xcode 10, I have the project setting, Swift Language Version, set to Swift 4.Here is the image 在Xcode 10中,我将项目设置Swift语言版本设置为Swift 4。 在此处输入图片说明
  • clean ,build and relaunching xcode. 清理,构建并重新启动xcode。

Does anyone have suggestions on how to resolve this? 有人对如何解决这个问题有建议吗? Am I missing something? 我想念什么吗? Xcode bug? Xcode错误?

If you wanna use pod with swift version 4.1 just write post install script in your Podfile or update to pod version which suppots swift 4.2. 如果您想将Pod与Swift版本4.1一起使用,只需在Podfile中编写安装后脚本,或更新到支持swift 4.2的Pod版本。

# Post install script

post_install do |installer|
    installer.pods_project.targets.each do |target|
        if target.name == 'razorpay-pod'
            target.build_configurations.each do |config|
                config.build_settings['SWIFT_VERSION'] = '4.1'
            end
        end
    end
end

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Xcode 10-Swift 4.2编译器无法导入使用Swift 4.1.2编译的模块 - Xcode 10 - Module compiled with Swift 4.1.2 cannot be imported by the Swift 4.2 compiler 用 Swift 5.5.1 编译的模块不能被 Swift 5.5.2 编译器 RazorPay 导入 - Module compiled with Swift 5.5.1 cannot be imported by the Swift 5.5.2 compiler RazorPay Xcode 10.2中的Realm Swift-错误:Swift 5.0编译器无法导入使用Swift 4.2编译的模块 - Realm Swift in Xcode 10.2 - ERROR: Module compiled with Swift 4.2 cannot be imported by the Swift 5.0 compiler 使用Swift 4.1.2编译的模块不能由Swift 4.2编译器导入 - Module compiled with Swift 4.1.2 cannot be imported by the Swift 4.2 compiler 使用Swift 4.1编译的模块无法在Swift 3.2.3中导入 - Module compiled with Swift 4.1 cannot be imported in Swift 3.2.3 安装 Xcode10.2.1 但仍然收到错误“Swift 5.1 编译器无法导入使用 Swift 5.0.1 编译的模块” - Install Xcode10.2.1 but still got the error 'Module compiled with Swift 5.0.1 cannot be imported by the Swift 5.1 compiler' 使用 Swift 5.2.2 编译的模块无法由带有 xcode 12.1 的 Swift 5.3 编译器导入 - Module compiled with Swift 5.2.2 cannot be imported by the Swift 5.3 compiler with xcode 12.1 Xcode 11.2.1 错误 - 使用 Swift 5.1 编译的模块无法由 Swift 5.1.2 编译器导入 - Xcode 11.2.1 Error - Module compiled with Swift 5.1 cannot be imported by the Swift 5.1.2 compiler 即使使用 Xcode 11.7 命令行工具,Swift 5.3 编译器也无法导入使用 Swift 5.2.4 编译的模块 - Module compiled with Swift 5.2.4 cannot be imported by the Swift 5.3 compiler even with Xcode 11.7 command line tools Swift 5.1.2 编译器 (couchbaselite) xcode 11.2 无法导入使用 Swift 5.1 编译的模块 - Module compiled with Swift 5.1 cannot be imported by the Swift 5.1.2 compiler (couchbaselite) xcode 11.2
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM