diff --git a/IMUIKitOC/IMUIKitOCExample/IMUIKitOCExample.xcodeproj/project.pbxproj b/IMUIKitOC/IMUIKitOCExample/IMUIKitOCExample.xcodeproj/project.pbxproj index 0a9d44c6..b4a7d1e3 100644 --- a/IMUIKitOC/IMUIKitOCExample/IMUIKitOCExample.xcodeproj/project.pbxproj +++ b/IMUIKitOC/IMUIKitOCExample/IMUIKitOCExample.xcodeproj/project.pbxproj @@ -601,7 +601,7 @@ INFOPLIST_KEY_UIMainStoryboardFile = Main; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -637,7 +637,7 @@ INFOPLIST_KEY_UIMainStoryboardFile = Main; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/IMUIKitOC/IMUIKitOCExample/IMUIKitOCExample/Main/AppDelegate.m b/IMUIKitOC/IMUIKitOCExample/IMUIKitOCExample/Main/AppDelegate.m index 83c37813..d7ab8619 100644 --- a/IMUIKitOC/IMUIKitOCExample/IMUIKitOCExample/Main/AppDelegate.m +++ b/IMUIKitOC/IMUIKitOCExample/IMUIKitOCExample/Main/AppDelegate.m @@ -11,7 +11,8 @@ #import #import #import -#import +#import +#import #import // #import #import "CustomRouterViewController.h" @@ -42,7 +43,8 @@ - (BOOL)application:(UIApplication *)application - (void)setupInit { // 初始化NIMSDK NIMSDKOption *option = [NIMSDKOption optionWithAppKey:AppKey]; - [[IMKitClient instance] setupCoreKitIM:option]; + option.v2 = YES; + [[IMKitClient instance] setupIM:option]; // 统一登录组件 YXConfig *config = [[YXConfig alloc] init]; @@ -86,7 +88,7 @@ - (void)loginWithUI { - (void)setupXKit:(YXUserInfo *)user { // 登录云信IM if (user.imToken && user.imAccid) { - [[IMKitClient instance] loginIM:user.imAccid :user.imToken :^(NSError * _Nullable error) { + [[IMKitClient instance] login:user.imAccid :user.imToken : nil :^(NSError * _Nullable error) { if (!error) { [ChatRouter setupInit]; [self setupTabbar]; @@ -124,6 +126,7 @@ - (void)registerRouter { [ChatRouter register]; [ConversationRouter register]; [ContactRouter register]; + [TeamRouter register]; // 聊天页面自定义面板示例 /* diff --git a/IMUIKitOC/IMUIKitOCExample/IMUIKitOCExample/Main/InhertViewController.swift b/IMUIKitOC/IMUIKitOCExample/IMUIKitOCExample/Main/InhertViewController.swift index d28217c4..09821cf0 100644 --- a/IMUIKitOC/IMUIKitOCExample/IMUIKitOCExample/Main/InhertViewController.swift +++ b/IMUIKitOC/IMUIKitOCExample/IMUIKitOCExample/Main/InhertViewController.swift @@ -8,7 +8,7 @@ import UIKit public class InhertViewController: ConversationController { override public func viewDidLoad() { super.viewDidLoad() - let test = TestViewController(sessionId: "") + let test = TestViewController(conversationId: "") // Do any additional setup after loading the view. } diff --git a/IMUIKitOC/IMUIKitOCExample/IMUIKitOCExample/Main/NETabbarController.m b/IMUIKitOC/IMUIKitOCExample/IMUIKitOCExample/Main/NETabbarController.m index b87216eb..3bbca1d3 100644 --- a/IMUIKitOC/IMUIKitOCExample/IMUIKitOCExample/Main/NETabbarController.m +++ b/IMUIKitOC/IMUIKitOCExample/IMUIKitOCExample/Main/NETabbarController.m @@ -11,7 +11,7 @@ #import #import #import -#import +#import #import // #import @@ -44,7 +44,7 @@ - (void)setUpControllers { [[NENavigationController alloc] initWithRootViewController:sessionCtrl]; // 通讯录 - ContactsViewController *contactCtrl = [[ContactsViewController alloc] init]; + ContactViewController *contactCtrl = [[ContactViewController alloc] init]; contactCtrl.tabBarItem = [[UITabBarItem alloc] initWithTitle:NSLocalizedString(@"contact", @"") image:[UIImage imageNamed:@"contact"] diff --git a/IMUIKitOC/IMUIKitOCExample/IMUIKitOCExample/Main/TestViewController.swift b/IMUIKitOC/IMUIKitOCExample/IMUIKitOCExample/Main/TestViewController.swift index 9d0b33f3..f00d5aa1 100644 --- a/IMUIKitOC/IMUIKitOCExample/IMUIKitOCExample/Main/TestViewController.swift +++ b/IMUIKitOC/IMUIKitOCExample/IMUIKitOCExample/Main/TestViewController.swift @@ -4,6 +4,7 @@ import NEChatUIKit import UIKit + public class TestViewController: P2PChatViewController { override public func viewDidLoad() { super.viewDidLoad() diff --git a/IMUIKitOC/IMUIKitOCExample/Podfile b/IMUIKitOC/IMUIKitOCExample/Podfile index ae9e436f..18a20bbd 100644 --- a/IMUIKitOC/IMUIKitOCExample/Podfile +++ b/IMUIKitOC/IMUIKitOCExample/Podfile @@ -1,6 +1,6 @@ # Uncomment the next line to define a global platform for your project -platform :ios, '11.0' +platform :ios, '12.0' source 'https://github.com/CocoaPods/Specs.git' target 'IMUIKitOCExample' do @@ -8,28 +8,35 @@ target 'IMUIKitOCExample' do use_frameworks! #登录组件 pod 'YXLogin', '1.1.0' - - #可选UI库 - pod 'NEContactUIKit', '9.7.0' - pod 'NEConversationUIKit', '9.7.0' - pod 'NEChatUIKit', '9.7.0' - pod 'NETeamUIKit', '9.7.0' - pod 'NEMapKit', '9.7.0' - - #基础kit库 - pod 'NECoreKit', '9.6.6' - pod 'NECoreIMKit', '9.6.7' - pod 'NECommonKit', '9.6.6' - pod 'NECommonUIKit', '9.6.6' - pod 'NEChatKit', '9.7.0' - + + # 基础库 + pod 'NIMSDK_LITE','10.2.6-beta' + pod 'NEChatKit', '10.2.1' + + # UI 组件,依次为通讯录组件、会话列表组件、会话(聊天)组件、群相关设置组件 + pod 'NEChatUIKit', '10.2.1' + pod 'NEContactUIKit', '10.2.1' + pod 'NEConversationUIKit', '10.2.1' + pod 'NETeamUIKit', '10.2.1' + + # 扩展库-地理位置组件 + pod 'NEMapKit', '10.2.1' + # 如果需要查看UI部分源码请注释掉以上在线依赖,打开下面的本地依赖 -# pod 'NEQChatUIKit', :path => '../NEQChatUIKit/NEQChatUIKit.podspec' -# pod 'NEContactUIKit', :path => '../NEContactUIKit/NEContactUIKit.podspec' -# pod 'NEConversationUIKit', :path => '../NEConversationUIKit/NEConversationUIKit.podspec' -# pod 'NETeamUIKit', :path => '../NETeamUIKit/NETeamUIKit.podspec' -# pod 'NEChatUIKit', :path => '../NEChatUIKit/NEChatUIKit.podspec' - + # pod 'NEQChatUIKit', :path => '../NEQChatUIKit/NEQChatUIKit.podspec' + # pod 'NEContactUIKit', :path => '../NEContactUIKit/NEContactUIKit.podspec' + # pod 'NEConversationUIKit', :path => '../NEConversationUIKit/NEConversationUIKit.podspec' + # pod 'NETeamUIKit', :path => '../NETeamUIKit/NETeamUIKit.podspec' + # pod 'NEChatUIKit', :path => '../NEChatUIKit/NEChatUIKit.podspec' + end - +# ⚠️如果pod依赖报错,可打开以下注释 +post_install do |installer| + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES' + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0' + end + end +end