Xcode 6.3正在项目重命名上崩溃

时间:2022-06-08 10:33:08

I just updated my Xcode 6.3. I am getting an issue while project renaming. Is there any solution?

我刚刚更新了Xcode 6.3。我在项目重命名时遇到了一个问题。有什么解决方案吗?

And in some case it is showing mymac instead of simulators or devices in schema - device section on top left side.

在某些情况下,它显示的是mymac,而不是在左上角的模式-设备部分的模拟器或设备。

6 个解决方案

#1


17  

This issue is resolved in XCode 6.4 , please update your XCode. If you are still using 6.3 then follow below solution. But I prefere to update Xcode to 6.4.

It is little different ,we have to follow some new procedure.

这没什么不同,我们得遵循一些新程序。

1) Change your xcodeproj file name first without opening it.

1)先更改您的xcodeproj文件名,不要打开它。

2) Change Target name from Project Editor by double clicking on target name.

2)双击目标名称,从项目编辑器中更改目标名称。

Xcode 6.3正在项目重命名上崩溃

3) If your project name is not changed yet , you can do it by right side of your xCode as shown in below figure.

3)如果您的项目名称尚未更改,您可以在xCode的右边进行更改,如图所示。

Xcode 6.3正在项目重命名上崩溃

4) You can change plist file name manually.

4)可以手动更改plist文件名。

5) Now for solving scheme issue , you have to remove current scheme and have to add newer scheme with proper name.

5)现在要解决方案问题,你需要删除当前方案,并添加新方案的名称。

Xcode 6.3正在项目重命名上崩溃

Xcode 6.3正在项目重命名上崩溃

Remove older schemes shown as above(by selecting it and removing by clicking on "-" button) and add newer one(By clicking on "+" button from manage scheme and adding proper name).

删除上面所示的旧方案(通过选择它并单击“-”按钮删除),并添加新方案(通过从管理方案中单击“+”按钮并添加适当的名称)。

#2


8  

