私聊的vm

This commit is contained in:
fengshuo
2024-02-27 23:34:55 +08:00
parent a764188646
commit 166f2bde57
57 changed files with 4289 additions and 2828 deletions

View File

@@ -19,6 +19,10 @@ target 'yinmeng-ios' do
pod 'DeviceKit', '~> 4.0'
pod "NSObject+Rx"
pod 'NIMSDK_LITE', '9.6.1'
pod ''
# Pods for yinmeng-ios
end

View File

@@ -8,6 +8,9 @@ PODS:
- Moya/Core (= 15.0.0)
- Moya/Core (15.0.0):
- Alamofire (~> 5.0)
- NIMSDK_LITE (9.6.1):
- NIMSDK_LITE/NOS (= 9.6.1)
- NIMSDK_LITE/NOS (9.6.1)
- "NSObject+Rx (5.2.2)":
- RxSwift (~> 6.2)
- Reusable (4.1.2):
@@ -29,6 +32,7 @@ DEPENDENCIES:
- Kingfisher
- MBProgressHUD
- Moya
- NIMSDK_LITE (= 9.6.1)
- "NSObject+Rx"
- Reusable
- RxCocoa
@@ -43,6 +47,7 @@ SPEC REPOS:
- Kingfisher
- MBProgressHUD
- Moya
- NIMSDK_LITE
- "NSObject+Rx"
- Reusable
- RxCocoa
@@ -57,6 +62,7 @@ SPEC CHECKSUMS:
Kingfisher: 99edc495d3b7607e6425f0d6f6847b2abd6d716d
MBProgressHUD: 3ee5efcc380f6a79a7cc9b363dd669c5e1ae7406
Moya: 138f0573e53411fb3dc17016add0b748dfbd78ee
NIMSDK_LITE: b020e3dbbc9f53934609bc35ecba7798be503e1a
"NSObject+Rx": 61cf1f7306a73dcef8b36649198af0813ec18dfd
Reusable: 6bae6a5e8aa793c9c441db0213c863a64bce9136
RxCocoa: 94f817b71c07517321eb4f9ad299112ca8af743b
@@ -64,6 +70,6 @@ SPEC CHECKSUMS:
RxSwift: 5710a9e6b17f3c3d6e40d6e559b9fa1e813b2ef8
SnapKit: e01d52ebb8ddbc333eefe2132acf85c8227d9c25
PODFILE CHECKSUM: c70d2998947e71f4b799d573fbe428797987a5b9
PODFILE CHECKSUM: 7019a59ec100e22a180d47778e7df381509800e8
COCOAPODS: 1.12.1
COCOAPODS: 1.14.3

10
Pods/Manifest.lock generated
View File

@@ -8,6 +8,9 @@ PODS:
- Moya/Core (= 15.0.0)
- Moya/Core (15.0.0):
- Alamofire (~> 5.0)
- NIMSDK_LITE (9.6.1):
- NIMSDK_LITE/NOS (= 9.6.1)
- NIMSDK_LITE/NOS (9.6.1)
- "NSObject+Rx (5.2.2)":
- RxSwift (~> 6.2)
- Reusable (4.1.2):
@@ -29,6 +32,7 @@ DEPENDENCIES:
- Kingfisher
- MBProgressHUD
- Moya
- NIMSDK_LITE (= 9.6.1)
- "NSObject+Rx"
- Reusable
- RxCocoa
@@ -43,6 +47,7 @@ SPEC REPOS:
- Kingfisher
- MBProgressHUD
- Moya
- NIMSDK_LITE
- "NSObject+Rx"
- Reusable
- RxCocoa
@@ -57,6 +62,7 @@ SPEC CHECKSUMS:
Kingfisher: 99edc495d3b7607e6425f0d6f6847b2abd6d716d
MBProgressHUD: 3ee5efcc380f6a79a7cc9b363dd669c5e1ae7406
Moya: 138f0573e53411fb3dc17016add0b748dfbd78ee
NIMSDK_LITE: b020e3dbbc9f53934609bc35ecba7798be503e1a
"NSObject+Rx": 61cf1f7306a73dcef8b36649198af0813ec18dfd
Reusable: 6bae6a5e8aa793c9c441db0213c863a64bce9136
RxCocoa: 94f817b71c07517321eb4f9ad299112ca8af743b
@@ -64,6 +70,6 @@ SPEC CHECKSUMS:
RxSwift: 5710a9e6b17f3c3d6e40d6e559b9fa1e813b2ef8
SnapKit: e01d52ebb8ddbc333eefe2132acf85c8227d9c25
PODFILE CHECKSUM: c70d2998947e71f4b799d573fbe428797987a5b9
PODFILE CHECKSUM: 7019a59ec100e22a180d47778e7df381509800e8
COCOAPODS: 1.12.1
COCOAPODS: 1.14.3

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@@ -53,55 +53,62 @@
<key>orderHint</key>
<integer>6</integer>
</dict>
<key>NSObject+Rx.xcscheme</key>
<key>NIMSDK_LITE.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>7</integer>
</dict>
<key>Pods-yinmeng-ios.xcscheme</key>
<key>NSObject+Rx.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>8</integer>
</dict>
<key>Reusable.xcscheme</key>
<key>Pods-yinmeng-ios.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>9</integer>
</dict>
<key>RxCocoa.xcscheme</key>
<key>Reusable.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>10</integer>
</dict>
<key>RxRelay.xcscheme</key>
<key>RxCocoa.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>11</integer>
</dict>
<key>RxSwift.xcscheme</key>
<key>RxRelay.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>12</integer>
</dict>
<key>SnapKit.xcscheme</key>
<key>RxSwift.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>13</integer>
</dict>
<key>SnapKit.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>14</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict/>

View File

@@ -1,7 +1,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Alamofire
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_LDFLAGS = $(inherited) -framework "CFNetwork"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}

View File

@@ -1,7 +1,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Alamofire
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_LDFLAGS = $(inherited) -framework "CFNetwork"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}

View File

@@ -1,7 +1,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/HandyJSON
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)

View File

@@ -1,7 +1,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/HandyJSON
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)

View File

@@ -1,7 +1,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_LDFLAGS = $(inherited) -framework "Accelerate" -framework "CFNetwork" -weak_framework "Combine" -weak_framework "SwiftUI"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}

View File

@@ -1,7 +1,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_LDFLAGS = $(inherited) -framework "Accelerate" -framework "CFNetwork" -weak_framework "Combine" -weak_framework "SwiftUI"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}

View File

@@ -2,7 +2,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Moya
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "CFNetwork" -framework "Foundation"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}

View File

@@ -2,7 +2,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Moya
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_LDFLAGS = $(inherited) -framework "Alamofire" -framework "CFNetwork" -framework "Foundation"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}

View File

@@ -171,6 +171,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
## NIMSDK_LITE
Copyright 2022 Netease
## NSObject+Rx
The MIT License (MIT)

View File

@@ -218,6 +218,16 @@ SOFTWARE.
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>Copyright 2022 Netease </string>
<key>License</key>
<string>Copyright</string>
<key>Title</key>
<string>NIMSDK_LITE</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>The MIT License (MIT)

View File

