我必定缺乏明顯的東西,可是我不知道如何在Xcode 4中重命名個人項目。 後端
若是我沒記錯的話,Xcode 3有專門的菜單項,可是Xcode 4中沒有這樣的條目。 xcode
除了重命名項目以外,您可能還須要重命名方案,使其與您的新項目名稱匹配。 app
更改方案名稱: 框架
Product ==> Manage Schemes...
ui
而後選擇您的方案,而後按回車/輸入以編輯名稱。 spa
或者, Product ==> New Scheme...
以您的新名稱建立一個新Product ==> New Scheme...
:) code
重命名項目確實是最好的方法。 get
這是我在Xcode 4.3.2中執行的操做: io
我使用一系列相似的後端框架和圖標製做自定義配件。 沒有什麼是完美的,可是當應用程序有不少類似之處時,這是節省大量配置點擊次數的快速方法。 ast
這些都不對我有用。 緣由是在Finder中,我已經手動將oldAppName.xcodeproj更改成
newAppName.xcodeproj
使用新名稱,所以當我嘗試在Xcode 4中編輯項目名稱時,出現一個錯誤,由於它已經存在,所以沒法保存newAppName.xcodeproj。 解決方案是使用Finder將newAppName.xcodeproj更改成
anyOtherName.xcodeproj,
而後我能夠在Xcode中編輯項目名稱,而後Xcode將anyOtherName.xcodeproj重命名爲newAppName.xcodeproj。
還有另外一種方法。
要在Xcode 4中重命名項目,請從項目窗口左側的項目導航器中選擇項目文件。 選擇「視圖」>「實用程序」>「文件檢查器」以打開項目窗口右側的文件檢查器。 文件檢查器頂部是「項目名稱」文本字段。 輸入新的項目名稱,而後按Return鍵或Tab鍵。
將打開一個工做表,詢問您是否要重命名項目內容項。 單擊重命名按鈕以完成對項目的重命名。
除了提供的其餘答案以外,若是您還想重命名默認狀況下放置文件的文件夾 (該文件夾與* .xcodeproj文件位於同一級別),請執行如下步驟:
- In Finder copy and paste the '<RootFolder>/<OldProjectName>' folder (in the same location) and rename the copied folder to '<RootFolder>/<NewProjectName>' - In XCode in the 'Project Navigator' (first tab in the pane on the left) foreach ('Group' you have in your project) { Select the 'Group' and observe the details in the 'File Inspector' (first tab in the pane on the right) if ('Path' == 'Relative to Group' AND 'Full Path' == '<RootFolder>/<OldProjectName>') { Click the icon to change the path of the 'Group' Choose the '<RootFolder>/<NewProjectName> folder } } - Delete the '<RootFolder>/<OldProjectName>' folder - Open the Project Settings, choose the Project target and under 'Build Settings' - find change the path appropriately for the following values: 'Prefix Header' and 'Info.plist file'
這樣就完成了。
若是您還有Tests文件夾,則將要重複相同的步驟。