Return to Snippet

Revision: 70175
at December 8, 2015 07:21 by TenDegrees


Updated Code
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);	

		}

	}];

}

Revision: 70174
at December 8, 2015 07:14 by TenDegrees


Updated Code
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);	

		}

	}];

}

Revision: 70173
at December 8, 2015 07:13 by TenDegrees


Updated Code
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);	

		}

	}];

}

Revision: 70172
at December 8, 2015 07:09 by TenDegrees


Updated Code
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);	

		}

	}];

}

Revision: 70171
at December 8, 2015 07:06 by TenDegrees


Updated Code
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]];

		}

	}];

}

Revision: 70170
at December 8, 2015 07:02 by TenDegrees


Updated Code
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)
                               {
                                   #ifdef LOGGING
                                   NSLog(@"Got this profile name: %@",((Profile *)object).name);
                                    #endif
                                   [self.allContacts setObject:((Profile *)object) forKey:[NSNumber numberWithInt:((Profile *)object).entityId]];
                               }
                           }];
                      }

Revision: 70169
at December 8, 2015 07:01 by TenDegrees


Initial Code
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]];
                               }
                           }];
                      }

Initial URL

                                

Initial Description
Iterating over an array of affiliates and reading Profile objects off the server.

Initial Title
Reading User Profiles using an Affiliate Object

Initial Tags

                                

Initial Language
Objective C