0
votes

What I did :

  • Tried to build project

What happened :

  • It failed with "Error:The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation."
  • The libPods.a is not generated

I have the latest cocoapods installed, and this is my podfile :

source 'https://github.com/CocoaPods/Specs.git'

inhibit_all_warnings!
platform :ios, '7.0'

target :MyProjectTests, :exclusive => true do
    pod 'OCMock'
end

I have seen similar issues reported at CocaPods project on github, but nothing seems to work.

I don't need any pods for my main project, I'd just like to use OCMock for testing.

2
So, just run 'pod install'. - Yevgeniy Leychenko
Yeah, been there done that. A couple of times. No luck. I even removed the *.xcworkspace so it would get generated again. No luck. - Losiowaty

2 Answers

0
votes

You should check that the Manifest.lock file is identical to Podfile.lock. These files should be the same when a pod install command is executed. If not, you should check if someone that is collaborating on your GIT project is changing the Podfile.lock (as it is usually under version control).

-1
votes

Yo have to add the Test target to the Podfile between the main target:

target :mainTarget do
    link_with "MainTarget"
    //Added pods...
    target :tests do
        link_with "Tests"
    end
end