After crashing, the extension "xcodeproj" disappears. So what you need is to add the extension. After opening project, all targets gone. You need to remove current scheme (Manage Schemes>Delete"), then add a new scheme with proper name. In my case, it works.

在崩溃之后,扩展“xcodeproj”消失了。所以你需要的是添加扩展名。项目开始后,所有的目标都消失了。您需要删除当前的方案(管理方案>删除),然后添加一个具有适当名称的新方案。在我的例子中,它起作用了。

#3


5  

Manually rename in the finder App.xcodeproj and App-info.plist to YourNewAppName.xcodeproj and YouNewAppName-info.plist. Control click on YourNewAppName.xcodeproj and chose Show Package Contents, manually rename App.xcscheme to YouNewAppName.xcscheme

在finder App.xcodeproj和App-info中手动重命名。plist YourNewAppName。xcodeproj YouNewAppName-info.plist。点击YourNewAppName控制。xcodeproj和选择Show Package Contents,手工将App.xcscheme重命名为YouNewAppName.xcscheme

Open project.pbxproj, YouNewAppName.xcscheme and xcschememanagement.plist files in your favorite text editor other than Xcode. Find and replace one at a time all instances of App to YourNewAppName then Save.

开放的项目。pbxproj YouNewAppName。xcscheme xcschememanagement。plist文件在除Xcode之外的您最喜欢的文本编辑器中。每次查找并替换一个应用程序的所有实例到newappname,然后保存。

Control click on project.xcworkspace and chose Show Package Contents and open UserInterfaceState.xcusersate in text editor. Find and replace one at a time all instances of App to YourNewAppName then Save.

点击控制项目。选择显示包内容和打开UserInterfaceState。xcusersate在文本编辑器。每次查找并替换一个应用程序的所有实例到newappname,然后保存。

Open YourNewAppName.xcodeproj in Xcode and change under the Project Document settings: Project Format Xcode 6.3-compatible

YourNewAppName开放。xcodeproj在Xcode中,并在项目文档设置下更改:项目格式Xcode 6.3兼容

...or for an easier time go back to Xcode 6.2.

…或者回到Xcode 6.2。

#4


2  

this might be a late reply, but definitely useful for some readers later on. Note: Renaming manually here and there is simply a risk and time-consuming. There a more effective way of doing it via Command-line with just 3 statements. Read on.

这可能是一个很晚的回复,但对以后的一些读者肯定是有用的。注意:在这里手动重命名,存在一个简单的风险和时间。有一种更有效的方法,通过命令行只使用3个语句。继续读下去。

Two Solutions exist:

存在两种解决方案:

1- Upgrade to Xcode 6.3.2 GM seed or later

1-升级到Xcode 6.3.2 GM seed或更高版本

2- Replace by command-line - it’s fast & furious..urm effective!! Mention not

2-用命令行替换-它是速度和激情。阶层有效! !提不

/// Install Ack. For info on Ack, see: http://beyondgrep.com/why-ack/

$ brew install rename ack

/// Two Commands to execute to do renaming - one for File names & 2nd for 'leterals' inside files

$ find . -name 'OldProjectName*' -print0 | xargs -0 rename -S 'OldProjectName' 'NewProjectName'

$ ack --literal --files-with-matches 'OldProjectName' | xargs sed -i '' 's/OldProjectName/NewProjectName/g'

/// Check to see if all renaming was a success. The following command indicates a success IF & ONLY IF no result is output

$ ack --literal 'OldProjectName'

#5


0  

Edit the Project (the top item in the Navigator panel) with the Utilities panel open (cmd-option-zero). Type the new project name into the box at the top of the Utilities panel. That's the box labeled "Name" in the "Identity and Type" section. When you change the name in that box a dialog pops up asking if you want to change the name of various files. Accept all of the suggested changes. That works for me with Xcode 6.3.2. It successfully changes the project name and the projects loads and runs on either a device or the simulator. I didn't experiment with not accepting some of the suggested changes.

使用公用事业面板打开(cmd- optionzero)编辑项目(导航面板中的顶部项目)。在“实用工具”面板顶部的框中键入新的项目名称。这是“标识和类型”部分中标有“名称”的框。当您在该框中更改名称时,会弹出一个对话框,询问是否要更改各种文件的名称。接受所有建议的更改。这对Xcode 6.3.2也适用。它成功地更改了项目名称,项目在设备或模拟器上加载和运行。我没有尝试不接受一些建议的改变。

Previously I tried to change the project name by editing the name in the "Project" or "Targets" section in the narrow panel near the center of the screen, which is where I changed the project name in previous Xcode versions. But when I edited it there in Xcode 6.3 the project wouldn't build or it crashed.

在此之前,我试图通过编辑屏幕中心附近的窄面板中的“项目”或“目标”部分中的名称来更改项目名称,在以前的Xcode版本中,我就是在这个面板中修改项目名称的。但当我在Xcode 6.3中对它进行编辑时,项目不会构建,否则就会崩溃。

#6


0  

I just did a small trick.

我做了一个小戏法。

I changed the 'Product Name' in Build Settings and give new name. the rest happened by its own. that is the Xcode also renamed folder and files.

我在构建设置中更改了“产品名称”,并给出了新的名称。剩下的就靠自己了。这就是Xcode也被重命名为文件夹和文件。

#1


17  

This issue is resolved in XCode 6.4 , please update your XCode. If you are still using 6.3 then follow below solution. But I prefere to update Xcode to 6.4.

It is little different ,we have to follow some new procedure.

这没什么不同,我们得遵循一些新程序。

1) Change your xcodeproj file name first without opening it.

1)先更改您的xcodeproj文件名,不要打开它。

2) Change Target name from Project Editor by double clicking on target name.

2)双击目标名称,从项目编辑器中更改目标名称。

Xcode 6.3正在项目重命名上崩溃

3) If your project name is not changed yet , you can do it by right side of your xCode as shown in below figure.

3)如果您的项目名称尚未更改,您可以在xCode的右边进行更改,如图所示。

Xcode 6.3正在项目重命名上崩溃

4) You can change plist file name manually.

4)可以手动更改plist文件名。

5) Now for solving scheme issue , you have to remove current scheme and have to add newer scheme with proper name.

5)现在要解决方案问题,你需要删除当前方案,并添加新方案的名称。

Xcode 6.3正在项目重命名上崩溃

Xcode 6.3正在项目重命名上崩溃

Remove older schemes shown as above(by selecting it and removing by clicking on "-" button) and add newer one(By clicking on "+" button from manage scheme and adding proper name).

删除上面所示的旧方案(通过选择它并单击“-”按钮删除),并添加新方案(通过从管理方案中单击“+”按钮并添加适当的名称)。

#2


8  

