NIMSDK Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | NIMSDKHeader.h |
+ sharedSDK
Get an SDK instance
+ (instancetype)sharedSDKReturn Value
NIMSDK instance.
Discussion
Get an SDK instance
Declared In
NIMSDKHeader.h
– sdkVersion
Get the version number of the current SDK.
- (NSString *)sdkVersionReturn Value
SDK version number
Discussion
Get the version number of the current SDK.
Declared In
NIMSDKHeader.h
– registerWithAppID:cerName:
Initialize the SDK
- (void)registerWithAppID:(NSString *)appKey cerName:(nullable NSString *)cerNameParameters
appKey |
applied AppKey |
|---|---|
cerName |
Push certificate name |
Discussion
Initialize the SDK
If you need more registration options, registerWithOption is recommended:
Declared In
NIMSDKHeader.h
– registerWithOption:
Initialize the SDK
- (void)registerWithOption:(NIMSDKOption *)optionParameters
option |
registration option |
|---|
Discussion
Initialize the SDK
Declared In
NIMSDKHeader.h
– appKey
get the AppKey:
- (nullable NSString *)appKeyReturn Value
current AppKey
Discussion
get the AppKey:
Declared In
NIMSDKHeader.h
– isUsingDemoAppKey
Check if the Demo AppKey is used
- (BOOL)isUsingDemoAppKeyReturn Value
result
Discussion
Check if the Demo AppKey is used
Declared In
NIMSDKHeader.h
– updateApnsToken:
Updated the APNs token
- (NSString *)updateApnsToken:(NSData *)tokenParameters
token |
APNs token |
|---|
Return Value
formated APNs token
Discussion
Updated the APNs token
Declared In
NIMSDKHeader.h
– updateApnsToken:customContentKey:
Updated the APNs token
- (NSString *)updateApnsToken:(NSData *)token customContentKey:(nullable NSString *)keyParameters
token |
APNS Token |
|---|---|
key |
Custom push content. set the key to send custom push content to the business server; Pass in @“” to clear the configuration, nil will not change the setting. |
Return Value
formated APNs token
Discussion
Updated the APNs token
Declared In
NIMSDKHeader.h
– updatePushKitToken:
Update the PushKit token
- (void)updatePushKitToken:(NSData *)tokenParameters
token |
PushKit token |
|---|
Discussion
Update the PushKit token
PKPushTypeVoIP is supported
Declared In
NIMSDKHeader.h
– currentLogFilepath
Get the SDK log path
- (NSString *)currentLogFilepathReturn Value
SDK log path
Discussion
Get the SDK log path
This interface will return the path of the latest log file, and the SDK will generate a log file every day for developers to locate and send feedbacks for issues
Declared In
NIMSDKHeader.h
– archiveLogs:
Compress the current log files
- (void)archiveLogs:(NIMArchiveLogsHandler)completionParameters
completion |
Path of the compressed package |
|---|
Discussion
Compress the current log files
This interface will compress all current logs into Zip files, and output the path of the zip file, the upper layer can upload the file for feedback.
Declared In
NIMSDKHeader.h
– uploadLogs:
Compress and upload current log files
- (void)uploadLogs:(NIMUploadLogsHandler _Nullable)completionParameters
completion |
Path of the compressed package |
|---|
Discussion
Compress and upload current log files
This interface will compress all current logs into Zip files, and output the path of the zip file, the upper layer can upload the file for feedback.
Declared In
NIMSDKHeader.h
– uploadLogsWithAttach:roomId:completion:
Compress and upload current log files
- (void)uploadLogsWithAttach:(nullable NSString *)attach roomId:(nullable NSString *)roomId completion:(NIMUploadLogsHandler _Nullable)completionParameters
attach |
additional message, optional |
|---|---|
roomId |
chat room ID, optional |
completion |
Path of the compressed package |
Discussion
Compress and upload current log files
This interface will compress all current logs into Zip files, and output the path of the zip file, the upper layer can upload the file for feedback.
Declared In
NIMSDKHeader.h
– enableConsoleLog
Enable the console log
- (void)enableConsoleLogDiscussion
Enable the console log
Declared In
NIMSDKHeader.h
serverSetting
Current server settings
@property (nonatomic, strong) NIMServerSetting *serverSettingDiscussion
Current server settings
Custom settings for on-premises deployment, which must be set before appkey registration is complete.
Declared In
NIMSDKHeader.h
sceneDict
Resource scene configuration
@property (nonatomic, strong) NSMutableDictionary *sceneDictDiscussion
Resource scene configuration
NOS predefinedt scene and custom scene rules The setting can be overridden. If the predefined scene is not set, the system default setting is used sceneDict key-value, 3 default system predefined scenes are provide, and the custom scene does not exceed 10. key is the scene in nsstring type; value is the resource time to live in nsnumber type. The value is measured in days. A value of 0 indicates permanent life. For example, @{@“nim_icon”:@0,@“nim_msg”:@0,@“nim_system”:@0,@“nim_custom”:@30}
Declared In
NIMSDKHeader.h
loginManager
Login manager that handles login, logout and notifications.
@property (nonatomic, strong, readonly) id<NIMLoginManager> loginManagerDiscussion
Login manager that handles login, logout and notifications.
Declared In
NIMSDKHeader.h
chatManager
Chat manager that handles messaging
@property (nonatomic, strong, readonly) id<NIMChatManager> chatManagerDiscussion
Chat manager that handles messaging
Declared In
NIMSDKHeader.h
conversationManager
Conversation manager that handles messaing, recent sessions loading
@property (nonatomic, strong, readonly) id<NIMConversationManager> conversationManagerDiscussion
Conversation manager that handles messaing, recent sessions loading
Declared In
NIMSDKHeader.h
mediaManager
Media manager that handles media operations (recording)
@property (nonatomic, strong, readonly) id<NIMMediaManager> mediaManagerDiscussion
Media manager that handles media operations (recording)
Declared In
NIMSDKHeader.h
teamManager
Group manager that handles group operations, such as creating groups, inviting users, removing members, and syncing
@property (nonatomic, strong, readonly) id<NIMTeamManager> teamManagerDiscussion
Group manager that handles group operations, such as creating groups, inviting users, removing members, and syncing
Declared In
NIMSDKHeader.h
superTeamManager
Supergroup manager that handles supergroup operations
@property (nonatomic, strong, readonly) id<NIMSuperTeamManager> superTeamManagerDiscussion
Supergroup manager that handles supergroup operations
Declared In
NIMSDKHeader.h
userManager
Friend manager
@property (nonatomic, strong, readonly) id<NIMUserManager> userManagerDiscussion
Friend manager
Declared In
NIMSDKHeader.h
systemNotificationManager
System notification manager
@property (nonatomic, strong, readonly) id<NIMSystemNotificationManager> systemNotificationManagerDiscussion
System notification manager
Declared In
NIMSDKHeader.h
apnsManager
APNs push manager
@property (nonatomic, strong, readonly) id<NIMApnsManager> apnsManagerDiscussion
APNs push manager
Declared In
NIMSDKHeader.h
resourceManager
Resource manager that handles file upload and download
@property (nonatomic, strong, readonly) id<NIMResourceManager> resourceManagerDiscussion
Resource manager that handles file upload and download
Declared In
NIMSDKHeader.h
chatroomManager
Chat room manager
@property (nonatomic, strong, readonly) id<NIMChatroomManager> chatroomManagerDiscussion
Chat room manager
Declared In
NIMSDKHeader.h
docTranscodingManager
Document conversion manager
@property (nonatomic, strong, readonly) id<NIMDocTranscodingManager> docTranscodingManagerDiscussion
Document conversion manager
Declared In
NIMSDKHeader.h
subscribeManager
Event subscribe manager
@property (nonatomic, strong, readonly) id<NIMEventSubscribeManager> subscribeManagerDiscussion
Event subscribe manager
Declared In
NIMSDKHeader.h
robotManager
Chatbot manager
@property (nonatomic, strong, readonly) id<NIMRobotManager> robotManagerDiscussion
Chatbot manager
Declared In
NIMSDKHeader.h
redPacketManager
Red packet manager
@property (nonatomic, strong, readonly) id<NIMRedPacketManager> redPacketManagerDiscussion
Red packet manager
Declared In
NIMSDKHeader.h
broadcastManager
Broadcast manager
@property (nonatomic, strong, readonly) id<NIMBroadcastManager> broadcastManagerDiscussion
Broadcast manager
Declared In
NIMSDKHeader.h
antispamManager
Anti-spam manager
@property (nonatomic, strong, readonly) id<NIMAntispamManager> antispamManagerDiscussion
Anti-spam manager
Declared In
NIMSDKHeader.h
signalManager
Signaling manager
@property (nonatomic, strong, readonly) id<NIMSignalManager> signalManagerDiscussion
Signaling manager
Declared In
NIMSDKHeader.h
passThroughManager
Pass-through agent manager
@property (nonatomic, strong, readonly) id<NIMPassThroughManager> passThroughManagerDiscussion
Pass-through agent manager
Declared In
NIMSDKHeader.h
chatExtendManager
Thread talk manager
@property (nonatomic, strong, readonly) id<NIMChatExtendManager> chatExtendManagerDiscussion
Thread talk manager
Declared In
NIMSDKHeader.h
indexManager
Index manager
@property (nonatomic, strong, readonly) id<NIMIndexManager> indexManagerDiscussion
Index manager
Declared In
NIMSDKHeader.h