Search code examples
iosiphonebashipadprovisioning-profile

How to Install Provising Profile and Certificates in Project By Command line / Using shell Script


I want to add my certificates and provisioning profile in my Project via Terminal/Using Shell script but I cant able to found any code for it.I also Want to access Keychain Access via code. or can we access Build settings of Xcode Using Commands.


Solution

  • command For install .cer/.p12 file is

    security unlock-keychain -p "" ~/Library/Keychains/login.keychain
    security import XXX.cer -k ~/Library/Keychains/login.keychain -P "" -T /usr/bin/codesign
    

    and for add Provision Profile

    output="~/Library/MobileDevice/Provisioning Profiles/$uuid.mobileprovision"
    cp -R  "$mp" "$output"