Search code examples
xcodexcode6static-librariescocoapodslinker-flags

Xcode 6 static library project


I have a static library project included to my main project. I followed this tutorial. It worked when I had Xcode 5. It stopped working after I updated to Xcode 6. What might be a reason? I use CocoaPods 0.35.0.


Solution

  • When using Cocoapods, you should not set "Other Linker Flags" manually. This is automatically set as part of the pod install process.

    Part of the Tutorial that you linked to tells you to set the Other Linker Flags manually.

    Go to your project and clear Other Linker Flags value on the project level and the target level (if it is in bold) by highlighting the value and hitting delete.

    Once deleted, you should see the inherited value coming from the Pods.xcconfig file. Something like:

    -ObjC -framework CoreGraphics
    

    You can verify this by clicking on "Levels" to the left of the search bar.

    This should have you cocoapods libraries sorted. Once this is working add the path to your static library headers by setting "Header Search Paths" to "${inherited} /path/to/static/libary/headers"