I have a Capacitor app that I am trying to build through DevOps with the xcode@5 task. However, I am not getting an .ipa to be generated on completion of the task. What am I missing? Is there another task that I need to run after the xcode task?
- task: Xcode@5
inputs:
actions: 'build'
scheme: 'App'
sdk: 'iphoneos'
configuration: 'Release'
xcWorkspacePath: '**/App.xcworkspace'
xcodeVersion: 'default'
packageApp: true
signingOption: 'manual'
provisioningProfileUuid: 'xxxxxx-xxxxx-xxx-xxx-xxxxxxxxx'
archivePath: "$(System.DefaultWorkingDirectory)/archive"
2
Answers
It seems you didn’t set the
Signing identity
input in your task.An Xcode app must be signed and provisioned to run on a device or be published to the App Store. This requires a P12 signing certificate and at least one provisioning profile. The tasks ‘Install Apple Certificate’ and ‘Install Apple Provisioning Profile’ are designed to provide Xcode with these essentials during the build process.
After this, you can check the archive path parameter for Xcode task. The
ipa
file is placed in the folder defined inarchive path
. You can add the Copy Files and Publish Build Artifacts tasks to store your IPA with the build record or test and deploy it in subsequent pipelines.Please refer this document Build, test, and deploy Xcode apps and Sign your Apple iOS, macOS, tvOS, or watchOS app to learn how to build and deploy Xcode projects with Azure Pipelines.
To generate the IPA package, you need to use .P12 certificate file and Provisioning Profile to sign the package.
Here are the steps:
Create certificate
Step1: Sign in the developer.apple.com/account/resources and select the Certificates tab.
Step2: Create a new certificates or select an existing certificate. Then download it(
.cer
file) to your local machine.Step3: Double click the
.cer
file to install the certificate and navigate to Keychain Access(mac local machine) to find newly installed certificate.Step4: Export the .P12 file and set the password.
Create provisioning profile
Step1: Sign in the developer.apple.com/account/resources and select Profiles tab.
Step2: Create a new Profiles. Select
IOS App Development -> Apple ID
as before.Step3: When you select the certificate, you need to select the corresponding certificate downloaded in the previous step.
This is the key step. You need to select the same certificate as the .p12 file created.
For example:
Step4: Download the Provisioning Profile.
Finally, you could upload the new XX.p12 file and Provisioning Profile to Azure Devops Secure file(
Pipelines -> Library -> Secure files
). Then you could use them in pipeline.For example:
Note:
certSecureFile
andprovProfileSecureFile
are the.p12
and.mobileprovision
file Name attribute in Secure Files.The
certPwd
is from the Pipeline variable or Variable Group. It will save the password you set at the #Create certificate step.Result: