FBSDKCoreKit/FBSDKCoreKit.h not found error after updating CocoaPod to 1.0.0

I recently updated to CocoaPods 1.0.0 and also updated the FacebookSDK for an app that I am working on. Well needless to say things broke. For whatever reason Xcode started complaining that it couldn’t find the FBSDKCoreKit frame work.

Well never fear my fellow iOS developers. I found the answer on Stackoverflow. http://stackoverflow.com/a/37329239/339427

Here is a look at what’s in my pod file.

platform :ios, '9.0'
use_frameworks!

target "MyTarget" do
    pod 'FBSDKCoreKit'
    pod 'FBSDKLoginKit'
    pod 'FBSDKShareKit'
end

Here is the answer I found in the stackoverflow post that helped get things working again. 

Answer from: Mihriban Minaz
After updating Cocoapods 1.0.0, I deleted pod.lock and installed the current stable pod versions (4.7.0 to 4.11.0) of FBSDKCoreKit, FBSDKLoginKit, FBSDKShareKit

Then i encounter the same error. What i did was:

  1. Added Header Search Paths Build Settings in Xcode:

    "${PODS_ROOT}/Headers/Public/Facebook-iOS-SDK\"
    "${PODS_ROOT}/Headers/Public/Facebook-iOS-SDK/FacebookSDK\"
    "${PODS_ROOT}/Headers/Public/FBSDKCoreKit\"
    "${PODS_ROOT}/Headers/Public/FBSDKCoreKit/FBSDKCoreKit\"

Then i still had error for another file. Because XCode is using prebuild frameworks.

FBSDKCoreKit/FBSDKCopying.h not found

  1. Clean Build -> ⇧⌘K (Shift + Command + K) – to clean builded frameworks.
  2. Clean Build Folder -> ⌥⇧⌘K (Option+Shift+Command+K)
  3. Close Xcode // important! – Otherwise it recreate the DerivedData for the current open project automatically
  4. Run this command in terminal

    rm -rf ~/Library/Developer/Xcode/DerivedData
  5. Open XCode and build successfully

 

2 Comments

  1. ErickMaynard December 1, 2016 at 7:22 am

    This doesn’t work for me. Same error.

    1. Matthew Wallace February 13, 2017 at 2:39 pm

      Things change with CocoaPods and Xcode so often, it doesn’t surprise me. If you do find a fix please update the comments here and let us know what you came up with.

Leave a comment

Your email address will not be published. Required fields are marked *