Skip to content

Commit

Permalink
feat(@quasar/app): Enforce correct build mode for Cordova on iOS with…
Browse files Browse the repository at this point in the history
… latest XCode
  • Loading branch information
rstoenescu committed Feb 25, 2019
1 parent 3c85b71 commit 982f60b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/lib/cordova/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ class CordovaRunner {
args.push(`--target=${cfg.ctx.emulator}`)
}

if (cfg.ctx.targetName === 'ios') {
args.push(`--buildFlag=-UseModernBuildSystem=0`)
}

return this.__runCordovaCommand(
cfg,
args
Expand Down

3 comments on commit 982f60b

@sergaks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw, the flag is not required in cordova-ios-plugin v.5.0.0 (apache/cordova-ios#412). As workaround in my local quasar project I have updated src-cordova/package.json with "cordova-ios": "^5.0.0"

@rstoenescu
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean cordova-ios?

I tested with v5 and that still requires the build flag. If you open the .xcodeproj file in XCode you can also manually set the build mode, but what I am interested is in everything working out of the box, which is what this commit does.

Also, for some reason, with latest cordova CLI, a newly scaffolded cordova project folder comes with cordova-ios v4.

@sergaks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, cordova-ios
it's absolutely ok to use the flag, but as soon as cardova cli updates dependency to cardova-ios it can be not more required. Not sure about difference between legacy build system and new one.

Never mind, I just do not set the build flag, instead I do the following:
1 - update src-cordova/package.json : "cordova-ios": "^5.0.0"
2 - npm install
3 - remove src-cordova/platforms/ios
4 - quasar dev -m cordova -T ios
and get running ios app with new build system

Thanks!

Please sign in to comment.