FBSDKCoreKit/FBSDKCoreKit.h not found error

后端 未结 27 1863
伪装坚强ぢ
伪装坚强ぢ 2020-12-04 11:07

I am implementing FB Login so i Downloaded the SDK from https://developers.facebook.com/docs/ios. then i drag n down FBSDKCoreKit, FBSDKLoginKit a

27条回答
  •  离开以前
    2020-12-04 11:38

    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

提交回复
热议问题