xcode - 为 iPhone 构建 iOS 应用程序可以从 xCode 进行,但不能从命令行 (xcodebuild) 进行构建

标签 xcode ios hudson provisioning xcodebuild

我目前正在尝试通过在 OSX 服务器计算机上运行的自动构建来简化我们的构建和发布过程,该构建是运行 OSX 10.6.7 并安装了 xCode 4.0.1 和 iOS SDK 4.3(Apple 的最新版本)的 MacMini。 我已关注Mike Nachbaur's很棒的指南,感觉我已经快到了,但我还有最后一个障碍需要克服。

所以。我们的应用程序可以很好地构建:

a) 我在 xCode 中的笔记本电脑

b) 我的笔记本电脑通过命令行使用 xcodebuild

c) 来自 xCode 的构建机器

但是它不起作用

d) 使用 xcodebuild 从命令行构建机器。

这是控制台输出的结尾:

CreateUniversalBinary build/Distribution-iphoneos/CallControl.app/CallControl normal "armv6 armv7"
    cd /Users/ainutveckling/Jenkins/workspace/CallControl_iPhoneContiousBuild/Callcontrol
    setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/Users/ainutveckling/Jenkins/tools/jdk6/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /usr/bin/lipo -create /Users/ainutveckling/Jenkins/workspace/CallControl_iPhoneContiousBuild/Callcontrol/build/Callcontrol.build/Distribution-iphoneos/CallControl.build/Objects-normal/armv6/CallControl /Users/ainutveckling/Jenkins/workspace/CallControl_iPhoneContiousBuild/Callcontrol/build/Callcontrol.build/Distribution-iphoneos/CallControl.build/Objects-normal/armv7/CallControl -output /Users/ainutveckling/Jenkins/workspace/CallControl_iPhoneContiousBuild/Callcontrol/build/Distribution-iphoneos/CallControl.app/CallControl

GenerateDSYMFile build/Distribution-iphoneos/CallControl.app.dSYM build/Distribution-iphoneos/CallControl.app/CallControl
    cd /Users/ainutveckling/Jenkins/workspace/CallControl_iPhoneContiousBuild/Callcontrol
    setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/Users/ainutveckling/Jenkins/tools/jdk6/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/usr/bin/dsymutil /Users/ainutveckling/Jenkins/workspace/CallControl_iPhoneContiousBuild/Callcontrol/build/Distribution-iphoneos/CallControl.app/CallControl -o /Users/ainutveckling/Jenkins/workspace/CallControl_iPhoneContiousBuild/Callcontrol/build/Distribution-iphoneos/CallControl.app.dSYM
ProcessProductPackaging "/Users/ainutveckling/Library/MobileDevice/Provisioning Profiles/F792F2E5-45DB-43C7-969C-6012C59BF778.mobileprovision" build/Distribution-iphoneos/CallControl.app/embedded.mobileprovision
    cd /Users/ainutveckling/Jenkins/workspace/CallControl_iPhoneContiousBuild/Callcontrol
    setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/Users/ainutveckling/Jenkins/tools/jdk6/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    <com.apple.tools.product-pkg-utility> "/Users/ainutveckling/Library/MobileDevice/Provisioning Profiles/F792F2E5-45DB-43C7-969C-6012C59BF778.mobileprovision" -o /Users/ainutveckling/Jenkins/workspace/CallControl_iPhoneContiousBuild/Callcontrol/build/Distribution-iphoneos/CallControl.app/embedded.mobileprovision

** BUILD FAILED **

+ failed build
+ echo 'Failed: build'
Failed: build
+ exit 1
Notifying upstream projects of job completion
Finished: FAILURE

在我的机器上,它看起来几乎一样:

GenerateDSYMFile build/Distribution-iphoneos/CallControl.app.dSYM build/Distribution-iphoneos/CallControl.app/CallControl
    cd /Users/anders/Utveckling/CallControl/iphone/totala_samtalslistan/Callcontrol
    setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/anders/Utveckling/android-sdk-mac_x86/tools:/Users/anders/Utveckling/android-sdk-mac_x86/platform-tools:"
    /Developer/usr/bin/dsymutil /Users/anders/Utveckling/CallControl/iphone/totala_samtalslistan/Callcontrol/build/Distribution-iphoneos/CallControl.app/CallControl -o /Users/anders/Utveckling/CallControl/iphone/totala_samtalslistan/Callcontrol/build/Distribution-iphoneos/CallControl.app.dSYM

ProcessProductPackaging "/Users/anders/Library/MobileDevice/Provisioning Profiles/F792F2E5-45DB-43C7-969C-6012C59BF778.mobileprovision" build/Distribution-iphoneos/CallControl.app/embedded.mobileprovision
    cd /Users/anders/Utveckling/CallControl/iphone/totala_samtalslistan/Callcontrol
    setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/anders/Utveckling/android-sdk-mac_x86/tools:/Users/anders/Utveckling/android-sdk-mac_x86/platform-tools:"
    <com.apple.tools.product-pkg-utility> "/Users/anders/Library/MobileDevice/Provisioning Profiles/F792F2E5-45DB-43C7-969C-6012C59BF778.mobileprovision" -o /Users/anders/Utveckling/CallControl/iphone/totala_samtalslistan/Callcontrol/build/Distribution-iphoneos/CallControl.app/embedded.mobileprovision

** BUILD SUCCEEDED **

但是成功了... 无论我是直接从构建机器上的命令行启动构建还是由 Hudson 启动构建,结果都是一样的。 上面指出的证书似乎已经到位。

我几乎准备放弃这个,所以我非常感谢任何帮助阐明这个问题的帮助!

最诚挚的问候, 安德斯

最佳答案

更新到新的分发证书和配置文件后,我在构建计算机上遇到了您在上面显示的确切错误。在 ProcessProductPackaging 步骤之后,它只会显示 ** BUILD FAILED ** 消息。

但是,当在构建机器上手动运行构建时,我遇到了 KeyChain 权限对话框。点击“始终允许”解决了问题。

除了在构建脚本中解锁之外:

security unlock -p $PASSWORD

关于xcode - 为 iPhone 构建 iOS 应用程序可以从 xCode 进行,但不能从命令行 (xcodebuild) 进行构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5659817/

相关文章:

ios - xcode - 如何将 xcode 6 Storyboard文件降级为 xcode 5?

objective-c - "Cannot find interface declaration for NSObject"?

xcode - 如何将 GIDSignInButton 类与 Google 身份验证结合使用?

iphone - 按键对 NSDictionary 进行排序/分组

git - 如何在 Jenkins 电子邮件中包含 git changelog?

ios - Tableview 忘记了 UISegmentedControl 中的 selectedSegment?

iphone - 为什么要在IOS中创建和使用Bundle?

ios - 在 Swift 中使用可选值

在 hudson 上运行的 cUnit 测试

java - 带有 Subversion : build after commit on Windows using Java or Ant 的 Hudson