ChandreshKanetiya
ChandreshKanetiya

Reputation: 2414

Could not open workspace file of Xcode

When I am open my project in Xcode. it's not open. Display following alert.

I also delete the project.xcworkspace file and create new scheme for this project. so that it can be open. but when I am shut down or restart my pc and then once again open the project, it's not opening and display following alert with some error.

so please tell me how to solve this error.

Upvotes: 4

Views: 14185

Answers (7)

Rahul Shakya
Rahul Shakya

Reputation: 1425

Open go the project directory and directly right click and open the .xcworkspace it will open

Upvotes: 6

ScottyBlades
ScottyBlades

Reputation: 14033

Oddly enough, when I got this when I tried opening the project directly from the folder. enter image description here

When I opened the project from the Xcode window there was no problem. enter image description here

Upvotes: 0

Vipin Pareek
Vipin Pareek

Reputation: 246

After doing all the stuff these steps are helpfull for me so try it:-

Open your project folder and then Right click on the .xcodeproj file and then select Show Package Contents and delete project.xcworkspace file. if there is any package are added then you must to delete and add once again in your project to run your project.

Upvotes: 2

Shweta
Shweta

Reputation: 1247

Close Xcode and restart you mac. Then open Xcode project again. It will work.

Upvotes: 2

iOS_Tejas
iOS_Tejas

Reputation: 269

Try this: go to the path and select xcodeproj

Right click on the .xcodeproj file and then select Show Package Contents. Then delete project.xcworkspace file. now Open the project in Xcode and run it.

Upvotes: 0

Piyush Naredi
Piyush Naredi

Reputation: 171

Go to this path by Finder -> Go To folder -> Paster above error path. -> Go. Now delete the content.xcworkspacedata file shown there. Now retry opening the project. It will be opened

Upvotes: -2

ericmarkmartin
ericmarkmartin

Reputation: 817

If you are tracking an Xcode project in git, often what will happen is you change your workspace set up, which alters your workspace files (which are stored in the special directory known as the .xcodeproj file). This can often cause merge conflicts between you're working copy and the remote branch. The best way to resolve this would be to find the file where the merge conflict is occurring, open it with a text editor, and resolve the merge conflict. If you are unfamiliar with merge conflicts and resolving them, I suggest you check out this guide: http://www.gitguys.com/topics/merging-with-a-conflict-conflicts-and-resolutions/

In the long run however, you might want to add the workspace files to the git ignore list, so that you are not including the way you resized your window every time you commit to your repository.

Hope this helps!

Upvotes: 1

Related Questions