I\'m new to DevOps so please go easy on me if I\'ve missed something basic :)
I’m using the following in Azure Pipelines: Hosted MacOS with an Xcode Build Agent (Xcod
Make sure to correctly target your Project's .xcworkspace
file instead of letting it default to <Project Name>.xcodeproj/project.xcworkspace
. This haunted me for two days while testing.
Example:
- task: Xcode@5
inputs:
sdk: '$(sdk)'
scheme: '$(scheme)'
configuration: '$(configuration)'
xcWorkspacePath: '**/<Project Name>.xcworkspace' # Make sure this line is here
xcodeVersion: 'default' # Options: default, 10, 9, 8, specifyPath
exportPath: '$(agent.buildDirectory)/output/$(sdk)/$(configuration)'
Here's how we got building an iOS app with multiple provisioning profiles to work in Azure DevOps.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>provisioningProfiles</key>
<dict>
<key>YOUR_BUNDLE_ID.watchkitapp.watchkitextension</key>
<string>UUID_OF_ASSOCIATED_PROVISIONING_PROFILE</string>
<key>YOUR_BUNDLE_ID.watchkitapp</key>
<string>UUID_OF_ASSOCIATED_PROVISIONING_PROFILE</string>
<key>YOUR_BUNDLE_ID</key>
<string>UUID_OF_ASSOCIATED_PROVISIONING_PROFILE</string>
</dict>
<key>signingCertificate</key>
<string>iOS Distribution</string>
<key>signingStyle</key>
<string>manual</string>
<key>method</key>
<string>app-store</string>
<key>teamID</key>
<string>YOUR_TEAM_ID</string>
</dict>
</plist>
it turns out after closer inspection the development certificate I had been using was the wrong one (there were a few on my Mac). I swapped this for the appropriate version and the issues went away.
I can now successfully build, archive and sign.
Hopefully this helps someone.
Andrew