3
votes

Does anyone have an idea how to use Azure DevOps CI with an ionic cordova ios app?

I tried the following

  • Npm install
  • Ionic command (Command: ionic cordova build ios)
  • List item
  • Install an apple certificate
  • Install an apple provisioning profile
  • Xcode build
  • Publish to the app store (install from marketplace)

Xcode build fails with the following error

2020-05-06T22:29:39.9577800Z ##[section]Starting: Xcode build
2020-05-06T22:29:39.9594120Z ==============================================================================
2020-05-06T22:29:39.9594470Z Task         : Xcode
2020-05-06T22:29:39.9594850Z Description  : Build, test, or archive an Xcode workspace on macOS. Optionally package an app.
2020-05-06T22:29:39.9595210Z Version      : 5.152.0
2020-05-06T22:29:39.9595490Z Author       : Microsoft Corporation
2020-05-06T22:29:39.9595850Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/xcode
2020-05-06T22:29:39.9596310Z ==============================================================================
2020-05-06T22:29:48.0466510Z ##[warning]Multiple Xcode workspace matches were found. The first match will be used: /Users/runner/runners/2.166.4/work/1/s/node_modules/@capacitor/cli/assets/ios-template/App/App.xcodeproj/project.xcworkspace
2020-05-06T22:29:48.0482290Z [command]/usr/bin/xcodebuild -workspace /Users/runner/runners/2.166.4/work/1/s/node_modules/@capacitor/cli/assets/ios-template/App/App.xcodeproj/project.xcworkspace -list
2020-05-06T22:29:53.0861170Z Information about workspace "App":
2020-05-06T22:29:53.0861630Z     Schemes:
2020-05-06T22:29:53.0866440Z         App
2020-05-06T22:29:53.0866690Z 
2020-05-06T22:29:53.1010390Z The workspace contains a single shared scheme. 'App' will be used.
2020-05-06T22:29:53.1033230Z [command]/usr/bin/xcodebuild -version
2020-05-06T22:29:53.2107930Z Xcode 10.3
2020-05-06T22:29:53.2127580Z Build version 10G8
2020-05-06T22:29:53.2275010Z [command]/usr/bin/xcodebuild -sdk iphonesimulator12.4 -configuration Release -workspace /Users/runner/runners/2.166.4/work/1/s/node_modules/@capacitor/cli/assets/ios-template/App/App.xcodeproj/project.xcworkspace -scheme App build CODE_SIGN_STYLE=Automatic DEVELOPMENT_TEAM=XXXX | /usr/local/lib/ruby/gems/2.6.0/bin/xcpretty -r junit --no-color
2020-05-06T22:29:54.8861040Z 
2020-05-06T22:29:54.8863380Z ⌠ error: /Users/runner/runners/2.166.4/work/1/s/node_modules/@capacitor/cli/assets/ios-template/App/Pods/Target Support Files/Pods-App/Pods-App.release.xcconfig: unable to open file (in target "App" in project "App") (in target 'App')
2020-05-06T22:29:54.8864420Z 
2020-05-06T22:29:54.8866300Z 
2020-05-06T22:29:54.8868760Z 
2020-05-06T22:29:54.8871220Z ⌠ error: /Users/runner/runners/2.166.4/work/1/s/node_modules/@capacitor/cli/assets/ios-template/App/Pods/Target Support Files/Pods-App/Pods-App.release.xcconfig: unable to open file (in target "App" in project "App") (in target 'App')
2020-05-06T22:29:54.8872120Z 
2020-05-06T22:29:54.8872340Z 
2020-05-06T22:29:54.8878940Z 
2020-05-06T22:29:54.8880320Z ⌠ error: /Users/runner/runners/2.166.4/work/1/s/node_modules/@capacitor/cli/assets/ios-template/App/Pods/Target Support Files/Pods-App/Pods-App.release.xcconfig: unable to open file (in target "App" in project "App") (in target 'App')
2020-05-06T22:29:54.8880960Z 
2020-05-06T22:29:54.8881090Z 
2020-05-06T22:29:54.8891460Z ** BUILD FAILED **
2020-05-06T22:29:54.8892100Z 
2020-05-06T22:29:54.9074960Z ##[error]Error: /usr/bin/xcodebuild failed with return code: 65
2020-05-06T22:29:54.9432910Z ##[section]Finishing: Xcode build

2

2 Answers

1
votes

I resolved this error by removing capacitor

how to remove capacitor

0
votes

It is possible to build Azure Devops Pipeline for iOS and Android. You would need to

  1. Install Node JS
  2. Install Ionic
  3. Call ionic capacitor sync
  4. Add Cocoapods Install task to your working directory
  5. Configure your project path
  6. Build iOS or Android

For those who are looking for YAML templates, please find a detailed version here