Xcode build failed (ionic, Vue, Capacitor)

Hello,

I am new to Ionic framework and when I saw this blog post, I was excited to test the new Ionic version with Vue 3 and it’s composition API, but I ran into an issue while trying to run the app in iOS simulator using Xcode.

I started with “blank” template and made no other changes. Running dev server and testing in browser works fine without any issues.

When trying to run the app in Xcode, I get “Build Failed” error with a list of many things in the error console (see Xcode window in the attached screenshot). It works fine in browser so I don’t suspect it’s an issue of the app itself as it’s just Vue project using “blank” template.

Commands executed to test in iOS simulator:

  1. ionic capacitor add ios
  2. npx cap open ios
  3. Clicking “Run” (Play) button in Xcode

Versions of OS, tools and packages:

macOS Catalina 10.15.7
Xcode 12.0.1 (12A7300)
Node.js 12.18.3
NPM 6.14.8

I was following these documentation steps to configure iOS platform:

  1. https://ionicframework.com/docs/developing/ios#xcode-setup
  2. https://ionicframework.com/docs/developing/ios#project-setup
  3. https://ionicframework.com/docs/developing/ios#running-with-the-ionic-cli

Thank you very much for your help, I really look forward to use Ionic for cross-platform development as it suits the app I am working on perfectly.

Jakub

I created a new “blank” template app and I am able to run iOS simulator

I am using Xcode 11.5 since you are using Xcode 12 can you put the app on github I will clone and see if I am able to run it…

Ionic:

   Ionic CLI       : 6.11.8-testing.0 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework : @ionic/vue 5.4.1

Capacitor:

   Capacitor CLI   : 2.4.2
   @capacitor/core : 2.4.2

Utility:

   cordova-res : 0.15.1
   native-run  : not installed

System:

   NodeJS : v12.18.0 (/usr/local/bin/node)
   npm    : 6.14.4
   OS     : macOS Catalina

Sounds I might downgrade Xcode to version 11.x

This is the repository, thank you for your help https://github.com/vanekj/finn

I can run the app. I only got a warning (I dont get this on my app) which I fixed by double clicking on the warning and i clicked “Perform Changes” on the popup…

Warning
Screenshot 2

Auto fix prompt

Thanks for testing, I am downloading Xcode 11.7 (veeeery slow) to see if that works and will confirm :slight_smile:

See if this runs in Xcode 12.

I did a test in the mentioned repository with Xcode 11.7 and it failed with the same errors as for my repository. I am installing Xcode 11.5 now to see if that works.

So, now I am running Xcode 11.5 and I can run your application in the simulator with success. But running my application is still not working… the errors are the same as in the original post. I will try to dig more into it, maybe trying to setup the project like new.

I will comment here if I will find something helpful.

This https://developer.apple.com/forums/thread/661725 sounds like the same issue but no answers there either. Maybe create an issue on github also if you haven’t.

Thank you for all your help.

I created a fresh new project in a new folder and it’s still not working. Now the errors are not listed under the App in Xcode, but from CapacitorCordova (as can be seen on the screenshot below).

All steps I made by following this and this documentation pages:

  1. xcode-select --install
  2. brew install cocoapods
  3. npm install -g @ionic/cli@latest
  4. ionic start ionic-test-app blank --type vue
  5. cd ionic-test-app
  6. ionic integrations enable capacitor
  7. ionic build
  8. ionic cap add ios
  9. ionic cap open ios
  10. Pressing the “Play” button in Xcode results in the error from the screenshot

I might open the GitHub issue as you suggested.

1 Like

For visibility, this is the issue.

1 Like

Just to let people know, the issue was resolved and my iOS simulator is working perfectly.

1 Like