Ionic-framework: Cannot build iOS with new ionic + cordova project: Info.plist not found

Created on 9 Oct 2018  路  7Comments  路  Source: ionic-team/ionic-framework

Bug Report

Ionic Info

Ionic:

   ionic (Ionic CLI)             : 4.2.1 (/Users/acrites/.config/yarn/global/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.0.0-beta.12
   @angular-devkit/build-angular : 0.7.5
   @angular-devkit/schematics    : 0.7.5
   @angular/cli                  : 6.1.5
   @ionic/angular-toolkit        : 1.0.0

Cordova:

   cordova (Cordova CLI) : 8.1.2 ([email protected])
   Cordova Platforms     : ios 4.5.5
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.2.0, (and 4 other plugins)

System:

   Android SDK Tools : 26.1.1 (/Users/acrites/Library/Android/sdk)
   ios-sim           : 7.0.0
   NodeJS            : v10.11.0 (/Users/acrites/.n/bin/node)
   npm               : 6.4.1
   OS                : macOS High Sierra
   Xcode             : Xcode 10.0 Build version 10A255

Describe the Bug
Following the instructions for the Ionic 4 beta in the wiki, you will get an error when attempting to run iOS via the CLI, ionic cordova run ios -l

[cordova]  project/platforms/ios/build/emulator/project.app/Info.plist file not found.
[ERROR] An error occurred while running subprocess cordova.

Steps to Reproduce

  1. ionic start --type=angular --cordova project blank
  2. cd project
  3. ionic cordova prepare ios (choose Yes to install the ios project).
  4. ionic cordova run ios -l

You will get this error about Info.plist not being found.

By the way, ionic cordova run android -l works.

Expected Behavior
The project should run in the iOS emulator.

triage

Most helpful comment

If I'm not mistaken it's related Xcode 10 and Cordova.

Solution: Add "-- --buildFlag="-UseModernBuildSystem=0" to end of command. So,
ionic cordova run ios -l -- --buildFlag="-UseModernBuildSystem=0"

Alternatively, you can add a "build.json" file to root of project instead with following code below and cordova will pickup build flag from there:
{ "ios": { "debug": { "buildFlag": [ "-UseModernBuildSystem=0" ] }, "release": { "buildFlag": [ "-UseModernBuildSystem=0" ] } } }

All 7 comments

If I open platform/ios/project.xcworkspace with Xcode and attempt to run, the build seems to succeed, but I get the splash screen + loading indicator forever.

If I'm not mistaken it's related Xcode 10 and Cordova.

Solution: Add "-- --buildFlag="-UseModernBuildSystem=0" to end of command. So,
ionic cordova run ios -l -- --buildFlag="-UseModernBuildSystem=0"

Alternatively, you can add a "build.json" file to root of project instead with following code below and cordova will pickup build flag from there:
{ "ios": { "debug": { "buildFlag": [ "-UseModernBuildSystem=0" ] }, "release": { "buildFlag": [ "-UseModernBuildSystem=0" ] } } }

Thank you! This does allow me to use ionic cordova run ios.

Thank you very much. It worked successfully

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

I'm not using ionic framework so I applied build.json file and works like a charm. Thanks!

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Was this page helpful?
0 / 5 - 0 ratings