使用Swift 5.1在Travis上运行Alamofire

我试图用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的模拟器

Star595198770 回答:使用Swift 5.1在Travis上运行Alamofire

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

本文链接:https://www.f2er.com/3072456.html

大家都在问