Skip to content

Commit

Permalink
Merge pull request #382 from zsw666/master
Browse files Browse the repository at this point in the history
update Podfile
  • Loading branch information
shine2008 authored Jan 25, 2024
2 parents 58d9820 + b72679b commit a2dd6fa
Show file tree
Hide file tree
Showing 375 changed files with 11,010 additions and 2,924 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
39ED7B1E290FA9C700CAE608 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 39ED7B20290FA9C700CAE608 /* Localizable.strings */; };
DD774A7729485F6600347A9E /* CustomRouterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DD774A7629485F6600347A9E /* CustomRouterViewController.m */; };
DDC1AC8929651B6C008C085A /* ConversationController+Test.m in Sources */ = {isa = PBXBuildFile; fileRef = DDC1AC8829651B6C008C085A /* ConversationController+Test.m */; };
DDE8123A29E950440040E401 /* InhertViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDE8123929E950440040E401 /* InhertViewController.swift */; };
DDE8123C29E9510F0040E401 /* TestViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDE8123B29E9510F0040E401 /* TestViewController.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -72,6 +74,8 @@
DD774A7629485F6600347A9E /* CustomRouterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CustomRouterViewController.m; sourceTree = "<group>"; };
DDC1AC8729651B6C008C085A /* ConversationController+Test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ConversationController+Test.h"; sourceTree = "<group>"; };
DDC1AC8829651B6C008C085A /* ConversationController+Test.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "ConversationController+Test.m"; sourceTree = "<group>"; };
DDE8123929E950440040E401 /* InhertViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InhertViewController.swift; sourceTree = "<group>"; };
DDE8123B29E9510F0040E401 /* TestViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TestViewController.swift; sourceTree = "<group>"; };
DDF443AC294851D90077184F /* IMUIKitOCExample-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "IMUIKitOCExample-Bridging-Header.h"; sourceTree = "<group>"; };
F984299B79B347145EA4AF84 /* Pods-IMUIKitOCExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-IMUIKitOCExample.debug.xcconfig"; path = "Target Support Files/Pods-IMUIKitOCExample/Pods-IMUIKitOCExample.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
Expand Down Expand Up @@ -179,6 +183,8 @@
DD774A7629485F6600347A9E /* CustomRouterViewController.m */,
DDC1AC8729651B6C008C085A /* ConversationController+Test.h */,
DDC1AC8829651B6C008C085A /* ConversationController+Test.m */,
DDE8123B29E9510F0040E401 /* TestViewController.swift */,
DDE8123929E950440040E401 /* InhertViewController.swift */,
39ED7B20290FA9C700CAE608 /* Localizable.strings */,
DDF443AC294851D90077184F /* IMUIKitOCExample-Bridging-Header.h */,
);
Expand All @@ -205,7 +211,7 @@
39A2F20628D9B2C400DDCAF2 /* Frameworks */,
39A2F20728D9B2C400DDCAF2 /* Resources */,
DB787379DE2DF44860C11CF1 /* [CP] Embed Pods Frameworks */,
8F14E37FD20AEF03EA4142FE /* [CP] Copy Pods Resources */,
2A3377106BCBB5C08F3A27B1 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -325,7 +331,7 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
8F14E37FD20AEF03EA4142FE /* [CP] Copy Pods Resources */ = {
2A3377106BCBB5C08F3A27B1 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
Expand Down Expand Up @@ -394,6 +400,8 @@
39A2F24B28DABC6700DDCAF2 /* NENavigationController.m in Sources */,
39A2F24728DABC1700DDCAF2 /* NETabbarController.m in Sources */,
39A2F21F28D9B2C500DDCAF2 /* main.m in Sources */,
DDE8123A29E950440040E401 /* InhertViewController.swift in Sources */,
DDE8123C29E9510F0040E401 /* TestViewController.swift in Sources */,
DD774A7729485F6600347A9E /* CustomRouterViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -593,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 = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -629,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 = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -647,6 +655,7 @@
39A2F23C28D9B2C600DDCAF2 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
Expand All @@ -664,6 +673,7 @@
39A2F23D28D9B2C600DDCAF2 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
Expand All @@ -681,6 +691,7 @@
39A2F23F28D9B2C600DDCAF2 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
Expand All @@ -696,6 +707,7 @@
39A2F24028D9B2C600DDCAF2 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
Expand Down
2 changes: 1 addition & 1 deletion IMUIKitOC/IMUIKitOCExample/IMUIKitOCExample/AppKey.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
#define AppKey_h

/// IM key
static NSString *const AppKey = @"";
static NSString *const AppKey = @"<#appKey#>";

#endif /* AppKey_h */
8 changes: 7 additions & 1 deletion IMUIKitOC/IMUIKitOCExample/IMUIKitOCExample/Info.plist
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
<dict>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
</dict>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@
@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property(nonatomic, strong) UIWindow *window;

@end
110 changes: 91 additions & 19 deletions IMUIKitOC/IMUIKitOCExample/IMUIKitOCExample/Main/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
#import <NEConversationUIKit/NEConversationUIKit-Swift.h>
#import <NECoreIMKit/NECoreIMKit-Swift.h>
#import <NECoreKit/NECoreKit-Swift.h>
//#import <NEQChatUIKit/NEQChatUIKit-Swift.h>
// #import <NEQChatUIKit/NEQChatUIKit-Swift.h>
#import "CustomRouterViewController.h"
#import "IMUIKitOCExample-Swift.h"

@import NIMSDK;

Expand All @@ -27,45 +28,116 @@ @implementation AppDelegate
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] init];
self.window.backgroundColor = [UIColor whiteColor];
self.window.frame = UIScreen.mainScreen.bounds;
self.window.frame = [[UIScreen mainScreen] bounds];
[self.window makeKeyAndVisible];
UIViewController *controller = [[UIViewController alloc] init];
self.window.rootViewController = controller;
[self.window makeKeyWindow];
UIViewController *root = [[UIViewController alloc] init];
root.view.backgroundColor = [UIColor whiteColor];
self.window.backgroundColor = [UIColor clearColor];
self.window.rootViewController = root;
[self setupInit];
return YES;
}

