Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pod Update is removing "Target Support Files" but not updating my project settings

Tags:

Admittedly, it's been awhile since I've run a pod update on my project. Today I was trying to do just that, and am running into issues.

After running a 'pod update', the project will not compile. Here is what I've noticed. The update itself appears to run fine, just like normal. I did notice that all the files in 'Pods/Target Support Files` have been removed.

When I attempt to build, I get an error like this one for most of my pods:

lang: error: no such file or directory: '/Users/logan/development/ProjectNameRemoved/src/Pods/Target Support Files/Pods-AJNotificationView/Pods-AJNotificationView-dummy.m' 

clang: error: no input files

When I go to the Build Phases for the pods with this error, I can see that the dummy .m file is still in there, even though it doesn't exist: dummy file

Removing all of those doesn't seem to help, as then I start getting the following errors:

second error

Digging down into the target's settings I can see the GCC prefix header is still set to use a nonexistent pch file:

prefix header

I'm not really sure where to go from here. It seems like pod update is removing certain files, but my pbxproj is not being updated to correlate these changes. Do I need to figure out how to do this manually?

I'm currently running XCode7 and CocoaPods 0.38.2

like image 521
LLooggaann Avatar asked Sep 24 '15 17:09

LLooggaann


People also ask

How do you update a specific POD file?

When you run pod update SomePodName , CocoaPods will try to find an updated version of the pod SomePodName, without taking into account the version listed in Podfile. lock . It will update the pod to the latest version possible (as long as it matches the version restrictions in your Podfile).

What is the difference between POD install and pod update?

You added a new pod to your Podfile This will install the latest version* of any new pods added to your Podfile, leaving your other pods unchanged. If you were to run pod update instead, it would install the new pods and update each of your existing pods to its latest version*.

Could not find include pods target support files pods runner pods runner release Xcconfig in search paths?

to Solve error: could not find included file 'Pods/Target Support Files/Pods-Runner/Pods-Runner. debug. xcconfig' in search paths (in target 'Runner') you just have to install pods manually. the second solution is Just to delete Podfile and re-run your app.


2 Answers

I encountered this problem when I was refactoring a project. After removing a CocoaPod, I had remnants of it that were referenced. Cleaning caches and rebuilding did not resolve the issue.

I was able to resolve it using cocoapods-deintegrate referenced in the user's comment above.

Steps to resolve:

  1. Close the project in Xcode so you don't have Xcode throwing warnings at you about differences between versions (assuming you're using version control, which is a good idea if you're messing with CocoaPods).

  2. Install cocoapods-deintegrate by typing in Terminal:

    gem install cocoapods-deintegrate

  3. Type pod deintegrate from the directory of your project.

  4. Open the project in Xcode, clean caches and rebuild. Your Podfile should still be there...leave it alone. We'll get to that in a moment.

  5. Close the project.

  6. Type pod install

  7. Open the project, clean caches and rebuild.

These are the steps I followed to resolve this issue.

Update:

I also used this methodology to resolve a linker error which cropped up when I deleted a reference to a class file instead of the file itself. Upon doing that, I got this error:

error: linker command failed with exit code 1 (use -v to see invocation)

like image 199
Adrian Avatar answered Sep 28 '22 17:09

Adrian


You can try

pod deintegrate pod install 

*You should be located at Podfile directory

like image 41
yoAlex5 Avatar answered Sep 28 '22 17:09

yoAlex5