NIMSDK Class Reference
Inherits from | NSObject |
---|---|
Declared in | NIMSDKHeader.h |
+ sharedSDK
Get an SDK instance
+ (instancetype)sharedSDK
Return Value
NIMSDK instance.
Discussion
Get an SDK instance
Declared In
NIMSDKHeader.h
– sdkVersion
Get the version number of the current SDK.
- (NSString *)sdkVersion
Return 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 *)cerName
Parameters
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 *)option
Parameters
option |
registration option |
---|
Discussion
Initialize the SDK
Declared In
NIMSDKHeader.h
– appKey
get the AppKey:
- (nullable NSString *)appKey
Return Value
current AppKey
Discussion
get the AppKey:
Declared In
NIMSDKHeader.h
– isUsingDemoAppKey
Check if the Demo AppKey is used
- (BOOL)isUsingDemoAppKey
Return Value
result
Discussion
Check if the Demo AppKey is used
Declared In
NIMSDKHeader.h
– updateApnsToken:
Updated the APNs token
- (NSString *)updateApnsToken:(NSData *)token
Parameters
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 *)key
Parameters
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 *)token
Parameters
token |
PushKit token |
---|
Discussion
Update the PushKit token
PKPushTypeVoIP is supported
Declared In
NIMSDKHeader.h
– currentLogFilepath
Get the SDK log path
- (NSString *)currentLogFilepath
Return 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)completion
Parameters
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)completion
Parameters
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)completion
Parameters
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)enableConsoleLog
Discussion
Enable the console log
Declared In
NIMSDKHeader.h
serverSetting
Current server settings
@property (nonatomic, strong) NIMServerSetting *serverSetting
Discussion
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 *sceneDict
Discussion
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> loginManager
Discussion
Login manager that handles login, logout and notifications.
Declared In
NIMSDKHeader.h
chatManager
Chat manager that handles messaging
@property (nonatomic, strong, readonly) id<NIMChatManager> chatManager
Discussion
Chat manager that handles messaging
Declared In
NIMSDKHeader.h
conversationManager
Conversation manager that handles messaing, recent sessions loading
@property (nonatomic, strong, readonly) id<NIMConversationManager> conversationManager
Discussion
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> mediaManager
Discussion
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> teamManager
Discussion
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> superTeamManager
Discussion
Supergroup manager that handles supergroup operations
Declared In
NIMSDKHeader.h
userManager
Friend manager
@property (nonatomic, strong, readonly) id<NIMUserManager> userManager
Discussion
Friend manager
Declared In
NIMSDKHeader.h
systemNotificationManager
System notification manager
@property (nonatomic, strong, readonly) id<NIMSystemNotificationManager> systemNotificationManager
Discussion
System notification manager
Declared In
NIMSDKHeader.h
apnsManager
APNs push manager
@property (nonatomic, strong, readonly) id<NIMApnsManager> apnsManager
Discussion
APNs push manager
Declared In
NIMSDKHeader.h
resourceManager
Resource manager that handles file upload and download
@property (nonatomic, strong, readonly) id<NIMResourceManager> resourceManager
Discussion
Resource manager that handles file upload and download
Declared In
NIMSDKHeader.h
chatroomManager
Chat room manager
@property (nonatomic, strong, readonly) id<NIMChatroomManager> chatroomManager
Discussion
Chat room manager
Declared In
NIMSDKHeader.h
docTranscodingManager
Document conversion manager
@property (nonatomic, strong, readonly) id<NIMDocTranscodingManager> docTranscodingManager
Discussion
Document conversion manager
Declared In
NIMSDKHeader.h
subscribeManager
Event subscribe manager
@property (nonatomic, strong, readonly) id<NIMEventSubscribeManager> subscribeManager
Discussion
Event subscribe manager
Declared In
NIMSDKHeader.h
robotManager
Chatbot manager
@property (nonatomic, strong, readonly) id<NIMRobotManager> robotManager
Discussion
Chatbot manager
Declared In
NIMSDKHeader.h
redPacketManager
Red packet manager
@property (nonatomic, strong, readonly) id<NIMRedPacketManager> redPacketManager
Discussion
Red packet manager
Declared In
NIMSDKHeader.h
broadcastManager
Broadcast manager
@property (nonatomic, strong, readonly) id<NIMBroadcastManager> broadcastManager
Discussion
Broadcast manager
Declared In
NIMSDKHeader.h
antispamManager
Anti-spam manager
@property (nonatomic, strong, readonly) id<NIMAntispamManager> antispamManager
Discussion
Anti-spam manager
Declared In
NIMSDKHeader.h
signalManager
Signaling manager
@property (nonatomic, strong, readonly) id<NIMSignalManager> signalManager
Discussion
Signaling manager
Declared In
NIMSDKHeader.h
passThroughManager
Pass-through agent manager
@property (nonatomic, strong, readonly) id<NIMPassThroughManager> passThroughManager
Discussion
Pass-through agent manager
Declared In
NIMSDKHeader.h
chatExtendManager
Thread talk manager
@property (nonatomic, strong, readonly) id<NIMChatExtendManager> chatExtendManager
Discussion
Thread talk manager
Declared In
NIMSDKHeader.h
indexManager
Index manager
@property (nonatomic, strong, readonly) id<NIMIndexManager> indexManager
Discussion
Index manager
Declared In
NIMSDKHeader.h