我正在使用 xcode 插件。我环顾四周,但大多数“解决方案”都不起作用。
我的主要问题是在生成的 xcworkspace 中,我正在尝试构建的项目没有方案。该插件执行命令
$ /usr/bin/xcodebuild -list -workspace Project.xcworkspace
并且输出只显示 Pod 的方案,而不是主项目方案。
Information about workspace "Project":
Schemes:
Pods
Pods-AFNetworking
Pods-Bolts
Pods-Facebook-iOS-SDK
我有 cocoapods buildsteppod install
我把它作为 Xcode 插件配置:目标:项目,构建前清理,配置:调试,Xcode 模式文件:项目,Xcode 工作区文件:项目,构建输出目录:${WORKSPACE}/build。
这是打印出来的错误:
Going to invoke xcodebuild:, scheme: Project, sdk: DEFAULT, workspace: Project, configuration: Debug, clean: YES, archive:NO, symRoot: DEFAULT, configurationBuildDir: /Users/ignat/.jenkins/workspace/Project/build, codeSignIdentity: DEFAULT
[Project] $ /usr/bin/xcodebuild -scheme Project -workspace Project.xcworkspace -configuration Debug clean build CONFIGURATION_BUILD_DIR=/Users/ignat/.jenkins/workspace/Project/build
Build settings from command line:
CONFIGURATION_BUILD_DIR = /Users/ignat/.jenkins/workspace/Project/build
xcodebuild: error: The workspace 'Project' does not contain a scheme named 'Project'.
FATAL: Build directory does not exist at /Users/ignat/.jenkins/workspace/Project/build. Potential configuration issue.
Build step 'Xcode' marked build as failure
Finished: FAILURE