Skip to content

Commit eb8cde6

Browse files
committed
things
1 parent 68c82b3 commit eb8cde6

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

Sources/CAltSign/Model/Apple API/ALTAppID.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
2020
@property (copy, nonatomic, nullable) NSDate *expirationDate;
2121

2222
@property (copy, nonatomic) NSDictionary<ALTFeature, id> *features;
23+
@property (copy, nonatomic) NSDictionary<ALTEntitlement, id> *entitlements;
2324

2425
- (instancetype)init NS_UNAVAILABLE;
2526
- (instancetype)initWithName:(NSString *)name identifier:(NSString *)identifier bundleIdentifier:(NSString *)bundleIdentifier expirationDate:(nullable NSDate *)expirationDate features:(NSDictionary<ALTFeature, id> *)features NS_DESIGNATED_INITIALIZER;

Sources/CAltSign/Model/Apple API/ALTAppID.m

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ - (instancetype)initWithName:(NSString *)name
2424
_bundleIdentifier = [bundleIdentifier copy];
2525
_expirationDate = [expirationDate copy];
2626
_features = [features copy];
27+
_entitlements = @[];
2728
}
28-
29+
2930
return self;
3031
}
3132

@@ -34,22 +35,22 @@ - (nullable instancetype)initWithResponseDictionary:(NSDictionary *)responseDict
3435
NSString *name = responseDictionary[@"name"];
3536
NSString *identifier = responseDictionary[@"appIdId"];
3637
NSString *bundleIdentifier = responseDictionary[@"identifier"];
37-
38+
3839
if (name == nil || identifier == nil || bundleIdentifier == nil)
3940
{
4041
return nil;
4142
}
42-
43+
4344
NSDictionary *allFeatures = responseDictionary[@"features"] ?: @{};
4445
NSArray *enabledFeatures = responseDictionary[@"enabledFeatures"] ?: @[];
45-
46+
4647
NSMutableDictionary *features = [NSMutableDictionary dictionary];
4748
for (ALTFeature feature in enabledFeatures)
4849
{
4950
id value = allFeatures[feature];
5051
features[feature] = value;
5152
}
52-
53+
5354
NSDate *expirationDate = responseDictionary[@"expirationDate"];
5455

5556
self = [self initWithName:name identifier:identifier bundleIdentifier:bundleIdentifier expirationDate:expirationDate features:features];
@@ -70,7 +71,7 @@ - (BOOL)isEqual:(id)object
7071
{
7172
return NO;
7273
}
73-
74+
7475
BOOL isEqual = ([self.identifier isEqualToString:appID.identifier] && [self.bundleIdentifier isEqualToString:appID.bundleIdentifier]);
7576
return isEqual;
7677
}

0 commit comments

Comments
 (0)