Xcode quits unexpectedly every time I open my project
IosXcodeMacosIos 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.
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.)
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:
- Go to project folder
- Open package contents of .xcworkspace
- Delete xcuserdata in package contents
- Remove it from Trash (optional)
- Go back and open .xcworkspace (XCode will prompt to reopen, but don't do this)
- 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
- Delete Project.xcworkspace first.
- Open Terminal
- Go to application folder
- Run command pod install
- Delete Derived Data
- Open Project.xcworkspace
It works for me.
Solution 16 - Ios
My Solved that worked
- Go to project folder
- open package contents of .xcodeproject
- Delete xcuserdata in package contents
- Go back and delete .xcworkspace
/// Please dont delete .pbxproj
Try to open your project and work :)