From 88d6c2d84e9ce25a4e680d571ad57e6a10b266cd Mon Sep 17 00:00:00 2001 From: June Date: Fri, 27 Dec 2024 13:36:06 +0900 Subject: [PATCH] fix the errors from previous commits --- Sources/CAltSign/Apple API/ALTAppleAPI.m | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Sources/CAltSign/Apple API/ALTAppleAPI.m b/Sources/CAltSign/Apple API/ALTAppleAPI.m index 87e66f0..e522576 100644 --- a/Sources/CAltSign/Apple API/ALTAppleAPI.m +++ b/Sources/CAltSign/Apple API/ALTAppleAPI.m @@ -427,20 +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 (int i = 0; i < appID.entitlements.count; i++) + if (team.type == ALTTeamTypeFree) { + for (ALTEntitlement entitlement in appID.entitlements) { - ALTEntitlement *entitlement = appID.entitlements[i]; if (!ALTFreeDeveloperCanUseEntitlement(entitlement)) { - // remove entitlement from appID.entitlements - [appID.entitlements removeObjectAtIndex:i]; + [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)