[SOLVED] App name in config.xml with spaces?

Hi all.

I can put a name with spaces to the app?
I had to start the app called “test”, now I have to go in distribution, I would rename it to “Test New” (with space).
I tried changing the config.xml:

<name>Test New</name>

but if I try to build, return me error of parse.
work If i change the name in:

<name>Test-New</name>

So I thought that we can not enter spaces in the name of the app, but it seems strange … there’s a workaround?

I do not know why, but doing:

ionic platform remove ios

and:

ionic platform add ios

and:

ionic build ios

now work

I have the same issue, if I put spaces in name then my .plist file containes spaces and when i do ionic build ios i get errors

2015-10-29 17:13:14.802 xcodebuild[26191:1531154] CFPropertyListCreateFromXMLData(): Old-style plist parser: missing semicolon in dictionary on line 108. Parsing will be abandoned. Break on _CFPropertyListMissingSemicolon to debug.
2015-10-29 17:13:14.809 xcodebuild[26191:1531154] CFPropertyListCreateFromXMLData(): Old-style plist parser: missing semicolon in dictionary on line 108. Parsing will be abandoned. Break on _CFPropertyListMissingSemicolon to debug.
2015-10-29 17:13:14.811 xcodebuild[26191:1531154] Error Domain=NSCocoaErrorDomain Code=3840 "Unexpected character / at line 1" UserInfo={NSDebugDescription=Unexpected character / at line 1, kCFPropertyListOldStyleParsingError=Error Domain=NSCocoaErrorDomain Code=3840 "Missing ';' on line 108" UserInfo={NSDebugDescription=Missing ';' on line 108}}
xcodebuild: error: Unable to read project 'ADCB Private Concierge.xcodeproj'.
	Reason: Project /Users/yuri/Sites/quintessentially/q-life-style-app/app/platforms/ios/ADCB Private Concierge.xcodeproj cannot be opened because the project file cannot be parsed.


Error code 74 for command: xcodebuild with args: -xcconfig,/Users/yuri/Sites/quintessentially/q-life-style-app/app/platforms/ios/cordova/build-debug.xcconfig,-project,ADCB Private Concierge.xcodeproj,ARCHS=i386,-target,ADCB Private Concierge,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/yuri/Sites/quintessentially/q-life-style-app/app/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/yuri/Sites/quintessentially/q-life-style-app/app/platforms/ios/build/sharedpch

As soon as I remove spaces it builds for ios again

Am I the only person who cannot add spaces to app name in config.xml when building for ios?

I was having the same issue so I created a Cordova plugin that let’s me set the display separate from the app name.

Try this

cordova plugins add cordova-plugin-app-name --variable APP_NAME="ADCB Private Concierge" --save

I’m specifically not using ionic to install the plugin because it does something weird with the value of the APP_NAME variable.

3 Likes

You literally have to add a cordova plugin to allow spaces in the name?

@blakgeek Solution work for me ! Thanks !

You can make the necessary changes by hand but they’ll get overwritten every time you build. So sadly the answer is yes. It’s a limitation imposed by how the app name get’s used by Cordova which Ionic is built on top of.

The solution is working for me. Getting the following error.

2016-09-07 16:35:40.328 xcodebuild[10169:148374] CFPropertyListCreateFromXMLData(): Old-style plist parser: missing semicolon in dictionary on line 48. Parsing will be abandoned. Break on _CFPropertyListMissingSemicolon to debug.

2016-09-07 16:35:40.329 xcodebuild[10169:148374] CFPropertyListCreateFromXMLData(): Old-style plist parser: missing semicolon in dictionary on line 48. Parsing will be abandoned. Break on _CFPropertyListMissingSemicolon to debug.

2016-09-07 16:35:40.395 xcodebuild[10169:148374] Error Domain=NSCocoaErrorDomain Code=3840 “Unexpected character / at line 1” UserInfo={NSDebugDescription=Unexpected character / at line 1, kCFPropertyListOldStyleParsingError=Error Domain=NSCocoaErrorDomain Code=3840 “Missing ‘;’ on line 48” UserInfo={NSDebugDescription=Missing ‘;’ on line 48}}

Please help !!

Environment Information

Cordova CLI: 5.0.0
Ionic CLI Version: 2.0.0
Ionic App Lib Version: 2.0.0
ios-deploy version: 1.8.2
ios-sim version: 4.1.1
OS: Mac OS X El Capitan
Node Version: v0.12.7
Xcode version: Xcode 7.3 Build version 7D175

@Soumen Can you enter a defect in github and I’ll take a look? Thanx.

@Soumen What are you setting the app name to?

Sorry for the late reply. I upgraded cordova CLI to 5.4.1 and it worked for me. And thanks for your concern.

Ran into this in Ionic 2 - is this really still the recommended solution, to install the cordova-plugin-app-name? Seems like something Ionic/Cordova would support directly, a space in app name is very common.

Is there an open bug on this topic?

@blakgeek hi, does your plugin support ionic cloud package?

I’m not sure. Give it try and if you run into issues I’ll see if I can make the necessary changes. Or feel free to create a PR.

Sorry this is coming in late as the last reply is over two years now. Thanks for the plugin, it worked for me on android app but can’t get it to work on windows 10 version of the app. Does this plugin support windows 10 platform? Note: I have not tried it on iOS platform, however, does is support iOS platform too or just android platform?

Thanks again for the plugin.