Renaming Capacitor ios app leads to issue when building due to scheme.
See original GitHub issueDescribe the bug If you follow the official capacitor guide for renaming the app you start getting the issues when trying to build for iOS. When renaming the app xcode prompts to also change other things, one of which is the scheme (see screenshot below).
So when you run quasar build -m capacitor -T ios
for example, it looks like it goes through node_modules/@quasar/app/lib/capacitor/index.js
where the workspace and scheme are hardcoded to be App
.
https://github.com/quasarframework/quasar/blob/dev/app/lib/capacitor/index.js#L81
To Reproduce Steps to reproduce the behavior:
- Have an app you are building for ios using capacitor, or create new app.
- Build app for ios with
--ide
flag i.e:quasar build -m capacitor -T ios --ide
- Follow the official guide to rename app.
- Allow xcode to also rename project’s contents.
- Build again:
quasar build -m capacitor -T ios
- See error:
App · [sync] Running "xcrun xcodebuild -workspace App.xcworkspace -scheme App -configuration release -derivedDataPath /Users/...
xcodebuild: error: The workspace named "App" does not contain a scheme named "App". The "-list" option can be used to find the names of the schemes in the workspace.
Expected behavior
Should have a way to build with capacitor when having renamed the app. Maybe a cli flag or a setting in quasar.conf.js
.
Screenshots
Platform (please complete the following information): OS: OSX 10.15.7 Node: 12.16.1 NPM: 6.13.4 Xcode: 12.1 (12A7403) Additional context
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
Top GitHub Comments
In Capacitor 3 there is a new configuration option you can use if you changed your scheme.
In your capacitor.config.json/.ts file add a scheme property inside the ios object. Something like this for .ts
ios: { scheme: "yourAppName" }
I think the problem is the build scheme is hardcoded to be
App
in thexcodebuild
command of Quasar’sCapacitorRunner
: https://github.com/quasarframework/quasar/blob/cc11e72683c06342c3fd08eacf52c7ae91c2e644/app-webpack/lib/capacitor/index.js#L81