[英]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 我试图解决的事情
deleting all pods and reinstalling them. 删除所有吊舱并重新安装。
deleting derived data. 删除派生数据。
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.