/ Published in: Objective C

Iterating over an array of affiliates and reading Profile objects off the server.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
for(Affiliate *affiliate in profile.affiliates) { Profile *affiliateProfile = [[Profile alloc]init]; affiliateProfile.emailScope=ScopePublic; affiliateProfile.entityId=affiliate.peerId; [self readUnityObject:affiliateProfile withCompletionBlock:^(id object, bool success, NSString *errorMessage) { if (success) { NSLog(@"Got this profile name: %@",((Profile *)object).name); [self.allContacts setObject:((Profile *)object) forKey:[NSNumber numberWithInt:((Profile *)object).entityId]]; } else { NSLog(@"%@",errorMessage); } }]; }
Comments
