15 lines
528 B
Swift
15 lines
528 B
Swift
|
import Flutter
|
||
|
import UIKit
|
||
|
|
||
|
public class SwiftDeviceIdentityPlugin: NSObject, FlutterPlugin {
|
||
|
public static func register(with registrar: FlutterPluginRegistrar) {
|
||
|
let channel = FlutterMethodChannel(name: "device_identity", binaryMessenger: registrar.messenger())
|
||
|
let instance = SwiftDeviceIdentityPlugin()
|
||
|
registrar.addMethodCallDelegate(instance, channel: channel)
|
||
|
}
|
||
|
|
||
|
public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) {
|
||
|
result("iOS " + UIDevice.current.systemVersion)
|
||
|
}
|
||
|
}
|