Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion Sources/CAltSign/Apple API/ALTAppleAPI.m
Original file line number Diff line number Diff line change
Expand Up @@ -427,10 +427,21 @@ - (void)updateAppID:(ALTAppID *)appID team:(ALTTeam *)team session:(ALTAppleAPIS
{
parameters[feature] = appID.features[feature];
}

NSMutableDictionary *entitlementss = [appID.entitlements mutableCopy];

if (team.type == ALTTeamTypeFree) {
for (ALTEntitlement entitlement in appID.entitlements)
{
if (!ALTFreeDeveloperCanUseEntitlement(entitlement))
{
[entitlementss removeObjectForKey:entitlement];
}
}
}

// parameters[@"capabilities"] = @[ALTCapabilityIncreasedMemoryLimit, ALTCapabilityIncreasedDebuggingMemoryLimit, ALTCapabilityExtendedVirtualAddressing];
[parameters setObject:appID.entitlements forKey:@"entitlements"];
[parameters setObject:entitlementss forKey:@"entitlements"];
[self sendRequestWithURL:URL additionalParameters:parameters
session:session team:team completionHandler:^(NSDictionary *responseDictionary, NSError *requestError) {
if (responseDictionary == nil)
Expand Down
1 change: 1 addition & 0 deletions Sources/CAltSign/Capabilities/ALTCapabilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ extern ALTFeature const ALTFeatureInterAppAudio;

_Nullable ALTEntitlement ALTEntitlementForFeature(ALTFeature feature) NS_SWIFT_NAME(ALTEntitlement.init(feature:));
_Nullable ALTFeature ALTFeatureForEntitlement(ALTEntitlement entitlement) NS_SWIFT_NAME(ALTFeature.init(entitlement:));
bool ALTFreeDeveloperCanUseEntitlement(ALTEntitlement entitlement);

NS_ASSUME_NONNULL_END
32 changes: 32 additions & 0 deletions Sources/CAltSign/Capabilities/ALTCapabilities.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,38 @@ _Nullable ALTEntitlement ALTEntitlementForFeature(ALTFeature feature)
return nil;
}

bool ALTFreeDeveloperCanUseEntitlement(ALTEntitlement entitlement) {
if ([entitlement isEqualToString:ALTEntitlementAppGroups])
{
return true;
}
else if ([entitlement isEqualToString:ALTEntitlementInterAppAudio])
{
return true;
}
else if ([entitlement isEqualToString:ALTEntitlementGetTaskAllow])
{
return true;
}
else if ([entitlement isEqualToString:ALTEntitlementIncreasedMemoryLimit])
{
return true;
}
else if ([entitlement isEqualToString:ALTEntitlementTeamIdentifier])
{
return true;
}
else if ([entitlement isEqualToString:ALTEntitlementKeychainAccessGroups])
{
return true;
}
else if ([entitlement isEqualToString:ALTEntitlementApplicationIdentifier])
{
return true;
}
return true;
}

_Nullable ALTFeature ALTFeatureForEntitlement(ALTEntitlement entitlement)
{
if ([entitlement isEqualToString:ALTEntitlementAppGroups])
Expand Down
Loading