Schedule a meeting for logged-in users

It's good to have plans, especially for meetings. Our Meeting SDK for iOS provides meeting management functionalities that help you to create, list, update, and delete meeting events.

Meeting Management Warm Up

In order to perform meeting management, firstly we need to get MobileRTCPremeetingService from MobileRTC like the following:

MobileRTCPremeetingService *service = [[MobileRTC sharedRTC] getPreMeetingService];
if (service) {
  ....
}

Create or schedule a meeting

To create or schedule a meeting, firstly you will need to have a MobileRTCMeetingItem, you can put all meeting information and configurations into the MobileRTCMeetingItem like this:

id<MobileRTCMeetingItem> item = [service createMeetingItem];
...
// Start configuring meeting item
[item setMeetingTopic:@"xxx"];
[item setStartTime:[NSDate date]];
[item setTimeZoneID:[NSTimeZone defaultTimeZone].name];
[item setDurationInMinutes:60];
....

Once the MobileRTCMeetingItem is all set, call the scheduleMeeting function to schedule the meeting. After that, you need to destroy the meeting item.

[service scheduleMeeting:item];
[service destroyMeetingItem:item];

To catch the errors during the scheduling process, override the following function with sinkSchedultMeeting implemented.

- (void)sinkSchedultMeeting:(NSInteger)result
{
    NSLog(@"sinkSchedultMeeting result: %zd", result);
}

List meetings

To list all meetings that belong to the user, call ListMeeting function.

if (service) {
    [service listMeeting];
}

To catch the errors during the listing process, override the following function with sinkListMeeting implemented.

- (void)sinkListMeeting:(NSInteger)result withMeetingItems:(NSArray*)array
{
    NSLog(@"sinkSchedultMeeting result: %zd items: %@", result, array);
}

Edit or update an existing meeting

To edit or update an existing meeting, get the MobileRTCMeetingItem from getMeetingItemByNumber.

id<MobileRTCMeetingItem> item = [service getMeetingItemByNumber:123456789];
if (item) {
  ...
}

Next, update the contents in the item and pass to editMeeting method.

[item setMeetingTopic:@"xxx yyy"];
[item setMeetingNumber:123456789];
[item setStartTime:[NSDate date]];
[item setMeetingPassword:@"yyy"];
[service editMeeting:item];}

To catch the errors during the updating process, override the following function with sinkEditMeeting implemented.

- (void)sinkEditMeeting:(NSInteger)result
{
    NSLog(@"sinkEditMeeting result: %zd", result);
}

Delete a meeting

To delete an existing meeting, first get the Unique meeting ID. Then pass the meetingUniqueId to deleteMeeting method.

if (service) {
    id<MobileRTCMeetingItem> item = [service getMeetingItemByNumber:123456789];
    if (item) {
        [service deleteMeeting:item];}
    }
}

To catch the errors during the deleting process, override the following function with sinkDeleteMeeting implemented.

- (void)sinkDeleteMeeting:(NSInteger)result
{
    NSLog(@"sinkDeleteMeeting result: %zd", result);
}