Can't import dependency installed with Cocoapods

后端 未结 11 1122
醉梦人生
醉梦人生 2021-02-07 11:16

I\'ve installed FBSDK with Cocoapods but can\'t import it in my AppDelegate.swift file for some reason. The FBSDK kit appears in my Xcode project so I feel like it should be wor

11条回答
  •  北海茫月
    2021-02-07 12:03

    Why not simply use the Swift pods?-

    pod 'FacebookCore'
    pod 'FacebookLogin'
    pod 'FacebookShare'
    

    and then import as normal, like-

    import FBSDKLoginKit
    import FacebookLogin
    

    Once done, do a clean and build (command/⌘ + Shift + K) and Build (command/⌘ + B). Make sure you are using the .xcworkspace file to open the project.

    More info on Swift FBSDK here.

    Once you use the Swift pods, you should see these Frameworks in your project.

    If you still continue to see the error then "Clean the build folder" using command + shift + alt + K.

提交回复
热议问题