Customize invitations
Customize the invitation template
To customize invitation template, follow these steps:
- Enable the invitation template customization feature by implementing
onClickedInviteButtonmethod
- (void)onClickedInviteButton:(UIViewController*)parentVC
{
InviteViewController *inviteVC = [[InviteViewController alloc] init];
UINavigationController *nav = [[UINavigationController alloc]
initWithRootViewController:inviteVC];
nav.modalPresentationStyle = UIModalPresentationFormSheet;
[parentVC presentViewController:nav animated:YES completion:NULL];
}
- Then you can get Meeting ID and Join Meeting URL like the following:
NSString *meetingID = [MobileRTCInviteHelper sharedInstance].meetingID;
NSString *meetingURL = [MobileRTCInviteHelper sharedInstance].joinMeetingURL;
Customize invitation contents
If you would like to enable/disable the invitation methods(SMS, Copy URL, Email), customize the content of the Invite by Message(SMS), Copy URL, and Invite by Email after a meeting has started, the upcoming snippet will be very helpful.
Enable or disable invitation methods
//To Enable or Disable Copy URL
[MobileRTCInviteHelper sharedInstance].disableCopyURL = YES;
//To Enable or Disable Invite by Email
[MobileRTCInviteHelper sharedInstance].disableInviteEmail = YES;
//To Enable or Disable Invite by Message
[MobileRTCInviteHelper sharedInstance].disableInviteSMS = YES;
Customize invitation contents
if (state == MobileRTCMeetingState_InMeeting)
{
//To customize the content of Invite by SMS
NSString *meetingID = [[MobileRTCInviteHelper sharedInstance] meetingID];
NSString *smsMessage = [NSString stringWithFormat:NSLocalizedString(@"Please join meeting with ID: %@", @""), meetingID];
[[MobileRTCInviteHelper sharedInstance] setInviteSMS:smsMessage];
//To customize the content of Copy URL
NSString *joinURL = [[MobileRTCInviteHelper sharedInstance] joinMeetingURL];
NSString *copyURLMsg = [NSString stringWithFormat:NSLocalizedString(@"MeetingURL: %@", @""), joinURL];
[[MobileRTCInviteHelper sharedInstance] setInviteCopyURL:copyURLMsg];
//To customize "Invite by Email"
[MobileRTCInviteHelper sharedInstance].inviteEmailSubject = @"Invite by Email";
[MobileRTCInviteHelper sharedInstance].inviteEmailContent = [NSString
stringWithFormat:NSLocalizedString(@"Please join meeting with ID: %@", @""), meetingID];
}