Sending an Invite in Unity


/ Published in: Objective C
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.