After crashing, the extension "xcodeproj" disappears. So what you need is to add the extension. After opening project, all targets gone. You need to remove current scheme (Manage Schemes>Delete"), then add a new scheme with proper name. In my case, it works.

在崩溃之后,扩展“xcodeproj”消失了。所以你需要的是添加扩展名。项目开始后,所有的目标都消失了。您需要删除当前的方案(管理方案>删除),然后添加一个具有适当名称的新方案。在我的例子中,它起作用了。

#3


5  

Manually rename in the finder App.xcodeproj and App-info.plist to YourNewAppName.xcodeproj and YouNewAppName-info.plist. Control click on YourNewAppName.xcodeproj and chose Show Package Contents, manually rename App.xcscheme to YouNewAppName.xcscheme

在finder App.xcodeproj和App-info中手动重命名。plist YourNewAppName。xcodeproj YouNewAppName-info.plist。点击YourNewAppName控制。xcodeproj和选择Show Package Contents,手工将App.xcscheme重命名为YouNewAppName.xcscheme

Open project.pbxproj, YouNewAppName.xcscheme and xcschememanagement.plist files in your favorite text editor other than Xcode. Find and replace one at a time all instances of App to YourNewAppName then Save.

开放的项目。pbxproj YouNewAppName。xcscheme xcschememanagement。plist文件在除Xcode之外的您最喜欢的文本编辑器中。每次查找并替换一个应用程序的所有实例到newappname,然后保存。

Control click on project.xcworkspace and chose Show Package Contents and open UserInterfaceState.xcusersate in text editor. Find and replace one at a time all instances of App to YourNewAppName then Save.

点击控制项目。选择显示包内容和打开UserInterfaceState。xcusersate在文本编辑器。每次查找并替换一个应用程序的所有实例到newappname,然后保存。

Open YourNewAppName.xcodeproj in Xcode and change under the Project Document settings: Project Format Xcode 6.3-compatible

YourNewAppName开放。xcodeproj在Xcode中,并在项目文档设置下更改:项目格式Xcode 6.3兼容

...or for an easier time go back to Xcode 6.2.

…或者回到Xcode 6.2。

#4


2  

this might be a late reply, but definitely useful for some readers later on. Note: Renaming manually here and there is simply a risk and time-consuming. There a more effective way of doing it via Command-line with just 3 statements. Read on.

这可能是一个很晚的回复,但对以后的一些读者肯定是有用的。注意:在这里手动重命名,存在一个简单的风险和时间。有一种更有效的方法,通过命令行只使用3个语句。继续读下去。

Two Solutions exist:

存在两种解决方案:

1- Upgrade to Xcode 6.3.2 GM seed or later

1-升级到Xcode 6.3.2 GM seed或更高版本

2- Replace by command-line - it’s fast & furious..urm effective!! Mention not

2-用命令行替换-它是速度和激情。阶层有效! !提不

/// Install Ack. For info on Ack, see: http://beyondgrep.com/why-ack/

$ brew install rename ack

/// Two Commands to execute to do renaming - one for File names & 2nd for 'leterals' inside files

$ find . -name 'OldProjectName*' -print0 | xargs -0 rename -S 'OldProjectName' 'NewProjectName'

$ ack --literal --files-with-matches 'OldProjectName' | xargs sed -i '' 's/OldProjectName/NewProjectName/g'

/// Check to see if all renaming was a success. The following command indicates a success IF & ONLY IF no result is output

$ ack --literal 'OldProjectName'

#5


0  

Edit the Project (the top item in the Navigator panel) with the Utilities panel open (cmd-option-zero). Type the new project name into the box at the top of the Utilities panel. That's the box labeled "Name" in the "Identity and Type" section. When you change the name in that box a dialog pops up asking if you want to change the name of various files. Accept all of the suggested changes. That works for me with Xcode 6.3.2. It successfully changes the project name and the projects loads and runs on either a device or the simulator. I didn't experiment with not accepting some of the suggested changes.

使用公用事业面板打开(cmd- optionzero)编辑项目(导航面板中的顶部项目)。在“实用工具”面板顶部的框中键入新的项目名称。这是“标识和类型”部分中标有“名称”的框。当您在该框中更改名称时,会弹出一个对话框,询问是否要更改各种文件的名称。接受所有建议的更改。这对Xcode 6.3.2也适用。它成功地更改了项目名称,项目在设备或模拟器上加载和运行。我没有尝试不接受一些建议的改变。

Previously I tried to change the project name by editing the name in the "Project" or "Targets" section in the narrow panel near the center of the screen, which is where I changed the project name in previous Xcode versions. But when I edited it there in Xcode 6.3 the project wouldn't build or it crashed.

在此之前,我试图通过编辑屏幕中心附近的窄面板中的“项目”或“目标”部分中的名称来更改项目名称,在以前的Xcode版本中,我就是在这个面板中修改项目名称的。但当我在Xcode 6.3中对它进行编辑时,项目不会构建,否则就会崩溃。

#6


0  

I just did a small trick.

我做了一个小戏法。

I changed the 'Product Name' in Build Settings and give new name. the rest happened by its own. that is the Xcode also renamed folder and files.

我在构建设置中更改了“产品名称”,并给出了新的名称。剩下的就靠自己了。这就是Xcode也被重命名为文件夹和文件。