Facebook Login swift No such module

I imported facebook sdk via Cocoa Pods described here https://developers.facebook.com/docs/swift/login

But strange, when I use it on my device, I get:

No suche FacebookLogin module

It works on the emulator ....

import UIKit
import FacebookLogin

class ViewController: UIViewController {

    override func viewDidLoad() {
    super.viewDidLoad()
    // Do any additional setup after loading the view, typically from a nib.

        let fbLoginButton = LoginButton(readPermissions: [ .publicProfile ])
        fbLoginButton.center = view.center

        view.addSubview(fbLoginButton)

    }
}

My swap file:

platform :ios, '8.0'
use_frameworks!

target 'myapp' do
  pod 'SwiftEventBus', :tag => '2.2.0', :git => 'https://github.com/cesarferreira/SwiftEventBus.git'
  pod 'PhoneNumberKit', '~> 1.2'
  pod 'Firebase'
  pod 'Firebase/Core'
  pod 'Firebase/Database'
  pod 'Firebase/Auth'
  pod 'FacebookCore'
  pod 'FacebookLogin'
  pod 'FacebookShare'
end
+4
source share
3 answers

I changed with

platform: ios, '8.0'

to

platform: ios, '10 .0 '

in my podfile

+3
source

I got a Facebook Login last week. It works on the device and the emulator. I just added these frames from the profile in Xcode instead of cocopod.

0
source
  • CocoaPod Mac?
  • Pods , Xcode?

. Pod

  • .
  • , : sudo gem install cocoapods , .
  • Finder. , Xcode.
  • cd , .
  • .
  • - : cd/Users/someone/Downloads/WonderfulProject
  • return.
  • pod install. , . .

!

0

Source: https://habr.com/ru/post/1667165/


All Articles