Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/108.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xcode/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios Travis CI在Cocoapod上构建失败_Ios_Xcode_Travis Ci - Fatal编程技术网

Ios Travis CI在Cocoapod上构建失败

Ios Travis CI在Cocoapod上构建失败,ios,xcode,travis-ci,Ios,Xcode,Travis Ci,这是我第一次尝试用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/

这是我第一次尝试用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中进行本地编译,会显示出很多很多错误。这些似乎都与阿拉莫菲尔有关。我确保我的方案设置为
share
,并将所有pod目标添加到该方案中。我做错了什么?

您需要明确指定要使用的
osx\U映像
,否则您的项目将使用未指定版本的Xcode(和Swift)构建,这可能与您的项目不兼容。您需要明确指定要使用的
osx\U映像
,否则,您的项目将使用可能与您的项目不兼容的未指定版本的Xcode(和Swift)构建。