Xcode quits unexpectedly every time I open my project

IosXcodeMacos

Ios Problem Overview


I am just opening my xcode , when i open my current project its showing the warning like "xcode quit unexpectedly " with 3 options "Ignore","Report" and "Reopen",when i click reopen it will open xcode window and again automatically it will close and showing the same warning.

Why this is happening am not getting am a newbie,if anyone having idea on this plz help me out. if i open any other projects then its opening no issues...issue is with my Current App.

versions :
xcode is 4.3.1
mac OS X version is 10.7.3
Please tell me why its happening like this.

Ios Solutions


Solution 1 - Ios

Xcode stores some user state information inside the Xcode project “file”, which is really a folder. That state information might have become corrupted. You can normally throw away everything inside your .xcodeproj folder except the project.pbxproj file. This might fix your problem.

Open up the folder containing your .xcodeproj file. Right-click or control-click the .xcodeproj file and choose “Show Package Contents”. Then throw away everything except the project.pbxproj file.

cleaning an xcodeproj package

If you know what an Xcode workspace is, and you're actually making use of it, you might not have a project.xcworkspace file to throw away, or you might not want to throw it away. But if you don't know what an Xcode workspace is, then you're not using it so you can just throw away project.xcworkspace. Xcode will recreate it automatically.

Solution 2 - Ios

Deleting Derived Data worked for me. Just open another project or open xcode without opening your corrupted project. Than open preferences and go locations tab at the end. Click gray circle with arrow (where all your projects derived data are saved.)enter image description here

Delete your corrupted project's derived data in there and you are good to go.

Solution 3 - Ios

you can run XcodeSystemResources.pkg.

/Applications/Xcode.app/Contents/Resources/Packages/XcodeSystemResources.pkg.

I hope help to you

Solution 4 - Ios

I would recommend opening the terminal and copying in the following:

rm -rf ~/Library/Developer/Xcode/DerivedData

Note: credit to zirinisp for providing the answer that worked for me

Solution 5 - Ios

go to [ProjectName].xcworkspace file.Right click. Show package contents. Delete xcuserdata folder. After deleting, run the project it will work for sure.

Solution 6 - Ios

Just delete the Xcode saved state. It worked for me.

Solution 7 - Ios

I am using CocoaPod (XCode 8.2), these steps solved my issue:

  1. Go to project folder
  2. Open package contents of .xcworkspace
  3. Delete xcuserdata in package contents
  4. Remove it from Trash (optional)
  5. Go back and open .xcworkspace (XCode will prompt to reopen, but don't do this)
  6. Continue with your project :)

Solution 8 - Ios

Open project folder show package contents from .xcworkspace or .xcodeproj You will see 2 folders xcshareddata and xcuserdata Please remove xcuserdata folder Try to open application

Solution 9 - Ios

If you're using CocoaPods, just follow Rob's instruction but on the .xcworkspace file instead and do not delete the .xcworkspacedata file.

Solution 10 - Ios

It's 2021, still having this problem. Reboot doesn't help, OS update doesn't help.

Then I updated everything in the App Store (iMovie, Numbers, Pages, Keynote) and Xcode is now working.

Please don't ask why.

Solution 11 - Ios

I am using CocoaPods, and followed Rob's Instruction on the .xcworkspace file as indicated above by Allecto. After I "showed Package Contents" on the .xcworkspace file, the only thing I did was to rename the xcuserdata folder to xcuserdataCrashApril2. I was then able to open the project (workspace) with no problems. The only difference is xcode did not save the state of which .swift source code files were previously opened (which is not a big issue for me).

I suppose I can delete the xcuserdataCrashApril2 file, but I am keeping it out there as a reminder of what to do the next time this happens.

Solution 12 - Ios

I am using Xcode 8.3

Go to ~/Library/Developer/Xcode

Delete Derived Data folder and it works for me.

May help you.

Solution 13 - Ios

All the advices from above didn't help me so I added the pod file via pod init & pod install and successfully opened newly created .xcworkspace. Hope it helps somebody

Solution 14 - Ios

I also have this bug with XCode 10.3. In my case i launch app -> it displays alert "Quits unexpectedly" and it doesn't matter what i choose: to reopen or not - it crashes again.

Solution: Reboot Mac :))

Solution 15 - Ios

  1. Delete Project.xcworkspace first.
  2. Open Terminal
  3. Go to application folder
  4. Run command pod install
  5. Delete Derived Data
  6. Open Project.xcworkspace

It works for me.

Solution 16 - Ios

My Solved that worked

  1. Go to project folder
  2. open package contents of .xcodeproject
  3. Delete xcuserdata in package contents
  4. Go back and delete .xcworkspace

/// Please dont delete .pbxproj

Try to open your project and work :)

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionsuvarnaView Question on Stackoverflow
Solution 1 - Iosrob mayoffView Answer on Stackoverflow
Solution 2 - IosysnzlcnView Answer on Stackoverflow
Solution 3 - IosTolga İskenderView Answer on Stackoverflow
Solution 4 - Iossam_smithView Answer on Stackoverflow
Solution 5 - IosAmit ThakurView Answer on Stackoverflow
Solution 6 - IosBonDView Answer on Stackoverflow
Solution 7 - IossonnetView Answer on Stackoverflow
Solution 8 - IosNitinView Answer on Stackoverflow
Solution 9 - IosPaula HasstenteufelView Answer on Stackoverflow
Solution 10 - IosAitchView Answer on Stackoverflow
Solution 11 - IosAnthonyDView Answer on Stackoverflow
Solution 12 - IosAshuView Answer on Stackoverflow
Solution 13 - Iosveaceslav.makarovView Answer on Stackoverflow
Solution 14 - IosNikita HaikoView Answer on Stackoverflow
Solution 15 - IosYogendra SinghView Answer on Stackoverflow
Solution 16 - Iosindrit savetaView Answer on Stackoverflow