Troubleshooting

<Installing CocoaPods

  • After upgrading from OS X 10.8 to 10.9 the installed CocoaPods gem doesn’t work anymore, even after re-installing the gem. To solve this, you might need to uninstall the gem first and then re-install.

 $ gem uninstall cocoapods
 $ gem install cocoapods
  • The gem might not be able to compile, to solve this you might need to symlink GCC.

  • If you used an pre release version of Xcode you might need to update the command line tools.

  • CocoaPods is not compatible with MacRuby.

  • <Using the CocoaPods Project

    1. If something doesn’t seem to work, first of all ensure that you are not completely overriding any options set from the Pods.xcconfig file in your project’s build settings. To add values to options from your project’s build settings, prepend the value list with $(inherited).

    2. If Xcode can’t find the headers of the dependencies:

      • Check if the pod header files are correctly symlinked in Pods/Headers and you are not overriding the HEADER_SEARCH_PATHS (see #1).
      • Make sure your project is using the Pods.xcconfig. To check this select your project file, then select it in the second pane again and open the Info section in the third pane. Under configurations you should select Pods.xcconfig for each configurations requiring your installed pods.
      • If Xcode still can’t find them, as a last resort you can prepend your imports, e.g. #import "Pods/SSZipArchive.h".
    3. If you're getting errors about unrecognized C compiler command line options, e.g. cc1obj: error: unrecognized command line option "-Wno-sign-conversion":

      • Make sure your project build settings are configured to use "Apple LLVM compiler" (clang)
      • Are you setting the CC, CPP or CXX environment variable, e.g. in your ~/.profile? This may interfere with the Xcode build process. Remove the environment variable from your ~/.profile.
    4. If Xcode complains when linking, e.g. Library not found for -lPods, it doesn't detect the implicit dependencies:

      • Go to Product > Edit Scheme
      • Click on Build
      • Add the Pods static library, and make sure it's at the top of the list
      • Clean and build again
      • If that doesn't work, verify that the source for the spec you are trying to include has been pulled from GitHub. Do this by looking in <Project Dir>/Pods/<Name of spec you are trying to include>. If it is empty (it should not be), verify that the ~/.cocoapods/master/<spec>/<spec>.podspec has the correct git hub url in it.
      • If still doesn't work, check your XCode build locations settings. Go to Preferences -> Locations -> Derived Data -> Advanced and set build location to "Relative to Workspace".

    Xcode build location settings
    • If you tried to submit app to App Store, and found that "Product" > "Archive" produce nothing in "Organizer":
      • In Xcode "Build Settings", find "Skip Install". Set the value for "Release" to "NO" on your application target. Build again and it should work.

    Different Xcode versions can have various problems. Ask for help and tell us what version you're using.

    <Running into build failures after migrating to Xcode 5 and CocoaPods 0.25.0?

    This applies to users migrating projects from Xcode 4, or are still using Xcode 4.

    1. The Pods Xcode project now sets the ONLY_ACTIVE_ARCH build setting to YES in the Debug configuration. You will have to set the same on your project/target, otherwise the build will fail.
    2. Ensure your project/target has an ARCHS value set, otherwise the build will fail.
    3. When building a iOS project from the command-line, with the xcodebuild tool that comes with Xcode 4, you’ll need to completely disable this setting by appending to your build command: ONLY_ACTIVE_ARCH=NO.

    <Can I workaround ‘Duplicate Symbol’ errors with static libraries?

    This usually occurs when you’re using a closed-source third-party library that includes a common dependency of your application. One brute-force workaround is to remove the dependency from the static library, as described here

    However, in general, the vendor should really prefix any dependencies it includes, so you don’t need to deal with it. When this happens, please contact the vendor and ask them to fix it on their side and use the above method as a temporary workaround.

    <I didn't find the solution to my problem!

    We have multiple avenues for support, here they are in the order we prefer.

    • Stack Overflow, get yourself some internet points. This keeps the pressure off the CocoaPods dev team and gives us time to work on the project and not support. One of the advantages of using Stack Overflow is that the answer is then easily accessible for others.

    • CocoaPods Mailing List, the mailing list is mainly used for announcements of related projects and for support.

    • If your question is regarding a library (to be) distributed through CocoaPods, refer to the spec repo.

    <I think this is a bug with CocoaPods

    In this case we want to get it on a GitHub issues tracker, we use this to keep track of the development work we have to do.

    • Search tickets before you file a new one. Add to existing tickets if you have new information about the issue.
    • Only file tickets about the CocoaPods tool itself. This includes CocoaPods, CocoaPods/Core, and Xcodeproj.

    • Keep tickets short but sweet. Make sure you include all the context needed to solve the issue. Don't overdo it. Great tickets allow us to focus on solving problems instead of discussing them.