Lock Screen Effects | Effects When in the Background |
![]() | ![]() |
target 'YourAppName' do# Uncommment the next line if you're using Swift or would like to use dynamic frameworksuse_frameworks!use_modular_headers!# Pods for Examplepod 'TIMPush', '7.9.5668'end
pod install # If you cannot install the latest version of TUIKit, run the following command to update the local CocoaPods repository list. pod repo update
Push Notification
Service
to your existing AppID.Bundle ID
of your App cannot use the wildcard *, otherwise the remote push service cannot be used.SSL Certificates
in the Apple Push Notification service SSL Certificates window, which are used for the remote push certificates of the development environment and production environment, as shown in the picture below:*.certSigningRequest
file.*.certSigningRequest
file. Development SSL Certificate
locally.Production SSL Certificate
for the production environment.SSL Certificates
, and the system will import them into the keychain.P12
file, please be sure to set a password for it.Push Notification
Service
to your existing AppID.Bundle ID
cannot use the wildcard *
; otherwise, the remote push service cannot be used.Bundle ID
and other information, click Continue to proceed to the next step.SSL Certificates
, one for the development environment (Development) and the other for the production environment (Production) remote push certificates, as shown below:Keychain Access - Certificate Assistant - Request a Certificate From a Certificate Authority
).*.certSigningRequest
file.*.certSigningRequest
file.Development SSL Certificate
for your development environment to your local system.Production SSL Certificate
for your production environment to your local system.SSL Certificate
for both the development and production environments, and the system will import it into your keychain.Apple Development IOS Push Service
) and Production (Apple Push Services
) environment's P12
files.P12
file, be sure to set a password.offlinePushCertificateID
in AppDelegate to return the Certificate ID.import TIMPushfunc offlinePushCertificateID() -> Int32 {return kAPNSBusiId}
#pragma mark - TIMPush- (int)offlinePushCertificateID {return kAPNSBusiId;}
import TUICallKit_Swiftimport TUICallEnginelet pushInfo: TUIOfflinePushInfo = TUIOfflinePushInfo()pushInfo.title = ""pushInfo.desc = "You have a new call"pushInfo.iOSPushType = .apnspushInfo.ignoreIOSBadge = falsepushInfo.iOSSound = "phone_ringing.mp3"pushInfo.androidSound = "phone_ringing"// For OPPO, you must set the `ChannelID` to receive push messages. The `ChannelID` must be identical with that in the console.// OPPO must set a ChannelID to receive push messages. This channelID needs to be the same as the console.pushInfo.androidOPPOChannelID = "tuikit"// FCM channel ID, you need change PrivateConstants.java and set "fcmPushChannelId"pushInfo.androidFCMChannelID = "fcm_push_channel"// VIVO message type: 0-push message, 1-System message(have a higher delivery rate)pushInfo.androidVIVOClassification = 1// HuaWei message type: https://developer.huawei.com/consumer/cn/doc/development/HMSCore-Guides/message-classification-0000001149358835pushInfo.androidHuaWeiCategory = "IM"let params = TUICallParams()params.userData = "User Data"params.timeout = 30params.offlinePushInfo = pushInfo// Single person call example, similar for group callTUICallKit.createInstance().call(userId: "123456", callMediaType: .audio, params: params) {} fail: { code, message in}
#import <TUICallKit_Swift/TUICallKit_Swift-Swift.h>#import <TUICallEngine/TUICallEngine.h>- (TUICallParams *)getCallParams {TUIOfflinePushInfo *offlinePushInfo = [self createOfflinePushInfo];TUICallParams *callParams = [TUICallParams new];callParams.offlinePushInfo = offlinePushInfo;callParams.timeout = 30;return callParams;}- (TUIOfflinePushInfo *)createOfflinePushInfo {TUIOfflinePushInfo *pushInfo = [TUIOfflinePushInfo new];pushInfo.title = @"";pushInfo.desc = @"You have a new call";pushInfo.iOSPushType = TUICallIOSOfflinePushTypeAPNs;pushInfo.ignoreIOSBadge = NO;pushInfo.iOSSound = @"phone_ringing.mp3";pushInfo.AndroidSound = @"phone_ringing";// For OPPO, you must set the `ChannelID` to receive push messages. The `ChannelID` must be identical with that in the console.// OPPO must set a ChannelID to receive push messages. This channelID needs to be the same as the console.pushInfo.AndroidOPPOChannelID = @"tuikit";// FCM channel ID, you need change PrivateConstants.java and set "fcmPushChannelId"pushInfo.AndroidFCMChannelID = @"fcm_push_channel";// VIVO message type: 0-push message, 1-System message(have a higher delivery rate)pushInfo.AndroidVIVOClassification = 1;// HuaWei message type: https://developer.huawei.com/consumer/cn/doc/development/HMSCore-Guides/message-classification-0000001149358835pushInfo.AndroidHuaWeiCategory = @"IM";return pushInfo;}// Single person call example, similar for group call[[TUICallKit createInstance] callWithUserId:@"123456"callMediaType:TUICallMediaTypeAudioparams:[self getCallParams] succ:^{} fail:^(int code, NSString * _Nullable errMsg) {}];
- application:didRegisterForRemoteNotificationsWithDeviceToken:
callback returns the production environment token. In this case, the businessID needs to be set to the production environment Certificate ID.- application:didRegisterForRemoteNotificationsWithDeviceToken:
callback returns the development environment token. In this case, the businessID needs to be set to the development environment certificate ID.
Was this page helpful?