25 lines
774 B
Swift
25 lines
774 B
Swift
import Flutter
|
|
import UIKit
|
|
|
|
public class ClientProxyFrameworkPlugin: NSObject, FlutterPlugin {
|
|
private var channel: FlutterMethodChannel?
|
|
|
|
public static func register(with registrar: FlutterPluginRegistrar) {
|
|
let ch = FlutterMethodChannel(
|
|
name: "client_proxy_framework/facebook_sdk",
|
|
binaryMessenger: registrar.messenger())
|
|
let instance = ClientProxyFrameworkPlugin()
|
|
instance.channel = ch
|
|
registrar.addMethodCallDelegate(instance, channel: ch)
|
|
}
|
|
|
|
public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
|
|
if call.method == "waitForFacebookSdkInit" {
|
|
result(true)
|
|
channel?.invokeMethod("onFacebookSdkInitialized", arguments: nil)
|
|
} else {
|
|
result(FlutterMethodNotImplemented)
|
|
}
|
|
}
|
|
}
|