简体   繁体   中英

Change Code Signing of Project from command line

I made a script to copy,rename and change Bundle Id of a project from command line, after that process, my next step is to change the code signing of the project to point to the new certificates.

Is there any way of doing this from command line?

Edit: I just saw that that info is stored on the .pbxproj, how can I change that file?

You can re-sign a build using the following:

export CODESIGN_ALLOCATE=`xcode-select -print-path`/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
codesign -f -s "iPhone Developer" -vv Example.app/Example

If all you have is an IPA, just unzip it, it's a normal zip file with a single Payload directory containing your application.

Edit:

If you need to change an Xcode project itself, an Xcode project is just a bundle, change into the directory and open the project.pbxproj file. You should be able to simply use sed to find and replace the developer identity.

There may be better options, such as supplying the setting on the command-line to xcodebuild . If you give more background on what it is you are trying to do, you may get better suggestions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM