这是我第一次尝试使用我的iOS项目设置Travis CI。我在.travis.yml文件中有这个:
language: objective-c
script:
- xcodebuild clean build -sdk iphonesimulator -workspace MyApp.xcworkspace -scheme MyApp CODE_SIGNING_REQUIRED=NO
当travis运行时,它会开始编译,但会遇到cocoapods的问题,例如:
/Users/travis/build/MyApp/ios-app/Pods/Alamofire/Source/AFError.swift:265:38: error: 'case' labels with multiple patterns cannot declare variables
case .jsonEncodingFailed(let error), .propertyListEncodingFailed(let error):
^
/Users/travis/build/MyApp/ios-app/Pods/Alamofire/Source/AFError.swift:276:73: error: definition conflicts with previous value
case .bodyPartURLInvalid(let url), .bodyPartFilenameInvalid(let url), .bodyPartFileNotReachable(let url),
^
/Users/travis/build/MyApp/ios-app/Pods/Alamofire/Source/AFError.swift:276:38: note: previous definition of 'url' is here
case .bodyPartURLInvalid(let url), .bodyPartFilenameInvalid(let url), .bodyPartFileNotReachable(let url),
如果我在Xcode中进行本地编译,则会显示许多错误。这些似乎也与Alamofire有关。我确保我的方案设置为share
,并且还将所有pod目标添加到该方案中。我在这里做错了什么?