FBSDKCoreKit/FBSDKCoreKit.h not found error

后端 未结 27 1710
伪装坚强ぢ
伪装坚强ぢ 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:52

    I dragged the framework to the Framework folder inside xcode, chose to copy files if needed and all worked fine without any other configuration change.

    0 讨论(0)
  • 2020-12-04 11:53

    Xcode 11 + CocoaPods solution

    In root of your project, i.e. the same path where you have MyApp.xcworkspace open Terminal and init pod's pod init, then add the required FBSDK pods - your Podfile should look something like that:

    # Uncomment the next line to define a global platform for your project
    # platform :ios, '9.0'
    target 'MyApp' do
      # Comment the next line if you don't want to use dynamic frameworks
      use_frameworks!
    
      # Pods for MyApp
      pod 'FBSDKCoreKit'
      pod 'FBSDKLoginKit'
      pod 'FBSDKShareKit'   
    end
    

    Now in your Terminal pod install and open MyApp.xcworkspace (which is not MyApp.xcodeproj). Go to MyApp -> Build Phases -> Link Binary with Libraries and you should see at the bottom of the list of frameworks Pods_MyApp.framework. If you'd click + below Pods_MyApp.framework you should in new window below Workspace a list of Pods where all related to FBSDK should be.

    Note: Make sure you're installing FBSDK, not Facebook SDK, because the second one is outdated.

    0 讨论(0)
  • 2020-12-04 11:53

    I had similar issue. Fix consisted for me in selecting: "COPY FILES IF NECESSARY" when manually adding the different frameworks into XCode framework.

    0 讨论(0)
提交回复
热议问题