Search code examples
iosfbsdkswift3xcode8ios10

Facebook iOS SDK - Xcode 8 Swift 3 Doesn't work


At first, I've tried compiling my application, and it succeeded, but it crashed when it used Facebook methods. Then, I deleted the frameworks and reinstalled them, but now it doesn't compiling. The error:

No such module 'FBSDKCoreKit'

Does it because of the Swift 3 syntax? What can I do in order to fix it? When it does compile, it just crashes at the first time it uses those methods...


Solution

  • Do the following things and you can import any swift file from "Pods"

    1. Clean your project
    2. Make sure that all your "Pods" > "Build Settings" > "Build Active Architecture Only" is set to "NO".
    3. Don't run, just build your project.
    4. Now, import any file from "Pods" to any swift file

    This will solve your import module problem.