Skip to content

Commit

Permalink
something i don't know
Browse files Browse the repository at this point in the history
  • Loading branch information
junepark678 committed Dec 26, 2024
1 parent 4323ff7 commit 6192183
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Sources/CAltSign/Apple API/ALTAppleAPI.m
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,16 @@ - (void)updateAppID:(ALTAppID *)appID team:(ALTTeam *)team session:(ALTAppleAPIS
parameters[feature] = appID.features[feature];
}

if (team.type == ALTTeamTypeFree)
for (int i = 0; i < appID.entitlements.count; i++)
{
ALTEntitlement *entitlement = appID.entitlements[i];
if (!ALTFreeDeveloperCanUseEntitlement(entitlement))
{
// remove entitlement from appID.entitlements
[appID.entitlements removeObjectAtIndex:i];
}
}

// parameters[@"capabilities"] = @[ALTCapabilityIncreasedMemoryLimit, ALTCapabilityIncreasedDebuggingMemoryLimit, ALTCapabilityExtendedVirtualAddressing];
[parameters setObject:appID.entitlements forKey:@"entitlements"];
Expand Down
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

0 comments on commit 6192183

Please sign in to comment.