Revision: 70189
Updated Code
at December 9, 2015 08:29 by TenDegrees
Updated Code
Invite *inviteToRespondTo = yourContactInvite;
[self respondToUnityInvite:inviteToRespondTo withAccept:YES andCompletionBlock:^(bool success, NSString *errorMessage)
{
if(success)
{
NSLog(@"Invite was successfully accepted");
Profile *senderProfile = [[Profile alloc]init];
senderProfile.entityId=inviteToRespondTo.sourceEntityId;
[self readUnityObject:senderProfile withCompletionBlock:^(id object, bool success, NSString *errorMessage)
{
if(success)
{
Profile *readProfile = (Profile *)object;
[self.allContacts setObject:readProfile forKey:[NSNumber numberWithInt:readProfile.entityId]];
NSMutableDictionary *temp = [[NSMutableDictionary alloc]initWithDictionary:self.pendingInvites];
[temp removeObjectForKey:[NSNumber numberWithInt:readProfile.entityId]];
self.pendingInvites=temp;
}
else
{
}
}];
}
else
{
NSLog(@"%@",errorMessage);
}
}];
Revision: 70188
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at December 9, 2015 08:28 by TenDegrees
Initial Code
Invite *inviteToRespondTo = yourContactInvite;
[self respondToUnityInvite:inviteToRespondTo withAccept:YES andCompletionBlock:^(bool success, NSString *errorMessage)
{
if(success)
{
NSLog(@"Invite was successfully accepted�);
Profile *senderProfile = [[Profile alloc]init];
senderProfile.entityId=inviteToRespondTo.sourceEntityId;
[self readUnityObject:senderProfile withCompletionBlock:^(id object, bool success, NSString *errorMessage)
{
if(success)
{
Profile *readProfile = (Profile *)object;
[self.allContacts setObject:readProfile forKey:[NSNumber numberWithInt:readProfile.entityId]];
NSMutableDictionary *temp = [[NSMutableDictionary alloc]initWithDictionary:self.pendingInvites];
[temp removeObjectForKey:[NSNumber numberWithInt:readProfile.entityId]];
self.pendingInvites=temp;
}
else
{
}
}];
}
else
{
NSLog(@"%@",errorMessage);
}
}];
Initial URL
Initial Description
The process required for accepting or rejecting an invite within Unity.
Initial Title
Responding to an Invite
Initial Tags
Initial Language
Objective C