iosDeviceInfos method
Implementation
Map<String, dynamic> iosDeviceInfos(IosDeviceInfo data) {
String? osVersion = data.systemVersion;
if(data.systemVersion != null) {
//Split parts with '.' delimiter
List<String> resultingOSV = data.systemVersion!.split(".");
if(resultingOSV.length > 2) {
osVersion = resultingOSV[0]+"."+resultingOSV[1];
}
}
return <String, dynamic> {
"os": "iOS",
"osr": data.systemVersion,
"osn": data.systemName,
"osv": osVersion,
"events": events.map((event) => event.customJsonString()),
"mdl": data.name,
};
}