英文:
Can the app's executable filename be different from the app's display name?
问题
I am sure it was possible at least till lately to have the app's executable (the .app) filename different from the app's product name / display name.
Our app's name is in Chinese however until recently its executable filename was in English, say abc.app. I inherited this setup several years ago. Recently though we looked into changing the app's Chinese name (to another Chinese name) but decided eventually not to do so. However, since the attempt to change the app's name I have not been able to get the executable filename to be in English. No matter what it always is the same as the PRODUCT_NAME, which is in Chinese. I tried modifying the app's 'bundle name', 'bundle display name', 'executable file' and other settings. None worked.
By the way, the reason we want the executable's filename to be in English is: some of the code will have to be modified otherwise. For example the following statement will not work when [[NSBundle mainBundle] resourcePath]
contains non-English characters:
NSURL* url = [NSURL URLWithString:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:urlStr]];
英文:
I am sure it was possible at least till lately to have the app's executable (the .app) filename different from the app's product name / display name.
Our app's name is in Chinese however until recently its executable filename was in English, say abc.app. I inherited this setup several years ago. Recently though we looked into changing the app's Chinese name (to another Chinese name) but decided eventually not to do so. However, since the attempt to change the app's name I have not been able to get the executable filename to be in English. No matter what it always is the same as the PRODUCT_NAME, which is in Chinese. I tried modifying the app's 'bundle name', 'bundle display name', 'executable file' and other settings. None worked.
By the way, the reason we want the executable's filename to be in English is: some of the code will have to be modified otherwise. For example the following statement will not work when [[NSBundle mainBundle] resourcePath]
contains non-English characters:
> NSURL* url = [NSURL URLWithString:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:urlStr]];
答案1
得分: 0
Credit goes to @Cy-4AH, 这是一个正确的答案:
> 只需在 plist 中添加自定义文本,用于 CFBundleDisplayName。将 PRODUCT_NAME 和 target name 保留为英文。
英文:
Credit goes to @Cy-4AH, this is a correct answer:
> Just add custom text in plist for CFBundleDisplayName. PRODUCT_NAME
> and target name leave in english.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论