Posted By

TenDegrees on 12/09/15


Tagged

Unity invite TenDegrees


Versions (?)

Sending an Invite in Unity


 / Published in: Objective C
 

This shows the basic process for sending an invite to a contact found through search or otherwise.

  1. Entity *userEntity = [[Entity alloc]init];
  2. userEntity.entityId=self.currentUser.entityId;
  3. Invite *invite = [[Invite alloc]init];
  4. invite.sourceEntityId=userEntity.entityId;
  5. invite.destinationEntityId=thePersonYouWantToInvite.entityId;
  6. invite.message=@"Please add me as a contact!";
  7.  
  8. [self createUnityObject:invite withCompletionBlock:^(id object, bool succcess, NSString *errorMessage)
  9. {
  10. if(success)
  11. {
  12. // show success message
  13. }
  14. else
  15. {
  16. NSLog("%@",errorMessage);
  17. }
  18. }];

Report this snippet  

You need to login to post a comment.