- (void)setupInit {
// 初始化NIMSDK
NIMSDKOption *option = [NIMSDKOption optionWithAppKey:AppKey];
option.apnsCername = @"";
option.pkCername = @"";
[[IMKitClient instance] setupCoreKitIM:option];

// 登录IM之前先初始化 @ 消息监听mananger
NEAtMessageManager * _ = [NEAtMessageManager instance];

[[IMKitClient instance] loginIM:@"imaccid" :@"imToken" :^(NSError * _Nullable error) {
if (error != nil) {
NSLog(@"NEKitCore login error : %@", [error description]);
// 初始化NIMSDK
NIMSDKOption *option = [NIMSDKOption optionWithAppKey:AppKey];
[[IMKitClient instance] setupCoreKitIM:option];

// 统一登录组件
YXConfig *config = [[YXConfig alloc] init];
config.appKey = AppKey;
config.parentScope = @2;
config.scope = @7;
config.supportInternationalize = false;
config.type = YXLoginPhone;

#ifdef DEBUG
config.isOnline = NO;
#else
config.isOnline = YES;
#endif
[[AuthorManager shareInstance] initAuthorWithConfig:config];
if ([AuthorManager shareInstance].canAutologin) {
[[AuthorManager shareInstance]
autoLoginWithCompletion:^(YXUserInfo *_Nullable userinfo, NSError *_Nullable error) {
if (error) {
NSLog(@"auto login failed,error = %@", error);
} else {
[self setupXKit:userinfo];
}
}];
} else {
[self loginWithUI];
}
}

- (void)loginWithUI {
[[AuthorManager shareInstance]
startLoginWithCompletion:^(YXUserInfo *_Nullable userinfo, NSError *_Nullable error) {
if (!error) {
[self setupXKit:userinfo];
} else {
[self setupTabbar];
NSLog(@"login failed,error = %@", error);
}
}];
}];
}

- (void)setupXKit:(YXUserInfo *)user {
// 登录云信IM
if (user.imToken && user.imAccid) {
[[IMKitClient instance] loginIM:user.imAccid :user.imToken :^(NSError * _Nullable error) {
if (!error) {
[ChatRouter setupInit];
[self setupTabbar];
//登录圈组模块,如不需要圈组功能则不用登录
// QChatLoginParam *parama = [[QChatLoginParam alloc]init:user.imAccid :user.imToken];
// [[IMKitClient instance] loginQchat:parama completion:^(NSError * _Nullable error, QChatLoginResult * _Nullable result) {
// if (!error) {
// [self setupTabbar];
// }else {
// NSLog(@"qchat login failed,error = %@",error);
// }
// }];

}else {
NSLog(@"loginIM failed,error = %@",error);
}
}];
} else {
NSLog(@"parameter is nil");
}
}

- (void)setupTabbar {
self.window.backgroundColor = [UIColor whiteColor];
self.window.rootViewController = [[NETabbarController alloc] init];
[self registerRouter];
}

- (void)customClick {
NSLog(@"custom more action click");
}

// 注册路由
- (void)registerRouter {
[ChatRouter register];
[ConversationRouter register];
[ContactRouter register];

// 聊天页面自定义面板示例
/*
NEMoreItemModel *item = [[NEMoreItemModel alloc] init];
item.title = @"自定义";
item.customDelegate = self;
item.action = @selector(customClick);
item.image = [UIImage imageNamed:@"chatSelect"];
NSMutableArray *muta = [[NSMutableArray alloc] initWithArray:
NEChatUIKitClient.instance.moreAction];
[muta addObject:item];
NEChatUIKitClient.instance.moreAction = muta;
*/

[[Router shared] register:@"imkit://chat/p2pChat.page"
closure:^(NSDictionary<NSString *, id> *_Nonnull param) {
NSObject *param1 = [param objectForKey:@"nav"];
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
// Use of this source code is governed by a MIT license that can be
// found in the LICENSE file.

import NEConversationUIKit
import UIKit

public class InhertViewController: ConversationController {
override public func viewDidLoad() {
super.viewDidLoad()
let test = TestViewController(sessionId: "")
// Do any additional setup after loading the view.
}

/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
}
*/
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
#import "NETabbarController.h"
#import "NENavigationController.h"

#import <NEChatKit/NEChatKit-Swift.h>
#import <NEChatUIKit/NEChatUIKit-Swift.h>
#import <NECommonUIKit/NECommonUIKit-Swift.h>
#import <NEContactUIKit/NEContactUIKit-Swift.h>
#import <NEConversationUIKit/NEConversationUIKit-Swift.h>
#import <NECoreIMKit/NECoreIMKit-Swift.h>
#import <NECoreKit/NECoreKit-Swift.h>
//#import <NEQChatUIKit/NEQChatUIKit-Swift.h>
// #import <NEQChatUIKit/NEQChatUIKit-Swift.h>

@interface NETabbarController ()

Expand All @@ -26,8 +28,14 @@ - (void)viewDidLoad {
}

- (void)setUpControllers {
// ChatViewController *chat = [[ChatViewController alloc] init];
// NENavigationView *nenav = [[NENavigationView alloc] init];

[ChatRouter registerFun];

// 会话列表页
ConversationController *sessionCtrl = [[ConversationController alloc] init];

sessionCtrl.view.backgroundColor = [UIColor whiteColor];
sessionCtrl.tabBarItem = [[UITabBarItem alloc] initWithTitle:NSLocalizedString(@"message", @"")
image:[UIImage imageNamed:@"chat"]
Expand All @@ -46,13 +54,13 @@ - (void)setUpControllers {

// 圈组

// QChatHomeViewController *qchatCtrl = [[QChatHomeViewController alloc] init];
// qchatCtrl.tabBarItem =
// [[UITabBarItem alloc] initWithTitle:NSLocalizedString(@"qchat", @"")
// image:[UIImage imageNamed:@"qchat_tabbar_icon"]
// selectedImage:[UIImage imageNamed:@"qchat_tabbar_icon"]];
// NENavigationController *qchatNav =
// [[NENavigationController alloc] initWithRootViewController:qchatCtrl];
// QChatHomeViewController *qchatCtrl = [[QChatHomeViewController alloc] init];
// qchatCtrl.tabBarItem =
// [[UITabBarItem alloc] initWithTitle:NSLocalizedString(@"qchat", @"")
// image:[UIImage imageNamed:@"qchat_tabbar_icon"]
// selectedImage:[UIImage imageNamed:@"qchat_tabbar_icon"]];
// NENavigationController *qchatNav =
// [[NENavigationController alloc] initWithRootViewController:qchatCtrl];

self.tabBar.backgroundColor = [UIColor whiteColor];
self.viewControllers = @[ sessionNav, contactNav ];
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
// Use of this source code is governed by a MIT license that can be
// found in the LICENSE file.

import NEChatUIKit
import UIKit
public class TestViewController: P2PChatViewController {
override public func viewDidLoad() {
super.viewDidLoad()

// Do any additional setup after loading the view.
}

/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
}
*/
}
Loading

0 comments on commit a2dd6fa

Please sign in to comment.