从19年的6.1.0
升级最新版本:9.1.1(iOS SDK (9.1.1)含圈组模块)
下载地址:http://yunxin.163.com/im-sdk-demo?solutionType=0#solution
配置步骤:https://doc.yunxin.163.com/docs/TM5MzM5Njk/DQ5MTA5ODQ?platformId=60278
请先前往SDK下载页面获取当前最新版本。
将解压得到的NIMSDK.framework拷贝到工程项目文件夹下。
以 Xcode Version 11.5 为例,进入TARGETS > Project Name > General > Frameworks, Libraries, and Embedded Content 菜单,点击 +,再点击 Add Other…,将NIMSDK.framework添加进去。同时,将Embed 属性设置为 Embed & Sign,以使得SDK动态库和应用签名保持一致。
至此, SDK 已经导入完成。
由于项目一开始是19年的6.1.0版本 里面用了 音视频功能,项目本身并没用音视频功能
NIMAVChat.framework(已废弃了吧,现在官方采用NERtcSDK)
NMCBasicModuleFramework.framework
NMC.framework
这次三个库都删除,
删除整个VideoChat文件:
另外还有一些引用的代码也删除或者注释掉:
NIMAVChatSDK
NTESVideoChatViewController
NIMNetCallManagerDelegate
NTESTeamMeetingCallingViewController
NTESTeamMeetingViewController
- (NSInteger)chatroomRetryCount
NTESAudioChatViewController
NTESTeamMeetingCalleeInfo
[NIMAVChatSDK sharedSDK]
- (NSString *)textByCaller:(NSString *)caller type:(NIMNetCallMediaType)type
- (NSInteger)chatroomRetryCount
其中- (NSString *)description 改成如下:
- (NSString *)description{
return [NSString stringWithFormat:
@"\n\n\n" \
"enabled_remove_recent_session %d\n" \
"local_search_time_order_desc %d\n" \
"auto_remove_remote_session %d\n" \
"auto_remove_snap_message %d\n" \
"add_friend_need_verify %d\n" \
"show app %d\n" \
"maximum log days %zd\n" \
"using amr %d\n" \
"ignore_team_types %@ \n" \
"server_record_audio %d\n" \
"server_record_video %d\n" \
"server_record_whiteboard_data %d\n" \
"videochat_auto_rotate_remote_video %d \n" \
"videochat_start_with_back_camera %zd\n" \
"videochat_video_encode_max_kbps %zd\n" \
"videochat_local_record_video_kbps %zd\n" \
"videochat_auto_disable_audiosession %zd\n" \
"videochat_audio_denoise %zd\n" \
"videochat_voice_detect %zd\n" \
"videochat_prefer_hd_audio %zd\n"\
"chatroom_retry_count %zd\n"\
"sync_when_remote_fetch_messages %zd\n"\
"\n\n\n",
[self removeSessionWhenDeleteMessages],
[self localSearchOrderByTimeDesc],
[self autoRemoveRemoteSession],
[self autoRemoveSnapMessage],
[self needVerifyForFriend],
[self showFps],
[self maximumLogDays],
[self usingAmr],
[self ignoreTeamNotificationTypes],
[self serverRecordAudio],
[self serverRecordVideo],
[self serverRecordWhiteboardData],
[self videochatAutoRotateRemoteVideo],
[self startWithBackCamera],
[self videoMaxEncodeKbps],
[self localRecordVideoKbps],
[self autoDeactivateAudioSession],
[self audioDenoise],
[self voiceDetect],
[self preferHDAudio],
[self chatroomRetryCount],
[self enableSyncWhenFetchRemoteMessages]
];
}
编译报错的代码也直接注释掉。
若遇到:
“Building for iOS Simulator, but the linked and embedded framework '***' wa...
参看:https://www.jianshu.com/p/c6a68d421644
整体感觉NIMSDK.framework并没有其他变化: