Skip to content

Commit

Permalink
OC project with V10 (#394)
Browse files Browse the repository at this point in the history
* v10.2.1

* OC project with V10

---------

Co-authored-by: 张诗文 <[email protected]>
  • Loading branch information
zsw666 and 张诗文 authored Jun 25, 2024
1 parent 0f7f8ca commit 972a26f
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
#import <NEChatUIKit/NEChatUIKit-Swift.h>
#import <NEContactUIKit/NEContactUIKit-Swift.h>
#import <NEConversationUIKit/NEConversationUIKit-Swift.h>
#import <NECoreIMKit/NECoreIMKit-Swift.h>
#import <NETeamUIKit/NETeamUIKit-Swift.h>
#import <NECoreIM2Kit/NECoreIM2Kit-Swift.h>
#import <NECoreKit/NECoreKit-Swift.h>
// #import <NEQChatUIKit/NEQChatUIKit-Swift.h>
#import "CustomRouterViewController.h"
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -124,6 +126,7 @@ - (void)registerRouter {
[ChatRouter register];
[ConversationRouter register];
[ContactRouter register];
[TeamRouter register];

// 聊天页面自定义面板示例
/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#import <NECommonUIKit/NECommonUIKit-Swift.h>
#import <NEContactUIKit/NEContactUIKit-Swift.h>
#import <NEConversationUIKit/NEConversationUIKit-Swift.h>
#import <NECoreIMKit/NECoreIMKit-Swift.h>
#import <NECoreIM2Kit/NECoreIM2Kit-Swift.h>
#import <NECoreKit/NECoreKit-Swift.h>
// #import <NEQChatUIKit/NEQChatUIKit-Swift.h>

Expand Down Expand Up @@ -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"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import NEChatUIKit
import UIKit

public class TestViewController: P2PChatViewController {
override public func viewDidLoad() {
super.viewDidLoad()
Expand Down
53 changes: 30 additions & 23 deletions IMUIKitOC/IMUIKitOCExample/Podfile
Original file line number Diff line number Diff line change
@@ -1,35 +1,42 @@
# 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
# Comment the next line if you don't want to use dynamic frameworks
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

0 comments on commit 972a26f

Please sign in to comment.