1v1 Video Call | Group call |
| |
SDKAppID, SDKSecretKey
, which will be used as Mandatory Parameters in Step 4: Log in to the TUICallKit component.pod 'TUICallKit_Swift'
to your Podfile
. If you encounter any problems, please refer to the Example project.target 'xxxx' do...pod 'TUICallKit_Swift/Professional'end
Podfile
, you need to cd
into the xxxx.xcodeproj
directory in Terminal, and then create a Podfile
by executing the following command:pod init
cd
into the Podfile
directory and then run the following command to install components.pod install
pod repo update
pod update
Privacy - Camera Usage Description
Privacy - Microphone Usage Description
TUICallKit
componentimport TUICoreimport TUICallKit_Swiftfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {let userID = "denny" // Please replace with your UserIdlet sdkAppID: Int32 = 0 // Please replace with the SDKAppID obtained from the console in the step 1let secretKey = "****" // Please replace with the SecretKey obtained from the console in the step 1let userSig = GenerateTestUserSig.genTestUserSig(userID: userID, sdkAppID: sdkAppID, secretKey: secretKey)TUILogin.login(sdkAppID, userID: userID, userSig: userSig) {print("login success")} fail: { code, message inprint("login failed, code: \\(code), error: \\(message ?? "nil")")}return true}
#import <TUICore/TUILogin.h>#import <TUICallKit_Swift/TUICallKit_Swift-Swift.h>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {NSString *userID = @"denny"; // Please replace with your UserIdint sdkAppID = 0; // Please replace with the SDKAppID obtained from the console in the first stepNSString *secretKey = @"****"; // Please replace with the SecretKey obtained from the console in the first stepNSString *userSig = [GenerateTestUserSig genTestUserSigWithUserID:userID sdkAppID:sdkAppID secretKey:secretKey];[TUILogin login:sdkAppIDuserID:userIDuserSig:userSigsucc:^{NSLog(@"login success");} fail:^(int code, NSString * _Nullable msg) {NSLog(@"login failed, code: %d, error: %@", code, msg);}];return YES;}
Parameter | Type | Description |
userID | String | Your own User ID based on your business. It can only include letters (a-z, A-Z), digits (0-9), underscores, and hyphens. |
sdkAppID | Int32 | |
secretKey | String | |
userSig | String | A security signature for user login to verify identity and prevent unauthorized access to cloud services. |
import TUICallKit_Swiftimport TUICallEngine// Initiating a 1-to-1 audio call (assuming userId is mike)TUICallKit.createInstance().call(userId: "mike", callMediaType: .audio)
#import <TUICallKit_Swift/TUICallKit_Swift-Swift.h>#import <TUICallEngine/TUICallEngine.h>// Initiating a 1-to-1 audio call (assuming userId is mike)[[TUICallKit createInstance] callWithUserId:@"mike" callMediaType:TUICallMediaTypeAudio];
| |
Caller | Callee |
Was this page helpful?