NIMSDK Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | NIMSDKHeader.h |
+ sharedSDK
获取SDK实例
+ (instancetype)sharedSDKReturn Value
NIMSDK实例
Discussion
获取SDK实例
Declared In
NIMSDKHeader.h
– sdkVersion
获取SDK版本号
- (NSString *)sdkVersionReturn Value
SDK版本号
Discussion
获取SDK版本号
Declared In
NIMSDKHeader.h
– registerWithAppID:cerName:
初始化SDK
- (void)registerWithAppID:(NSString *)appKey cerName:(nullable NSString *)cerNameParameters
appKey |
申请的appKey |
|---|---|
cerName |
推送证书名 |
Declared In
NIMSDKHeader.h
– registerWithOption:
初始化SDK
- (void)registerWithOption:(NIMSDKOption *)optionParameters
option |
注册选项 |
|---|
Discussion
初始化SDK
Declared In
NIMSDKHeader.h
– appKey
获取AppKey
- (nullable NSString *)appKeyReturn Value
返回当前注册的AppKey
Discussion
获取AppKey
Declared In
NIMSDKHeader.h
– isUsingDemoAppKey
是否正在使用Demo AppKey
- (BOOL)isUsingDemoAppKeyReturn Value
返回是否正在使用Demo AppKey
Discussion
是否正在使用Demo AppKey
Declared In
NIMSDKHeader.h
– qchatWithOption:
设置圈组选项
- (void)qchatWithOption:(NIMQChatOption *)optionParameters
option |
圈组选项 |
|---|
Discussion
设置圈组选项
Declared In
NIMSDKHeader.h
– updateApnsToken:
更新APNS Token
- (NSString *)updateApnsToken:(NSData *)tokenParameters
token |
APNS Token |
|---|
Return Value
格式化后的APNS Token
Discussion
更新APNS Token
Declared In
NIMSDKHeader.h
– updateApnsToken:customContentKey:
更新APNS Token
- (NSString *)updateApnsToken:(NSData *)token customContentKey:(nullable NSString *)keyParameters
token |
APNS Token |
|---|---|
key |
自定义本端推送内容, 设置key可对应业务服务器自定义推送文案; 传@“” 清空配置, nil 则不更改 |
Return Value
格式化后的APNS Token
Discussion
更新APNS Token
Declared In
NIMSDKHeader.h
– updateApnsToken:customContentKey:qchatCustomContentKey:
更新APNS Token
- (NSString *)updateApnsToken:(NSData *)token customContentKey:(nullable NSString *)key qchatCustomContentKey:(nullable NSString *)qchatKeyParameters
token |
APNS Token |
|---|---|
key |
自定义本端推送内容, 设置key可对应业务服务器自定义推送文案; 传@“” 清空配置, nil 则不更改 |
qchatKey |
自定义圈组本端推送内容, 设置key可对应业务服务器自定义推送文案; 传@“” 清空配置, nil 则不更改 |
Return Value
格式化后的APNS Token
Discussion
更新APNS Token
Declared In
NIMSDKHeader.h
– updatePushKitToken:
x 更新 PushKit Token
- (void)updatePushKitToken:(NSData *)tokenParameters
token |
PushKit token |
|---|
Discussion
x 更新 PushKit Token
目前仅支持 PKPushTypeVoIP
Declared In
NIMSDKHeader.h
– currentLogFilepath
获得SDK Log路径
- (NSString *)currentLogFilepathReturn Value
SDK当天log路径
Discussion
获得SDK Log路径
这个接口会返回当前最新的一个 log 文件路径,SDK 会每天生成一个 log 文件方便开发者定位和反馈问题
Declared In
NIMSDKHeader.h
– archiveLogs:
打包当前的日志集合
- (void)archiveLogs:(NIMArchiveLogsHandler)completionParameters
completion |
打包后的压缩包路径 |
|---|
Discussion
打包当前的日志集合
这个接口会压缩当前所有的日志为 Zip 文件,并输出 Zip 路径,上层可以根据这个文件进行上传反馈
Declared In
NIMSDKHeader.h
– uploadLogs:
打包并上传当前的日志集合
- (void)uploadLogs:(NIMUploadLogsHandler _Nullable)completionParameters
completion |
打包后的压缩包路径 |
|---|
Discussion
打包并上传当前的日志集合
这个接口会压缩当前所有的日志为 Zip 文件,并输出 Zip 路径,上层可以根据这个文件进行上传反馈
Declared In
NIMSDKHeader.h
– uploadLogsWithAttach:roomId:completion:
打包并上传当前的日志集合
- (void)uploadLogsWithAttach:(nullable NSString *)attach roomId:(nullable NSString *)roomId completion:(NIMUploadLogsHandler _Nullable)completionParameters
attach |
附言,可为空 |
|---|---|
roomId |
聊天室ID,可为空 |
completion |
打包后的压缩包路径 |
Discussion
打包并上传当前的日志集合
这个接口会压缩当前所有的日志为 Zip 文件,并输出 Zip 路径,上层可以根据这个文件进行上传反馈
Declared In
NIMSDKHeader.h
serverSetting
当前服务器配置
@property (nonatomic, strong) NIMServerSetting *serverSettingDiscussion
当前服务器配置
私有化需要进行自定义设置,必须在注册 appkey 完成之前设置
Declared In
NIMSDKHeader.h
sceneDict
资源场景配置
@property (nonatomic, strong) NSMutableDictionary *sceneDictDiscussion
资源场景配置
nos 预设场景和自定义场景规则 可以覆盖设置,如果预设场景不设置,为系统默认设置 sceneDict key-value,系统默认预设场景为3种,自定义场景不超过10种 key 是场景,nsstring类型;value 是资源存活时间,nsnumber类型,精确到天,0为永久存活 例如:@{@“nim_icon”:@0,@“nim_msg”:@0,@“nim_system”:@0,@“nim_custom”:@30}
Declared In
NIMSDKHeader.h
loginManager
登录管理类 负责登录,注销和相关操作的通知收发
@property (nonatomic, strong, readonly) id<NIMLoginManager> loginManagerDiscussion
登录管理类 负责登录,注销和相关操作的通知收发
Declared In
NIMSDKHeader.h
chatManager
聊天管理类,负责消息的收发
@property (nonatomic, strong, readonly) id<NIMChatManager> chatManagerDiscussion
聊天管理类,负责消息的收发
Declared In
NIMSDKHeader.h
conversationManager
会话管理类,负责消息,最近会话的读写和管理
@property (nonatomic, strong, readonly) id<NIMConversationManager> conversationManagerDiscussion
会话管理类,负责消息,最近会话的读写和管理
Declared In
NIMSDKHeader.h
mediaManager
媒体管理类,负责多媒体相关的接口 (录音等)
@property (nonatomic, strong, readonly) id<NIMMediaManager> mediaManagerDiscussion
媒体管理类,负责多媒体相关的接口 (录音等)
Declared In
NIMSDKHeader.h
teamManager
群组管理类,负责群组的操作:创建,拉人,踢人,同步等
@property (nonatomic, strong, readonly) id<NIMTeamManager> teamManagerDiscussion
群组管理类,负责群组的操作:创建,拉人,踢人,同步等
Declared In
NIMSDKHeader.h
superTeamManager
超大群,负责超大群的相关操作
@property (nonatomic, strong, readonly) id<NIMSuperTeamManager> superTeamManagerDiscussion
超大群,负责超大群的相关操作
Declared In
NIMSDKHeader.h
userManager
好友管理类
@property (nonatomic, strong, readonly) id<NIMUserManager> userManagerDiscussion
好友管理类
Declared In
NIMSDKHeader.h
systemNotificationManager
系统通知管理类
@property (nonatomic, strong, readonly) id<NIMSystemNotificationManager> systemNotificationManagerDiscussion
系统通知管理类
Declared In
NIMSDKHeader.h
apnsManager
APNS推送管理类
@property (nonatomic, strong, readonly) id<NIMApnsManager> apnsManagerDiscussion
APNS推送管理类
Declared In
NIMSDKHeader.h
resourceManager
资源管理器,负责文件上传和下载
@property (nonatomic, strong, readonly) id<NIMResourceManager> resourceManagerDiscussion
资源管理器,负责文件上传和下载
Declared In
NIMSDKHeader.h
chatroomManager
聊天室管理类
@property (nonatomic, strong, readonly) id<NIMChatroomManager> chatroomManagerDiscussion
聊天室管理类
Declared In
NIMSDKHeader.h
docTranscodingManager
文档转码管理类
@property (nonatomic, strong, readonly) id<NIMDocTranscodingManager> docTranscodingManagerDiscussion
文档转码管理类
Declared In
NIMSDKHeader.h
subscribeManager
事件订阅管理类
@property (nonatomic, strong, readonly) id<NIMEventSubscribeManager> subscribeManagerDiscussion
事件订阅管理类
Declared In
NIMSDKHeader.h
robotManager
智能机器人管理类
@property (nonatomic, strong, readonly) id<NIMRobotManager> robotManagerDiscussion
智能机器人管理类
Declared In
NIMSDKHeader.h
redPacketManager
红包管理类
@property (nonatomic, strong, readonly) id<NIMRedPacketManager> redPacketManagerDiscussion
红包管理类
Declared In
NIMSDKHeader.h
broadcastManager
广播消息管理类
@property (nonatomic, strong, readonly) id<NIMBroadcastManager> broadcastManagerDiscussion
广播消息管理类
Declared In
NIMSDKHeader.h
antispamManager
反垃圾管理类
@property (nonatomic, strong, readonly) id<NIMAntispamManager> antispamManagerDiscussion
反垃圾管理类
Declared In
NIMSDKHeader.h
signalManager
通用音视频信令管理类
@property (nonatomic, strong, readonly) id<NIMSignalManager> signalManagerDiscussion
通用音视频信令管理类
Declared In
NIMSDKHeader.h
passThroughManager
透传代理管理类
@property (nonatomic, strong, readonly) id<NIMPassThroughManager> passThroughManagerDiscussion
透传代理管理类
Declared In
NIMSDKHeader.h
chatExtendManager
Thread Talk管理类
@property (nonatomic, strong, readonly) id<NIMChatExtendManager> chatExtendManagerDiscussion
Thread Talk管理类
Declared In
NIMSDKHeader.h
indexManager
索引管理类
@property (nonatomic, strong, readonly) id<NIMIndexManager> indexManagerDiscussion
索引管理类
Declared In
NIMSDKHeader.h
qchatManager
圈组管理类
@property (nonatomic, strong, readonly) id<NIMQChatManager> qchatManagerDiscussion
圈组管理类
Declared In
NIMSDKHeader.h
qchatApnsManager
圈组APNS推送管理类
@property (nonatomic, strong, readonly) id<NIMQChatApnsManager> qchatApnsManagerDiscussion
圈组APNS推送管理类
Declared In
NIMSDKHeader.h
qchatServerManager
圈组服务器管理类
@property (nonatomic, strong, readonly) id<NIMQChatServerManager> qchatServerManagerDiscussion
圈组服务器管理类
Declared In
NIMSDKHeader.h
qchatChannelManager
圈组频道管理类
@property (nonatomic, strong, readonly) id<NIMQChatChannelManager> qchatChannelManagerDiscussion
圈组频道管理类
Declared In
NIMSDKHeader.h
qchatRoleManager
圈组身份组管理类
@property (nonatomic, strong, readonly) id<NIMQChatRoleManager> qchatRoleManagerDiscussion
圈组身份组管理类
Declared In
NIMSDKHeader.h
qchatMessageManager
圈组消息管理类
@property (nonatomic, strong, readonly) id<NIMQChatMessageManager> qchatMessageManagerDiscussion
圈组消息管理类
Declared In
NIMSDKHeader.h
qchatMessageExtendManager
圈组消息扩展管理类
@property (nonatomic, strong, readonly) id<NIMQChatMessageExtendManager> qchatMessageExtendManagerDiscussion
圈组消息扩展管理类
Declared In
NIMSDKHeader.h
qchatRTCChannelManager
圈组rtc管理类
@property (nonatomic, strong, readonly) id<NIMQChatRTCChannelManager> qchatRTCChannelManagerDiscussion
圈组rtc管理类
Declared In
NIMSDKHeader.h