Search code examples
phpiosprovisioning-profilexcodebuild

Php run xcodebuild cannot find provisioning profile


I wanna run a server to build ipa for me.When it comes to use Xcode to build app use these command:

/usr/bin/xcodebuild -project /Users/xxxx/sites/PhpServer/AutoUpload/ProjectsDir/48c36d185970fa9231f1f6274b72cf60/48c36d185970fa9231f1f6274b72cf60.xcodeproj -target 48c36d185970fa9231f1f6274b72cf60 -configuration Release PROVISIONING_PROFILE=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

It turn out to be:

Code Sign error: No codesigning identities found: No codesigning identities (i.e. certificate and private key pairs) that match the provisioning profile specified in your build settings

I've checked in ~/Library/MobileDevice/Provisioning profile,the provisioning profile lay there well.

What I am confused about is that it runs well in terminal from the same directory where the Server root is.

What I am thinking is that maybe the xcodebuild execution from php cannot find the ~/Library/MobileDevice/Provisioning profile directory.

  1. How can I specify the location path of provisioning profile when using xcodebuild,PROVISIONING_PROFILE=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx by only specify the ID, how about the location path?

  2. Is there any other methods to get through Building ipa?


Solution

  • I finally solve the problem.I yelled out ‘finally...’.

    This is because when u double click the .cer file to install,the system install .cer file under the 'login' category.what u need to do is open key chain app to move .cer file from 'login' to 'system' category.