@@ -5,6 +5,8 @@ ${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework
${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework
${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework
${BUILT_PRODUCTS_DIR}/Moya/Moya.framework
${PODS_ROOT}/NIMSDK_LITE/NIMSDK/NIMSDK.framework
${PODS_ROOT}/NIMSDK_LITE/NIMSDK/NIMNOS.framework
${BUILT_PRODUCTS_DIR}/NSObject+Rx/NSObject_Rx.framework
${BUILT_PRODUCTS_DIR}/Reusable/Reusable.framework
${BUILT_PRODUCTS_DIR}/RxCocoa/RxCocoa.framework

View File

@@ -4,6 +4,8 @@ ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Moya.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/NIMSDK.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/NIMNOS.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/NSObject_Rx.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Reusable.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxCocoa.framework

View File

@@ -5,6 +5,8 @@ ${BUILT_PRODUCTS_DIR}/HandyJSON/HandyJSON.framework
${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework
${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework
${BUILT_PRODUCTS_DIR}/Moya/Moya.framework
${PODS_ROOT}/NIMSDK_LITE/NIMSDK/NIMSDK.framework
${PODS_ROOT}/NIMSDK_LITE/NIMSDK/NIMNOS.framework
${BUILT_PRODUCTS_DIR}/NSObject+Rx/NSObject_Rx.framework
${BUILT_PRODUCTS_DIR}/Reusable/Reusable.framework
${BUILT_PRODUCTS_DIR}/RxCocoa/RxCocoa.framework

View File

@@ -4,6 +4,8 @@ ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HandyJSON.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Moya.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/NIMSDK.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/NIMNOS.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/NSObject_Rx.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Reusable.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxCocoa.framework

View File

@@ -18,7 +18,7 @@ echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}"
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
SWIFT_STDLIB_PATH="${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
BCSYMBOLMAP_DIR="BCSymbolMaps"
@@ -182,6 +182,8 @@ if [[ "$CONFIGURATION" == "Debug" ]]; then
install_framework "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework"
install_framework "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework"
install_framework "${BUILT_PRODUCTS_DIR}/Moya/Moya.framework"
install_framework "${PODS_ROOT}/NIMSDK_LITE/NIMSDK/NIMSDK.framework"
install_framework "${PODS_ROOT}/NIMSDK_LITE/NIMSDK/NIMNOS.framework"
install_framework "${BUILT_PRODUCTS_DIR}/NSObject+Rx/NSObject_Rx.framework"
install_framework "${BUILT_PRODUCTS_DIR}/Reusable/Reusable.framework"
install_framework "${BUILT_PRODUCTS_DIR}/RxCocoa/RxCocoa.framework"
@@ -196,6 +198,8 @@ if [[ "$CONFIGURATION" == "Release" ]]; then
install_framework "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework"
install_framework "${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework"
install_framework "${BUILT_PRODUCTS_DIR}/Moya/Moya.framework"
install_framework "${PODS_ROOT}/NIMSDK_LITE/NIMSDK/NIMSDK.framework"
install_framework "${PODS_ROOT}/NIMSDK_LITE/NIMSDK/NIMNOS.framework"
install_framework "${BUILT_PRODUCTS_DIR}/NSObject+Rx/NSObject_Rx.framework"
install_framework "${BUILT_PRODUCTS_DIR}/Reusable/Reusable.framework"
install_framework "${BUILT_PRODUCTS_DIR}/RxCocoa/RxCocoa.framework"

View File

@@ -1,11 +1,11 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/DeviceKit" "${PODS_CONFIGURATION_BUILD_DIR}/HandyJSON" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/Moya" "${PODS_CONFIGURATION_BUILD_DIR}/NSObject+Rx" "${PODS_CONFIGURATION_BUILD_DIR}/Reusable" "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa" "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit"
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/DeviceKit" "${PODS_CONFIGURATION_BUILD_DIR}/HandyJSON" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/Moya" "${PODS_CONFIGURATION_BUILD_DIR}/NSObject+Rx" "${PODS_CONFIGURATION_BUILD_DIR}/Reusable" "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa" "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_ROOT}/NIMSDK_LITE/NIMSDK"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/DeviceKit/DeviceKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/HandyJSON/HandyJSON.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD/MBProgressHUD.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Moya/Moya.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/NSObject+Rx/NSObject_Rx.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Reusable/Reusable.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa/RxCocoa.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay/RxRelay.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers"
LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks'
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_LDFLAGS = $(inherited) -framework "Accelerate" -framework "Alamofire" -framework "CFNetwork" -framework "CoreGraphics" -framework "DeviceKit" -framework "Foundation" -framework "HandyJSON" -framework "Kingfisher" -framework "MBProgressHUD" -framework "Moya" -framework "NSObject_Rx" -framework "QuartzCore" -framework "Reusable" -framework "RxCocoa" -framework "RxRelay" -framework "RxSwift" -framework "SnapKit" -framework "UIKit" -weak_framework "Combine" -weak_framework "SwiftUI"
LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_LDFLAGS = $(inherited) -l"c++" -l"resolv" -l"sqlite3.0" -l"z" -framework "AVFoundation" -framework "Accelerate" -framework "Alamofire" -framework "AudioToolbox" -framework "CFNetwork" -framework "CoreGraphics" -framework "CoreMedia" -framework "CoreTelephony" -framework "DeviceKit" -framework "Foundation" -framework "HandyJSON" -framework "Kingfisher" -framework "MBProgressHUD" -framework "Moya" -framework "NIMNOS" -framework "NIMSDK" -framework "NSObject_Rx" -framework "QuartzCore" -framework "Reusable" -framework "RxCocoa" -framework "RxRelay" -framework "RxSwift" -framework "SnapKit" -framework "SystemConfiguration" -framework "UIKit" -framework "VideoToolbox" -weak_framework "Combine" -weak_framework "SwiftUI"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)

View File

@@ -1,11 +1,11 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/DeviceKit" "${PODS_CONFIGURATION_BUILD_DIR}/HandyJSON" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/Moya" "${PODS_CONFIGURATION_BUILD_DIR}/NSObject+Rx" "${PODS_CONFIGURATION_BUILD_DIR}/Reusable" "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa" "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit"
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/DeviceKit" "${PODS_CONFIGURATION_BUILD_DIR}/HandyJSON" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/Moya" "${PODS_CONFIGURATION_BUILD_DIR}/NSObject+Rx" "${PODS_CONFIGURATION_BUILD_DIR}/Reusable" "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa" "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_ROOT}/NIMSDK_LITE/NIMSDK"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/DeviceKit/DeviceKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/HandyJSON/HandyJSON.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MBProgressHUD/MBProgressHUD.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Moya/Moya.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/NSObject+Rx/NSObject_Rx.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Reusable/Reusable.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa/RxCocoa.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay/RxRelay.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift/RxSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers"
LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks'
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_LDFLAGS = $(inherited) -framework "Accelerate" -framework "Alamofire" -framework "CFNetwork" -framework "CoreGraphics" -framework "DeviceKit" -framework "Foundation" -framework "HandyJSON" -framework "Kingfisher" -framework "MBProgressHUD" -framework "Moya" -framework "NSObject_Rx" -framework "QuartzCore" -framework "Reusable" -framework "RxCocoa" -framework "RxRelay" -framework "RxSwift" -framework "SnapKit" -framework "UIKit" -weak_framework "Combine" -weak_framework "SwiftUI"
LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_LDFLAGS = $(inherited) -l"c++" -l"resolv" -l"sqlite3.0" -l"z" -framework "AVFoundation" -framework "Accelerate" -framework "Alamofire" -framework "AudioToolbox" -framework "CFNetwork" -framework "CoreGraphics" -framework "CoreMedia" -framework "CoreTelephony" -framework "DeviceKit" -framework "Foundation" -framework "HandyJSON" -framework "Kingfisher" -framework "MBProgressHUD" -framework "Moya" -framework "NIMNOS" -framework "NIMSDK" -framework "NSObject_Rx" -framework "QuartzCore" -framework "Reusable" -framework "RxCocoa" -framework "RxRelay" -framework "RxSwift" -framework "SnapKit" -framework "SystemConfiguration" -framework "UIKit" -framework "VideoToolbox" -weak_framework "Combine" -weak_framework "SwiftUI"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)

View File

@@ -1,7 +1,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Reusable
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_LDFLAGS = $(inherited) -framework "UIKit"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}

View File

@@ -1,7 +1,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Reusable
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_LDFLAGS = $(inherited) -framework "UIKit"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}

