Xcode 6.3 is crashing on Project Rename

走远了吗. 提交于 2019-11-27 23:00:39

问题


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

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


回答1:


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.

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

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

4) You can change plist file name manually.

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

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:


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.




回答3:


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

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.

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.

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

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




回答4:


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.

Two Solutions exist:

1- Upgrade to Xcode 6.3.2 GM seed or later

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

/// 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:


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.

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.




回答6:


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.



来源:https://stackoverflow.com/questions/29692487/xcode-6-3-is-crashing-on-project-rename

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!