Skip to content

Commit

Permalink
NEAISearchKit v1.0.5 (#416)
Browse files Browse the repository at this point in the history
* add sample code

* update Podfile

* v10.4.0

* v10.4.1

* fix NEMapKit.podspec

* update Podfile

* update NETeamUIKit.podspec

* v10.5.0

* 优化登录登出体验

* v10.5.1

* NEAISearchKit v1.0.5
  • Loading branch information
zsw666 authored Dec 26, 2024
1 parent 1d63a7c commit f80daeb
Show file tree
Hide file tree
Showing 29 changed files with 102 additions and 126 deletions.
4 changes: 2 additions & 2 deletions NEAISearchKit/NEAISearchKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'NEAISearchKit'
s.version = '1.0.4'
s.version = '1.0.5'
s.summary = 'Netease XKit'

# This description is used to generate tags and improve search results.
Expand Down Expand Up @@ -38,6 +38,6 @@ TODO: Add long description of the pod here.
s.resource = 'NEAISearchKit/Assets/**/*'

s.dependency 'NEChatKit'
s.dependency 'NECommonUIKit', '9.7.4'
s.dependency 'NECommonUIKit'

end
18 changes: 9 additions & 9 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ target 'app' do
pod 'NEMapKit', '10.5.1'

# 扩展库 - AI 划词搜索
pod 'NEAISearchKit', '1.0.4'
pod 'NEAISearchKit', '1.0.5'

# 扩展库 - 呼叫组件
pod 'NERtcCallKit/NOS_Special', '3.1.0'
pod 'NERtcCallUIKit/NOS_Special', '3.1.0'
pod 'NERtcCallUIKit/NOS_Special', '3.1.0'

# 扩展库,依次为 RTC 音视频基础组件、RTC 音视频神经网络组件(使用背景虚化功能需要集成)、RTC 音视频背景分割组件(使用背景虚化功能需要集成)
pod 'NERtcSDK/RtcBasic', '5.6.33'
Expand All @@ -32,13 +32,13 @@ target 'app' do


# 如果需要查看UI部分源码请注释掉以上在线依赖,打开下面的本地依赖
# 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 'NEMapKit', :path => 'NEMapKit/NEMapKit.podspec'
# pod 'NEAISearchKit', :path => 'NEAISearchKit/NEAISearchKit.podspec'
# pod 'NERtcCallUIKit', :path => 'NERtcCallUIKit/NERtcCallUIKit.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 'NEMapKit', :path => 'NEMapKit/NEMapKit.podspec'
# pod 'NEAISearchKit', :path => 'NEAISearchKit/NEAISearchKit.podspec'
# pod 'NERtcCallUIKit', :path => 'NERtcCallUIKit/NERtcCallUIKit.podspec'


end
Expand Down
4 changes: 2 additions & 2 deletions app.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 10.4.0;
MARKETING_VERSION = 10.5.1;
PRODUCT_BUNDLE_IDENTIFIER = com.netease.yunxin.app.im;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -764,7 +764,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 10.4.0;
MARKETING_VERSION = 10.5.1;
PRODUCT_BUNDLE_IDENTIFIER = com.netease.yunxin.app.im;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = inHouseYunxin;
Expand Down
2 changes: 1 addition & 1 deletion app/Custom/CustomChatCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class CustomChatCell: NEChatBaseCell {
super.init(coder: coder)
}

override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
override public init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
backgroundColor = .lightGray
Expand Down
4 changes: 2 additions & 2 deletions app/Custom/CustomConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class CustomConfig {
public static let shared = CustomConfig()

/// 通过配置项实现 UI 自定义,该方式不需要继承自 ChatViewController
public func configChatUIKit() {
open func configChatUIKit() {
ChatUIConfig.shared.messageProperties.avatarType = .cycle
ChatUIConfig.shared.messageProperties.avatarCornerRadius = 8.0
ChatUIConfig.shared.messageProperties.signalBgColor = UIColor.yellow
Expand Down Expand Up @@ -151,7 +151,7 @@ public class CustomConfig {
}

/// 通过配置项实现自定义,该方式不需要继承自 ContactViewController
public func configContactUIKit() {
open func configContactUIKit() {
/*
UI 属性自定义
*/
Expand Down
2 changes: 1 addition & 1 deletion app/Custom/CustomContactTableViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class CustomContactTableViewCell: ContactTableViewCell {
}

// 根据数据模型设置 cell 内容
override public func setModel(_ model: ContactInfo) {
override open func setModel(_ model: ContactInfo) {
super.setModel(model)
onlineView.isHidden = false
}
Expand Down
8 changes: 4 additions & 4 deletions app/Custom/CustomContactViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class CustomContactViewController: ContactViewController, NEBaseContactVi
super.init(coder: coder)
}

override public func viewDidLoad() {
override open func viewDidLoad() {
// 通过重写实现自定义,该方式需要继承自 ChatViewController
// customByOverread()

Expand All @@ -45,19 +45,19 @@ public class CustomContactViewController: ContactViewController, NEBaseContactVi
}

// 通过继承方式重写次最右侧按钮点击事件, 这种方式会覆盖配置项中的点击事件
override public func searchAction() {
override open func searchAction() {
bodyTopViewHeight = 80
bodyBottomViewHeight = 80
}

// 通过继承方式重写最右侧按钮点击事件, 这种方式会覆盖配置项中的点击事件
override public func didClickAddBtn() {
override open func didClickAddBtn() {
bodyTopViewHeight = 0
bodyBottomViewHeight = 0
}

// 父类加载完数据后会调用此方法,可在此对数据进行二次处理
public func onDataLoaded() {
open func onDataLoaded() {
for info in viewModel.contacts[1].contacts {
info.contactCellType = ContactCellType.ContactCutom.rawValue
}
Expand Down
4 changes: 2 additions & 2 deletions app/Custom/CustomConversationController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ open class CustomConversationController: ConversationController, NEBaseConversat
super.init(coder: coder)
}

override public func viewDidLoad() {
override open func viewDidLoad() {
// 通过重写实现自定义,该方式需要继承自 ChatViewController
// customByOverread()

Expand Down Expand Up @@ -76,7 +76,7 @@ open class CustomConversationController: ConversationController, NEBaseConversat
}

// 可自行处理数据
public func onDataLoaded() {
open func onDataLoaded() {
for model in viewModel.conversationListData {
model.customType = 1
}
Expand Down
4 changes: 2 additions & 2 deletions app/Main/NENavigationController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import UIKit

class NENavigationController: UINavigationController {
override public func viewDidLoad() {
override open func viewDidLoad() {
super.viewDidLoad()
setUpNavigation()
}
Expand All @@ -22,7 +22,7 @@ class NENavigationController: UINavigationController {
}
}

override public func pushViewController(_ viewController: UIViewController, animated: Bool) {
override open func pushViewController(_ viewController: UIViewController, animated: Bool) {
if children.count > 0 {
viewController.hidesBottomBarWhenPushed = true
if children.count > 1 {
Expand Down
2 changes: 1 addition & 1 deletion app/Main/NETabBarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ class NETabBarController: UITabBarController, NEConversationListener, NEContactL
setUpSessionBadgeValue()
}

@objc public func clearValidationUnreadCount() {
@objc open func clearValidationUnreadCount() {
setUpContactBadgeValue()
}
}
Expand Down
6 changes: 3 additions & 3 deletions app/Main/UIStyleManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ import NEChatUIKit
class NEStyleManager {
static let instance = NEStyleManager()
let userDefault = UserDefaults.standard
public func isNormalStyle() -> Bool {
open func isNormalStyle() -> Bool {
if let style = userDefault.object(forKey: IMUIKit_Style_Key) as? NSNumber, style.intValue == 2 {
return false
}
return true
}

public func setNormalStyle() {
open func setNormalStyle() {
userDefault.set(NSNumber(integerLiteral: 1), forKey: IMUIKit_Style_Key)
userDefault.synchronize()
}

public func setFunStyle() {
open func setFunStyle() {
userDefault.set(NSNumber(integerLiteral: 2), forKey: IMUIKit_Style_Key)
userDefault.synchronize()
}
Expand Down
38 changes: 10 additions & 28 deletions app/Main/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,11 @@ class ViewController: UIViewController {

func setupUI() {
view.addSubview(launchIconView)
if #available(iOS 11.0, *) {
NSLayoutConstraint.activate([
launchIconView.centerXAnchor.constraint(equalTo: view.centerXAnchor),
launchIconView.topAnchor.constraint(
equalTo: view.safeAreaLayoutGuide.topAnchor,
constant: 145.0
),
])
} else {
NSLayoutConstraint.activate([
launchIconView.centerXAnchor.constraint(equalTo: view.centerXAnchor),
launchIconView.topAnchor.constraint(equalTo: view.topAnchor, constant: 145.0),
])
}

NSLayoutConstraint.activate([
launchIconView.centerXAnchor.constraint(equalTo: view.centerXAnchor),
launchIconView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: 145.0),
])

view.addSubview(launchIconLabel)
NSLayoutConstraint.activate([
Expand All @@ -80,19 +71,10 @@ class ViewController: UIViewController {
])

view.addSubview(copyright)
if #available(iOS 11.0, *) {
NSLayoutConstraint.activate([
copyright.centerXAnchor.constraint(equalTo: view.centerXAnchor),
copyright.bottomAnchor.constraint(
equalTo: view.safeAreaLayoutGuide.bottomAnchor,
constant: -48
),
])
} else {
NSLayoutConstraint.activate([
copyright.centerXAnchor.constraint(equalTo: view.centerXAnchor),
copyright.bottomAnchor.constraint(equalTo: view.bottomAnchor, constant: -48),
])
}

NSLayoutConstraint.activate([
copyright.centerXAnchor.constraint(equalTo: view.centerXAnchor),
copyright.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor, constant: -48),
])
}
}
4 changes: 2 additions & 2 deletions app/Manager/IMSDKConfigManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ class IMSDKConfigManager: NSObject {
}

/// 保存私有化配置
public func saveConfig(model: IMSDKConfigModel) {
open func saveConfig(model: IMSDKConfigModel) {
configModel = model
saveObjectToDisk(model, fileName: filename)
}

/// 获取私有化配置
public func getConfig() -> IMSDKConfigModel {
open func getConfig() -> IMSDKConfigModel {
configModel ?? IMSDKConfigModel()
}

Expand Down
19 changes: 9 additions & 10 deletions app/Mine/Controller/IMSDKConfigViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ class IMSDKConfigViewController: NEBaseViewController, UITableViewDelegate, UITa
tableView.sectionHeaderHeight = 12.0
tableView.keyboardDismissMode = .onDrag

if #available(iOS 11.0, *) {
tableView.estimatedRowHeight = 0
tableView.estimatedSectionHeaderHeight = 0
tableView.estimatedSectionFooterHeight = 0
}
tableView.estimatedRowHeight = 0
tableView.estimatedSectionHeaderHeight = 0
tableView.estimatedSectionFooterHeight = 0

if #available(iOS 15.0, *) {
tableView.sectionHeaderTopPadding = 0.0
}
Expand Down Expand Up @@ -58,8 +57,10 @@ class IMSDKConfigViewController: NEBaseViewController, UITableViewDelegate, UITa
setupUI()
}

public func setupUI() {
open func setupUI() {
view.backgroundColor = navigationView.backgroundColor
navigationView.moreButton.isHidden = true

view.addSubview(contentTableView)
NSLayoutConstraint.activate([
contentTableView.leftAnchor.constraint(equalTo: view.leftAnchor),
Expand All @@ -73,8 +74,6 @@ class IMSDKConfigViewController: NEBaseViewController, UITableViewDelegate, UITa
for (key, value) in cellClassDic {
contentTableView.register(value, forCellReuseIdentifier: "\(key)")
}
view.backgroundColor = navigationView.backgroundColor
navigationView.moreButton.isHidden = true
}

let twoSectionModel = SettingSectionModel()
Expand Down Expand Up @@ -324,7 +323,7 @@ class IMSDKConfigViewController: NEBaseViewController, UITableViewDelegate, UITa
contentTableView.reloadData()
}

public func changeParseModel() {
open func changeParseModel() {
if NEStyleManager.instance.isNormalStyle() {
let actionSheet = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
let autoAction = UIAlertAction(title: "一键自动解析", style: .default) { [weak self] _ in
Expand All @@ -349,7 +348,7 @@ class IMSDKConfigViewController: NEBaseViewController, UITableViewDelegate, UITa
}
}

public func getFooterView() -> UIView {
open func getFooterView() -> UIView {
let back = UIView()
back.backgroundColor = .clear
back.frame = CGRectMake(0, 0, view.frame.width, 60)
Expand Down
9 changes: 4 additions & 5 deletions app/Mine/Controller/IntroduceBrandViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,10 @@ class IntroduceBrandViewController: NEBaseViewController, UITableViewDelegate,
tableView.register(VersionCell.self, forCellReuseIdentifier: "VersionCell")
tableView.keyboardDismissMode = .onDrag

if #available(iOS 11.0, *) {
tableView.estimatedRowHeight = 0
tableView.estimatedSectionHeaderHeight = 0
tableView.estimatedSectionFooterHeight = 0
}
tableView.estimatedRowHeight = 0
tableView.estimatedSectionHeaderHeight = 0
tableView.estimatedSectionFooterHeight = 0

if #available(iOS 15.0, *) {
tableView.sectionHeaderTopPadding = 0.0
}
Expand Down
9 changes: 4 additions & 5 deletions app/Mine/Controller/LanguageViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,10 @@ class LanguageViewController: NEBaseViewController, UITableViewDelegate,
tableView.sectionHeaderHeight = 12.0
tableView.keyboardDismissMode = .onDrag

if #available(iOS 11.0, *) {
tableView.estimatedRowHeight = 0
tableView.estimatedSectionHeaderHeight = 0
tableView.estimatedSectionFooterHeight = 0
}
tableView.estimatedRowHeight = 0
tableView.estimatedSectionHeaderHeight = 0
tableView.estimatedSectionFooterHeight = 0

if #available(iOS 15.0, *) {
tableView.sectionHeaderTopPadding = 0.0
}
Expand Down
9 changes: 4 additions & 5 deletions app/Mine/Controller/MessageRemindViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ class MessageRemindViewController: NEBaseViewController, UITableViewDelegate,
tableView.sectionHeaderHeight = 12.0
tableView.keyboardDismissMode = .onDrag

if #available(iOS 11.0, *) {
tableView.estimatedRowHeight = 0
tableView.estimatedSectionHeaderHeight = 0
tableView.estimatedSectionFooterHeight = 0
}
tableView.estimatedRowHeight = 0
tableView.estimatedSectionHeaderHeight = 0
tableView.estimatedSectionFooterHeight = 0

if #available(iOS 15.0, *) {
tableView.sectionHeaderTopPadding = 0.0
}
Expand Down
2 changes: 1 addition & 1 deletion app/Mine/Controller/NEAboutWebViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class NEAboutWebViewController: NEBaseViewController {
setUpSubViews()
}

init(url: String) {
public init(url: String) {
super.init(nibName: nil, bundle: nil)
loadUrl = url
}
Expand Down
Loading

0 comments on commit f80daeb

Please sign in to comment.