View File

@@ -2,7 +2,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_LDFLAGS = $(inherited) -framework "RxRelay" -framework "RxSwift"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}

View File

@@ -2,7 +2,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/RxCocoa
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/RxRelay" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_LDFLAGS = $(inherited) -framework "RxRelay" -framework "RxSwift"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}

View File

@@ -2,7 +2,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/RxRelay
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_LDFLAGS = $(inherited) -framework "RxSwift"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}

View File

@@ -2,7 +2,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/RxRelay
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_LDFLAGS = $(inherited) -framework "RxSwift"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}

View File

@@ -1,7 +1,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/RxSwift
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)

View File

@@ -1,7 +1,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/RxSwift
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)

View File

@@ -1,7 +1,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SnapKit
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)

View File

@@ -1,7 +1,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SnapKit
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)

View File

@@ -11,6 +11,14 @@
E81A7BAE2B885B20009E736E /* Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = E81A7BAA2B885B20009E736E /* Base64.m */; };
E81A7BAF2B885B20009E736E /* MAIDESEncryptTool.m in Sources */ = {isa = PBXBuildFile; fileRef = E81A7BAB2B885B20009E736E /* MAIDESEncryptTool.m */; };
E81A7BB22B886299009E736E /* HUDTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = E81A7BB12B886299009E736E /* HUDTool.swift */; };
E8479E382B8DC5CD009AF878 /* ChatListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8479E372B8DC5CD009AF878 /* ChatListVC.swift */; };
E8479E3B2B8DC5FA009AF878 /* ChatViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8479E3A2B8DC5FA009AF878 /* ChatViewModel.swift */; };
E8479E3D2B8DC61F009AF878 /* ChatBaseCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8479E3C2B8DC61F009AF878 /* ChatBaseCell.swift */; };
E8479E412B8DC6BC009AF878 /* ChatBaseObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8479E402B8DC6BC009AF878 /* ChatBaseObject.swift */; };
E8479E432B8DD077009AF878 /* ChatUIConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8479E422B8DD077009AF878 /* ChatUIConfig.swift */; };
E8479E462B8DD5BF009AF878 /* Date+.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8479E452B8DD5BF009AF878 /* Date+.swift */; };
E8479E482B8DD6E1009AF878 /* ChatTextCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8479E472B8DD6E1009AF878 /* ChatTextCell.swift */; };
E8479E4D2B8DDBC5009AF878 /* ChatAttributeTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8479E4C2B8DDBC5009AF878 /* ChatAttributeTool.swift */; };
E86A43AA2B85DFA90084C04D /* BaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E86A43A92B85DFA90084C04D /* BaseViewController.swift */; };
E86A43AE2B85DFEA0084C04D /* Color+.swift in Sources */ = {isa = PBXBuildFile; fileRef = E86A43AD2B85DFEA0084C04D /* Color+.swift */; };
E86A43B02B85E11B0084C04D /* BaseNavigationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E86A43AF2B85E11B0084C04D /* BaseNavigationViewController.swift */; };
@@ -60,6 +68,14 @@
E81A7BAC2B885B20009E736E /* Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Base64.h; sourceTree = "<group>"; };
E81A7BAD2B885B20009E736E /* MAIDESEncryptTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MAIDESEncryptTool.h; sourceTree = "<group>"; };
E81A7BB12B886299009E736E /* HUDTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HUDTool.swift; sourceTree = "<group>"; };
E8479E372B8DC5CD009AF878 /* ChatListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatListVC.swift; sourceTree = "<group>"; };
E8479E3A2B8DC5FA009AF878 /* ChatViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatViewModel.swift; sourceTree = "<group>"; };
E8479E3C2B8DC61F009AF878 /* ChatBaseCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatBaseCell.swift; sourceTree = "<group>"; };
E8479E402B8DC6BC009AF878 /* ChatBaseObject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatBaseObject.swift; sourceTree = "<group>"; };
E8479E422B8DD077009AF878 /* ChatUIConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatUIConfig.swift; sourceTree = "<group>"; };
E8479E452B8DD5BF009AF878 /* Date+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Date+.swift"; sourceTree = "<group>"; };
E8479E472B8DD6E1009AF878 /* ChatTextCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatTextCell.swift; sourceTree = "<group>"; };
E8479E4C2B8DDBC5009AF878 /* ChatAttributeTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatAttributeTool.swift; sourceTree = "<group>"; };
E86A43A92B85DFA90084C04D /* BaseViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseViewController.swift; sourceTree = "<group>"; };
E86A43AD2B85DFEA0084C04D /* Color+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Color+.swift"; sourceTree = "<group>"; };
E86A43AF2B85E11B0084C04D /* BaseNavigationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseNavigationViewController.swift; sourceTree = "<group>"; };
@@ -138,6 +154,48 @@
path = Hud;
sourceTree = "<group>";
};
E8479E392B8DC5E8009AF878 /* VM */ = {
isa = PBXGroup;
children = (
E8479E3A2B8DC5FA009AF878 /* ChatViewModel.swift */,
);
path = VM;
sourceTree = "<group>";
};
E8479E3E2B8DC624009AF878 /* View */ = {
isa = PBXGroup;
children = (
E8479E3C2B8DC61F009AF878 /* ChatBaseCell.swift */,
E8479E472B8DD6E1009AF878 /* ChatTextCell.swift */,
);
path = View;
sourceTree = "<group>";
};
E8479E3F2B8DC6A6009AF878 /* Model */ = {
isa = PBXGroup;
children = (
E8479E402B8DC6BC009AF878 /* ChatBaseObject.swift */,
E8479E422B8DD077009AF878 /* ChatUIConfig.swift */,
);
path = Model;
sourceTree = "<group>";
};
E8479E442B8DD5B5009AF878 /* Date */ = {
isa = PBXGroup;
children = (
E8479E452B8DD5BF009AF878 /* Date+.swift */,
);
path = Date;
sourceTree = "<group>";
};
E8479E492B8DDA3F009AF878 /* Tool */ = {
isa = PBXGroup;
children = (
E8479E4C2B8DDBC5009AF878 /* ChatAttributeTool.swift */,
);
path = Tool;
sourceTree = "<group>";
};
E86A43A72B85DF7A0084C04D /* Base */ = {
isa = PBXGroup;
children = (
@@ -165,6 +223,7 @@
E86A43AB2B85DFC20084C04D /* Extension */ = {
isa = PBXGroup;
children = (
E8479E442B8DD5B5009AF878 /* Date */,
E8D15AA42B89B0BA00369467 /* List */,
E86A43E62B884C520084C04D /* String */,
E86A43C42B862CB70084C04D /* UIImage */,
@@ -338,7 +397,12 @@
E8D15AB42B8B001900369467 /* Chat */ = {
isa = PBXGroup;
children = (
E8479E492B8DDA3F009AF878 /* Tool */,
E8479E3F2B8DC6A6009AF878 /* Model */,
E8479E3E2B8DC624009AF878 /* View */,
E8479E392B8DC5E8009AF878 /* VM */,
E8D15AB52B8B002700369467 /* ChatVC.swift */,
E8479E372B8DC5CD009AF878 /* ChatListVC.swift */,
);
path = Chat;
sourceTree = "<group>";
@@ -515,8 +579,11 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
E8479E3D2B8DC61F009AF878 /* ChatBaseCell.swift in Sources */,
E86A43AE2B85DFEA0084C04D /* Color+.swift in Sources */,
E8479E482B8DD6E1009AF878 /* ChatTextCell.swift in Sources */,
E8D15A9F2B89AED600369467 /* AuthManager.swift in Sources */,
E8479E382B8DC5CD009AF878 /* ChatListVC.swift in Sources */,
E86A43B02B85E11B0084C04D /* BaseNavigationViewController.swift in Sources */,
E86A43E82B884C5E0084C04D /* String+.swift in Sources */,
E8D15AA32B89B03D00369467 /* Deserialized.swift in Sources */,
@@ -524,9 +591,12 @@
E86A43DA2B877A840084C04D /* AppConfigObject.swift in Sources */,
E8D15AA62B89B0C600369467 /* List+.swift in Sources */,
E81A7BAE2B885B20009E736E /* Base64.m in Sources */,
E8479E462B8DD5BF009AF878 /* Date+.swift in Sources */,
E81A7BB22B886299009E736E /* HUDTool.swift in Sources */,
E86A43BC2B85FA640084C04D /* AuthForgetVC.swift in Sources */,
E86A43C32B8628AF0084C04D /* BaseTabBarViewController.swift in Sources */,
E8479E3B2B8DC5FA009AF878 /* ChatViewModel.swift in Sources */,
E8479E412B8DC6BC009AF878 /* ChatBaseObject.swift in Sources */,
E86A43AA2B85DFA90084C04D /* BaseViewController.swift in Sources */,
E884E85F2B6900C500ADE6EE /* AppDelegate.swift in Sources */,
E8D15AEA2B8CD77800369467 /* H5Utils.swift in Sources */,
@@ -546,6 +616,8 @@
E86A43BF2B8620C40084C04D /* Utils.swift in Sources */,
E86A43BA2B85F1360084C04D /* AuthLoginVC.swift in Sources */,
E8D15ABC2B8B87BA00369467 /* UserViewModel.swift in Sources */,
E8479E432B8DD077009AF878 /* ChatUIConfig.swift in Sources */,
E8479E4D2B8DDBC5009AF878 /* ChatAttributeTool.swift in Sources */,
E81A7BAF2B885B20009E736E /* MAIDESEncryptTool.m in Sources */,
E8D15AA82B89B74700369467 /* YMRequestX.swift in Sources */,
E8D15AB02B8AFFCE00369467 /* HomeVoiceVC.swift in Sources */,

View File

@@ -7,7 +7,7 @@
<key>yinmeng-ios.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>14</integer>
<integer>15</integer>
</dict>
</dict>
</dict>

View File

@@ -24,7 +24,7 @@ private extension BaseTabBarViewController {
let home: (BaseViewController, String, UIImage?, UIImage?) = (PlanetStarVC(), "", UIImage(named: "tabbar_icon_planet"), UIImage(named: "tabbar_icon_planet_sel"))
let message: (BaseViewController, String, UIImage?, UIImage?) = (ChatVC(), "",UIImage(named: "tabbar_icon_chat"), UIImage(named: "tabbar_icon_chat_sel"))
let message: (BaseViewController, String, UIImage?, UIImage?) = (ChatListVC(), "",UIImage(named: "tabbar_icon_chat"), UIImage(named: "tabbar_icon_chat_sel"))
let person: (BaseViewController, String, UIImage?, UIImage?) = (UserInfoVC(), "",UIImage(named: "tabbar_icon_user"), UIImage(named: "tabbar_icon_user_sel"))

View File

@@ -0,0 +1,110 @@
//
// Date+.swift
// yinmeng-ios
//
// Created by MaiMang on 2024/2/27.
//
import Foundation
extension Date {
///
/// - Returns:
static func getNowTimeStamp() -> Int {
let nowDate = Date.init()
//10
let interval = Int(nowDate.timeIntervalSince1970)
return interval
}
///
/// - Returns:
static func getNowTimeString(dateFormat: String) -> String {
let dateformatter = DateFormatter()
dateformatter.dateFormat = dateFormat
let nowDate = Date.init()
return dateformatter.string(from: nowDate)
}
///
/// - Parameters:
/// - timeStamp:
/// - dateFormat: yyyy-MM-dd HH:mm:ss
/// - Returns:
static func getTimeString(timeStamp: Int, dateFormat: String) -> String {
let date = Date(timeIntervalSince1970: TimeInterval.init(timeStamp))
let dateformatter = DateFormatter()
dateformatter.dateFormat = dateFormat
return dateformatter.string(from: date)
}
/// Date
/// - Parameters:
/// - timeString:
/// - dateFormat: yyyy-MM-dd HH:mm:ss
/// - Returns: Date
static func getDate(timeString: String, dateFormat: String) -> Date {
let dateformatter = DateFormatter()
dateformatter.dateFormat = dateFormat
let date = dateformatter.date(from: timeString) ?? Date()
return date
}
///
/// - Parameters:
/// - timeString:
/// - dateFormat: yyyy-MM-dd HH:mm:ss
/// - Returns:
static func getTimeStamp(timeString: String, dateFormat: String) -> Int {
let dateformatter = DateFormatter()
dateformatter.dateFormat = dateFormat
let date = self.getDate(timeString: timeString, dateFormat: dateFormat)
return Int(date.timeIntervalSince1970)
}
/// date
/// - Parameters:
/// - timeStamp:
/// - Returns: date
static func getDateWith(timeStamp: Int) -> Date {
let date = Date(timeIntervalSince1970: TimeInterval.init(timeStamp))
return date
}
///
/// - Returns:
func getTime() -> (String, String, String, String, String, String) {
let dateformatter = DateFormatter()
dateformatter.dateFormat = "yyyy"
let y = dateformatter.string(from: self)
dateformatter.dateFormat = "MM"
let mo = dateformatter.string(from: self)
dateformatter.dateFormat = "dd"
let d = dateformatter.string(from: self)
dateformatter.dateFormat = "HH"
let h = dateformatter.string(from: self)
dateformatter.dateFormat = "mm"
let m = dateformatter.string(from: self)
dateformatter.dateFormat = "ss"
let s = dateformatter.string(from: self)
return (y, mo, d, h, m, s)
}
///
/// - Parameter dateFormat: yyyy-MM-dd HH:mm:ss
/// - Returns:
func getStringTime(dateFormat: String) -> String {
let dateformatter = DateFormatter()
dateformatter.dateFormat = dateFormat
return dateformatter.string(from: self)
}
}

View File

@@ -0,0 +1,18 @@
//
// ChatListVC.swift
// yinmeng-ios
//
// Created by MaiMang on 2024/2/27.
//
import UIKit
class ChatListVC: BaseViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
}

View File

@@ -3,27 +3,64 @@
// yinmeng-ios
//
// Created by MaiMang on 2024/2/25.
//
//
import UIKit
import NIMSDK
class ChatVC: BaseViewController {
public init(session: NIMSession) {
vm = ChatViewModel(session: session)
super.init(nibName: nil, bundle: nil)
// vm.delegate = self
// NIMSDK.shared().mediaManager.add(self)
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
var vm:ChatViewModel
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .orange
}
/*
// 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.
}
*/
private lazy var chatTableView: UITableView = {
let tableView = UITableView(frame: .zero, style: .plain)
tableView.delegate = self
tableView.dataSource = self
tableView.tableFooterView = UIView()
tableView.separatorStyle = .none
tableView.backgroundColor = .clear
if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never
}
return tableView
}()
}
extension ChatVC: UITableViewDelegate, UITableViewDataSource {
public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return vm.messageObjects.count
}
public func tableView(_ tableView: UITableView,
cellForRowAt indexPath: IndexPath) -> UITableViewCell {
return UITableViewCell()
}
public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
}
public func tableView(_ tableView: UITableView,
heightForRowAt indexPath: IndexPath) -> CGFloat {
let m = vm.messageObjects[safe:indexPath.row]
return CGFloat(m?.height ?? 0)
}
}

View File

@@ -0,0 +1,105 @@
//
// ChatBaseObject.swift
// yinmeng-ios
//
// Created by MaiMang on 2024/2/27.
//
import Foundation
import NIMSDK
public enum SessionType: Int {
case text = 1
case image
case time
}
public protocol ChatSessionProtocol: NSObjectProtocol {
var msg:NIMMessage? {get set}
// cell
var contentSize: CGSize { get set }
///
var height: Float { get set }
///id
var userID: String? { get set }
///
var name: String? { get set }
///
var avatar: String? { get set }
///
var type:SessionType{get set}
init(msg: NIMMessage?)
}
open class ChatBaseObject:NSObject, ChatSessionProtocol {
public var msg: NIMMessage?
public var contentSize: CGSize
public var height: Float
public var userID: String?
public var name: String?
public var avatar: String?
public var type: SessionType = .text
public required init(msg: NIMMessage?) {
self.msg = msg
if let uid = msg?.from {
self.userID = uid
let user = NIMSDK.shared().userManager.userInfo(uid)
self.avatar = user?.userInfo?.avatarUrl
self.name = user?.userInfo?.nickName
}
contentSize = CGSize(width: 32.0, height: ChatUIConfig.layout.bubbleMinHeight)
height = Float(ChatUIConfig.layout.bubbleMinHeight + ChatUIConfig.layout.margin)
}
}
class ChatTextObject: ChatBaseObject {
public var attribute: NSMutableAttributedString?
required init(msg: NIMMessage?) {
super.init(msg: msg)
type = .text
let style = NSMutableParagraphStyle()
style.lineSpacing = 6
let attributeStr = NSMutableAttributedString(string: msg?.text ?? "", attributes: [NSAttributedString.Key.font: ChatUIConfig.ui.messageFont, NSAttributedString.Key.paragraphStyle: style])
attribute = attributeStr
let textSize = ChatAttributeTool.boundingRect(attribute: attributeStr, font: ChatUIConfig.ui.messageFont, maxSize: CGSize(width: ChatUIConfig.layout.contentMaxWidth, height: CGFloat.greatestFiniteMagnitude))
var h = ChatUIConfig.layout.bubbleMinHeight
h = textSize.height + 1 + ChatUIConfig.layout.textInsets.top + ChatUIConfig.layout.textInsets.bottom
if h < 36 {
h = 36
}
contentSize = CGSize(width: textSize.width + ChatUIConfig.layout.textInsets.left + ChatUIConfig.layout.textInsets.right + 1, height: h)
height = Float(contentSize.height + ChatUIConfig.layout.cellContentInsets.bottom + ChatUIConfig.layout.cellContentInsets.top)
}
}
class ChatTimeObject: ChatBaseObject {
var text:String = ""
public var attribute: NSMutableAttributedString?
required init(msg: NIMMessage?) {
super.init(msg: msg)
type = .time
let style = NSMutableParagraphStyle()
style.lineSpacing = 6
let attributeStr = NSMutableAttributedString(string: msg?.text ?? "", attributes: [NSAttributedString.Key.font: ChatUIConfig.ui.messageFont, NSAttributedString.Key.paragraphStyle: style])
attribute = attributeStr
let textSize = ChatAttributeTool.boundingRect(attribute: attributeStr, font: ChatUIConfig.ui.messageFont, maxSize: CGSize(width: ChatUIConfig.layout.contentMaxWidth, height: CGFloat.greatestFiniteMagnitude))
var h = ChatUIConfig.layout.bubbleMinHeight
h = textSize.height + 1 + ChatUIConfig.layout.textInsets.top + ChatUIConfig.layout.textInsets.bottom
if h < 36 {
h = 36
}
contentSize = CGSize(width: textSize.width + ChatUIConfig.layout.textInsets.left + ChatUIConfig.layout.textInsets.right + 1, height: h)
height = Float(contentSize.height + ChatUIConfig.layout.cellContentInsets.bottom + ChatUIConfig.layout.cellContentInsets.top)
}
}

View File

@@ -0,0 +1,62 @@
//
// ChatUIConfig.swift
// yinmeng-ios
//
// Created by MaiMang on 2024/2/27.
//
import Foundation
public class ChatUIConfig {
/// UI
public static let ui = UI()
///
public static let layout = Layout()
public class UI {
public enum AvatarType {
case cycle //
case rectangle(CGFloat) //
}
///
public var avatarType: AvatarType = .cycle
///
public var avatarPlaceholderImage = UIImage()
/// /
public var tipsColor = UIColor.lightGray
/// /
public var tipsFont = UIFont.systemFont(ofSize: 12)
/// ()
public var messageFont = UIFont.systemFont(ofSize: 14)
///
public var messageNameFont = UIFont.systemFont(ofSize: 13)
///
public var messageNameColor = UIColor(red: 5/255.0, green: 19/255.0, blue: 47/255.0, alpha: 1)
/// ()
public var leftMessageColor = UIColor.black
/// ()
public var rightMessageColor = UIColor.black
}
public class Layout {
///
public var avatarSize: CGFloat = 34.0
/// cell
public var cellContentInsets = UIEdgeInsets(top: 8, left: 16, bottom: 8, right: 16)
///
public var textInsets = UIEdgeInsets(top: 10, left: 15, bottom: 10, right: 15)
///
public var contentMaxWidth: CGFloat = (UIScreen.main.bounds.size.width - 170)
///
public var pictureMaxSize = CGSize(width: 150, height: 150)
///
public var bubbleMinHeight: CGFloat = 40.0
///
public var margin: CGFloat = 8.0
}
}

View File

@@ -0,0 +1,28 @@
//
// ChatAttributeTool.swift
// yinmeng-ios
//
// Created by MaiMang on 2024/2/27.
//
import Foundation
public class ChatAttributeTool {
// size
public class func boundingRect(attribute: NSAttributedString, font: UIFont, maxSize: CGSize) -> CGSize {
if attribute.length == 0 {
return CGSize.zero
}
var sizeRec = attribute.boundingRect(
with: maxSize,
options: [.usesLineFragmentOrigin, .usesFontLeading],
context: nil
).size
if attribute.length > 0, sizeRec.width == 0, sizeRec.height == 0 {
sizeRec = maxSize
}
return CGSize(width: ceil(sizeRec.width), height: ceil(sizeRec.height))
}
}

View File

@@ -0,0 +1,666 @@
//
// ChatViewModel.swift
// yinmeng-ios
//
// Created by MaiMang on 2024/2/27.
//
import Foundation
import NIMSDK
public typealias ChatProviCompletion = ((Error?, [NIMMessage]?) -> ())
public enum LoadMessageDirection: Int {
case old = 1
case new
}
public protocol ChatViewModelDelegate: NSObjectProtocol {
func didAppend(_ message: NIMMessage)
func onDeleteMessage(_ message: NIMMessage, atIndexs: [IndexPath])
func send(_ message: NIMMessage, didCompleteWithError error: Error?)
func send(_ message: NIMMessage, progress: Float)
func onRecvMessages(_ messages: [NIMMessage])
func willSend(_ message: NIMMessage)
}
public class ChatViewModel: NSObject,
NIMConversationManagerDelegate, NIMSystemNotificationManagerDelegate {
private var userInfo = [String: NIMUser]()
public let messagPageNum: UInt = 100
public var session: NIMSession
///
public var messageObjects: [ChatSessionProtocol] = .init()
//
private var oldMsg: NIMMessage?
//
private var newMsg: NIMMessage?
//
public var credibleTimestamp: TimeInterval = 0
public var anchor: NIMMessage?
internal var isHistoryAnchorChat = false
public weak var delegate: ChatViewModelDelegate?
private func addMessageListener() {
NIMSDK.shared().chatManager.add(self)
NIMSDK.shared().conversationManager.add(self)
NIMSDK.shared().systemNotificationManager.add(self)
}
init(session: NIMSession) {
self.session = session
super.init()
addMessageListener()
}
///
/// - Parameters:
/// - message:
/// - completion:
public func sendMessage(message: NIMMessage, _ completion: @escaping (Error?) -> Void) {
NIMSDK.shared().chatManager.send(message, to: session, completion: completion)
}
////
public func sendAudioMessage(filePath: String, _ completion: @escaping (Error?) -> Void) {
let audioObject = NIMAudioObject(sourcePath: filePath)
let audioMessage = NIMMessage()
audioMessage.messageObject = audioObject
audioMessage.apnsContent = "发来了一段语音"
let setting = NIMMessageSetting()
setting.teamReceiptEnabled = false
audioMessage.setting = setting
sendMessage(message: audioMessage, completion)
}
///
public func sendImageMessage(image: UIImage, _ completion: @escaping (Error?) -> Void) {
let imageMessage = NIMMessage()
let imageOpt = NIMImageOption()
imageOpt.compressQuality = 0.8
let imageObject = NIMImageObject(image: image)
imageObject.option = imageOpt
imageMessage.messageObject = imageObject
imageMessage.apnsContent = "发送了一张图片"
sendMessage(message: imageMessage, completion)
}
public func sendTextMessage(text: String, _ completion: @escaping (Error?) -> Void) {
if text.count <= 0 {
return
}
let textMessage = NIMMessage()
textMessage.text = text
sendMessage(message: textMessage, completion)
}
//
public func reloadRemoteHistoryMessage(direction: LoadMessageDirection, updateCredible: Bool,
option: NIMHistoryMessageSearchOption,
_ completion: @escaping (Error?, NSInteger,
[ChatSessionProtocol]?) -> Void) {
weak var weakSelf = self
NIMSDK.shared().conversationManager.fetchMessageHistory(session, option: option) { error, messages in
if error == nil {
if let messageArray = messages, messageArray.count > 0 {
if direction == .old {
weakSelf?.oldMsg = messageArray.last
} else {
weakSelf?.newMsg = messageArray.first
}
for msg in messageArray {
if let model = weakSelf?.modelTransformMessage(message: msg) {
weakSelf?.addTimeMessage(msg)
weakSelf?.messageObjects.insert(model, at: 0)
}
}
if let updateMessage = messageArray.first, updateCredible {
//
weakSelf?.credibleTimestamp = updateMessage.timestamp
}
completion(error, messageArray.count, weakSelf?.messageObjects)
} else {
completion(error, 0, weakSelf?.messageObjects)
}
} else {
completion(error, 0, nil)
}
}
}
//
public func dropDownRemoteRefresh(_ completion: @escaping (Error?, NSInteger, [ChatSessionProtocol]?)
-> Void) {
let isCredible = isMessageCredible(message: oldMsg ?? NIMMessage())
if isCredible { //
getMoreMessageHistory(completion)
} else {
let option = NIMHistoryMessageSearchOption()
option.startTime = 0
option.endTime = oldMsg?.timestamp ?? 0
option.limit = messagPageNum
option.sync = true
//
reloadRemoteHistoryMessage(
direction: .old,
updateCredible: false,
option: option,
completion
)
}
}
public func queryRoamMsgHasMoreTime_v2(_ completion: @escaping (Error?, NSInteger, NSInteger,
[ChatSessionProtocol]?, Int) -> Void) {
weak var weakSelf = self
NIMSDK.shared().conversationManager.incompleteSessionInfo(by: session) { error, sessionInfos in
if error == nil {
let sessionInfo = sessionInfos?.first
//
weakSelf?.credibleTimestamp = sessionInfo?.timestamp ?? 0
weakSelf?.getMessageHistory(self.newMsg) { error, value, models in
completion(error, value, 0, models, 0)
}
}
}
}
//
public func getMessageHistory(_ message: NIMMessage?,
_ completion: @escaping (Error?, NSInteger, [ChatSessionProtocol]?)
-> Void) {
NIMSDK.shared().conversationManager.messages(in: session, message: message, limit: Int(messagPageNum), completion: result(completion))
func result(_ completion: @escaping (Error?, NSInteger, [ChatSessionProtocol]?) -> ()) -> ChatProviCompletion {
return { [weak self] error, messages in
if let messageArray = messages, messageArray.count > 0 {
self?.oldMsg = messageArray.first
for msg in messageArray {
if let model = self?.modelTransformMessage(message: msg) {
self?.addTimeMessage(msg)
self?.messageObjects.append(model)
}
}
completion(error, messageArray.count, self?.messageObjects)
self?.markRead(messages: messageArray) { error in
}
} else {
completion(error, 0, self?.messageObjects)
}
}
}
}
//
public func getMoreMessageHistory(_ completion: @escaping (Error?, NSInteger, [ChatSessionProtocol]?)
-> Void) {
let messageParam = oldMsg ?? newMsg
weak var weakSelf = self
NIMSDK.shared().conversationManager.messages(in: session, message: messageParam, limit: Int(messagPageNum)) { error, messages in
if let messageArray = messages, messageArray.count > 0 {
weakSelf?.oldMsg = messageArray.first
// 使
let isCredible = weakSelf?
.isMessageCredible(message: messageArray.first ?? NIMMessage())
if let isTrust = isCredible, isTrust {
for msg in messageArray.reversed() {
if let model = weakSelf?.modelTransformMessage(message: msg) {
weakSelf?.addTimeMessage(msg)
weakSelf?.messageObjects.insert(model, at: 0)
}
}
completion(error, messageArray.count, weakSelf?.messageObjects)
} else {
let option = NIMHistoryMessageSearchOption()
option.startTime = 0
option.endTime = weakSelf?.oldMsg?.timestamp ?? 0
option.limit = weakSelf?.messagPageNum ?? 100
option.sync = true
weakSelf?.reloadRemoteHistoryMessage(
direction: .old,
updateCredible: true,
option: option,
completion
)
}
weakSelf?.markRead(messages: messageArray) { error in
}
} else {
if let messageArray = messages, messageArray.isEmpty,
weakSelf?.credibleTimestamp ?? 0 > 0 {
//
let option = NIMHistoryMessageSearchOption()
option.startTime = 0
option.endTime = weakSelf?.oldMsg?.timestamp ?? 0
option.limit = weakSelf?.messagPageNum ?? 100
weakSelf?.reloadRemoteHistoryMessage(
direction: .old,
updateCredible: true,
option: option,
completion
)
} else {
completion(error, 0, weakSelf?.messageObjects)
}
}
}
}
//
public func searchMessageHistory(direction: LoadMessageDirection, startTime: TimeInterval,
endTime: TimeInterval,
_ completion: @escaping (Error?, NSInteger, [ChatSessionProtocol]?)
-> Void) {
let option = NIMMessageSearchOption()
option.startTime = startTime
option.endTime = endTime
option.order = .asc
option.limit = messagPageNum
NIMSDK.shared().conversationManager.searchMessages(session, option: option) { [weak self] error, messages in
if error == nil {
if let messageArray = messages, messageArray.count > 0 {
var newMessages = [NIMMessage]()
for msg in messageArray {
newMessages.append(msg)
if let model = self?.modelTransformMessage(message: msg) {
self?.addTimeMessage(msg)
self?.messageObjects.append(model)
}
}
if direction == .old {
self?.oldMsg = newMessages.first
} else {
self?.newMsg = newMessages.last
}
completion(error, newMessages.count, self?.messageObjects)
} else {
completion(error, 0, self?.messageObjects)
}
} else {
completion(error, 0, nil)
}
}
}
//
public func isMessageCredible(message: NIMMessage) -> Bool {
return credibleTimestamp <= 0 || message.timestamp >= credibleTimestamp
}
public func markRead(messages: [NIMMessage], _ completion: @escaping (Error?) -> Void) {
NIMSDK.shared().conversationManager.markAllMessagesRead(in: session) { error in
}
}
@discardableResult
public func resendMessage(message: NIMMessage) -> Error? {
var e: Error? = nil
do {
try NIMSDK.shared().chatManager.resend(message)
} catch {
e = error
}
return e
}
public func getUserInfo(userId: String) -> NIMUser? {
return NIMSDK.shared().userManager.userInfo(userId)
}
public func getTeamMember(userId: String, teamId: String) -> NIMTeamMember? {
// return repo.getTeamMemberList(userId: userId, teamId: teamId)
return nil
}
public func deleteMessage(message: NIMMessage) {
NIMSDK.shared().conversationManager.delete(message)
deleteMessageUpdateUI(message)
}
// MARK: collection
func addColletion(_ message: NIMMessage,
completion: @escaping (NSError?, NIMCollectInfo?) -> Void) {
let param = NIMAddCollectParams()
var string: String?
if message.messageType == .text {
string = message.text
param.type = 1024
} else {
switch message.messageType {
case .audio:
if let obj = message.messageObject as? NIMAudioObject {
string = obj.url
}
param.type = message.messageType.rawValue
case .image:
if let obj = message.messageObject as? NIMImageObject {
string = obj.url
}
param.type = message.messageType.rawValue
case .video:
if let obj = message.messageObject as? NIMVideoObject {
string = obj.url
}
param.type = message.messageType.rawValue
default:
param.type = 0
}
param.data = string ?? ""
}
param.uniqueId = message.serverID
// repo.collectMessage(param, completion)
}
// MARK: revoke
// history message insert message at first of messages, send message add last of messages
private func addTimeMessage(_ message: NIMMessage) {
let lastTs = messageObjects.last?.msg?.timestamp ?? 0.0
let curTs = message.timestamp
let dur = curTs - lastTs
print("curTs:\(curTs) lastTs:\(lastTs)")
if (dur / 60) > 5 {
messageObjects.append(timeModel(message))
}
}
private func ddTimeForHistoryMessage(_ message: NIMMessage) {
let firstTs = messageObjects.first?.msg?.timestamp ?? 0.0
let curTs = message.timestamp
let dur = firstTs - curTs
print("HistorycurTs:\(curTs) firstTs:\(firstTs)")
if (dur / 60) > 5 {
messageObjects.insert(timeModel(message), at: 0)
}
}
private func timeModel(_ message: NIMMessage) -> ChatSessionProtocol {
let timeMsg = NIMMessage()
timeMsg.timestamp = message.timestamp
let model = ChatTimeObject(msg: timeMsg)
model.type = .time
model.text = "2024-2-28"
return model
}
private func modelTransformMessage(message: NIMMessage) -> ChatSessionProtocol? {
var model: ChatSessionProtocol
switch message.messageType {
case .text:
model = ChatTextObject(msg: message)
default:
return nil
// text
// message.text = ""
// model = MAIMessageContentModel(message: message)
}
if let uid = message.from {
model.userID = uid
let user = getUserInfo(userId: uid)
var fullName = uid
if let nickName = user?.userInfo?.nickName {
fullName = nickName
}
model.avatar = user?.userInfo?.avatarUrl
if session.sessionType == .team {
// team
let teamMember = getTeamMember(userId: uid, teamId: session.sessionId)
if let teamNickname = teamMember?.nickname {
fullName = teamNickname
}
}
if let alias = user?.alias {
fullName = alias
}
model.name = fullName
}
return model
}
func deleteMessageUpdateUI(_ message: NIMMessage) {
var index = -1
for (i, model) in messageObjects.enumerated() {
if model.msg?.serverID == message.serverID {
index = i
break
}
}
var indexs = [IndexPath]()
if index >= 0 {
// remove time tip
let last = index - 1
// if last >= 0, let timeModel = messages[last] as? MAIMessageTipsModel,
// timeModel.type == .time {
// messageObjects.removeSubrange(last ... index)
// indexs.append(IndexPath(row: last, section: 0))
// indexs.append(IndexPath(row: index, section: 0))
// } else {
messageObjects.remove(at: index)
indexs.append(IndexPath(row: index, section: 0))
// }
}
delegate?.onDeleteMessage(message, atIndexs: indexs)
}
private func getUserInfo(_ userId: String, _ completion: @escaping (NIMUser?, NSError?) -> Void) {
if let user = userInfo[userId] {
completion(user, nil)
}
if let user = getUserInfo(userId: userId) {
userInfo[userId] = user
completion(user, nil)
}
}
// p2p >ID team: ID
private func getShowName(userId: String, teamId: String?) -> String {
let user = getUserInfo(userId: userId)
var fullName = userId
if let nickName = user?.userInfo?.nickName {
fullName = nickName
}
// model.avatar = user?.userInfo?.thumbAvatarUrl
if let tID = teamId, session.sessionType == .team {
// team
let teamMember = getTeamMember(userId: userId, teamId: tID)
if let teamNickname = teamMember?.nickname {
fullName = teamNickname
}
}
if let alias = user?.alias {
fullName = alias
}
return fullName
}
public func fetchMessageAttachment(_ message: NIMMessage,
_ completion: @escaping (Error?) -> Void) {
do {
try NIMSDK.shared().chatManager.fetchMessageAttachment(message)
} catch let error {
completion(error)
}
}
public func downLoad(_ urlString: String, _ filePath: String, _ progress: NIMHttpProgressBlock?,
_ completion: NIMDownloadCompleteBlock?) {
NIMSDK.shared().resourceManager.download(urlString, filepath: filePath, progress: progress, completion: completion)
}
public func getUrls() -> [String] {
var urls = [String]()
messageObjects.forEach { model in
if model.type == .image, let message = model.msg?.messageObject as? NIMImageObject {
if let url = message.url {
urls.append(url)
} else {
if let path = message.path, FileManager.default.fileExists(atPath: path) {
urls.append(path)
}
}
}
}
return urls
}
public func sendInputTypingState() {
if session.sessionType == .P2P {
setTypingCustom(1)
}
}
public func sendInputTypingEndState() {
if session.sessionType == .P2P {
setTypingCustom(0)
}
}
func setTypingCustom(_ typing: Int) {
let message = NIMMessage()
if message.setting == nil {
message.setting = NIMMessageSetting()
}
message.setting?.apnsEnabled = false
message.setting?.shouldBeCounted = false
let noti =
NIMCustomSystemNotification(content: getJSONStringFromDictionary(["typing": typing]))
NIMSDK.shared().systemNotificationManager.sendCustomNotification(noti, to: session)
}
public func getHandSetEnable() -> Bool {
return false
// return repo.getHandsetMode()
}
public func getMessageRead() -> Bool {
return NIMSDK.shared().conversationManager.allUnreadCount() > 0
}
// MARK: NIMConversationManagerDelegate
private func getJSONStringFromDictionary(_ dictionary: [String: Any]) -> String {
if !JSONSerialization.isValidJSONObject(dictionary) {
print("not parse to json string")
return ""
}
if let data = try? JSONSerialization.data(withJSONObject: dictionary, options: []),
let JSONString = String(data: data, encoding: .utf8) {
return JSONString
}
return ""
}
private func getDictionaryFromJSONString(_ jsonString: String) -> NSDictionary? {
if let jsonData = jsonString.data(using: .utf8),
let dict = try? JSONSerialization.jsonObject(
with: jsonData,
options: .mutableContainers
) as? NSDictionary {
return dict
}
return nil
}
deinit {
print("deinit")
}
}
extension ChatViewModel: NIMChatManagerDelegate {
// MARK: NIMChatManagerDelegate
public func send(_ message: NIMMessage, didCompleteWithError error: Error?) {
for (i, msg) in messageObjects.enumerated() {
if message.messageId == msg.msg?.messageId {
messageObjects[i].msg = message
break
}
}
delegate?.send(message, didCompleteWithError: error)
}
//
public func onRecvMessages(_ messages: [NIMMessage]) {
for msg in messages {
if msg.session?.sessionId == session.sessionId {
if let model = modelTransformMessage(message: msg) {
newMsg = msg
addTimeMessage(msg)
self.messageObjects.append(model)
}
}
}
delegate?.onRecvMessages(messages)
}
public func willSend(_ message: NIMMessage) {
if message.session?.sessionId != session.sessionId {
return
}
guard let model = modelTransformMessage(message: message) else { return }
if newMsg == nil {
newMsg = message
}
var isResend = false
for (i, msg) in messageObjects.enumerated() {
if message.messageId == msg.msg?.messageId {
messageObjects[i].msg = message
isResend = true
break
}
}
if !isResend {
addTimeMessage(message)
messageObjects.append(model)
}
delegate?.didAppend(message)
}
public func onReceive(_ notification: NIMCustomSystemNotification) {
}
public func send(_ message: NIMMessage, progress: Float) {
delegate?.send(message, progress: progress)
}
}

View File

@@ -0,0 +1,78 @@
//
// ChatBaseCell.swift
// yinmeng-ios
//
// Created by MaiMang on 2024/2/27.
//
import UIKit
protocol ChatBaseCellProtocol: NSObjectProtocol {
func cell(_ cell: ChatBaseCell, didTapAvatarAt model: ChatBaseObject)
}
class ChatBaseCell: UITableViewCell {
weak var delegate: ChatBaseCellProtocol?
var model:ChatBaseObject? {
didSet {
guard let _ = model else {return}
layoutMessageCell()
}
}
///
open func layoutMessageCell() { }
///
open func activityStartAnimating() {
guard let sendType = model?.type, sendType.rawValue == 0 else {
return
}
guard let sendDate = model?.msg?.timestamp as? Int else {
return
}
let nowDate = Date.getNowTimeStamp()
if ((nowDate - sendDate) <= 1) {
self.activityIndicatorView.isHidden = false
self.activityIndicatorView.startAnimating()
DispatchQueue.main.asyncAfter(deadline: .now() + 1.25) {
self.activityIndicatorView.startAnimating()
self.activityIndicatorView.isHidden = true
}
}
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
backgroundColor = .clear
contentView.addSubview(avatarImgView)
contentView.addSubview(bubbleView)
contentView.addSubview(activityIndicatorView)
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
lazy var avatarImgView: UIImageView = {
let imageView = UIImageView()
imageView.isUserInteractionEnabled = true
imageView.layer.masksToBounds = true
imageView.contentMode = .scaleAspectFill
return imageView
}()
lazy var bubbleView: UIImageView = {
let imageView = UIImageView()
return imageView
}()
lazy var activityIndicatorView: UIActivityIndicatorView = {
let activityView = UIActivityIndicatorView(style: UIActivityIndicatorView.Style.medium)
activityView.backgroundColor = .clear
activityView.isHidden = true
return activityView
}()
}

View File

@@ -0,0 +1,117 @@
//
// ChatTextCell.swift
// yinmeng-ios
//
// Created by MaiMang on 2024/2/27.
//
import UIKit
import SnapKit
class ChatTextCell: ChatBaseCell {
private lazy var textLb: UILabel = {
let label = UILabel()
label.translatesAutoresizingMaskIntoConstraints = false
label.isEnabled = false
label.numberOfLines = 0
return label
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
}
func initSubview() {
bubbleView.addSubview(textLb)
avatarImgView.snp.remakeConstraints { (make) in
make.size.equalTo(ChatUIConfig.layout.avatarSize)
make.left.equalToSuperview().offset(10)
make.top.equalTo(contentView).offset(10)
}
bubbleView.snp.remakeConstraints { (make) in
make.top.equalTo(contentView.snp.top).offset(2)
make.bottom.equalTo(textLb.snp.bottom).offset(2)
make.left.equalTo(avatarImgView.snp.right)
make.width.equalTo(ChatUIConfig.layout.contentMaxWidth)
make.height.equalTo(textLb).offset(26)
}
textLb.snp.remakeConstraints { (make) in
make.top.equalTo(bubbleView).offset(ChatUIConfig.layout.textInsets.top);
make.left.equalTo(bubbleView).offset(ChatUIConfig.layout.textInsets.left);
make.right.equalTo(bubbleView).offset(-ChatUIConfig.layout.textInsets.right);
}
activityIndicatorView.snp.remakeConstraints { (make) in
make.centerY.equalTo(bubbleView)
make.centerX.equalToSuperview()
make.width.height.equalTo(30)
}
bubbleView.setContentHuggingPriority(.required, for: .horizontal)
}
override func layoutMessageCell() {
super.layoutMessageCell()
if let textModel = model as? ChatTextObject {
self.textLb.attributedText = textModel.attribute
setupCellLayout()
}
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
extension ChatTextCell {
func setupCellLayout() {
guard let model = model else {return}
if model.msg?.isOutgoingMsg == true { //
avatarImgView.snp.remakeConstraints { (make) in
make.size.equalTo(ChatUIConfig.layout.avatarSize)
make.right.equalToSuperview().offset(-10)
make.top.equalToSuperview().offset(ChatUIConfig.layout.cellContentInsets.top)
}
bubbleView.snp.makeConstraints { make in
make.size.equalTo(model.contentSize)
make.top.equalTo(avatarImgView)
make.right.equalTo(avatarImgView.snp.left).offset(-10)
}
activityIndicatorView.snp.remakeConstraints { (make) in
make.centerY.equalTo(bubbleView)
make.right.equalTo(bubbleView.snp.left)
make.width.height.equalTo(30)
}
textLb.snp.makeConstraints { make in
make.edges.equalTo(ChatUIConfig.layout.textInsets)
}
// start
activityStartAnimating()
}else {
avatarImgView.snp.remakeConstraints { (make) in
make.size.equalTo(ChatUIConfig.layout.avatarSize)
make.left.equalToSuperview().offset(10)
make.top.equalToSuperview().offset(ChatUIConfig.layout.cellContentInsets.top)
}
bubbleView.snp.makeConstraints { make in
make.size.equalTo(model.contentSize)
make.top.equalTo(avatarImgView)
make.left.equalTo(avatarImgView.snp.right).offset(10)
}
textLb.snp.makeConstraints { make in
make.edges.equalTo(ChatUIConfig.layout.textInsets)
}
}
}
}