Skip to content

DatagramConferenceFramework (ConferenceSDK)

Version 1.0


Installation

*** IMPORTANT ***

  • Copy and add 'DatagramConferenceFramework.framework' in 'lib' folder to your project. project_dir

  • In project Build Settings, find 'Framework Search Paths' and link to folder that contains 'DatagramConferenceFramework.framework' framework_search_path

  • In project 'General', change 'Embed' for each framework to 'Embed & Sign' embed_and_sign

*** IMPORTANT ***

  • Remember to add Camera/Microphone permission description in Info.plist, otherwise your application will crash. permission

  • And to let call run in background, you need to set background mode to Voice over IP background_mode

Usage

Import ConferenceSDK

swift
import DatagramConferenceFramework

Load Conference Info

swift
+ (void) getConferenceInfo:(NSString *_Nullable)url
                     Alias: (NSString *_Nullable) alias
                completion:(void(^)(NSDictionary<NSString *,id> * _Nullable result))resultBlock;
  • Obtain conference's info from url or alias
  • If url or alias is valid and exist, the dictionary in result can contains "name" of the conference, "alias" same at input, "expiredAt" the time when conference is no longer available.
  • In case of error, the "error" give the reason "InvalidUrl" or "NotFound"
swift
ConferenceSDK.getConferenceInfo(nil, alias: alias) { [weak self] result in
    guard let `self` = self else { return }
    if let validResult = result {
        NSLog("validResult = %@", validResult)
        if let aliasText = alias {
            if text.count > aliasText.count && qrcodeDict.count < 3 {
                self.joinLinkTextField.text = alias
                self.joinLinkPrefixLabel.text = JoinLinkPrefixText
                self.layoutPrefixView()
            }
        }
        if let resultAlias = validResult["alias"] as? String, 
            resultAlias.isEmpty == false {

            self.showAliasDetail(info: validResult)
        } else {
            let notFoundError = "Event not found. Please try again"
            self.showLinkError(errorString: notFoundError)
        }
    }
}

Join Conference with Built-in GUI

swift
+ (void) joinConference:(NSString *_Nullable) url
                  Alias:(NSString *_Nullable) alias
                   Name:(NSString *_Nullable) name
             completion:(void(^)(NSDictionary<NSString*,id> * _Nullable result))resultBlock;
  • Join conference with url or alias
  • If join success, the result is not used.
  • In case of error, the "error" give the reason "InvalidUrl" or "NotFound"
swift
if resultAlias != nil {
    ConferenceSDK.joinConference(nil, alias: resultAlias, name: "SDK-Demo") { joinResult in
        
    }
}