question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Renaming Capacitor ios app leads to issue when building due to scheme.

See original GitHub issue

Describe 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:

  1. Have an app you are building for ios using capacitor, or create new app.
  2. Build app for ios with --ide flag i.e: quasar build -m capacitor -T ios --ide
  3. Follow the official guide to rename app.
  4. Allow xcode to also rename project’s contents.
  5. Build again: quasar build -m capacitor -T ios
  6. 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 image image

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:open
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
devXprocommented, Jan 2, 2022

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" }

0reactions
eyedeancommented, May 31, 2022

I think the problem is the build scheme is hardcoded to be App in the xcodebuild command of Quasar’s CapacitorRunner: https://github.com/quasarframework/quasar/blob/cc11e72683c06342c3fd08eacf52c7ae91c2e644/app-webpack/lib/capacitor/index.js#L81

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuring iOS | Capacitor Documentation
To rename the App target, open your project in Xcode, select the App project, and double-click the App target. Finally, add the scheme...
Read more >
How to change the name of an iOS app? - xcode
Go to Targets in Xcode . Build Settings on your project's target (your current development name). Search for Product Name under Packaging ....
Read more >
iOS package build fails with fastlane error: "Couldn't find ...
Without a way to rename the scheme in the xcode project on the fly it's necessary to override the app name explicitly during...
Read more >
How are we meant to rename our projects? - Apple Developer
1. In the Project Navigator (left side of Xcode, click the Folder icon), select your project name (the blue file icon at the...
Read more >
[Solved]-Renaming a project results in compiler error
Related Query · interface builder Storyboard compiler error when build xcode project · Moving unity 5 project from windows to mac to implement...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found