No Such Module 'FBSDKLoginKit' Xcode 9

末鹿安然 提交于 2019-12-06 07:59:58

Try this!

pod 'FBSDKCoreKit', '~> 4.10.0'
pod 'FBSDKLoginKit', '~> 4.10.0'
pod 'FBSDKShareKit', '~> 4.10.0'

Please add

pod 'FBSDKCoreKit'

also.

Try to update your pod file like this

 pod 'FacebookCore'
 pod 'FacebookLogin'

Not sure if you already found an answer but this worked for me, I had the same problem as you, kind of weird but it worked.

I uninstalled the pods 'FBSDKCoreKit', 'FBSDKShareKit', and 'FBSDKLoginKit'

I then installed pods 'FacebookCore' and 'FacebookLogin' this also installs the previous pods I uninstalled.

When I typed import FBSDKCoreKit in my AppDelegate header I still received an error.

So just for shits and gigs I removed import FBSDKCoreKit and replaced it with import FacebookLogin and there were no errors

I then typed in the necessary code in my AppDelegate file stated in the instructions of Step 5: Connect to AppDelegate (https://developers.facebook.com/docs/ios/getting-started)

I ran the app, the build failed but I went into my AppDelegate file and again, for shits and gigs, typed in import FBSDKCoreKit in the header (without removing import FacebookCore) and there were no errors. Then I removed import FacebookCore from the header and still no errors.

still messing with the syntax to get "Build Successful" but it seems to be heading in the right direction.

I'm new to xCode and Swift, so honestly I'm not exactly sure what I did that was the main reason for the fix but this worked for me. Let me know if this helped!

The actual issue is there is a bug with Xcode wherein its not recognizing the pods already installed and added to the project.Thats why the module not found error during compile time. I am getting the same build error with many other pods afterwards also.Its happening only at times that too unexpectedly .The only way is to build the project multiple times until it recognizes the module and the error is gone .This sounds crazy but no other way so far. Also, Use cmd+B to build your code. Hope this helps.

This error appeared for me when I added a new build-target to my project.
Xcode added this change which caused all the trouble.

-               E31B6D4E3385CBFF63FDF655 /* BuildFile in Frameworks */,
 +              E31B6D4E3385CBFF63FDF655 /* (null) in Frameworks */,

When I removed the change from my commit history, all worked fine.
I did so with an interactive rebase.

Try this!!

Goto General -> Linked Frameworks and Libraries -> remove Framework.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!