Xcode - change bundle identifier but not product name - ios

My bundle identifier has to match the one in the iOS dev portal:
com.mydomain.myappname
It seems the only way to do this in Xcode is to go to Targets, Build Settings, and change the Product Name to myappname. However, this also causes the app to be called "myappname" on the device home screen (under the icon). I know that has to able to be set differently. (I want "My App" to be displayed instead of "myappname"). Where do I set this?

You set this as the "Product Name" in the Build Settings in Xcode. You want to set your bundle identifier in the info.plist file for your app.
The bundle identifier in the Info.plist can contain placeholder variables such as ${PRODUCT_NAME}. These placeholder variables are replaced with their values from the build settings when the app is compiled. Use plutil to see the compiled version of the Info.plist in your .app bundle.

The "Bundle identifier" and "Bundle display name" are set in the info.plist file. The "Bundle display name" is what shows up by the app icon on the Home screen. They can use placeholder values such as ${PRODUCT_NAME} or ${PRODUCT_NAME:rfc1034identifier}, or you can set them explicitly. The "Product Name" is set in the Build Settings. You can first set the "Product Name" the way you want it, and then adjust or override the derived values by editing the info.plist file.
It sounds like what you want to do is set the Product Name to be "myappname", leave the Bundle identifier to be "com.mydomain.${PRODUCT_NAME:rfc1034identifier}", and then set the Bundle display name to be "My App".

What I did is put in the matching bundle identifier name at "Build Settings > Product Name". And then key in the actual App Name at the "Info > Bundle Display Name". Overwrite the ${PRODUCT_NAME} variable and key in the exact "My App". This do the trick.

Related

Use Bundle Identifier instead of Product Bundle Identifier with Xcode 7

After upgrading to Xcode 7 I have noticed that the CFBundleIdentifier has started to point to Product Bundle Identifier found in Build Settings/Packaging instead of the Bundle Identifier in the Info.Plist.
Is there any way to change it back? Or will it simply work to point back to Bundle Identifier, i.e. write $(BUNDLE_IDENTIFIER) in the Product Bundle Identifier field?
You should keep the $(PRODUCT_BUNDLE_IDENTIFIER) in your Info.plist and set your product bundle identifier in Build Settings > Product Bundle Identifier with a value of something like com.mydomain.myappname.
From the Xcode 7.0 release notes:
The new build setting Product Bundle Identifier (PRODUCT_BUNDLE_IDENTIFIER) is the recommended place to set the Bundle Identifier for a target. The target’s Info.plist should be configured to use this build setting by referencing it as $(PRODUCT_BUNDLE_IDENTIFIER) in the value for the CFBundleIdentifier key.
Xcode offers to configure this for you when you accept the “Upgrade to recommended settings” project modernization in the issue navigator, unless your target preprocesses its Info.plist file. In that case you will need to configure this setting manually. This change is backwards-compatible to older versions of Xcode.
This change is required to make certain features work, such as On Demand Resources, if your target preprocesses its Info.plist file. (20887827)

Xcode submit the app to the store

I am trying to submit my app to the AppStore but when i do it an error message appear with this:
ERROR ITMS-90329 your package contains a file 'Myapp .app/Myapp' with
a name that contains leading or trailing whitespace
How can i solve this problem? (i already changed the product name, bundle name, bundle display name, project name)
Go Info.plist and change Product Name "Myapp " to "Myapp".
Go to build settings of targets in Xcode and select the Packaging section and check the Product Name its can contains leading or trailing whitespace.

Changing iOS App name in new update?

I currently have an app which is in the iOS store, but in the new version I am wanting to change the entire name of the app with the upcoming update, with this what will I need to update?
The only things I can think of is the bundle ID & name in the developer centre, is that all?
No need to change the bundle ID since it's the same app.
I would suggest changing the name in the developer center, AND changing the "Bundle display name" in the plist. This will affect the name in the appstore as well as the name displayed under the app icon once it's installed on a device.
To change Bundle display name: Go to targets and select target. Select "Info" section. Under "Custom iOS target properties", add a new key with the name Bundle display name. Set value to new name.

How to change the bundle identifier in xcode

I want to publish my app on iTunes.When i enter the app name and bundle id it shows an error that app name and app id is already benn used.I searched on it and only solution i got is to change tha app name and bundle id.
But the app id should be the same as bundle identifier in our xcode project.So can anyone tell me how to change the bundle identifer in the xcode project.
Goto the settings of your app target. Under general section you can change your bundle identifier. Usually bundle identifier goes like com.companyID.appName
Try to change in your app target -> General -> Identity -> Bundle Identifier.
But if app name is written in gray color there then it is likely because you have a product name variable, something like .${PRODUCT_NAME:rfc1034identifier}, appended to the end of your bundle identifier under Target (your application) > Info (info.plist). Try removing that.

Bundle identifier changed after changing application name

a little stuck here,
I changed the name of my application, the bit that will show under the icon on a device, bundle identifier right ? I want to submit an update to my app, but now my bundle identifier is different, and there is no code signing identity profile to select to validate/distribute. How do I go about submitting my app if the identifiers are different?
Really confused
any help would be much appreciated
thanks
By default your bundle identifier is com.yourcompany.${PRODUCT_NAME:rfc1034identifier} in your Info.plist (Bundle identifier key), if you change PRODUCT_NAME you change also your bundle identifier. You can specify other bundle identifier in Info.plist which you can find in Project Navigator. To change the name of application in Spring Board (under icon) you have to change Bundle display name in Info.plist. For more details about Info.plist read apple documentation:
https://developer.apple.com/library/ios/#documentation/General/Reference/InfoPlistKeyReference/Introduction/Introduction.html

Resources