Advertisement
McFamous

Untitled

Apr 6th, 2023
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. private func receiveAppInfo(result: FlutterResult) {
  2. let infoDictionary: [String: String] = [:]
  3. let device = UIDevice.current
  4.  
  5. infoDictionary["deviceModel"] = device.model
  6. infoDictionary["appVersionName"] = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String
  7. infoDictionary["appVersionCode"] = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String
  8.  
  9. result(Int(device.batteryLevel * 100))
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement