Xcode 6.3 is crashing on Project Rename
Asked Answered
A

6

26

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.

Appendectomy answered 17/4, 2015 at 7:7 Comment(3)
How do you rename the project ? Use Refactor function ?Intercede
@Intercede Nope, I just click on xcodeproj in opened xCode and it will ask for rename plist , and some other files. This is what i used to do in xcode 6.2 and earlier.Appendectomy
I have got the same problem.. and hoping that answer will solve my problemBiodynamics
A
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.

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

enter image description here

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

enter image description here

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.

enter image description here

enter image description here

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).

Appendectomy answered 24/4, 2015 at 5:28 Comment(8)
The steps you are mentioned above are correct. One thing you could add in your answer that after renaming the info.plist file manually to new project name, also change its name in the targets-> build settings -> Info.plist file.Donato
Is "It is little different ,we have to follow some new procedure." a new way of saying "There's a fatal bug by the provider of this software and you pay the price for it."?Andri
This is... beyond frustrating.Foltz
I am not getting best answer or best approach for this. But i can following this procedure :(Appendectomy
Apple should fix it, my xCode crash many times when I renaming my project name, it's bugging me.Conjugation
Version numbers are wrong - you're referencing Xcode 8 which simply doesn't exist yet. As of this post Xcode 7 beta 6 is the highest available Xcode. I think you mean 6.3 and 6.4.Mb
Thanks @SeanDev.. I mean 6.4. by mistake i wrote 8.4. Thanks for correction.Appendectomy
In XCode 6.4 to change the schema I used the menu Product > Schema > New SchemaDockage
C
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.

Cuff answered 20/4, 2015 at 10:52 Comment(4)
God bless you, man. I waste 4 hours without any luck till I probe your answer and finally works!Swede
Actually I think it is sufficient to delete the current scheme and then Autocreate the new scheme.Clarita
This do not rename the .xcdatamodeld file and info.plist file. So is it worth to do it by this way?Donato
This is a little different so I will follow this procedure.Andri
S
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

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.

Spondaic answered 17/4, 2015 at 17:3 Comment(1)
This is the only set of instructions that worked for me. Thanks! It's sad that this basic bit of functionality is broken in XCode 6.3.Ezmeralda
L
3

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'
Lindo answered 12/5, 2015 at 13:2 Comment(0)
C
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.

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.

Convenient answered 6/6, 2015 at 18:30 Comment(0)
K
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.

Karl answered 1/4, 2016 at 13:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.