Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Workspace created by cocoapods is locked

I'm using CocoaPods with a project. I ran pod install and it installed correctly. Then when I try to open the created xcworkspace Xcode displaying the error 'workspace file is locked'. I tried to unlock it but it's not working. It also didn't include some frameworks (Security.framework, MobileCoreServices.framework etc.) in workspace.

like image 758
kmithi Avatar asked Aug 07 '13 16:08

kmithi


People also ask

What is Podfile lock file?

Podfile. lock is used to make sure that every members of the team has the same versions of pods installed on the project. This file is generated after you run the command: pod install. It gets updated when you run pod install or pod update.

How do you remove CocoaPods?

Just rm -rf that pod's folder, and remove the line from the Podfile. Then run pod install again.

Can I delete Podfile?

lock, Pods/ and *. xcworkspace for you. The only thing left is Podfile, which you can remove it with remove command rm .


1 Answers

I had this problem recently. I don't know about the missing frameworks, but if you go to your project folder within terminal and modify the permissions on the project files, you should be able to open the project. I personally had to modify multiple files and folders to be able to get it to stop asking me if I want to unlock my files.

Steps that Worked for Me:

Use the terminal to go to the folder that contains the xcworkspace file. Type

sudo chmod 777 NameOfYourWorkspaceFile.xcworkspace 

(Please don't literally use that file name unless that's what your xcworkspace file is called). This should change the permissions for your entire workspace, but you will still have the unlock problem with your Pods project.

From within the same directory, you can do another chmod on the Pods folder like so:

sudo chmod 777 Pods

After that, go into your Pods folder by typing "cd Pods" and then modify the permissions on your Pods.xcodeproj file as so:

sudo chmod 777 Pods.xcodeproj

Like I said previously, these permission changes were enough to get xCode to stop asking me if I want to unlock my projects. I don't know if it will be enough for you though. Hopefully it helps!

like image 100
Heinous Games Avatar answered Oct 21 '22 12:10

Heinous Games