[ 
https://issues.apache.org/jira/browse/CB-10916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15533303#comment-15533303
 ] 

ASF GitHub Bot commented on CB-10916:
-------------------------------------

Github user fredgalvao commented on the issue:

    https://github.com/apache/cordova-ios/pull/228
  
    Is there any reason why this PR doesn't also export `CFBundleName` as the 
result of the short name on config.xml? Follow me for a while:
    
    According to [this page on the developer 
portal](https://developer.apple.com/library/content/qa/qa1892/_index.html) it 
seems like these two properties go along and, unless they are too big, should 
most probably have the same value.
    
    Now, with the recent findings and issues related to renaming projects 
(which causes malformed pbxproj files and unsolvable string search&replace 
operations), it seems to me like we could simply leave the project structure 
and project name (not to be confused with app name) a generic static value, and 
deal with the `<name>` and `<short-name>` outputing them to 
`CFBundleDisplayName` and `CFBundleName` respectively.
    
    That's what I did when I evolved my cordova project into a whitelabel, so 
that I could generate different apps with the same code base. However, in my 
case I needed to use a string replacement on `build.gradle` to set the 
`applicationId` on android (the app name works fine, it's updated in the 
string.xml correctly and my main activity class doesn't need to be renamed). 
There's an [issue](https://issues.apache.org/jira/browse/CB-11374) for the 
`applicationId` thing too, btw. On iOS, I also had to use 
[cordova-plugin-app-name](https://github.com/blakgeek/cordova-plugin-app-name/blob/master/plugin.xml)
 to deal with the "renaming breaks the project" issue (leaving the `<name>` 
untouched, otherwise I'd be screwed).
    
    ## Summary of my _opinion_
    
    To evolve into a more whitelabel-friendly structure with respect to naming 
apps:
    
    - Evolve `<name>` and `<short-name>` handling to affect **ONLY** 
{`strings.xml`@`app_name`} on android, and {`CFBundleName` + 
`CFBundleDisplayName`} on iOS, leaving the following items with a generic 
static name [activity class name on android, xcode project files (plist, 
pbxproj)].
    
    Please @shazron and @dpogue tell me what you think of all of this.


> Add ability to set different binary name and display name
> ---------------------------------------------------------
>
>                 Key: CB-10916
>                 URL: https://issues.apache.org/jira/browse/CB-10916
>             Project: Apache Cordova
>          Issue Type: Wish
>          Components: Android, iOS
>            Reporter: Jacob Weber
>            Priority: Minor
>
> I would like to use a different value for the binary filenames (.ipa/.apk) 
> and the app display name. Currently <name> in config.xml is used for both.
> If I set <name> to the value I want for the binary name, I have to manually 
> edit app_name in res/values/strings.xml and CFBundleDisplayName in 
> *-Info.plist.
> On the other hand, if I set <name> to the value I want for the display name, 
> I can manually rename the binaries, but the iOS .ipa file still contains an 
> .app file with the display name, and CFBundleExecutable still has the display 
> name.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to