Updating capacitor project name

From slack

Using Capacitor, how do I change the name of my project with out getting error App.xcodeproject does not exist?

1 Like

When adding capacitor to a project, you can change the name by setting the appName key in the capacitor.config.json

{
  "appId": "io.ionic.starter",
  "appName": "MyApp",
  "bundledWebRuntime": false,
  "npmClient": "npm",
  "webDir": "www",
  "plugins": {
    "SplashScreen": {
      "launchShowDuration": 0
    }
  },
  "cordova": {}
}

When you create the iOS project, this will update the setting in xcode

Screen Shot 2020-06-09 at 10.51.28 AM

SO while project and target say “App”

Screen Shot 2020-06-09 at 10.51.45 AM

Those aren’t really relevant here. When we build and deploy to a device, we’ll have the “MyApp” name being used.

Screen Shot 2020-06-09 at 10.52.24 AM