File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,8 +71,8 @@ NS_SWIFT_NAME(revoke(_:for:session:completionHandler:));
7171- (void )addAppGroupWithName : (NSString *)name groupIdentifier : (NSString *)groupIdentifier team : (ALTTeam *)team session : (ALTAppleAPISession *)session
7272 completionHandler : (void (^)(ALTAppGroup *_Nullable group, NSError *_Nullable error))completionHandler ;
7373
74- - (void )addAppID : (ALTAppID *)appID toGroup : ( ALTAppGroup *) group team : (ALTTeam *)team session : (ALTAppleAPISession *)session
75- completionHandler : (void (^)(BOOL success, NSError *_Nullable error))completionHandler ;
74+ - (void )assignAppID : (ALTAppID *)appID toGroups : ( NSArray < ALTAppGroup *> *) groups team : (ALTTeam *)team session : (ALTAppleAPISession *)session
75+ completionHandler : (void (^)(BOOL success, NSError *_Nullable error))completionHandler ;
7676
7777/* Provisioning Profiles */
7878- (void )fetchProvisioningProfileForAppID : (ALTAppID *)appID team : (ALTTeam *)team session : (ALTAppleAPISession *)session
Original file line number Diff line number Diff line change @@ -541,11 +541,18 @@ - (void)addAppGroupWithName:(NSString *)name groupIdentifier:(NSString *)groupId
541541 }];
542542}
543543
544- - (void )addAppID : (ALTAppID *)appID toGroup : (ALTAppGroup *)group team : (ALTTeam *)team session : (ALTAppleAPISession *)session completionHandler : (void (^)(BOOL , NSError * _Nullable))completionHandler
544+ - (void )assignAppID : (ALTAppID *)appID toGroups : (NSArray <ALTAppGroup *> *)groups team : (ALTTeam *)team session : (ALTAppleAPISession *)session
545+ completionHandler : (void (^)(BOOL success, NSError *_Nullable error))completionHandler
545546{
546547 NSURL *URL = [NSURL URLWithString: @" ios/assignApplicationGroupToAppId.action" relativeToURL: self .baseURL];
547548
548- [self sendRequestWithURL: URL additionalParameters: @{@" appIdId" : appID.identifier , @" applicationGroups" : group.identifier }
549+ NSMutableArray *groupIDs = [NSMutableArray arrayWithCapacity: groups.count];
550+ for (ALTAppGroup *group in groups)
551+ {
552+ [groupIDs addObject: group.identifier];
553+ }
554+
555+ [self sendRequestWithURL: URL additionalParameters: @{@" appIdId" : appID.identifier , @" applicationGroups" : groupIDs}
549556 session: session team: team completionHandler: ^(NSDictionary *responseDictionary, NSError *requestError) {
550557 if (responseDictionary == nil )
551558 {
You can’t perform that action at this time.
0 commit comments