Alamofire on travis with Swift 5.1



我正试图用Travis运行我的项目,但由于Alamofire的问题,我无法编译。我不清楚为什么它不起作用。。。我使用的是alamofire 4.8版本,它应该支持Xcode 11和Swift 5.1,没有任何问题(此外,我可以使用Xcode 11.2在本地编译和运行该应用程序,我唯一的问题是尝试使用travis编译它(

这是我在Travis 上看到的错误消息

module compiled with Swift 5.0.1 cannot be imported by the Swift 5.1 compiler: /Users/travis/build/MyUser/app-ios/app-ios/Carthage/Build/iOS/Alamofire.framework/Modules/Alamofire.swiftmodule/x86_64.swiftmodule

这是我目前的配置:

osx_image: xcode11
language: swift
branches:
only:
- master
script: xcodebuild test -workspace apps.xcworkspace -scheme Travis -sdk iphonesimulator ONLY_ACTIVE_ARCH=YES -destination 'platform=iOS Simulator,name=iPhone 8,OS=13.0' | xcpretty && exit ${PIPESTATUS[0]}

我还尝试使用Xcode 11.2和带有ios 13.2 的模拟器

您需要使用类似carthage update --no-use-binaries --platform iOS的东西重新编译您的迦太基依赖项。

最新更新