xcodebuild: build Mac OS app

I'd like to do automating for my Mac App project.

My environment is Mac OS 10.8.3; Xcode 4.6. I use the following command in the terminal:

xcodebuild -project pro.xcodeproj -target MyProject -configuration Debug CODE_SIGN_IDENTITY='Mac Developer: xxxxxx'

It ran well and I could see the MyProject.app was created in the workspace: /build/Debug.

Then I just copied it to the Jenkins configurations, like:

export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer/
xcodebuild -project pro.xcodeproj -target MyProject -configuration Debug  CODE_SIGN_IDENTITY='Mac Developer: xxxxxx'

However, the build always failed with :

Code Sign error: Provisioning profile 'EADA149E-1A30-4C3C-B42B-75DEA77308DF' can't be found

What makes me strange is that I could not find the "wrong" profile.

I find a same question Distributing .app file after command line xcodebuild call. But the "archive" is invalid in xcode 4.6.

So please help me about how can I do the automating for Mac App. Thanks!


I find it and it is the same problem like "provison not found". What you need to do is delete the referred provision file in prom.xcodeproj/project.pbxproj.

You can find the same answers here Codesign error: Provisioning profile cannot be found after deleting expired profile

链接地址: http://www.djcxy.com/p/59790.html

上一篇: xcodebuild存档问题

下一篇: xcodebuild:构建Mac OS应用程序