Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private func receiveAppInfo(result: FlutterResult) {
- let infoDictionary: [String: String] = [:]
- let device = UIDevice.current
- infoDictionary["deviceModel"] = device.model
- infoDictionary["appVersionName"] = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String
- infoDictionary["appVersionCode"] = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String
- result(Int(device.batteryLevel * 100))
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement