xcode 如何更改我的 iOS 项目的名称?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4369358/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How can I change the name of my iOS project?
提问by Moshe
How can I change a name of my project in the Xcode?
如何在 Xcode 中更改我的项目名称?
回答by Moshe
Newer Versions of Xcode
较新版本的 Xcode
According to the Xcode documentationsays that you can select your project in the lefthand panel and then open the properties inspector. By editing the project name, you'll be prompted to renamed targets etc.
根据Xcode 文档说,您可以在左侧面板中选择您的项目,然后打开属性检查器。通过编辑项目名称,系统会提示您重命名目标等。
Original Answer
原答案
I'm not sure exactly what you are asking, so I've given two parts to my answer.
我不确定你在问什么,所以我给出了两个部分的答案。
To change the display name of your project, (under the icon on the home screen) you should edit your Info.plist file in the Resources
group of your project. Change the Bundle Display Name
key. Make sure that you save the plist file and that you've deleted the old app from the simulator. Then, clean your build and then you can build it again to the simulator.
要更改项目的显示名称,(在主屏幕上的图标下)您应该编辑Resources
项目组中的Info.plist 文件。更改Bundle Display Name
密钥。确保你保存了 plist 文件并且你已经从模拟器中删除了旧的应用程序。然后,清理您的构建,然后您可以再次将其构建到模拟器。
To change the name of your project, target and executable, click on Project
-> Rename...
in Xcode.
要更改项目、目标和可执行文件的名称,请在 Xcode 中单击Project
-> Rename...
。
回答by Jayprakash Dubey
It's simple. Just press enter on name of project. Rename your project as desired. This will prompt changes to be done in entire Project. Click on Rename.
这很简单。只需在项目名称上按 Enter 键。根据需要重命名您的项目。这将提示在整个项目中进行更改。单击重命名。
回答by hotpaw2
Ap iOS app under construction has at least 6 "names". They can all be different and can be set in different places.
正在构建的 iOS 应用程序至少有 6 个“名称”。它们都可以不同,并且可以设置在不同的位置。
- Project name.
- Target name.
- Product name (which will become the .app bundle file name, should have no spaces).
- Bundle display name (in the info.plist, displayed under the icon, spaces allowed).
- Bundle ID suffix.
- App name you give iTunes Connect.
- 项目名。
- 目标名称。
- 产品名称(将成为 .app 包文件名,不应有空格)。
- 捆绑显示名称(在 info.plist 中,显示在图标下,允许有空格)。
- 捆绑 ID 后缀。
- 您为 iTunes Connect 提供的应用程序名称。
Depending on what you change, you may need to delete the app from your device/simulator, and reinstall/build-and-run, to quickly see the changes.
根据您的更改,您可能需要从设备/模拟器中删除应用程序,然后重新安装/构建并运行,以快速查看更改。
回答by hotpaw2
Ah, I figured it out already. You need to change the active target.
啊,我已经想通了。您需要更改活动目标。
回答by Ameer
If you want to change Project Name, Target name, -Info.plist name & -Prefix.pch name then,
如果要更改项目名称、目标名称、-Info.plist 名称和 -Prefix.pch 名称,则,
- Select Project in Xcode (.xcodeproj file)
- Selecte file inspector
- In identity section change project name which u want to update & press enter
- After scanning whole project it will ask to change the file names i.e target, plist & pch file
- Select check boxes as per your need
回答by Abizern
回答by Hoàng Ngh?a
if only change display name under app icon in device main screen you just need change "Bundle display name" key of target at tab info.
如果只更改设备主屏幕中应用程序图标下的显示名称,您只需更改选项卡信息中目标的“捆绑显示名称”键。
回答by Linuxmint
1) Expand the "Resources" folder
1)展开“资源”文件夹
2) Click on the "yourappname-info.plist"
2)点击“ yourappname-info.plist”
3) Expand the "Information Property List"
3)展开“信息属性列表”
4) You can change the "Bundle Display Name" to anything you want to display on the iPhone Home Screen.
4) 您可以将“捆绑显示名称”更改为您想要在 iPhone 主屏幕上显示的任何内容。
回答by Artem Oboturov
@Mosche This question should be updated for XCode 4.
@Mosche 这个问题应该针对 XCode 4 更新。
Seems one has to use sed in .xcodeproj directory:
似乎必须在 .xcodeproj 目录中使用 sed :
find . -type f -exec sed -i -e 's/OldProjectName/NewProjectName/g' {} \;