XCode 4 和 xcodebuild 出现问题:找不到 UninstalledProducts 目录
升级到 XCode 4 后,我们的 CI 构建脚本不再正常工作。我们构建过程的一部分是在构建每个应用程序后对其进行存档。为此,脚本会在 UninstalledProducts 目录下查找构建的应用程序。然而,在 XCode 4 中似乎不再创建该目录。这是 XCode4 的新的、正确的行为吗?
我刚刚继承了维护 iOS CI 构建的工作,所以 xcodebuild 对我来说是新的。除了将目标 sdk 的值从“iphoneos4.2”更改为“iphoneos4.3”之外,我没有触及用于此特定 CI 构建的现有 makefile。
以下是 makefile 中的相关行。构建在最后一行失败,因为找不到 UninstalledProducts 目录。
$(XCODEBUILD) -sdk ${TARGETSDK} -target TheMobileApp -configuration EnterpriseDistribution clean install OTHER_CFLAGS='-DDEBUG=0 -DWEB_COM_URL=@\"https://uat.web.com/the-mobile-app\"' mv build/UninstalledProducts/TheMobileApp.app ${distdir}/EnterpriseUAT
这是错误消息:
mv: rename build/UninstalledProducts/TheMobileApp.app to IPHONE_PROJ-r1234/EnterpriseUAT/TheMobileApp.app: No such file or directory make: *** [compile] Error 1
但是,该应用程序似乎也是在 build/EnterpriseDistribution-iphoneos/TheMobileApp.app 中构建的,它是 /tmp/TheMobileApp.dst/Applications/TheMobileApp.app 的符号链接。这是在 UninstalledProducts 下构建的同一个应用程序吗?
非常感谢任何帮助。提前致谢!
After upgrading to XCode 4 our CI build scripts are not longer working properly. Part of our build process is to archive each app after it's built. To do this the script looks for the built app under the UninstalledProducts directory. However, with XCode 4 it seems that this directory is no longer created. Is this new, correct behavior with XCode4?
I just inherited the job of maintaining our iOS CI builds so xcodebuild is new to me. I have not touched the existing makefile we use for this particular CI build except to changed the value for the target sdk from 'iphoneos4.2' to 'iphoneos4.3'.
Below are the relevant lines from the makefile. The build fails on the last line because the directory UninstalledProducts can't be found.
$(XCODEBUILD) -sdk ${TARGETSDK} -target TheMobileApp -configuration EnterpriseDistribution clean install OTHER_CFLAGS='-DDEBUG=0 -DWEB_COM_URL=@\"https://uat.web.com/the-mobile-app\"' mv build/UninstalledProducts/TheMobileApp.app ${distdir}/EnterpriseUAT
Here's the error message:
mv: rename build/UninstalledProducts/TheMobileApp.app to IPHONE_PROJ-r1234/EnterpriseUAT/TheMobileApp.app: No such file or directory make: *** [compile] Error 1
However, it appears that the app is also built at build/EnterpriseDistribution-iphoneos/TheMobileApp.app which is a symlink to /tmp/TheMobileApp.dst/Applications/TheMobileApp.app. Is this the same app that is built under UninstalledProducts?
Any help much appreciated. Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将此参数添加到 xcodebuild 命令中:
请参阅 http://developer.apple.com/library/mac/#documentation/DeveloperTools/Reference/XcodeBuildSettingRef/1-Build_Setting_Reference/build_setting_ref.html 供参考。
Add this parameter to the xcodebuild command:
See http://developer.apple.com/library/mac/#documentation/DeveloperTools/Reference/XcodeBuildSettingRef/1-Build_Setting_Reference/build_setting_ref.html for reference.