NIMIOSSDKOptions class

Inheritance
Annotations
  • @JsonSerializable()

Constructors

NIMIOSSDKOptions({String? apnsCername, String? pkCername, int? maxUploadLogSize, bool? enableFetchAttachmentAutomaticallyAfterReceivingInChatroom, bool? enableFileProtectionNone, bool? enabledHttpsForInfo, bool? enabledHttpsForMessage, int? maxAutoLoginRetryTimes, int? maximumLogDays, bool? disableReconnectInBackgroundState, bool? enableTeamReceipt, bool? enableFileQuickTransfer, bool? enableAsyncLoadRecentSession, bool? linkQuickSwitch, bool? enabledQChatMessageCache, required String appKey, String? sdkRootDir, int? cndTrackInterval, int? customClientType, bool? shouldSyncStickTopSessionInfos, bool? enableReportLogAutomatically, String? loginCustomTag, bool? enableDatabaseBackup, bool? shouldSyncUnreadCount, bool? shouldConsiderRevokedMessageUnreadCount, bool? enableTeamMessageReadReceipt, bool? shouldTeamNotificationMessageMarkUnread, bool? enableAnimatedImageThumbnail, bool? enablePreloadMessageAttachment, bool? useAssetServerAddressConfig, NIMLoginInfo? autoLoginInfo, Map<NIMNosScene, int>? nosSceneConfig, NIMServerConfig? serverConfig})
NIMIOSSDKOptions.fromMap(Map map)
factory

Properties

apnsCername String?
define iOS options here 云信 Apns 推送证书名
getter/setter pair
appKey String
app key
finalinherited
autoLoginInfo NIMLoginInfo?
自动登录账号信息 windows&macos 暂不支持自动登录
finalinherited
cdnTrackInterval int?
cdn统计回调触发间隔。触发cdn拉流前设置,触发拉流后改动将不生效 windows&macos 暂不支持
finalinherited
customClientType int?
自定义客户端类型,小于等于0视为没有自定义类型
finalinherited
disableReconnectInBackgroundState bool?
是否禁止后台重连 @discusssion 默认为 NO。即默认情况下,当程序退到后台断开连接后,如果 App 仍能运行,SDK 将继续执行自动重连机制。设置为 YES 后在后台将不自动重连,重连将被推迟到前台进行。 只有特殊用户场景才需要此设置,无明确原因请勿设置。
getter/setter pair
disableTraceroute bool?
设置禁用NIMSDK tracroute 能力 默认为NO,SDK会在请求失败时,进行 traceroute ,探测网路中各节点,以判断在哪个节点失去连接
getter/setter pair
enableAnimatedImageThumbnail bool?
默认情况下,从服务器获取原图缩略图时,如果原图为动图,我们将返回原图第一帧的缩略图。 而开启这个选项后,我们将返回缩略图后的动图。 这个选项只影响从服务器获取的缩略图,不影响本地生成的缩略图。默认关闭
finalinherited
enableAsyncLoadRecentSession bool?
是否开启异步读取最近会话,默认NO,不开启 @discussion 对于最近会话比较多的用户,初始读取数据库时,可能影响到启动速度,用户可以选择开启该选项,开启异步读取最近会话, querySessionList会优先返回一部分最近会话,等到全部读取完成时,通过回调通知用户刷新UI。
getter/setter pair
enableDatabaseBackup bool?
是否开启数据库备份功能,默认关闭
finalinherited
enabledHttpsForInfo bool?
针对用户信息开启 https 支持 @discusssion 默认为 YES。在默认情况下,我们认为用户头像,群头像,聊天室类用户头像等信息都是默认托管在云信上,所以 SDK 会针对他们自动开启 https 支持。 但如果你需要将这些信息都托管在自己的服务器上,需要设置这个接口为 NO,避免 SDK 自动将你的 http url 自动转换为 https url。
getter/setter pair
enabledHttpsForMessage bool?
针对消息内容开启 https 支持 @discusssion 默认为 YES。在默认情况下,我们认为消息,包括图片,视频,音频信息都是默认托管在云信上,所以 SDK 会针对他们自动开启 https 支持。 但如果你需要将这些信息都托管在自己的服务器上,需要设置这个接口为 NO,避免 SDK 自动将你的 http url 自动转换为 https url。 (强烈不建议) 需要注意的是即时设置了这个属性,通过 iOS SDK 发出去的消息 URL 仍是 https 的,设置这个值只影响接收到的消息 URL 格式转换
getter/setter pair
enabledQChatMessageCache bool?
是否开启圈组消息缓存支持,默认不开启
getter/setter pair
enableFetchAttachmentAutomaticallyAfterReceivingInChatroom bool?
是否在收到聊天室消息后自动下载附件 @discussion 默认为NO
getter/setter pair
enableFileProtectionNone bool?
是否使用 NSFileProtectionNone 作为云信文件的 NSProtectionKey @discussion 默认为 NO,只有在上层 APP 开启了 Data Protection 时才起效
getter/setter pair
enableFileQuickTransfer bool?
文件快传本地开关,默认YES
getter/setter pair
enablePreloadMessageAttachment bool?
是否需要SDK自动预加载多媒体消息的附件。 如果打开,SDK收到多媒体消息后,图片和视频会自动下载缩略图,音频会自动下载文件。 如果关闭,第三方APP可以只有决定要不要下载以及何时下载附件内容,典型时机为消息列表第一次滑动到 这条消息时,才触发下载,以节省用户流量。 默认打开。
finalinherited
enableReportLogAutomatically bool?
是否开启IM日志自动上报,默认关闭
finalinherited
enableTeamMessageReadReceipt bool?
是否启用群消息已读功能,默认关闭
finalinherited
enableTeamReceipt bool?
是否开启群回执功能 @discusssion 默认为 NO。
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
linkQuickSwitch bool?
getter/setter pair
loginCustomTag String?
登录时的自定义字段,登陆成功后会同步给其他端
finalinherited
maxAutoLoginRetryTimes int?
自动登录重试次数 @discusssion 默认为 0。即默认情况下,自动登录将无限重试。设置成大于 0 的值后,在没有登录成功前,自动登录将重试最多 maxAutoLoginRetryTimes 次。
getter/setter pair
maximumLogDays int?
本地 log 存活期 @discusssion 默认为 7 天。即超过 7 天的 log 将被清除。只能设置大于等于 2 的值。
getter/setter pair
maxUploadLogSize int?
日志上传大小上限,默认 0,不限制,单位(byte)
getter/setter pair
nosSceneConfig Map<NIMNosScene, int>?
SDK nos 场景配置
finalinherited
pkCername String?
云信 PushKit 推送证书名
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sdkRootDir String?
sdk 根目录
finalinherited
serverConfig NIMServerConfig?
配置专属服务器的地址
finalinherited
shouldConsiderRevokedMessageUnreadCount bool?
开启时,如果被撤回的消息本地还未读,那么当消息发生撤回时, 对应会话的未读计数将减 1 以保持最近会话未读数的一致性。默认关闭
finalinherited
shouldSyncStickTopSessionInfos bool?
是否同步置顶会话记录,默认关闭
finalinherited
shouldSyncUnreadCount bool?
是否开启会话已读多端同步,支持多端同步会话未读数,默认关闭
finalinherited
shouldTeamNotificationMessageMarkUnread bool?
群通知消息是否计入未读数,默认不计入未读
finalinherited
useAssetServerAddressConfig bool?
是否使用自定义服务器地址配置文件
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, dynamic>
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited