Skip to content

Commit

Permalink
v10.2.1 (#392)
Browse files Browse the repository at this point in the history
Co-authored-by: 张诗文 <[email protected]>
  • Loading branch information
zsw666 and 张诗文 authored Jun 24, 2024
1 parent 264fdc2 commit 0f7f8ca
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 23 deletions.
2 changes: 1 addition & 1 deletion NEChatUIKit/NEChatUIKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
#

s.name = 'NEChatUIKit'
s.version = '10.2.0'
s.version = '10.2.1'
s.summary = 'Chat Module of IM.'

# This description is used to generate tags and improve search results.
Expand Down
20 changes: 17 additions & 3 deletions NEChatUIKit/NEChatUIKit/Classes/Chat/Emoji/NEEmotionTool.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
import UIKit

open class NEEmotionTool: NSObject {
class func getAttWithStr(str: String, font: UIFont,
_ offset: CGPoint = CGPoint(x: 0, y: -3)) -> NSMutableAttributedString {
/// 找出所有表情的位置集合
/// - Parameter str: 字符串
/// - Returns: 表情位置
class func getRegularArray(str: String) -> [NSTextCheckingResult]? {
let regular = "\\[[^\\[|^\\]]+\\]"

var reExpression: NSRegularExpression?
Expand All @@ -21,6 +23,18 @@ open class NEEmotionTool: NSObject {
range: NSRange(location: 0, length: str.utf16.count)
)

return regularArr
}

/// 表情替换
/// - Parameters:
/// - str: 原始文本
/// - font: 字体
/// - offset: 偏移量
/// - Returns: 替换表情后的富文本
class func getAttWithStr(str: String, font: UIFont,
_ offset: CGPoint = CGPoint(x: 0, y: -3)) -> NSMutableAttributedString {
let regularArr = getRegularArray(str: str)
let emoticons = NIMInputEmoticonManager.shared
.emoticonCatalog(catalogID: NIMKit_EmojiCatalog)?.emoticons
let attStr = NSMutableAttributedString(string: str, attributes: [
Expand All @@ -32,7 +46,7 @@ open class NEEmotionTool: NSObject {
for i in (0 ... regArr.count - 1).reversed() {
let result = regArr[i]

for (idx, obj) in targetEmotions.enumerated() {
for obj in targetEmotions {
let ocStr = str as NSString
if ocStr.substring(with: result.range) == obj.tag {
attStr.replaceCharacters(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,8 @@ open class NEBaseChatInputView: UIView, ChatRecordViewDelegate,
}

// 处理粘贴,表情解析(存在表情则字符数量>=3)
if text.count >= 3 {
if text.count >= 3,
(NEEmotionTool.getRegularArray(str: text)?.count ?? 0) > 0 {
let mutaString = NSMutableAttributedString(attributedString: textView.attributedText)
let addString = NEEmotionTool.getAttWithStr(str: text, font: .systemFont(ofSize: 16))
mutaString.replaceCharacters(in: range, with: addString)
Expand Down
2 changes: 1 addition & 1 deletion NEContactUIKit/NEContactUIKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'NEContactUIKit'
s.version = '10.2.0'
s.version = '10.2.1'
s.summary = 'Netease XKit'

# This description is used to generate tags and improve search results.
Expand Down
2 changes: 1 addition & 1 deletion NEConversationUIKit/NEConversationUIKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'NEConversationUIKit'
s.version = '10.2.0'
s.version = '10.2.1'
s.summary = 'Netease XKit'

# This description is used to generate tags and improve search results.
Expand Down
4 changes: 2 additions & 2 deletions NEMapKit/NEMapKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'NEMapKit'
s.version = '10.2.0'
s.version = '10.2.1'
s.summary = 'Netease XKit'

# This description is used to generate tags and improve search results.
Expand All @@ -33,7 +33,7 @@ TODO: Add long description of the pod here.
s.source_files = 'NEMapKit/Classes/**/*'
# s.resource = 'NEMapKit/Assets/**/*'

s.dependency 'AMap2DMap'
s.dependency 'AMap3DMap'
s.dependency 'AMapSearch'
s.dependency 'AMapLocation'
s.static_framework = true
Expand Down
2 changes: 1 addition & 1 deletion NETeamUIKit/NETeamUIKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'NETeamUIKit'
s.version = '10.2.0'
s.version = '10.2.1'
s.summary = 'Netease XKit'

# This description is used to generate tags and improve search results.
Expand Down
18 changes: 9 additions & 9 deletions Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 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 'app' do
Expand All @@ -8,16 +8,16 @@ target 'app' do

# 基础库
pod 'NIMSDK_LITE','10.2.6-beta'
pod 'NEChatKit', '10.2.0'
pod 'NEChatKit', '10.2.1'

# UI 组件,依次为通讯录组件、会话列表组件、会话(聊天)组件、群相关设置组件
pod 'NEChatUIKit', '10.2.0'
pod 'NEContactUIKit', '10.2.0'
pod 'NEConversationUIKit', '10.2.0'
pod 'NETeamUIKit', '10.2.0'
pod 'NEChatUIKit', '10.2.1'
pod 'NEContactUIKit', '10.2.1'
pod 'NEConversationUIKit', '10.2.1'
pod 'NETeamUIKit', '10.2.1'

# 扩展库-地理位置组件
pod 'NEMapKit', '10.2.0'
# 扩展库-地理位置组件
pod 'NEMapKit', '10.2.1'

# 扩展库-呼叫组件
pod 'NERtcCallKit/NOS_Special', '2.4.0'
Expand Down Expand Up @@ -45,7 +45,7 @@ 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'] = '11.0'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
end
end
end
8 changes: 4 additions & 4 deletions app.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -646,12 +646,12 @@
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UIUserInterfaceStyle = Light;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 10.2.0;
MARKETING_VERSION = 10.2.1;
PRODUCT_BUNDLE_IDENTIFIER = com.netease.yunxin.app.im;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -695,12 +695,12 @@
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UIUserInterfaceStyle = Light;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 10.2.0;
MARKETING_VERSION = 10.2.1;
PRODUCT_BUNDLE_IDENTIFIER = com.netease.yunxin.app.im;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = inHouseYunxin;
Expand Down

0 comments on commit 0f7f8ca

Please sign in to comment.