Error after changing app name

I’ve changed the app name in Xcode from app, and now i get an error when i run sync. I changed it in the file inspector, and accepted the recommended Xcode changes, and i also changed the name from app in the pod file. Has anyone else seen this, is the only problem i’ve encountered with Capacitor so far, i’m loving it way more than cordova.

thanks

✖ Updating iOS native dependencies with "pod install" (may take several minutes): 
✖ update ios: 
[error] Error running update: Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client project
Pod installation complete! There are 5 dependencies from the Podfile and 32 total pods installed.
xcodebuild: error: 'App.xcodeproj' does not exist.

My guess is that changing the app name should be done in the capacitor.config.json file, not directly in Xcode.

Unless you made some other changes directly to the Xcode project that you need to preserve, the easiest way to fix your project is probably to delete the whole ios folder, and recreate it again by running npx cap add ios.

i changed it in there. I deleted the whole project and added it again, it’s fine until i change the app name, but i need to do that as i can’t leave it as app.

Perhaps you’re referring to the folder name? That’s always App, but it doesn’t really matter, not sure why you need to change it.

The appName configured in capacitor.config.json is what is used as the Display Name in the Xcode project configuration, and that’s what will be shown to the user when they install the app.

no, i haven’t changed the folder name.

I created the new capacitor app following the instructions in the 2.0 blog post. it all works fine, and syncs as long as the app name in Xcode is called app. When i change the name of the project in Xcode that’s when the problems start. the project name in the config file is the new one too, which is why i’m at a loss. I’ve also changed the reference name in the pod file

cheers

I’m still not clear why you need to change it though?

I get errors in iTunes connect if the name doesn’t match the previous bundle names

1 Like

The Bundle Identifier visible in the Xcode project configuration is called appId in capacitor.config.json. If you set that correctly at the beginning I don’t think you need to change the project name in Xcode.

Has anyone figured out what is causing the problem? I am also facing the same problem.