2013-02-04 72 views
0

使用Xcode 4.5.2时,我想创建名称为“我的应用程序”的项目(使用文件 - >新建 - >项目)。如果你不将它添加到现有的项目,将创建下列目录,假设你指定的目录“IOS” Xcode的:如何使iOS项目的目录与产品名称不同

ios/My App/My App/ 
ios/My App/My App.xcodeproj/ 

创建项目时,你是不是允许指定的名称上面的目录。我想要改变这个目录结构:

ios/MyApp/ 
ios/MyApp.xcodeproj/ 

即在'ios'下直接创建的名称和目录中没有空格。产品名称应该仍然是“我的应用程序”,并有空间。你会如何去做这件事?谢谢你的帮助。

回答

1

产品名称,您可以更改:

1)打开XCode项目,然后按CMD + 1

2)选择您在左侧面板

3)项目选择你的目标在中间面板

4)点击以 '构建设置'

5)查找 '产品名称'

在这里你可以写你的产品名称。产品名称是不是从你的目录名

+0

感谢您抽出时间回复。所以在创建项目时,名称中没有空格,这会创建没有空格的目录。然后更改产品名称以在其中留出空间。这需要照顾我需要的一件事。第二个是摆脱中间'MyApp'目录并在'ios'本身下创建2个目录。 –

0

经过一番尝试这里因是第二部分的步骤:

- Show Navigator pane 
- In Project Navigator, select project 'MyApp' 
- Show Utilities pane 
- Select File Inspector in Utilities pane 
- Under Identity, click on the right arrow next to the Full Path of the project directory 
- In the Finder that pops up, rename the parent MyApp to xyz. You'll see a popup that promts to either 'Close' or 'Re-save'. Select Close. 
- The xcode window disappears. 
- In the Finder, move MyApp and MyApp.xcodeproj one level above from where they are - i.e. to be at the same level as xyz. 
- Delete xyz 
- Double-click on MyApp.xcodeproj to open it in xcode. 
- It should now work 
相关问题