Skip to content

Commit 2377eb4

Browse files
committed
Fixes parsing certificate responses without machineName or machineId
1 parent 557d373 commit 2377eb4

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

AltSign/Model/Apple API/ALTCertificate.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,16 @@ - (instancetype)initWithResponseDictionary:(NSDictionary *)responseDictionary
4747
}
4848

4949
NSString *machineName = attributesDictionary[@"machineName"];
50+
if ([machineName isKindOfClass:[NSNull class]])
51+
{
52+
machineName = nil;
53+
}
54+
5055
NSString *machineIdentifier = attributesDictionary[@"machineId"];
56+
if ([machineIdentifier isKindOfClass:[NSNull class]])
57+
{
58+
machineIdentifier = nil;
59+
}
5160

5261
if (data != nil)
5362
{

0 commit comments

Comments
 (0)