ios-build-action
ios-build-action copied to clipboard
security: SecKeychainItemImport: Unknown format in import.
I am specified the p12-key-path and p12-cer-path. My pipeline is failed due to Unknown format in import.
- uses: yukiarrr/[email protected]
with:
project-path: Unity-iPhone.xcodeproj
p12-key-path: ./certificates/CVJDMPG837.p12
p12-cer-path: ./certificates/CVJDMPG837.cer
p12-key-base64: ${{ secrets.P12_KEY_BASE64 }}
p12-cer-base64: ${{ secrets.P12_CER_BASE64 }}
mobileprovision-base64: ${{ secrets.MOBILEPROVISION_BASE64 }}
Any solution?n
@HunainHumail still not get any solutions
@amjedsaleel
edit with this format and try:
- name: Build IOS App uses: yukiarrr/[email protected] with: project-path: ios/yourProjectName.xcodeproj p12-base64: ${{ secrets.IOS_P12_BASE64 }} // mobileprovision-base64: ${{ secrets.IOS_MOBILE_PROVISION_BASE64 }} code-signing-identity: 'iPhone Distribution' team-id: ${{ secrets.IOS_TEAM_ID }} certificate-password: ${{ secrets.IOS_CERTIFICATE_PASSWORD }} workspace-path: ios/yourProjectName.xcworkspace scheme: yourProjectName
To generate the environment variable below is the guide: The build action will need the following variables to be added as Github Secrets:
IOS_MOBILE_PROVISION_BASE64 : Base64 encoded Provisioning profile file.
Download it from your Apple developer portal and use the following script to generate base64 encoded format.
openssl base64 < MY_Profile.mobileprovision | tr -d '\n' | tee my-profile.base64.txt
IOS_P12_BASE64 : Base64 encoded .p12 file (key + cert) After installing the certificate on your Mac, Open Keychain Access App, select "My Certificates" on the top, and locate the certificate you've downloaded.
Expand the certificate to see the corresponding private key. Then select the certificate and private key, then right-click for the context menu on the items and choose "Export 2 items…".
Pick a location on disk to save the file as a .p12 and choose a strong password for the file(IOS_CERTIFICATE_PASSWORD)
Generate a base64 for the .p12 file using
openssl base64 < cert.p12 | tr -d '\n' | tee cert.base64.txt
IOS_TEAM_ID : your apple team id https://developer.apple.com/account/#!/membership/
IOS_CERTIFICATE_PASSWORD : Password used to generate p2 certificate.