Search code examples
iosswiftxcodecocoapodsxcode10

Xcode 10 cannot build project because unable to find pods


After cloning Xcode project from github, I opened PROJECT_NAME.xcodeproj file with Xcode. (no Podfile is created and no pods are installed, obviously, this project does not need any pods to run).

However, after building the project, error occurs saying that:

"error: PROJECT_DIRECTORY/Pods/Target Support Files/Pods-PROJECT_NAME/Pods-PROJECT_NAME.debug.xcconfig: unable to open file".

I haven't installed any pods, nor have I initialised pods in this project, because I do not need them yet.

I have tried to initialise pods in the project and installed them after what .xcworkspace file was created and I launched it and it have builded and run successfully.

However, I do not need any pods, so how to handle this issue without installing pods and running the project straight from .xcodeproj file?


Solution

  • tl;dr
    pod deintegrate is only right approach to get rid of pods from project.

    If you want to get it by hands:

    In project settings remove configuration through pod s xcconfig files enter image description here

    You may want to delete configs configs from project as well if here still reference on them: enter image description here

    Make sure that Build Phases do not contain any CocoaPods related steps: enter image description here

    IMHO never delete pods by hands, use pod deintegrate. It will remove all unnecessary files.