I'm actually new to AzureDevOps and its been two days I can't seem to find a solution for building my app on AzureDevOps.
Here's what I've done so far:
p12 certificated uploaded and applied in pipeline following this guide Install Apple Certificate
provisioning certificate uploaded and applied in pipeline Install Apple Provisioning Certificate
Now when I try to build my iOS app using fastlane:
cd ios
bundle install
fastlane beta
setup_ci(force=true)
gym(scheme: 'app', workspace: './ios/workspace', verbose: true)
I'm looking for a way to use the p12 and provisioning profiles certificate from Azure DevOps to my gym build. After looking a lot, I found that setup_ci does that automatically for me.
Here is my Fastlane file
platform :ios do
lane :beta do
setup_ci(force=true)
gym(
scheme: 'AlfaCarpeting', workspace: './ios/AlfaCarpeting', verbose: true
)
end
end
And here's my Azure pipeline yml file:
# Node.js with React
# Build a Node.js project that uses React.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://learn.microsoft.com/azure/devops/pipelines/languages/javascript
trigger:
- master
pool:
vmImage: 'macOS-10.15'
variables:
- group: React Native Variables
steps:
- task: InstallAppleCertificate@2
inputs:
certSecureFile: Certificates.p12
certPwd: $(P12Password)
keychain: 'temp'
deleteCert: true
displayName: Install Apple Certificate
- task: InstallAppleProvisioningProfile@1
inputs:
provisioningProfileLocation: 'secureFiles'
provProfileSecureFile: 'alfaCarpetingBeta.mobileprovision'
displayName: 'Install Apple Provisioning Profile'
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- script: |
cd ios
bundle install
fastlane ios beta
displayName: 'Build iOS'
The Logs from AzureDevops
[05:38:20]: $ set -o pipefail && xcodebuild -workspace ./AlfaCarpeting.xcworkspace -scheme AlfaCarpeting -destination 'generic/platform=iOS' -archivePath /Users/runner/Library/Developer/Xcode/Archives/2020-03-21/AlfaCarpeting\ 2020-03-21\ 05.38.20.xcarchive archive | tee /Users/runner/Library/Logs/gym/AlfaCarpeting-AlfaCarpeting.log | xcpretty
[05:38:22]: ▸ ❌ error: /Users/runner/runners/2.165.2/work/1/s/ios/Pods/Target Support Files/Pods-AlfaCarpeting/Pods-AlfaCarpeting.release.xcconfig: unable to open file (in target "AlfaCarpeting" in project "AlfaCarpeting") (in target 'AlfaCarpeting' from project 'AlfaCarpeting')
[05:38:22]: ▸ ❌ error: /Users/runner/runners/2.165.2/work/1/s/ios/Pods/Target Support Files/Pods-AlfaCarpeting/Pods-AlfaCarpeting.release.xcconfig: unable to open file (in target "AlfaCarpeting" in project "AlfaCarpeting") (in target 'AlfaCarpeting' from project 'AlfaCarpeting')
[05:38:22]: ▸ ❌ error: /Users/runner/runners/2.165.2/work/1/s/ios/Pods/Target Support Files/Pods-AlfaCarpeting/Pods-AlfaCarpeting.release.xcconfig: unable to open file (in target "AlfaCarpeting" in project "AlfaCarpeting") (in target 'AlfaCarpeting' from project 'AlfaCarpeting')
[05:38:22]: ▸ ❌ error: No profiles for 'com.AlfaCarpeting' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.AlfaCarpeting'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'AlfaCarpeting' from project 'AlfaCarpeting')
[05:38:22]: ▸ ** ARCHIVE FAILED **
If you open the project in xcode and goto Build Settings -> Signing you'll want to adjust the "Code Signing Style" to Manual. Here's the settings I ended up with (note - I am using fastlane match for cert and profile management):