device_identity/ios/Classes/SwiftDeviceIdentityPlugin.swift
宏谋刘 161d9c18f3 1.0
2023-05-10 16:07:15 +08:00

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)
}
}