When I build my app for development, I have no troubles. However when I try to build an archive/ipa from Xcode or using the schenzen gem I get this error:
diff: /../Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
Looking at the generated script I can see that the problem is ${PODS_ROOT} is not set to anything...
Any idea why this would happen and how to correct it?
BTW, I'm on cocoapods 0.29.0, iOS7
That's quite curious. I'll go take a look and see if we have any tests that cover it. Could you provide some information about your setup? Version of Ruby, pre-existing workspace or auto generated, your Podfile?
philswenson@zoso:~/dev/3rdRev/3R_iOS (login)$ ruby -v
ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-darwin12.2.0]
podfile:
platform :ios, :deployment_target => '7.0'
inhibit_all_warnings!
pod 'SDWebImage'
pod 'Reachability'
pod 'AFNetworking', '~>1.3.2'
pod 'Facebook-iOS-SDK'
pod 'KeychainItemWrapper'
#pod 'NSString-Ruby'
pod 'MRProgress', '~> 0.2'
pod 'NSDate+TimeAgo'
pod 'CTAssetsPickerController', :git => 'https://github.com/chiunam/CTAssetsPickerController'
pod 'LXReorderableCollectionViewFlowLayout', :git => 'https://github.com/lxcid/LXReorderableCollectionViewFlowLayout'
pod 'SSToolkit'
pod 'ObjectiveSugar'
pre-existing workspace? If I understand the question, it's generated by cocoa-pods. I opened the .xcworkspace directory that cocoa-pod created. Other other thing that might be of interest is I switch between XCode and AppCode. However both simply open the .xcworkspace directory.
My project starts with a digit (3rdrevolution). I can't imagine that matters, but just letting you know....
if needed, I can grant access to my project. Or we can do a screenshare....
is there anything I can do to pass in the PODS_ROOT?
As a quick fix you can find the full path to the Pods directory and pass it in under 'other C flags' with the value PODS_ROOT?
I tried this on both release and debug in the other C flags setup with the same result...
do you see anything wrong in my setup? the directory is the one with podfile.lock in it:
philswenson@zoso:~/dev/3rdRev/3R_iOS (login)$ ls -al Podfile*
-rw-r--r-- 1 philswenson staff 544 Jan 5 20:39 Podfile
-rw-r--r-- 1 philswenson staff 1707 Jan 5 11:15 Podfile.lock
philswenson@zoso:~/dev/3rdRev/3R_iOS (login)$
Your Pods Root is the one containing Manifest.lock. Go a directory down and try again?
yep, i was just about to update my comment but you beat me to it :) I tried going to the pods directory with the same result (via schenzen):
philswenson@zoso:~/dev/3rdRev/3R_iOS (login)$ ipa build -trace
Select a scheme:
1. 3rdRevolution
2. -[IsoDateTest testIso]
3. -[ThirdRevolution_Tests testDateParse]
4. 3rdRevolution local
5. 3rdRevolution prod
6. 3rdRevolution Staging
? 5
xcodebuild 3rdRevolution.xcworkspace
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution Check\ Pods\ Manifest.lock /Users/philswenson/Library/Developer/Xcode/DerivedData/3rdRevolution-crkklmdwurdjtrbjvjedcqqeoyvk/Build/Intermediates/3rdRevolution.build/Release-iphoneos/3rdRevolution.build/Script-575E80A3764942528E15344B.sh
(1 failure)
** ARCHIVE FAILED **
The following build commands failed:
PhaseScriptExecution Check\ Pods\ Manifest.lock /Users/philswenson/Library/Developer/Xcode/DerivedData/3rdRevolution-crkklmdwurdjtrbjvjedcqqeoyvk/Build/Intermediates/ArchiveIntermediates/3rdRevolution\ prod/IntermediateBuildFilesPath/3rdRevolution.build/Release-iphoneos/3rdRevolution.build/Script-575E80A3764942528E15344B.sh
(1 failure)
philswenson@zoso:~/dev/3rdRev/3R_iOS (login)$ sub /Users/philswenson/Library/Developer/Xcode/DerivedData/3rdRevolution-crkklmdwurdjtrbjvjedcqqeoyvk/Build/Intermediates/ArchiveIntermediates/3rdRevolution\ prod/IntermediateBuildFilesPath/3rdRevolution.build/Release-iphoneos/3rdRevolution.build/Script-575E80A3764942528E15344B.sh
Note that I also tried setting PODS_ROOT with a -D as shown here, same result. The PODS_ROOT isn't making it to the generated shell script. So either I'm setting it wrong or "Other C Flags" isn't the right place?
Here is the screenshot:
BTW I did this both for debug and release, although for an IPA I'm not sure which to set (guessing release)...
I just tried setting PODS_ROOT in Pods.xcconfig to the correct path. same result...
Damn, this is weird, nor can I reproduce it. I'll see if I can find someone less useless than myself for ideas.
thanks for your help on this :)
I ended up modifying Check Pods Manifest.lock to hard-code the Pods.lock path like so:
this obviously isn't ideal and won't work on other boxes w/o tweaking settings. Now I'm on to the next problem... ug.
is there a proper build system for iOS like ruby's rake, java's ant/gradle/maven... By this I mean a build system where you edit text files to define the build rather than tweaking dozens/hundreds of settings in a UI?
In a word, no :P. xctool is pretty great, but basically put as much as you can into .xcconfig files and make some intelligent schemes. Shenzen and Rakefiles are my preferred tools. I'm going to close this now, but if this crops up again let me know. Sometimes the best solution is nuking your Xcode project and rebuilding :(
I had the same problem today. It turned out that in my project the Pods.xcconfig was not set on my Release configuration.
I had this problem too, it turns out I was using an older version of the cocoapods ruby gem, which I presumed would have been updated automatically when I upgraded to the latest copy of xcode.
Upgrading the cocoapods ruby gem to version 1.7.5 resolved the problem for me.
I also had this problem, in my case it was when building a target that did not use any pods, but which linked with frameworks that _did_ use pods. I just had to create an empty target block for it in my Podfile, which adds the missing configurations under the project.
@mattconnolly Thanks, you saved one developer's day :)
Most helpful comment
I had the same problem today. It turned out that in my project the Pods.xcconfig was not set on my Release configuration.