Skip to content

Commit

Permalink
iOs: NSDictionary protected from nil value
Browse files Browse the repository at this point in the history
  • Loading branch information
RSATom committed Jul 29, 2022
1 parent b3a0d03 commit b8689d3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/ios/CDVDevice.m
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,16 @@ - (NSDictionary*)deviceProperties
{
UIDevice* device = [UIDevice currentDevice];

NSString* modelVersion = [device modelVersion];
NSString* systemVersion = [device systemVersion];
NSString* uniqueId = [self uniqueAppInstanceIdentifier:device];

return @{
@"manufacturer": @"Apple",
@"model": [device modelVersion],
@"model": modelVersion ? modelVersion : @"",
@"platform": @"iOS",
@"version": [device systemVersion],
@"uuid": [self uniqueAppInstanceIdentifier:device],
@"version": systemVersion ? systemVersion : @"",
@"uuid": uniqueId ? uniqueId : @"",
@"cordova": [[self class] cordovaVersion],
@"isVirtual": @([self isVirtual]),
@"isiOSAppOnMac": @([self isiOSAppOnMac])
Expand Down

0 comments on commit b8689d3

Please sign in to comment.