Przeglądaj źródła

feat: 删除 IMSDK 非必要文件

陈文艺 3 miesięcy temu
rodzic
commit
d7cba0fd3d

+ 2 - 8
Lanu.xcodeproj/project.pbxproj

@@ -224,6 +224,8 @@
 		};
 		FBB67E232EC48B440070E686 /* ThirdParty */ = {
 			isa = PBXFileSystemSynchronizedRootGroup;
+			exceptions = (
+			);
 			path = ThirdParty;
 			sourceTree = "<group>";
 		};
@@ -374,14 +376,10 @@
 			inputFileListPaths = (
 				"${PODS_ROOT}/Target Support Files/Pods-Lanu/Pods-Lanu-resources-${CONFIGURATION}-input-files.xcfilelist",
 			);
-			inputPaths = (
-			);
 			name = "[CP] Copy Pods Resources";
 			outputFileListPaths = (
 				"${PODS_ROOT}/Target Support Files/Pods-Lanu/Pods-Lanu-resources-${CONFIGURATION}-output-files.xcfilelist",
 			);
-			outputPaths = (
-			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
 			shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Lanu/Pods-Lanu-resources.sh\"\n";
@@ -417,14 +415,10 @@
 			inputFileListPaths = (
 				"${PODS_ROOT}/Target Support Files/Pods-Lanu/Pods-Lanu-frameworks-${CONFIGURATION}-input-files.xcfilelist",
 			);
-			inputPaths = (
-			);
 			name = "[CP] Embed Pods Frameworks";
 			outputFileListPaths = (
 				"${PODS_ROOT}/Target Support Files/Pods-Lanu/Pods-Lanu-frameworks-${CONFIGURATION}-output-files.xcfilelist",
 			);
-			outputPaths = (
-			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
 			shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Lanu/Pods-Lanu-frameworks.sh\"\n";

+ 9 - 11
Lanu/Common/Views/Toast/LNToastView.swift

@@ -12,21 +12,19 @@ import SnapKit
 
 var allToast = NSHashTable<UIView>(options: .weakMemory)
 
-extension UIView {
-    static func showToast(_ toast: String?) {
-        guard let toast, !toast.isEmpty else { return }
-        
-        runOnMain {
-            let view = LNToastView()
-            view.show(toast)
-        }
-    }
+func showToast(_ toast: String?) {
+    guard let toast, !toast.isEmpty else { return }
     
-    static func cleanToasts() {
-        allToast.allObjects.forEach { $0.removeFromSuperview() }
+    runOnMain {
+        let view = LNToastView()
+        view.show(toast)
     }
 }
 
+func cleanToasts() {
+    allToast.allObjects.forEach { $0.removeFromSuperview() }
+}
+
 class LNToastView: UIView {
     private let textLabel = UILabel()
     

+ 1 - 1
Lanu/Views/Game/Skill/LNSkillUserInfoView.swift

@@ -131,7 +131,7 @@ extension LNSkillUserInfoView {
             let pasteboard = UIPasteboard.general
             pasteboard.string = curDetail.userNo
             
-            UIView.showToast(.init(key: "ID 已复制到粘贴板"))
+            showToast(.init(key: "ID 已复制到粘贴板"))
         }), for: .touchUpInside)
         idView.addSubview(copyButton)
         copyButton.snp.makeConstraints { make in

+ 1 - 1
Lanu/Views/Profile/Post/LNPostSkillSelectPanel.swift

@@ -135,7 +135,7 @@ extension LNPostSkillSelectPanel {
                 checkIc.image = .init(named: "ic_uncheck")
             } else {
                 if maxSelection == curSelecteds.count {
-                    UIView.showToast(.init(key: "最多选择%d个", maxSelection))
+                    showToast(.init(key: "最多选择%d个", maxSelection))
                 } else {
                     curSelecteds.append(skill)
                     checkIc.image = .init(named: "ic_check")

+ 1 - 1
Lanu/Views/Profile/Profile/LNProfileScoreFloatingView.swift

@@ -119,7 +119,7 @@ extension LNProfileScoreFloatingView {
                 { [weak self] success in
                     guard let self else { return }
                     if success {
-                        UIView.showToast(.init(key: "谢谢你的评价!"))
+                        showToast(.init(key: "谢谢你的评价!"))
                         isHidden = true
                     }
                 }

+ 1 - 1
Lanu/Views/Profile/Profile/LNProfileUserInfoView.swift

@@ -100,7 +100,7 @@ extension LNProfileUserInfoView {
             let pasteboard = UIPasteboard.general
             pasteboard.string = curDetail.userNo
             
-            UIView.showToast(.init(key: "ID 已复制到粘贴板"))
+            showToast(.init(key: "ID 已复制到粘贴板"))
         }), for: .touchUpInside)
         idView.addSubview(copyButton)
         copyButton.snp.makeConstraints { make in

+ 0 - 1
ThirdParty/TUIKit/TIMCommon/CommonModel/TIMConfig.h

@@ -38,7 +38,6 @@ NS_ASSUME_NONNULL_BEGIN
 
 @property(nonatomic, assign) BOOL enableMessageBubble;
 
-+ (BOOL)isClassicEntrance;
 @end
 
 NS_ASSUME_NONNULL_END

+ 0 - 24
ThirdParty/TUIKit/TIMCommon/CommonModel/TIMConfig.m

@@ -53,28 +53,4 @@ typedef NS_OPTIONS(NSInteger, emojiFaceType) {
     return [service getChatPopDetailGroups];
 }
 
-+ (NSString *)getCurrentStyleSelectID {
-    NSString *styleID = [[NSUserDefaults standardUserDefaults] objectForKey:@"StyleSelectkey"];
-    if (IS_NOT_EMPTY_NSSTRING(styleID)) {
-        return styleID;
-    } else {
-        // First Init
-        NSString *initStyleID = kTUIKitFirstInitAppStyleID;
-        [[NSUserDefaults standardUserDefaults] setValue:initStyleID forKey:@"StyleSelectkey"];
-        [NSUserDefaults.standardUserDefaults synchronize];
-        return initStyleID;
-    }
-}
-
-+ (BOOL)isClassicEntrance {
-    NSString *styleID = [self.class getCurrentStyleSelectID];
-    if ([styleID isKindOfClass:NSString.class]) {
-        if (styleID.length > 0) {
-            if ([styleID isEqualToString:@"Classic"]) {
-                return YES;
-            }
-        }
-    }
-    return NO;
-}
 @end

+ 0 - 21
ThirdParty/TUIKit/TUICore/NSDictionary+TUISafe.h

@@ -1,21 +0,0 @@
-//
-//  NSDictionary+TUISafe.h
-//  lottie-ios
-//
-//  Created by kayev on 2021/8/9.
-//  Copyright © 2023 Tencent. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface NSDictionary (TUISafe)
-
-- (id)tui_objectForKey:(NSString *)aKey conformProtocol:(Protocol *)pro;
-
-- (id)tui_objectForKey:(NSString *)aKey asClass:(Class)cls;
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 35
ThirdParty/TUIKit/TUICore/NSDictionary+TUISafe.m

@@ -1,35 +0,0 @@
-//
-//  NSDictionary+TUISafe.m
-//  lottie-ios
-//
-//  Created by kayev on 2021/8/9.
-//  Copyright © 2023 Tencent. All rights reserved.
-//
-
-#import "NSDictionary+TUISafe.h"
-
-@implementation NSDictionary (TUISafe)
-
-- (id)tui_objectForKey:(NSString *)aKey conformProtocol:(Protocol *)pro {
-    NSParameterAssert(aKey);
-    NSParameterAssert(pro);
-
-    NSObject *value = [self objectForKey:aKey];
-    if (value && ![value conformsToProtocol:pro]) {
-        NSAssert(NO, @"value not conforms this protocol");
-    }
-    return value;
-}
-
-- (id)tui_objectForKey:(NSString *)aKey asClass:(Class)cls {
-    NSParameterAssert(aKey);
-    NSParameterAssert(cls);
-
-    NSObject *value = [self objectForKey:aKey];
-    if (value && ![value isKindOfClass:cls]) {
-        NSAssert(NO, @"value's class is error");
-    }
-    return value;
-}
-
-@end

+ 0 - 81
ThirdParty/TUIKit/TUICore/NSString+TUIUtil.h

@@ -12,100 +12,19 @@ char tui_pinyinFirstLetter(unsigned short hanzi);
 
 @interface NSString (TUIUtil)
 
-/**
- * Hash the string using md5
- */
-+ (NSString *)md5String:(NSString *)str;
-- (NSString *)md5;
-
 /**
  * Get the first letter of Pinyin
  */
 - (NSString *)firstPinYin;
 
-- (NSString *)safePathString;
-
 + (BOOL)isEmpty:(NSString *)string;
 
-/**
- * compare two version
- *
- * @param sourVersion *.*.*.*
- * @param desVersion *.*.*.*
- * @returns No,sourVersion is less than desVersion; YES, the statue is opposed
- */
-+ (BOOL)compareVerison:(NSString *)sourVersion withDes:(NSString *)desVersion;
-
-/**
- * Whether the current string contains only whitespace and newlines
- */
-- (BOOL)isWhitespaceAndNewlines;
-
 /**
  * Remove whitespace before and after a string, excluding newlines
  */
 - (NSString *)trim;
 
-/**
- * Remove all whitespace from a string
- */
-- (NSString *)removeWhiteSpace;
-- (NSString *)removeNewLine;
-
-/**
- * The string with URL-Encoding
- */
-- (NSString *)stringByUrlEncoding;
-
-/**
- * Convert the first letter of a string to uppercase
- */
-- (NSString *)capitalize;
-
-/**
- * Determines whether a string starts with the given string, ignoring case
- */
-- (BOOL)startsWith:(NSString *)str;
-- (BOOL)startsWith:(NSString *)str Options:(NSStringCompareOptions)compareOptions;
-
-/**
- * Determines whether a string ends with the given string, ignoring case
- */
-- (BOOL)endsWith:(NSString *)str;
-- (BOOL)endsWith:(NSString *)str Options:(NSStringCompareOptions)compareOptions;
-
-/**
- * Determines whether a string contains the given string, ignoring case
- */
 - (BOOL)tui_containsString:(NSString *)str;
 - (BOOL)tui_containsString:(NSString *)str Options:(NSStringCompareOptions)compareOptions;
 
-/**
- * Determines whether a string equals with the given string, ignoring case
- */
-- (BOOL)equalsString:(NSString *)str;
-
-- (NSString *)emjoiText;
-
-#pragma mark Hashing
-#if kSupportGTM64
-- (NSString *)base64Encoding;
-#endif
-
-- (NSString *)valueOfLabel:(NSString *)label;
-
-- (NSString *)substringAtRange:(NSRange)rang;
-
-- (NSUInteger)utf8Length;
-
-- (BOOL)isContainsEmoji;
-
-- (NSString *)cutBeyondTextInLength:(NSInteger)maxLenth;
-
-- (CGSize)textSizeIn:(CGSize)size font:(UIFont *)font;
-- (CGSize)textSizeIn:(CGSize)size font:(UIFont *)font breakMode:(NSLineBreakMode)breakMode;
-- (CGSize)textSizeIn:(CGSize)size font:(UIFont *)font breakMode:(NSLineBreakMode)breakMode align:(NSTextAlignment)alignment;
-
-- (CGFloat)widthFromFont:(UIFont *)font;
-
 @end

+ 0 - 355
ThirdParty/TUIKit/TUICore/NSString+TUIUtil.m

@@ -238,20 +238,6 @@ char tui_pinyinFirstLetter(unsigned short hanzi) {
 
 @implementation NSString (TUIUtil)
 
-+ (NSString *)md5String:(NSString *)str;
-{
-    const char *cStr = [str UTF8String];
-    unsigned char result[CC_MD5_DIGEST_LENGTH];
-    CC_MD5(cStr, (uint32_t)strlen(cStr), result);
-    return [NSString stringWithFormat:@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", result[0], result[1], result[2], result[3],
-                                      result[4], result[5], result[6], result[7], result[8], result[9], result[10], result[11], result[12], result[13],
-                                      result[14], result[15]];
-}
-
-- (NSString *)md5 {
-    return [NSString md5String:self];
-}
-
 - (NSString *)firstPinYin {
     if ([self length] == 0) {
         return [NSString stringWithFormat:@"%c", '['];
@@ -275,58 +261,10 @@ char tui_pinyinFirstLetter(unsigned short hanzi) {
     return string == nil || string.length == 0;
 }
 
-- (BOOL)isWhitespaceAndNewlines {
-    NSCharacterSet *whitespace = [NSCharacterSet whitespaceAndNewlineCharacterSet];
-    for (NSInteger i = 0; i < self.length; ++i) {
-        unichar c = [self characterAtIndex:i];
-        if (![whitespace characterIsMember:c]) {
-            return NO;
-        }
-    }
-    return YES;
-}
-
 - (NSString *)trim {
     return [self stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
 }
 
-- (NSString *)removeWhiteSpace {
-    return [[self componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceCharacterSet]] componentsJoinedByString:@""];
-}
-
-- (NSString *)removeNewLine {
-    return [[self componentsSeparatedByCharactersInSet:[NSCharacterSet newlineCharacterSet]] componentsJoinedByString:@""];
-}
-
-- (NSString *)stringByUrlEncoding {
-    NSString *url = (NSString *)CFBridgingRelease(
-        CFURLCreateStringByAddingPercentEscapes(NULL, (CFStringRef)self, NULL, (CFStringRef) @"!*'();:@&=+$,/?%#[]", kCFStringEncodingUTF8));
-
-    return url;
-}
-
-- (NSString *)capitalize {
-    if (self == nil || [self length] == 0) return self;
-    return [[self substringToIndex:1].uppercaseString stringByAppendingString:[self substringFromIndex:1]];
-}
-
-- (BOOL)startsWith:(NSString *)str {
-    return [self startsWith:str Options:NSCaseInsensitiveSearch];
-}
-
-- (BOOL)startsWith:(NSString *)str Options:(NSStringCompareOptions)compareOptions {
-    return (str != nil) && ([str length] > 0) && ([self length] >= [str length]) && ([self rangeOfString:str options:compareOptions].location == 0);
-}
-
-- (BOOL)endsWith:(NSString *)str {
-    return [self endsWith:str Options:NSCaseInsensitiveSearch];
-}
-
-- (BOOL)endsWith:(NSString *)str Options:(NSStringCompareOptions)compareOptions {
-    return (str != nil) && ([str length] > 0) && ([self length] >= [str length]) &&
-           ([self rangeOfString:str options:(compareOptions | NSBackwardsSearch)].location == ([self length] - [str length]));
-}
-
 - (BOOL)tui_containsString:(NSString *)str {
     return [self tui_containsString:str Options:NSCaseInsensitiveSearch];
 }
@@ -335,297 +273,4 @@ char tui_pinyinFirstLetter(unsigned short hanzi) {
     return (str != nil) && ([str length] > 0) && ([self length] >= [str length]) && ([self rangeOfString:str options:compareOptions].location != NSNotFound);
 }
 
-- (BOOL)equalsString:(NSString *)str {
-    return (str != nil) && ([self length] == [str length]) && ([self rangeOfString:str options:NSCaseInsensitiveSearch].location == 0);
-}
-
-#pragma mark XML Extensions
-+ (NSString *)encodeXMLCharactersIn:(NSString *)source {
-    if (![source isKindOfClass:[NSString class]] || !source) {
-        return @"";
-    }
-
-    NSString *result = [NSString stringWithString:source];
-
-    if ([result rangeOfString:@"&"].location != NSNotFound) {
-        result = [[result componentsSeparatedByString:@"&"] componentsJoinedByString:@"&amp;"];
-    }
-
-    if ([result rangeOfString:@"<"].location != NSNotFound) {
-        result = [[result componentsSeparatedByString:@"<"] componentsJoinedByString:@"&lt;"];
-    }
-
-    if ([result rangeOfString:@">"].location != NSNotFound) {
-        result = [[result componentsSeparatedByString:@">"] componentsJoinedByString:@"&gt;"];
-    }
-
-    if ([result rangeOfString:@"\""].location != NSNotFound) {
-        result = [[result componentsSeparatedByString:@"\""] componentsJoinedByString:@"&quot;"];
-    }
-
-    if ([result rangeOfString:@"'"].location != NSNotFound) {
-        result = [[result componentsSeparatedByString:@"'"] componentsJoinedByString:@"&apos;"];
-    }
-
-    return result;
-}
-
-+ (NSString *)decodeXMLCharactersIn:(NSString *)source {
-    if (![source isKindOfClass:[NSString class]] || !source) {
-        return @"";
-    }
-
-    NSString *result = [NSString stringWithString:source];
-
-    if ([result rangeOfString:@"&amp;"].location != NSNotFound) {
-        result = [[result componentsSeparatedByString:@"&amp;"] componentsJoinedByString:@"&"];
-    }
-
-    if ([result rangeOfString:@"&lt;"].location != NSNotFound) {
-        result = [[result componentsSeparatedByString:@"&lt;"] componentsJoinedByString:@"<"];
-    }
-
-    if ([result rangeOfString:@"&gt;"].location != NSNotFound) {
-        result = [[result componentsSeparatedByString:@"&gt;"] componentsJoinedByString:@">"];
-    }
-
-    if ([result rangeOfString:@"&quot;"].location != NSNotFound) {
-        result = [[result componentsSeparatedByString:@"&quot;"] componentsJoinedByString:@"\""];
-    }
-
-    if ([result rangeOfString:@"&apos;"].location != NSNotFound) {
-        result = [[result componentsSeparatedByString:@"&apos;"] componentsJoinedByString:@"'"];
-    }
-
-    if ([result rangeOfString:@"&nbsp;"].location != NSNotFound) {
-        result = [[result componentsSeparatedByString:@"&nbsp;"] componentsJoinedByString:@" "];
-    }
-
-    if ([result rangeOfString:@"&#8220;"].location != NSNotFound) {
-        result = [[result componentsSeparatedByString:@"&#8220;"] componentsJoinedByString:@"\""];
-    }
-
-    if ([result rangeOfString:@"&#8221;"].location != NSNotFound) {
-        result = [[result componentsSeparatedByString:@"&#8221;"] componentsJoinedByString:@"\""];
-    }
-
-    if ([result rangeOfString:@"&#039;"].location != NSNotFound) {
-        result = [[result componentsSeparatedByString:@"&#039;"] componentsJoinedByString:@"'"];
-    }
-    return result;
-}
-
-/**
- compare two version
- @param sourVersion *.*.*.*
- @param desVersion *.*.*.*
- @returns No,sourVersion is less than desVersion; YES, the statue is opposed
- */
-+ (BOOL)compareVerison:(NSString *)sourVersion withDes:(NSString *)desVersion {
-    NSArray *sourArr = [sourVersion componentsSeparatedByString:@"."];
-    NSArray *desArr = [desVersion componentsSeparatedByString:@"."];
-    int sourInt, desInt;
-    NSMutableString *sourStr = [[NSMutableString alloc] init];
-    NSMutableString *desStr = [[NSMutableString alloc] init];
-
-    if ([sourArr count] < [desArr count]) {
-        return YES;
-    } else {
-    }
-
-    for (int i = 0; i < [sourArr count]; i++) {
-        [sourStr appendFormat:@"%@", [sourArr objectAtIndex:i]];
-        [desStr appendFormat:@"%@", [desArr objectAtIndex:i]];
-    }
-    sourInt = [sourStr intValue];
-    desInt = [desStr intValue];
-    if (sourInt < desInt) {
-        return YES;
-    } else {
-        return NO;
-    }
-    return NO;
-}
-#if kSupportGTM64
-#pragma mark - hashing
-- (NSString *)base64Encoding {
-    NSData *stringData = [self dataUsingEncoding:NSUTF8StringEncoding];
-    NSString *encodedString = [GTMBase64 stringByEncodingData:stringData];
-
-    return encodedString;
-}
-#endif
-
-#if kSupportNSDataCommon
-///////////////////////////////////////////////////////////////////////////////////////////////////
-/**
- * Calculate the md5 hash using CC_MD5.
- *
- * @returns md5 hash of this string.
- */
-- (NSString *)md5Hash {
-    return [[self dataUsingEncoding:NSUTF8StringEncoding] md5Hash];
-}
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-/**
- * Calculate the SHA1 hash using CommonCrypto CC_SHA1.
- *
- * @returns SHA1 hash of this string.
- */
-- (NSString *)sha1Hash {
-    return [[self dataUsingEncoding:NSUTF8StringEncoding] sha1Hash];
-}
-#endif
-
-- (NSString *)valueOfLabel:(NSString *)label {
-    NSError *error = nil;
-
-    NSString *reg = [NSString stringWithFormat:@"(?<=%@\\>).*(?=</%@)", label, label];
-    NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:reg options:0 error:&error];
-
-    if (regex != nil) {
-        NSTextCheckingResult *firstMatch = [regex firstMatchInString:self options:0 range:NSMakeRange(0, [self length])];
-
-        if (firstMatch) {
-            NSRange resultRange = [firstMatch rangeAtIndex:0];
-            NSString *result = [self substringAtRange:resultRange];
-            return result;
-        }
-    }
-
-    return nil;
-}
-
-- (NSString *)substringAtRange:(NSRange)rang {
-    if ([NSString isEmpty:self]) {
-        return nil;
-    }
-
-    if (rang.location > self.length) {
-        return nil;
-    }
-
-    if (rang.location + rang.length > self.length) {
-        return nil;
-    }
-
-    return [self substringWithRange:rang];
-}
-
-- (NSString *)emjoiText {
-    if (self.length) {
-        NSData *data = [self dataUsingEncoding:NSNonLossyASCIIStringEncoding];
-        NSString *valueUnicode = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
-        NSData *dataa = [valueUnicode dataUsingEncoding:NSUTF8StringEncoding];
-        NSString *valueEmoj = [[NSString alloc] initWithData:dataa encoding:NSNonLossyASCIIStringEncoding];
-        return valueEmoj;
-    } else {
-        return self;
-    }
-}
-
-- (NSUInteger)utf8Length {
-    size_t length = strlen([self UTF8String]);
-    return length;
-}
-
-- (BOOL)isContainsEmoji;
-{
-    __block BOOL returnValue = NO;
-
-    [self enumerateSubstringsInRange:NSMakeRange(0, [self length])
-                             options:NSStringEnumerationByComposedCharacterSequences
-                          usingBlock:^(NSString *substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop) {
-                            const unichar hs = [substring characterAtIndex:0];
-                            if (0xd800 <= hs && hs <= 0xdbff) {
-                                if (substring.length > 1) {
-                                    const unichar ls = [substring characterAtIndex:1];
-                                    const int uc = ((hs - 0xd800) * 0x400) + (ls - 0xdc00) + 0x10000;
-                                    if (0x1d000 <= uc && uc <= 0x1f77f) {
-                                        returnValue = YES;
-                                    }
-                                }
-                            } else if (substring.length > 1) {
-                                const unichar ls = [substring characterAtIndex:1];
-                                if (ls == 0x20e3) {
-                                    returnValue = YES;
-                                }
-                            } else {
-                                if (0x2100 <= hs && hs <= 0x27ff) {
-                                    returnValue = YES;
-                                } else if (0x2B05 <= hs && hs <= 0x2b07) {
-                                    returnValue = YES;
-                                } else if (0x2934 <= hs && hs <= 0x2935) {
-                                    returnValue = YES;
-                                } else if (0x3297 <= hs && hs <= 0x3299) {
-                                    returnValue = YES;
-                                } else if (hs == 0xa9 || hs == 0xae || hs == 0x303d || hs == 0x3030 || hs == 0x2b55 || hs == 0x2b1c || hs == 0x2b1b ||
-                                           hs == 0x2b50) {
-                                    returnValue = YES;
-                                }
-                            }
-
-                            *stop = returnValue;
-                          }];
-
-    return returnValue;
-}
-
-- (NSString *)cutBeyondTextInLength:(NSInteger)maxLenth {
-    size_t length = strlen([self UTF8String]);
-    if (length > maxLenth) {
-        NSString *text = [self substringToIndex:self.length - 1];
-        return [text cutBeyondTextInLength:maxLenth];
-    } else {
-        return self;
-    }
-}
-
-- (CGSize)textSizeIn:(CGSize)size font:(UIFont *)font {
-    return [self textSizeIn:size font:font breakMode:NSLineBreakByWordWrapping];
-}
-
-- (CGSize)textSizeIn:(CGSize)size font:(UIFont *)afont breakMode:(NSLineBreakMode)breakMode {
-    return [self textSizeIn:size font:afont breakMode:NSLineBreakByWordWrapping align:NSTextAlignmentLeft];
-}
-
-- (CGSize)textSizeIn:(CGSize)size font:(UIFont *)afont breakMode:(NSLineBreakMode)abreakMode align:(NSTextAlignment)alignment {
-    NSLineBreakMode breakMode = abreakMode;
-    UIFont *font = afont ? afont : [UIFont systemFontOfSize:14];
-
-    CGSize contentSize = CGSizeZero;
-
-    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
-    paragraphStyle.lineBreakMode = breakMode;
-    paragraphStyle.alignment = alignment;
-
-    NSDictionary *attributes = @{NSFontAttributeName : font, NSParagraphStyleAttributeName : paragraphStyle};
-    contentSize = [self boundingRectWithSize:size
-                                     options:(NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading)
-                                  attributes:attributes
-                                     context:nil]
-                      .size;
-    contentSize = CGSizeMake((int)contentSize.width + 1, (int)contentSize.height + 1);
-    return contentSize;
-}
-
-- (NSString *)safePathString {
-    NSString *homePrefix = [NSHomeDirectory() stringByDeletingLastPathComponent];
-    if ([self hasPrefix:homePrefix]) {
-        return [NSHomeDirectory() stringByAppendingString:[self substringFromIndex:[NSHomeDirectory() length]]];
-    }
-    return self;
-}
-
-- (CGFloat)widthFromFont:(UIFont *)font {
-    if (self.length == 0) {
-        return 0;
-    }
-    return [self boundingRectWithSize:CGSizeMake(0, font.lineHeight)
-                              options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading | NSStringDrawingUsesDeviceMetrics
-                           attributes:@{NSFontAttributeName : font}
-                              context:nil]
-        .size.width;
-}
 @end

+ 0 - 105
ThirdParty/TUIKit/TUICore/TUICommonModel.h

@@ -24,71 +24,6 @@ NS_ASSUME_NONNULL_BEGIN
 - (NSString *)showAllowType;
 @end
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-//                            TUIUserModel
-//
-/////////////////////////////////////////////////////////////////////////////////
-@interface TUIUserModel : NSObject <NSCopying>
-@property(nonatomic, copy) NSString *userId;
-@property(nonatomic, copy) NSString *name;
-@property(nonatomic, copy) NSString *avatar;
-@end
-
-/////////////////////////////////////////////////////////////////////////////////
-//
-//                           TUIScrollView
-//
-/////////////////////////////////////////////////////////////////////////////////
-
-@interface TUIScrollView : UIScrollView
-@property(strong, nonatomic) UIImageView *imageView;
-@end
-
-/////////////////////////////////////////////////////////////////////////////////
-//
-//                          TUIGroupAvatar
-//
-/////////////////////////////////////////////////////////////////////////////////
-@interface TUIGroupAvatar : NSObject
-
-/**
- *
- * Obtain the latest group avatar in real time according to the group id. After the avatar is updated, it will be cached locally. This interface will request
- * the network This interface will not use the cache. If you need to read the cache, please use getCacheGroupAvatar:imageCallback or getCacheAvatarForGroup:
- * number:
- */
-+ (void)fetchGroupAvatars:(NSString *)groupID placeholder:(UIImage *)placeholder callback:(void (^)(BOOL success, UIImage *image, NSString *groupID))callback;
-
-/**
- * Create a group avatar based on the given url array
- */
-+ (void)createGroupAvatar:(NSArray *)group finished:(void (^)(UIImage *groupAvatar))finished;
-
-/**
- * Cache avatars based on group ID and number of group members
- */
-+ (void)cacheGroupAvatar:(UIImage *)avatar number:(UInt32)memberNum groupID:(NSString *)groupID;
-
-/**
- * Get the cached avatar asynchronously, this interface will request the interface to get the current number of group members, and return the avatar
- * corresponding to the local cache
- */
-+ (void)getCacheGroupAvatar:(NSString *)groupID callback:(void (^)(UIImage * _Nullable, NSString *groupID))imageCallBack;
-
-/**
- * Get the cached avatar synchronously, this interface does not request the network
- */
-+ (UIImage * _Nullable)getCacheAvatarForGroup:(NSString *)groupId number:(UInt32)memberNum;
-
-/**
- * 
- * Clear the avatar cache of the specified group
- */
-+ (void)asyncClearCacheAvatarForGroup:(NSString *)groupID;
-
-@end
-
 /////////////////////////////////////////////////////////////////////////////////
 //
 //                          TUIImageCache
@@ -104,46 +39,6 @@ NS_ASSUME_NONNULL_BEGIN
 - (void)addFaceToCache:(NSString *)path;
 - (UIImage *)getFaceFromCache:(NSString *)path;
 
-@end
-/////////////////////////////////////////////////////////////////////////////////
-//
-//                          TUINavigationController
-//
-/////////////////////////////////////////////////////////////////////////////////
-@class TUINavigationController;
-@protocol TUINavigationControllerDelegate <NSObject>
-@optional
-- (void)navigationControllerDidClickLeftButton:(TUINavigationController *)controller;
-- (void)navigationControllerDidSideSlideReturn:(TUINavigationController *)controller fromViewController:(UIViewController *)fromViewController;
-@end
-
-@interface TUINavigationController : UINavigationController <UINavigationControllerDelegate, UIGestureRecognizerDelegate>
-
-@property(nonatomic, weak) UIViewController *currentShowVC;
-@property(nonatomic, weak) id<TUINavigationControllerDelegate> uiNaviDelegate;
-@property(nonatomic, strong) UIImage *navigationItemBackArrowImage;
-@property(nonatomic, strong) UIColor *navigationBackColor;
-@end
-
-@interface UIAlertController (TUITheme)
-
-- (void)tuitheme_addAction:(UIAlertAction *)action;
-
-@end
-
-typedef void (^TUIValueCallbck)(NSDictionary *param);
-typedef void (^TUINonValueCallbck)(void);
-
-typedef NSString *TUIExtVauleType;
-
-@interface NSObject (TUIExtValue)
-
-@property(nonatomic, copy) TUIValueCallbck tui_valueCallback;
-
-@property(nonatomic, copy) TUINonValueCallbck tui_nonValueCallback;
-
-@property(nonatomic, strong) id tui_extValueObj;
-
 @end
 
 NS_ASSUME_NONNULL_END

+ 0 - 688
ThirdParty/TUIKit/TUICore/TUICommonModel.m

@@ -12,8 +12,6 @@
 #import "TUIDarkModel.h"
 #import "TUIGlobalization.h"
 #import "TUIThemeManager.h"
-#import "TUITool.h"
-#import "UIView+TUILayout.h"
 
 /////////////////////////////////////////////////////////////////////////////////
 //
@@ -52,458 +50,6 @@
 }
 @end
 
-/////////////////////////////////////////////////////////////////////////////////
-//
-//                             TUIUserModel
-//
-/////////////////////////////////////////////////////////////////////////////////
-@implementation TUIUserModel
-
-- (id)copyWithZone:(NSZone *)zone {
-    TUIUserModel *model = [[TUIUserModel alloc] init];
-    model.userId = self.userId;
-    model.name = self.name;
-    model.avatar = self.avatar;
-    return model;
-}
-
-@end
-
-/////////////////////////////////////////////////////////////////////////////////
-//
-//                          TUIScrollView
-//
-/////////////////////////////////////////////////////////////////////////////////
-
-static void *gScrollViewBoundsChangeNotificationContext = &gScrollViewBoundsChangeNotificationContext;
-
-@interface TUIScrollView ()
-
-@property(nonatomic, readonly) CGFloat imageAspectRatio;
-@property(nonatomic) CGRect initialImageFrame;
-@property(strong, nonatomic, readonly) UITapGestureRecognizer *tap;
-
-@end
-
-@implementation TUIScrollView
-
-@synthesize tap = _tap;
-
-#pragma mark - Tap to Zoom
-
-- (UITapGestureRecognizer *)tap {
-    if (_tap == nil) {
-        _tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapToZoom:)];
-        _tap.numberOfTapsRequired = 2;
-    }
-    return _tap;
-}
-
-- (void)tapToZoom:(UIGestureRecognizer *)gestureRecognizer {
-    if (self.zoomScale > self.minimumZoomScale) {
-        [self setZoomScale:self.minimumZoomScale animated:YES];
-    } else {
-        CGPoint tapLocation = [gestureRecognizer locationInView:self.imageView];
-        CGFloat zoomRectWidth = self.imageView.frame.size.width / self.maximumZoomScale;
-        CGFloat zoomRectHeight = self.imageView.frame.size.height / self.maximumZoomScale;
-        CGFloat zoomRectX = tapLocation.x - zoomRectWidth * 0.5;
-        CGFloat zoomRectY = tapLocation.y - zoomRectHeight * 0.5;
-        CGRect zoomRect = CGRectMake(zoomRectX, zoomRectY, zoomRectWidth, zoomRectHeight);
-        [self zoomToRect:zoomRect animated:YES];
-    }
-}
-
-#pragma mark - Private Methods
-
-- (void)configure {
-    self.showsVerticalScrollIndicator = NO;
-    self.showsHorizontalScrollIndicator = NO;
-    [self startObservingBoundsChange];
-}
-
-- (void)setImageView:(UIImageView *)imageView {
-    if (_imageView.superview == self) {
-        [_imageView removeGestureRecognizer:self.tap];
-        [_imageView removeFromSuperview];
-    }
-    if (imageView) {
-        _imageView = imageView;
-        _initialImageFrame = CGRectNull;
-        _imageView.userInteractionEnabled = YES;
-        [_imageView addGestureRecognizer:self.tap];
-        [self addSubview:imageView];
-    }
-}
-
-- (CGFloat)imageAspectRatio {
-    if (self.imageView.image) {
-        return self.imageView.image.size.width / self.imageView.image.size.height;
-    }
-    return 1;
-}
-
-- (CGSize)rectSizeForAspectRatio:(CGFloat)ratio thatFitsSize:(CGSize)size {
-    CGFloat containerWidth = size.width;
-    CGFloat containerHeight = size.height;
-    CGFloat resultWidth = 0;
-    CGFloat resultHeight = 0;
-
-    if ((ratio <= 0) || (containerHeight <= 0)) {
-        return size;
-    }
-
-    if (containerWidth / containerHeight >= ratio) {
-        resultHeight = containerHeight;
-        resultWidth = containerHeight * ratio;
-    } else {
-        resultWidth = containerWidth;
-        resultHeight = containerWidth / ratio;
-    }
-
-    return CGSizeMake(resultWidth, resultHeight);
-}
-
-- (void)scaleImageForScrollViewTransitionFromBounds:(CGRect)oldBounds toBounds:(CGRect)newBounds {
-    CGPoint oldContentOffset = CGPointMake(oldBounds.origin.x, oldBounds.origin.y);
-    CGSize oldSize = oldBounds.size;
-    CGSize newSize = newBounds.size;
-
-    CGSize containedImageSizeOld = [self rectSizeForAspectRatio:self.imageAspectRatio thatFitsSize:oldSize];
-
-    CGSize containedImageSizeNew = [self rectSizeForAspectRatio:self.imageAspectRatio thatFitsSize:newSize];
-
-    if (containedImageSizeOld.height <= 0) {
-        containedImageSizeOld = containedImageSizeNew;
-    }
-
-    CGFloat orientationRatio = (containedImageSizeNew.height / containedImageSizeOld.height);
-
-    CGAffineTransform t = CGAffineTransformMakeScale(orientationRatio, orientationRatio);
-
-    self.imageView.frame = CGRectApplyAffineTransform(self.imageView.frame, t);
-
-    self.contentSize = self.imageView.frame.size;
-
-    CGFloat xOffset = (oldContentOffset.x + oldSize.width * 0.5) * orientationRatio - newSize.width * 0.5;
-    CGFloat yOffset = (oldContentOffset.y + oldSize.height * 0.5) * orientationRatio - newSize.height * 0.5;
-
-    xOffset -= MAX(xOffset + newSize.width - self.contentSize.width, 0);
-    yOffset -= MAX(yOffset + newSize.height - self.contentSize.height, 0);
-    xOffset += MAX(-xOffset, 0);
-    yOffset += MAX(-yOffset, 0);
-
-    self.contentOffset = CGPointMake(xOffset, yOffset);
-}
-
-- (void)setupInitialImageFrame {
-    if (self.imageView.image && CGRectEqualToRect(self.initialImageFrame, CGRectNull)) {
-        CGSize imageViewSize = [self rectSizeForAspectRatio:self.imageAspectRatio thatFitsSize:self.bounds.size];
-        self.initialImageFrame = CGRectMake(0, 0, imageViewSize.width, imageViewSize.height);
-        self.imageView.frame = self.initialImageFrame;
-        self.contentSize = self.initialImageFrame.size;
-    }
-}
-
-#pragma mark - KVO
-
-- (void)startObservingBoundsChange {
-    [self addObserver:self
-           forKeyPath:@"bounds"
-              options:NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew
-              context:gScrollViewBoundsChangeNotificationContext];
-}
-
-- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSKeyValueChangeKey, id> *)change context:(void *)context {
-    if (context == gScrollViewBoundsChangeNotificationContext) {
-        CGRect oldRect = ((NSValue *)change[NSKeyValueChangeOldKey]).CGRectValue;
-        CGRect newRect = ((NSValue *)change[NSKeyValueChangeNewKey]).CGRectValue;
-        if (!CGSizeEqualToSize(oldRect.size, newRect.size)) {
-            [self scaleImageForScrollViewTransitionFromBounds:oldRect toBounds:newRect];
-        }
-    }
-}
-
-- (void)dealloc {
-    [self removeObserver:self forKeyPath:@"bounds"];
-}
-
-#pragma mark - UIScrollView
-
-- (void)setContentOffset:(CGPoint)contentOffset {
-    const CGSize contentSize = self.contentSize;
-    const CGSize scrollViewSize = self.bounds.size;
-
-    if (contentSize.width < scrollViewSize.width) {
-        contentOffset.x = -(scrollViewSize.width - contentSize.width) * 0.5;
-    }
-
-    if (contentSize.height < scrollViewSize.height) {
-        contentOffset.y = -(scrollViewSize.height - contentSize.height) * 0.5;
-    }
-
-    [super setContentOffset:contentOffset];
-}
-
-#pragma mark - UIView
-
-- (instancetype)initWithFrame:(CGRect)frame {
-    self = [super initWithFrame:frame];
-    if (self) {
-        [self configure];
-    }
-    return self;
-}
-
-- (instancetype)initWithCoder:(NSCoder *)aDecoder {
-    self = [super initWithCoder:aDecoder];
-    if (self) {
-        [self configure];
-    }
-    return self;
-}
-
-- (void)layoutSubviews {
-    [super layoutSubviews];
-    [self setupInitialImageFrame];
-}
-
-@end
-
-/////////////////////////////////////////////////////////////////////////////////
-//
-//                          TUIGroupAvatar
-//
-/////////////////////////////////////////////////////////////////////////////////
-#define groupAvatarWidth (48 * [[UIScreen mainScreen] scale])
-@implementation TUIGroupAvatar
-
-+ (void)createGroupAvatar:(NSArray *)group finished:(void (^)(UIImage *groupAvatar))finished {
-    dispatch_async(dispatch_get_global_queue(0, 0), ^{
-      NSInteger avatarCount = group.count > 9 ? 9 : group.count;
-      CGFloat width = groupAvatarWidth / 3 * 0.90;
-      CGFloat space3 = (groupAvatarWidth - width * 3) / 4;
-      CGFloat space2 = (groupAvatarWidth - width * 2 + space3) / 2;
-      CGFloat space1 = (groupAvatarWidth - width) / 2;
-      __block CGFloat y = avatarCount > 6 ? space3 : (avatarCount > 3 ? space2 : space1);
-      __block CGFloat x = avatarCount % 3 == 0 ? space3 : (avatarCount % 3 == 2 ? space2 : space1);
-      width = avatarCount > 4 ? width : (avatarCount > 1 ? (groupAvatarWidth - 3 * space3) / 2 : groupAvatarWidth);
-
-      if (avatarCount == 1) {
-          x = 0;
-          y = 0;
-      }
-      if (avatarCount == 2) {
-          x = space3;
-      } else if (avatarCount == 3) {
-          x = (groupAvatarWidth - width) / 2;
-          y = space3;
-      } else if (avatarCount == 4) {
-          x = space3;
-          y = space3;
-      }
-
-      dispatch_async(dispatch_get_main_queue(), ^{
-        UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, groupAvatarWidth, groupAvatarWidth)];
-        [view setBackgroundColor:[UIColor colorWithWhite:0.8 alpha:0.6]];
-        view.layer.cornerRadius = 6;
-        __block NSInteger count = 0;
-        for (NSInteger i = avatarCount - 1; i >= 0; i--) {
-            NSString *avatarUrl = [group objectAtIndex:i];
-
-            UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(x, y, width, width)];
-            [view addSubview:imageView];
-            [imageView sd_setImageWithURL:[NSURL URLWithString:avatarUrl]
-                         placeholderImage:DefaultAvatarImage
-                                completed:^(UIImage *_Nullable image, NSError *_Nullable error, SDImageCacheType cacheType, NSURL *_Nullable imageURL) {
-                                  count++;
-                                  if (count == avatarCount) {
-                                      UIGraphicsBeginImageContextWithOptions(view.frame.size, NO, 2.0);
-                                      [view.layer renderInContext:UIGraphicsGetCurrentContext()];
-                                      UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
-                                      UIGraphicsEndPDFContext();
-                                      CGImageRef imageRef = image.CGImage;
-                                      CGImageRef imageRefRect =
-                                          CGImageCreateWithImageInRect(imageRef, CGRectMake(0, 0, view.frame.size.width * 2, view.frame.size.height * 2));
-                                      UIImage *ansImage = [[UIImage alloc] initWithCGImage:imageRefRect];
-                                      CGImageRelease(imageRefRect);
-                                      dispatch_async(dispatch_get_main_queue(), ^{
-                                        if (finished) {
-                                            finished(ansImage);
-                                        }
-                                      });
-                                  }
-                                }];
-
-            if (avatarCount == 3) {
-                if (i == 2) {
-                    y = width + space3 * 2;
-                    x = space3;
-                } else {
-                    x += width + space3;
-                }
-            } else if (avatarCount == 4) {
-                if (i % 2 == 0) {
-                    y += width + space3;
-                    x = space3;
-                } else {
-                    x += width + space3;
-                }
-            } else {
-                if (i % 3 == 0) {
-                    y += (width + space3);
-                    x = space3;
-                } else {
-                    x += (width + space3);
-                }
-            }
-        }
-      });
-    });
-}
-
-+ (void)fetchGroupAvatars:(NSString *)groupID placeholder:(UIImage *)placeholder callback:(void (^)(BOOL success, UIImage *image, NSString *groupID))callback {
-    @tui_weakify(self);
-    [[V2TIMManager sharedInstance] getGroupMemberList:groupID
-        filter:V2TIM_GROUP_MEMBER_FILTER_ALL
-        nextSeq:0
-        succ:^(uint64_t nextSeq, NSArray<V2TIMGroupMemberFullInfo *> *memberList) {
-          @tui_strongify(self);
-          int i = 0;
-          NSMutableArray *groupMemberAvatars = [NSMutableArray arrayWithCapacity:1];
-          for (V2TIMGroupMemberFullInfo *member in memberList) {
-              if (member.faceURL.length > 0) {
-                  [groupMemberAvatars addObject:member.faceURL];
-              } else {
-                  [groupMemberAvatars addObject:@"http://placeholder"];
-              }
-              if (++i == 9) {
-                  break;
-              }
-          }
-
-          if (i <= 1) {
-              [self asyncClearCacheAvatarForGroup:groupID];
-              if (callback) {
-                  callback(NO, placeholder, groupID);
-              }
-              return;
-          }
-
-          NSString *key = [NSString stringWithFormat:@"TUIConversationLastGroupMember_%@", groupID];
-          [NSUserDefaults.standardUserDefaults setInteger:groupMemberAvatars.count forKey:key];
-          [NSUserDefaults.standardUserDefaults synchronize];
-
-          [TUIGroupAvatar createGroupAvatar:groupMemberAvatars
-                                   finished:^(UIImage *groupAvatar) {
-                                     @tui_strongify(self);
-                                     UIImage *avatar = groupAvatar;
-                                     [self cacheGroupAvatar:avatar number:(UInt32)groupMemberAvatars.count groupID:groupID];
-
-                                     if (callback) {
-                                         callback(YES, avatar, groupID);
-                                     }
-                                   }];
-        }
-        fail:^(int code, NSString *msg) {
-          if (callback) {
-              callback(NO, placeholder, groupID);
-          }
-        }];
-}
-
-+ (void)cacheGroupAvatar:(UIImage *)avatar number:(UInt32)memberNum groupID:(NSString *)groupID {
-    dispatch_async(dispatch_get_global_queue(0, 0), ^{
-      if (groupID == nil || groupID.length == 0) {
-          return;
-      }
-      NSString *tempPath = NSTemporaryDirectory();
-      NSString *filePath = [NSString stringWithFormat:@"%@groupAvatar_%@_%d.png", tempPath, groupID, memberNum];
-      NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
-
-      // check to delete old file
-      NSNumber *oldValue = [defaults objectForKey:groupID];
-      if (oldValue != nil) {
-          UInt32 oldMemberNum = [oldValue unsignedIntValue];
-          NSString *oldFilePath = [NSString stringWithFormat:@"%@groupAvatar_%@_%d.png", tempPath, groupID, oldMemberNum];
-          NSFileManager *fileManager = [NSFileManager defaultManager];
-          [fileManager removeItemAtPath:oldFilePath error:nil];
-      }
-
-      // Save image.
-      BOOL success = [UIImagePNGRepresentation(avatar) writeToFile:filePath atomically:YES];
-      if (success) {
-          [defaults setObject:@(memberNum) forKey:groupID];
-      }
-    });
-}
-
-+ (void)getCacheGroupAvatar:(NSString *)groupID callback:(void (^)(UIImage * _Nullable, NSString *groupID))imageCallBack {
-    if (groupID == nil || groupID.length == 0) {
-        if (imageCallBack) {
-            imageCallBack(nil, groupID);
-        }
-        return;
-    }
-    [[V2TIMManager sharedInstance] getGroupsInfo:@[ groupID ]
-        succ:^(NSArray<V2TIMGroupInfoResult *> *groupResultList) {
-          V2TIMGroupInfoResult *groupInfo = groupResultList.firstObject;
-          if (!groupInfo) {
-              imageCallBack(nil, groupID);
-              return;
-          }
-          UInt32 memberNum = groupInfo.info.memberCount;
-          memberNum = MAX(1, memberNum);
-          memberNum = MIN(memberNum, 9);
-          ;
-          NSString *tempPath = NSTemporaryDirectory();
-          NSString *filePath = [NSString stringWithFormat:@"%@groupAvatar_%@_%u.png", tempPath, groupID, (unsigned int)memberNum];
-          NSFileManager *fileManager = [NSFileManager defaultManager];
-          UIImage *avatar = nil;
-          BOOL success = [fileManager fileExistsAtPath:filePath];
-
-          if (success) {
-              avatar = [[UIImage alloc] initWithContentsOfFile:filePath];
-              NSString *key = [NSString stringWithFormat:@"TUIConversationLastGroupMember_%@", groupID];
-              [NSUserDefaults.standardUserDefaults setInteger:memberNum forKey:key];
-              [NSUserDefaults.standardUserDefaults synchronize];
-          }
-          imageCallBack(avatar, groupInfo.info.groupID);
-        }
-        fail:^(int code, NSString *msg) {
-          imageCallBack(nil, groupID);
-        }];
-}
-
-+ (UIImage * _Nullable)getCacheAvatarForGroup:(NSString *)groupId number:(UInt32)memberNum {
-    memberNum = MAX(1, memberNum);
-    memberNum = MIN(memberNum, 9);
-    ;
-    NSString *tempPath = NSTemporaryDirectory();
-    NSString *filePath = [NSString stringWithFormat:@"%@groupAvatar_%@_%u.png", tempPath, groupId, (unsigned int)memberNum];
-    NSFileManager *fileManager = [NSFileManager defaultManager];
-    UIImage *avatar = nil;
-    BOOL success = [fileManager fileExistsAtPath:filePath];
-
-    if (success) {
-        avatar = [[UIImage alloc] initWithContentsOfFile:filePath];
-    }
-    return avatar;
-}
-
-+ (void)asyncClearCacheAvatarForGroup:(NSString *)groupID {
-    dispatch_async(dispatch_get_global_queue(0, 0), ^{
-      NSString *tempPath = NSTemporaryDirectory();
-      for (int i = 0; i < 9; i++) {
-          NSString *filePath = [NSString stringWithFormat:@"%@groupAvatar_%@_%d.png", tempPath, groupID, (i + 1)];
-          if ([NSFileManager.defaultManager fileExistsAtPath:filePath]) {
-              [NSFileManager.defaultManager removeItemAtPath:filePath error:nil];
-          }
-      }
-    });
-}
-
-@end
-
 /////////////////////////////////////////////////////////////////////////////////
 //
 //                          TUIImageCache
@@ -535,17 +81,6 @@ static void *gScrollViewBoundsChangeNotificationContext = &gScrollViewBoundsChan
     return self;
 }
 
-- (void)addResourceToCache:(NSString *)path {
-    __weak typeof(self) ws = self;
-    [TUITool asyncDecodeImage:path
-                     complete:^(NSString *key, UIImage *image) {
-                       __strong __typeof(ws) strongSelf = ws;
-                       if (key && image) {
-                           [strongSelf.resourceCache setValue:image forKey:key];
-                       }
-                     }];
-}
-
 - (UIImage * _Nullable)getResourceFromCache:(NSString *)path {
     if (path.length == 0) {
         return nil;
@@ -557,17 +92,6 @@ static void *gScrollViewBoundsChangeNotificationContext = &gScrollViewBoundsChan
     return image;
 }
 
-- (void)addFaceToCache:(NSString *)path {
-    __weak typeof(self) ws = self;
-    [TUITool asyncDecodeImage:path
-                     complete:^(NSString *key, UIImage *image) {
-                       __strong __typeof(ws) strongSelf = ws;
-                       if (key && image) {
-                           [strongSelf.faceCache setValue:image forKey:key];
-                       }
-                     }];
-}
-
 - (UIImage *)getFaceFromCache:(NSString *)path {
     if (path.length == 0) {
         return nil;
@@ -593,215 +117,3 @@ static void *gScrollViewBoundsChangeNotificationContext = &gScrollViewBoundsChan
     return image;
 }
 @end
-@interface IUCoreView : UIView
-@property(nonatomic, strong) UIView *view;
-@end
-
-@implementation IUCoreView
-
-- (instancetype)init {
-    self = [super init];
-    if (self) {
-        self.view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 10, 10)];
-        [self addSubview:self.view];
-    }
-    return self;
-}
-@end
-
-@implementation TUINavigationController
-
-- (instancetype)initWithRootViewController:(UIViewController *)rootViewController {
-    if (self = [super initWithRootViewController:rootViewController]) {
-        self.interactivePopGestureRecognizer.delegate = self;
-        self.delegate = self;
-    }
-    return self;
-}
-
-- (void)viewWillAppear:(BOOL)animated {
-    [super viewWillAppear:animated];
-    if (@available(iOS 13.0, *)) {
-        UINavigationBarAppearance *appearance = [UINavigationBarAppearance new];
-        [appearance configureWithDefaultBackground];
-        appearance.shadowColor = nil;
-        appearance.backgroundEffect = nil;
-        appearance.backgroundColor = self.navigationBackColor;
-        self.navigationBar.backgroundColor = self.navigationBackColor;
-        self.navigationBar.barTintColor = self.navigationBackColor;
-        self.navigationBar.shadowImage = [UIImage new];
-        self.navigationBar.standardAppearance = appearance;
-        self.navigationBar.scrollEdgeAppearance = appearance;
-
-    } else {
-        self.navigationBar.backgroundColor = self.navigationBackColor;
-        self.navigationBar.barTintColor = self.navigationBackColor;
-        self.navigationBar.shadowImage = [UIImage new];
-    }
-}
-- (void)viewDidLoad {
-    [super viewDidLoad];
-    self.delegate = self;
-}
-
-- (void)back {
-    if ([self.uiNaviDelegate respondsToSelector:@selector(navigationControllerDidClickLeftButton:)]) {
-        [self.uiNaviDelegate navigationControllerDidClickLeftButton:self];
-    }
-    [self popViewControllerAnimated:YES];
-}
-
-- (UIColor *)navigationBackColor {
-    if (!_navigationBackColor) {
-        _navigationBackColor = [self tintColor];
-    }
-    return _navigationBackColor;
-}
-
-- (UIColor *)tintColor {
-    return TUICoreDynamicColor(@"head_bg_gradient_start_color", @"#EBF0F6");
-}
-
-
-- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
-    if (self.viewControllers.count != 0) {
-        viewController.hidesBottomBarWhenPushed = YES;
-        self.tabBarController.tabBar.hidden = YES;
-
-        UIImage *image = self.navigationItemBackArrowImage;
-        image = [image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
-        UIBarButtonItem *back = [[UIBarButtonItem alloc] initWithImage:image style:UIBarButtonItemStylePlain target:self action:@selector(back)];
-        viewController.navigationItem.leftBarButtonItems = @[ back ];
-        viewController.navigationItem.leftItemsSupplementBackButton = NO;
-    }
-    [super pushViewController:viewController animated:animated];
-}
-
-- (UIImage *)navigationItemBackArrowImage {
-    if (!_navigationItemBackArrowImage) {
-        _navigationItemBackArrowImage = TUICoreDynamicImage(@"nav_back_img", [UIImage imageNamed:TUICoreImagePath(@"nav_back")]);
-    }
-    return _navigationItemBackArrowImage;
-}
-
-// fix: https://developer.apple.com/forums/thread/660750
-- (NSArray<__kindof UIViewController *> *)popToRootViewControllerAnimated:(BOOL)animated {
-    if (@available(iOS 14.0, *)) {
-        for (UIViewController *vc in self.viewControllers) {
-            vc.hidesBottomBarWhenPushed = NO;
-            self.tabBarController.tabBar.hidden = NO;
-        }
-    }
-    return [super popToRootViewControllerAnimated:animated];
-}
-
-- (void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
-    if (navigationController.viewControllers.count == 1) {
-        /**
-         * If the number of view controllers in the stack is 1, it means only the root controller, clear the currentShowVC, and disable the swipe gesture for
-         * the following method
-         */
-        self.currentShowVC = Nil;
-    } else {
-        /**
-         * Assign the pushed view controller to currentShowVC
-         */
-        self.currentShowVC = viewController;
-    }
-
-    if ([navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
-        if (self.viewControllers.count == 1) {
-            /**
-             * Forbid the sliding back of the home page
-             */
-            navigationController.interactivePopGestureRecognizer.enabled = NO;
-        } else {
-            navigationController.interactivePopGestureRecognizer.enabled = YES;
-        }
-    }
-}
-
-- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
-    /**
-     * Listen to the event returned by the side slide
-     */
-    __weak typeof(self) weakSelf = self;
-    if (@available(iOS 10.0, *)) {
-        [viewController.transitionCoordinator notifyWhenInteractionChangesUsingBlock:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
-          __strong typeof(weakSelf) strongSelf = weakSelf;
-          [strongSelf handleSideSlideReturnIfNeeded:context];
-        }];
-    } else {
-        [viewController.transitionCoordinator notifyWhenInteractionEndsUsingBlock:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
-          __strong typeof(weakSelf) strongSelf = weakSelf;
-          [strongSelf handleSideSlideReturnIfNeeded:context];
-        }];
-    }
-}
-
-- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer {
-    if (gestureRecognizer == self.interactivePopGestureRecognizer) {
-        if (self.currentShowVC == self.topViewController) {
-            /**
-             * If currentShowVC exists, it means that the number of controllers in the stack is greater than 1, allowing the side slide gesture to be activated
-             */
-            return YES;
-        }
-        return NO;
-    }
-    return YES;
-}
-
-- (void)handleSideSlideReturnIfNeeded:(id<UIViewControllerTransitionCoordinatorContext>)context {
-    if (context.isCancelled) {
-        return;
-    }
-    UIViewController *fromVc = [context viewControllerForKey:UITransitionContextFromViewControllerKey];
-    if ([self.uiNaviDelegate respondsToSelector:@selector(navigationControllerDidSideSlideReturn:fromViewController:)]) {
-        [self.uiNaviDelegate navigationControllerDidSideSlideReturn:self fromViewController:fromVc];
-    }
-}
-
-@end
-
-@implementation UIAlertController (TUITheme)
-
-- (void)tuitheme_addAction:(UIAlertAction *)action {
-    if (action.style == UIAlertActionStyleDefault || action.style == UIAlertActionStyleCancel) {
-        UIColor *tempColor = TUICoreDynamicColor(@"primary_theme_color", @"#147AFF");
-        [action setValue:tempColor forKey:@"_titleTextColor"];
-    }
-    [self addAction:action];
-}
-
-@end
-static const void *tui_valueCallbackKey = @"tui_valueCallbackKey";
-static const void *tui_nonValueCallbackKey = @"tui_nonValueCallbackKey";
-static const void *tui_extValueObjKey = @"tui_extValueObjKey";
-
-@implementation NSObject (TUIExtValue)
-
-- (void)setTui_valueCallback:(TUIValueCallbck)tui_valueCallback {
-    objc_setAssociatedObject(self, tui_valueCallbackKey, tui_valueCallback, OBJC_ASSOCIATION_COPY_NONATOMIC);
-}
-
-- (TUIValueCallbck)tui_valueCallback {
-    return objc_getAssociatedObject(self, tui_valueCallbackKey);
-}
-
-- (void)setTui_nonValueCallback:(TUINonValueCallbck)tui_nonValueCallback {
-    objc_setAssociatedObject(self, tui_nonValueCallbackKey, tui_nonValueCallback, OBJC_ASSOCIATION_COPY_NONATOMIC);
-}
-
-- (TUINonValueCallbck)tui_nonValueCallback {
-    return objc_getAssociatedObject(self, tui_nonValueCallbackKey);
-}
-
-- (void)setTui_extValueObj:(id)tui_extValueObj {
-    objc_setAssociatedObject(self, tui_extValueObjKey, tui_extValueObj, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
-}
-- (id)tui_extValueObj {
-    return objc_getAssociatedObject(self, tui_extValueObjKey);
-}
-
-@end

+ 0 - 4
ThirdParty/TUIKit/TUICore/TUIDefine.h

@@ -6,16 +6,12 @@
 #define THeader_h
 
 #import <SDWebImage/SDWebImage.h>
-#import "NSDictionary+TUISafe.h"
 #import "TUICommonModel.h"
 #import "TUIConfig.h"
 #import "TUIDarkModel.h"
 #import "TUIGlobalization.h"
 #import "TUIThemeManager.h"
-#import "TUITool.h"
 #import "UIColor+TUIHexColor.h"
-#import "UIView+TUILayout.h"
-#import "UIView+TUIToast.h"
 #import "NSString+TUIUtil.h"
 @import ImSDK_Plus;
 

+ 0 - 67
ThirdParty/TUIKit/TUICore/TUITool.h

@@ -1,67 +0,0 @@
-
-//  Created by Tencent on 2023/06/09.
-//  Copyright © 2023 Tencent. All rights reserved.
-
-#import <Foundation/Foundation.h>
-#import <UIKit/UIKit.h>
-#define IS_NOT_EMPTY_NSSTRING(__X__) (__X__ && [__X__ isKindOfClass:[NSString class]] && ![__X__ isEqualToString:@""])
-
-typedef void (^TAsyncImageComplete)(NSString *path, UIImage *image);
-
-@interface TUITool : NSObject
-// json & str & data
-+ (NSData *)dictionary2JsonData:(NSDictionary *)dict;
-+ (NSString *)dictionary2JsonStr:(NSDictionary *)dict;
-+ (NSDictionary *)jsonSring2Dictionary:(NSString *)jsonString;
-+ (NSDictionary *)jsonData2Dictionary:(NSData *)jsonData;
-
-// toast
-+ (void)makeToast:(NSString *)str;
-+ (void)makeToast:(NSString *)str duration:(NSTimeInterval)duration;
-+ (void)makeToast:(NSString *)str duration:(NSTimeInterval)duration position:(CGPoint)position;
-+ (void)makeToast:(NSString *)str duration:(NSTimeInterval)duration idposition:(id)position;
-+ (void)makeToastError:(NSInteger)error msg:(NSString *)msg;
-+ (void)hideToast;
-+ (void)makeToastActivity;
-+ (void)hideToastActivity;
-
-+ (void)dispatchMainAsync:(dispatch_block_t)block;
-
-// date
-+ (NSString *)convertDateToStr:(NSDate *)date;
-+ (NSString *)convertDateToHMStr:(NSDate *)date;
-
-// msg code convert
-+ (NSString *)convertIMError:(NSInteger)code msg:(NSString *)msg;
-+ (void)configIMErrorMap;
-
-+ (NSString *)genImageName:(NSString *)uuid;
-+ (NSString *)genImageExtenionName:(UIImage *)image;
-+ (NSString *)genSnapshotName:(NSString *)uuid;
-+ (NSString *)genVideoName:(NSString *)uuid;
-+ (NSString *)genFileName:(NSString *)uuid;
-+ (NSString *)genVoiceName:(NSString *)uuid withExtension:(NSString *)extent;
-+ (void)asyncDecodeImage:(NSString *)path complete:(TAsyncImageComplete)complete;
-
-+ (NSString *)deviceModel;
-+ (NSString *)deviceVersion;
-+ (NSString *)deviceName;
-
-+ (void)openLinkWithURL:(NSURL *)url;
-
-+ (void)showUnsupportAlertOfService:(NSString *)service onVC:(UIViewController *)vc;
-+ (void)postUnsupportNotificationOfService:(NSString *)service;
-+ (void)postUnsupportNotificationOfService:(NSString *)service serviceDesc:(NSString *)serviceDesc debugOnly:(BOOL)debugOnly;
-+ (void)addUnsupportNotificationInVC:(UIViewController *)vc;
-+ (void)addUnsupportNotificationInVC:(UIViewController *)vc debugOnly:(BOOL)debugOnly;
-
-+ (void)addValueAddedUnsupportNeedContactNotificationInVC:(UIViewController *)vc debugOnly:(BOOL)debugOnly;
-+ (void)addValueAddedUnsupportNeedPurchaseNotificationInVC:(UIViewController *)vc debugOnly:(BOOL)debugOnly;
-+ (void)postValueAddedUnsupportNeedContactNotification:(NSString *)service;
-+ (void)postValueAddedUnsupportNeedPurchaseNotification:(NSString *)service;
-
-+ (void)checkCommercialAbility:(long long)param succ:(void (^)(BOOL enabled))succ fail:(void (^)(int code, NSString *desc))fail;
-
-+ (UIWindow *)applicationKeywindow;
-
-@end

+ 0 - 1090
ThirdParty/TUIKit/TUICore/TUITool.m

@@ -1,1090 +0,0 @@
-//
-//  THelper.m
-//  TUIKit
-//
-//  Created by kennethmiao on 2018/11/1.
-//  Copyright © 2018 Tencent. All rights reserved.
-//
-
-#import <SDWebImage/SDImageCoderHelper.h>
-#import "TUILogin.h"
-#import "TUIGlobalization.h"
-#import "TUIWeakProxy.h"
-#import "TUIDefine.h"
-#import "UIView+TUIToast.h"
-
-@import ImSDK_Plus;
-
-@implementation TUITool
-
-static NSMutableDictionary * gIMErrorMsgMap = nil;
-
-+ (void)initialize {
-    [self setupIMErrorMap];
-}
-+ (void)configIMErrorMap {
-    [self.class setupIMErrorMap];
-}
-+ (void)setupIMErrorMap {
-    NSMutableDictionary *map = [NSMutableDictionary dictionary];
-    gIMErrorMsgMap = map;
-    
-    /////////////////////////////////////////////////////////////////////////////////
-    //
-    //                      (1)IM SDK
-    //
-    /////////////////////////////////////////////////////////////////////////////////
-
-    //General error code
-    [map setObject:TUIKitLocalizableString(TUIKitErrorInProcess) forKey:@(ERR_IN_PROGESS)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorInvalidParameters) forKey:@(ERR_INVALID_PARAMETERS)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorIOOperateFaild) forKey:@(ERR_IO_OPERATION_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorInvalidJson) forKey:@(ERR_INVALID_JSON)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorOutOfMemory) forKey:@(ERR_OUT_OF_MEMORY)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorParseResponseFaild) forKey:@(ERR_PARSE_RESPONSE_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSerializeReqFaild) forKey:@(ERR_SERIALIZE_REQ_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKNotInit) forKey:@(ERR_SDK_NOT_INITIALIZED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorLoadMsgFailed) forKey:@(ERR_LOADMSG_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorDatabaseOperateFailed) forKey:@(ERR_DATABASE_OPERATE_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorCrossThread) forKey:@(ERR_SDK_COMM_CROSS_THREAD)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorTinyIdEmpty) forKey:@(ERR_SDK_COMM_TINYID_EMPTY)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorInvalidIdentifier) forKey:@(ERR_SDK_COMM_INVALID_IDENTIFIER)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorFileNotFound) forKey:@(ERR_SDK_COMM_FILE_NOT_FOUND)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorFileTooLarge) forKey:@(ERR_SDK_COMM_FILE_TOO_LARGE)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorEmptyFile) forKey:@(ERR_SDK_COMM_FILE_SIZE_EMPTY)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorFileOpenFailed) forKey:@(ERR_SDK_COMM_FILE_OPEN_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorUnsupporInterface) forKey:@(ERR_SDK_INTERFACE_NOT_SUPPORT)];
-    
-    // Account
-    [map setObject:TUIKitLocalizableString(TUIKitErrorNotLogin) forKey:@(ERR_SDK_NOT_LOGGED_IN)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorNoPreviousLogin) forKey:@(ERR_NO_PREVIOUS_LOGIN)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorUserSigExpired) forKey:@(ERR_USER_SIG_EXPIRED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorLoginKickedOffByOther) forKey:@(ERR_LOGIN_KICKED_OFF_BY_OTHER)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorTLSSDKInit) forKey:@(ERR_SDK_ACCOUNT_TLS_INIT_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorTLSSDKUninit) forKey:@(ERR_SDK_ACCOUNT_TLS_NOT_INITIALIZED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorTLSSDKTRANSPackageFormat) forKey:@(ERR_SDK_ACCOUNT_TLS_TRANSPKG_ERROR)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorTLSDecrypt) forKey:@(ERR_SDK_ACCOUNT_TLS_DECRYPT_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorTLSSDKRequest) forKey:@(ERR_SDK_ACCOUNT_TLS_REQUEST_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorTLSSDKRequestTimeout) forKey:@(ERR_SDK_ACCOUNT_TLS_REQUEST_TIMEOUT)];
-    
-    // Message
-    [map setObject:TUIKitLocalizableString(TUIKitErrorInvalidConveration) forKey:@(ERR_INVALID_CONVERSATION)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorFileTransAuthFailed) forKey:@(ERR_FILE_TRANS_AUTH_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorFileTransNoServer) forKey:@(ERR_FILE_TRANS_NO_SERVER)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorFileTransUploadFailed) forKey:@(ERR_FILE_TRANS_UPLOAD_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorFileTransUploadFailedNotImage) forKey:@(ERR_IMAGE_UPLOAD_FAILED_NOTIMAGE)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorFileTransDownloadFailed) forKey:@(ERR_FILE_TRANS_DOWNLOAD_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorHTTPRequestFailed) forKey:@(ERR_HTTP_REQ_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorInvalidMsgElem) forKey:@(ERR_INVALID_MSG_ELEM)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorInvalidSDKObject) forKey:@(ERR_INVALID_SDK_OBJECT)];
-    [map setObject:TUIKitLocalizableString(TUIKitSDKMsgBodySizeLimit) forKey:@(ERR_SDK_MSG_BODY_SIZE_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKMsgKeyReqDifferRsp) forKey:@(ERR_SDK_MSG_KEY_REQ_DIFFER_RSP)];
-    
-    // Group
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKGroupInvalidID) forKey:@(ERR_SDK_GROUP_INVALID_ID)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKGroupInvalidName) forKey:@(ERR_SDK_GROUP_INVALID_NAME)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKGroupInvalidIntroduction) forKey:@(ERR_SDK_GROUP_INVALID_INTRODUCTION)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKGroupInvalidNotification) forKey:@(ERR_SDK_GROUP_INVALID_NOTIFICATION)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKGroupInvalidFaceURL) forKey:@(ERR_SDK_GROUP_INVALID_FACE_URL)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKGroupInvalidNameCard) forKey:@(ERR_SDK_GROUP_INVALID_NAME_CARD)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKGroupMemberCountLimit) forKey:@(ERR_SDK_GROUP_MEMBER_COUNT_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKGroupJoinPrivateGroupDeny) forKey:@(ERR_SDK_GROUP_JOIN_PRIVATE_GROUP_DENY)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKGroupInviteSuperDeny) forKey:@(ERR_SDK_GROUP_INVITE_SUPER_DENY)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKGroupInviteNoMember) forKey:@(ERR_SDK_GROUP_INVITE_NO_MEMBER)];
-    
-    // Relationship
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKFriendShipInvalidProfileKey) forKey:@(ERR_SDK_FRIENDSHIP_INVALID_PROFILE_KEY)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKFriendshipInvalidAddRemark) forKey:@(ERR_SDK_FRIENDSHIP_INVALID_ADD_REMARK)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKFriendshipInvalidAddWording) forKey:@(ERR_SDK_FRIENDSHIP_INVALID_ADD_WORDING)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKFriendshipInvalidAddSource) forKey:@(ERR_SDK_FRIENDSHIP_INVALID_ADD_SOURCE)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKFriendshipFriendGroupEmpty) forKey:@(ERR_SDK_FRIENDSHIP_FRIEND_GROUP_EMPTY)];
-    
-    // Network
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKNetEncodeFailed) forKey:@(ERR_SDK_NET_ENCODE_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKNetDecodeFailed) forKey:@(ERR_SDK_NET_DECODE_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKNetAuthInvalid) forKey:@(ERR_SDK_NET_AUTH_INVALID)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKNetCompressFailed) forKey:@(ERR_SDK_NET_COMPRESS_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKNetUncompressFaile) forKey:@(ERR_SDK_NET_UNCOMPRESS_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKNetFreqLimit) forKey:@(ERR_SDK_NET_FREQ_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKnetReqCountLimit) forKey:@(ERR_SDK_NET_REQ_COUNT_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKNetDisconnect) forKey:@(ERR_SDK_NET_DISCONNECT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKNetAllreadyConn) forKey:@(ERR_SDK_NET_ALLREADY_CONN)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKNetConnTimeout) forKey:@(ERR_SDK_NET_CONN_TIMEOUT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKNetConnRefuse) forKey:@(ERR_SDK_NET_CONN_REFUSE)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKNetNetUnreach) forKey:@(ERR_SDK_NET_NET_UNREACH)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKNetSocketNoBuff) forKey:@(ERR_SDK_NET_SOCKET_NO_BUFF)];
-    [map setObject:TUIKitLocalizableString(TUIKitERRORSDKNetResetByPeer) forKey:@(ERR_SDK_NET_RESET_BY_PEER)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKNetSOcketInvalid) forKey:@(ERR_SDK_NET_SOCKET_INVALID)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKNetHostGetAddressFailed) forKey:@(ERR_SDK_NET_HOST_GETADDRINFO_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKNetConnectReset) forKey:@(ERR_SDK_NET_CONNECT_RESET)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKNetWaitInQueueTimeout) forKey:@(ERR_SDK_NET_WAIT_INQUEUE_TIMEOUT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKNetWaitSendTimeout) forKey:@(ERR_SDK_NET_WAIT_SEND_TIMEOUT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKNetWaitAckTimeut) forKey:@(ERR_SDK_NET_WAIT_ACK_TIMEOUT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKWaitSendRemainingTimeout) forKey:@(ERR_SDK_NET_WAIT_SEND_REMAINING_TIMEOUT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKNetPKGSizeLimit)
-            forKey:@(ERR_SDK_NET_PKG_SIZE_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKNetWaitSendTimeoutNoNetwork) forKey:@(ERR_SDK_NET_WAIT_SEND_TIMEOUT_NO_NETWORK)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKNetWaitAckTimeoutNoNetwork) forKey:@(ERR_SDK_NET_WAIT_ACK_TIMEOUT_NO_NETWORK)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKNetRemainingTimeoutNoNetwork) forKey:@(ERR_SDK_NET_SEND_REMAINING_TIMEOUT_NO_NETWORK)];
-
-    
-    /////////////////////////////////////////////////////////////////////////////////
-    //
-    //                      (2)Server
-    //
-    /////////////////////////////////////////////////////////////////////////////////
-
-    // SSO
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKSVRSSOConnectLimit) forKey:@(ERR_SVR_SSO_CONNECT_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKSVRSSOVCode) forKey:@(ERR_SVR_SSO_VCODE)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRSSOEmpeyKey) forKey:@(ERR_SVR_SSO_EMPTY_KEY)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRSSOUinInvalid) forKey:@(ERR_SVR_SSO_UIN_INVALID)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRSSOVCodeTimeout) forKey:@(ERR_SVR_SSO_VCODE_TIMEOUT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRSSOCookieInvalid) forKey:@(ERR_SVR_SSO_COOKIE_INVALID)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRSSODownTips) forKey:@(ERR_SVR_SSO_DOWN_TIP)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRSSODisconnect) forKey:@(ERR_SVR_SSO_DISCONNECT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRSSOIdentifierInvalid) forKey:@(ERR_SVR_SSO_IDENTIFIER_INVALID)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRSSOClientClose) forKey:@(ERR_SVR_SSO_CLIENT_CLOSE)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRSSOMSFSDKQuit) forKey:@(ERR_SVR_SSO_MSFSDK_QUIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRSSOUnsupport) forKey:@(ERR_SVR_SSO_UNSURPPORT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRSSOPrepaidArrears) forKey:@(ERR_SVR_SSO_PREPAID_ARREARS)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRSSOPacketWrong) forKey:@(ERR_SVR_SSO_PACKET_WRONG)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRSSOAppidBlackList) forKey:@(ERR_SVR_SSO_APPID_BLACK_LIST)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRSSOCmdBlackList) forKey:@(ERR_SVR_SSO_CMD_BLACK_LIST)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRSSOAppidWithoutUsing) forKey:@(ERR_SVR_SSO_APPID_WITHOUT_USING)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRSSOFreqLimit) forKey:@(ERR_SVR_SSO_FREQ_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRSSOOverload) forKey:@(ERR_SVR_SSO_OVERLOAD)];
-    
-    // Resource
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRResNotFound) forKey:@(ERR_SVR_RES_NOT_FOUND)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRResAccessDeny) forKey:@(ERR_SVR_RES_ACCESS_DENY)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRResSizeLimit) forKey:@(ERR_SVR_RES_SIZE_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRResSendCancel) forKey:@(ERR_SVR_RES_SEND_CANCEL)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRResReadFailed) forKey:@(ERR_SVR_RES_READ_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRResTransferTimeout) forKey:@(ERR_SVR_RES_TRANSFER_TIMEOUT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRResInvalidParameters) forKey:@(ERR_SVR_RES_INVALID_PARAMETERS)];
-    
-    // Common
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRCommonInvalidHttpUrl) forKey:@(ERR_SVR_COMM_INVALID_HTTP_URL)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRCommomReqJsonParseFailed) forKey:@(ERR_SVR_COMM_REQ_JSON_PARSE_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRCommonInvalidAccount) forKey:@(ERR_SVR_COMM_INVALID_ACCOUNT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRCommonInvalidAccount) forKey:@(ERR_SVR_COMM_INVALID_ACCOUNT_EX)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRCommonInvalidSdkappid) forKey:@(ERR_SVR_COMM_INVALID_SDKAPPID)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRCommonRestFreqLimit) forKey:@(ERR_SVR_COMM_REST_FREQ_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRCommonRequestTimeout) forKey:@(ERR_SVR_COMM_REQUEST_TIMEOUT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRCommonInvalidRes) forKey:@(ERR_SVR_COMM_INVALID_RES)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRCommonIDNotAdmin) forKey:@(ERR_SVR_COMM_ID_NOT_ADMIN)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRCommonSdkappidFreqLimit) forKey:@(ERR_SVR_COMM_SDKAPPID_FREQ_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRCommonSdkappidMiss) forKey:@(ERR_SVR_COMM_SDKAPPID_MISS)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRCommonRspJsonParseFailed) forKey:@(ERR_SVR_COMM_RSP_JSON_PARSE_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRCommonExchangeAccountTimeout) forKey:@(ERR_SVR_COMM_EXCHANGE_ACCOUNT_TIMEUT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRCommonInvalidIdFormat) forKey:@(ERR_SVR_COMM_INVALID_ID_FORMAT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRCommonSDkappidForbidden) forKey:@(ERR_SVR_COMM_SDKAPPID_FORBIDDEN)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRCommonReqForbidden) forKey:@(ERR_SVR_COMM_REQ_FORBIDDEN)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRCommonReqFreqLimit) forKey:@(ERR_SVR_COMM_REQ_FREQ_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRCommonReqFreqLimit) forKey:@(ERR_SVR_COMM_REQ_FREQ_LIMIT_EX)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRCommonInvalidService) forKey:@(ERR_SVR_COMM_INVALID_SERVICE)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRCommonSensitiveText) forKey:@(ERR_SVR_COMM_SENSITIVE_TEXT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRCommonBodySizeLimit) forKey:@(ERR_SVR_COMM_BODY_SIZE_LIMIT)];
-    
-    // Account
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRAccountUserSigExpired) forKey:@(ERR_SVR_ACCOUNT_USERSIG_EXPIRED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRAccountUserSigEmpty) forKey:@(ERR_SVR_ACCOUNT_USERSIG_EMPTY)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRAccountUserSigCheckFailed) forKey:@(ERR_SVR_ACCOUNT_USERSIG_CHECK_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRAccountUserSigCheckFailed) forKey:@(ERR_SVR_ACCOUNT_USERSIG_CHECK_FAILED_EX)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRAccountUserSigMismatchPublicKey) forKey:@(ERR_SVR_ACCOUNT_USERSIG_MISMATCH_PUBLICKEY)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRAccountUserSigMismatchId) forKey:@(ERR_SVR_ACCOUNT_USERSIG_MISMATCH_ID)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRAccountUserSigMismatchSdkAppid) forKey:@(ERR_SVR_ACCOUNT_USERSIG_MISMATCH_SDKAPPID)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRAccountUserSigPublicKeyNotFound) forKey:@(ERR_SVR_ACCOUNT_USERSIG_PUBLICKEY_NOT_FOUND)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRAccountUserSigSdkAppidNotFount) forKey:@(ERR_SVR_ACCOUNT_SDKAPPID_NOT_FOUND)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRAccountInvalidUserSig) forKey:@(ERR_SVR_ACCOUNT_INVALID_USERSIG)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRAccountNotFound) forKey:@(ERR_SVR_ACCOUNT_NOT_FOUND)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRAccountSecRstr) forKey:@(ERR_SVR_ACCOUNT_SEC_RSTR)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRAccountInternalTimeout) forKey:@(ERR_SVR_ACCOUNT_INTERNAL_TIMEOUT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRAccountInvalidCount) forKey:@(ERR_SVR_ACCOUNT_INVALID_COUNT)];
-    [map setObject:TUIKitLocalizableString(TUIkitErrorSVRAccountINvalidParameters) forKey:@(ERR_SVR_ACCOUNT_INVALID_PARAMETERS)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRAccountAdminRequired) forKey:@(ERR_SVR_ACCOUNT_ADMIN_REQUIRED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRAccountLowSDKVersion) forKey:@(ERR_SVR_ACCOUNT_LOW_SDK_VERSION)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRAccountFreqLimit) forKey:@(ERR_SVR_ACCOUNT_FREQ_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRAccountBlackList) forKey:@(ERR_SVR_ACCOUNT_BLACKLIST)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRAccountCountLimit) forKey:@(ERR_SVR_ACCOUNT_COUNT_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRAccountInternalError) forKey:@(ERR_SVR_ACCOUNT_INTERNAL_ERROR)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorEnableUserStatusOnConsole) forKey:@(ERR_SVR_ACCOUNT_USER_STATUS_DISABLED)];
-    
-    // Profile
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRProfileInvalidParameters) forKey:@(ERR_SVR_PROFILE_INVALID_PARAMETERS)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRProfileAccountMiss) forKey:@(ERR_SVR_PROFILE_ACCOUNT_MISS)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRProfileAccountNotFound) forKey:@(ERR_SVR_PROFILE_ACCOUNT_NOT_FOUND)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRProfileAdminRequired) forKey:@(ERR_SVR_PROFILE_ADMIN_REQUIRED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRProfileSensitiveText) forKey:@(ERR_SVR_PROFILE_SENSITIVE_TEXT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRProfileInternalError) forKey:@(ERR_SVR_PROFILE_INTERNAL_ERROR)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRProfileReadWritePermissionRequired) forKey:@(ERR_SVR_PROFILE_READ_PERMISSION_REQUIRED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRProfileReadWritePermissionRequired) forKey:@(ERR_SVR_PROFILE_WRITE_PERMISSION_REQUIRED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRProfileTagNotFound) forKey:@(ERR_SVR_PROFILE_TAG_NOT_FOUND)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRProfileSizeLimit) forKey:@(ERR_SVR_PROFILE_SIZE_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRProfileValueError) forKey:@(ERR_SVR_PROFILE_VALUE_ERROR)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRProfileInvalidValueFormat) forKey:@(ERR_SVR_PROFILE_INVALID_VALUE_FORMAT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRFriendshipInvalidParameters) forKey:@(ERR_SVR_FRIENDSHIP_INVALID_PARAMETERS)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRFriendshipInvalidSdkAppid) forKey:@(ERR_SVR_FRIENDSHIP_INVALID_SDKAPPID)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRFriendshipAccountNotFound) forKey:@(ERR_SVR_FRIENDSHIP_ACCOUNT_NOT_FOUND)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRFriendshipAdminRequired) forKey:@(ERR_SVR_FRIENDSHIP_ADMIN_REQUIRED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRFriendshipSensitiveText) forKey:@(ERR_SVR_FRIENDSHIP_SENSITIVE_TEXT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRAccountInternalError) forKey:@(ERR_SVR_FRIENDSHIP_INTERNAL_ERROR)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRFriendshipNetTimeout) forKey:@(ERR_SVR_FRIENDSHIP_NET_TIMEOUT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRFriendshipWriteConflict) forKey:@(ERR_SVR_FRIENDSHIP_WRITE_CONFLICT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRFriendshipAddFriendDeny) forKey:@(ERR_SVR_FRIENDSHIP_ADD_FRIEND_DENY)];
-    [map setObject:TUIKitLocalizableString(TUIkitErrorSVRFriendshipCountLimit) forKey:@(ERR_SVR_FRIENDSHIP_COUNT_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRFriendshipGroupCountLimit) forKey:@(ERR_SVR_FRIENDSHIP_GROUP_COUNT_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRFriendshipPendencyLimit) forKey:@(ERR_SVR_FRIENDSHIP_PENDENCY_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRFriendshipBlacklistLimit) forKey:@(ERR_SVR_FRIENDSHIP_BLACKLIST_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRFriendshipPeerFriendLimit) forKey:@(ERR_SVR_FRIENDSHIP_PEER_FRIEND_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRFriendshipAlreadyFriends) forKey:@(ERR_SVR_FRIENDSHIP_ALREADY_FRIENDS)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRFriendshipInSelfBlacklist) forKey:@(ERR_SVR_FRIENDSHIP_IN_SELF_BLACKLIST)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRFriendshipAllowTypeDenyAny) forKey:@(ERR_SVR_FRIENDSHIP_ALLOW_TYPE_DENY_ANY)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRFriendshipInPeerBlackList) forKey:@(ERR_SVR_FRIENDSHIP_IN_PEER_BLACKLIST)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRFriendshipAllowTypeNeedConfirm) forKey:@(ERR_SVR_FRIENDSHIP_ALLOW_TYPE_NEED_CONFIRM)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRFriendshipAddFriendSecRstr) forKey:@(ERR_SVR_FRIENDSHIP_ADD_FRIEND_SEC_RSTR)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRFriendshipPendencyNotFound) forKey:@(ERR_SVR_FRIENDSHIP_PENDENCY_NOT_FOUND)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRFriendshipDelFriendSecRstr) forKey:@(ERR_SVR_FRIENDSHIP_DEL_FRIEND_SEC_RSTR)];
-    [map setObject:TUIKitLocalizableString(TUIKirErrorSVRFriendAccountNotFoundEx) forKey:@(ERR_SVR_FRIENDSHIP_ACCOUNT_NOT_FOUND_EX)];
-    // Conversation
-    [map setObject:TUIKitLocalizableString(TUIKirErrorSVRFriendAccountNotFoundEx) forKey:@(ERR_SVR_CONV_ACCOUNT_NOT_FOUND)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRFriendshipInvalidParameters) forKey:@(ERR_SVR_CONV_INVALID_PARAMETERS)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRFriendshipAdminRequired) forKey:@(ERR_SVR_CONV_ADMIN_REQUIRED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRAccountInternalError) forKey:@(ERR_SVR_CONV_INTERNAL_ERROR)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRFriendshipNetTimeout) forKey:@(ERR_SVR_CONV_NET_TIMEOUT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRConvGroupNameLengthLimit) forKey:@(ERR_SVR_CONV_CONV_GROUP_NAME_EXCEED_LENGTH)];
-    
-    // Message
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRMsgPkgParseFailed) forKey:@(ERR_SVR_MSG_PKG_PARSE_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRMsgInternalAuthFailed) forKey:@(ERR_SVR_MSG_INTERNAL_AUTH_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRMsgInvalidId) forKey:@(ERR_SVR_MSG_INVALID_ID)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRMsgNetError) forKey:@(ERR_SVR_MSG_NET_ERROR)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRMsgPushDeny) forKey:@(ERR_SVR_MSG_PUSH_DENY)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRMsgInPeerBlackList) forKey:@(ERR_SVR_MSG_IN_PEER_BLACKLIST)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRMsgBothNotFriend) forKey:@(ERR_SVR_MSG_BOTH_NOT_FRIEND)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRMsgNotPeerFriend) forKey:@(ERR_SVR_MSG_NOT_PEER_FRIEND)];
-    [map setObject:TUIKitLocalizableString(TUIkitErrorSVRMsgNotSelfFriend) forKey:@(ERR_SVR_MSG_NOT_SELF_FRIEND)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRMsgShutupDeny) forKey:@(ERR_SVR_MSG_SHUTUP_DENY)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRMsgRevokeTimeLimit) forKey:@(ERR_SVR_MSG_REVOKE_TIME_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRMsgDelRambleInternalError) forKey:@(ERR_SVR_MSG_DEL_RAMBLE_INTERNAL_ERROR)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRMsgJsonParseFailed) forKey:@(ERR_SVR_MSG_JSON_PARSE_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRMsgInvalidJsonBodyFormat) forKey:@(ERR_SVR_MSG_INVALID_JSON_BODY_FORMAT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRMsgInvalidToAccount) forKey:@(ERR_SVR_MSG_INVALID_TO_ACCOUNT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRMsgInvalidRand) forKey:@(ERR_SVR_MSG_INVALID_RAND)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRMsgInvalidTimestamp) forKey:@(ERR_SVR_MSG_INVALID_TIMESTAMP)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRMsgBodyNotArray) forKey:@(ERR_SVR_MSG_BODY_NOT_ARRAY)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRAccountAdminRequired) forKey:@(ERR_SVR_MSG_ADMIN_REQUIRED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRMsgInvalidJsonFormat) forKey:@(ERR_SVR_MSG_INVALID_JSON_FORMAT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRMsgToAccountCountLimit) forKey:@(ERR_SVR_MSG_TO_ACCOUNT_COUNT_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRMsgToAccountNotFound) forKey:@(ERR_SVR_MSG_TO_ACCOUNT_NOT_FOUND)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRMsgTimeLimit) forKey:@(ERR_SVR_MSG_TIME_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRMsgInvalidSyncOtherMachine) forKey:@(ERR_SVR_MSG_INVALID_SYNCOTHERMACHINE)];
-    [map setObject:TUIKitLocalizableString(TUIkitErrorSVRMsgInvalidMsgLifeTime) forKey:@(ERR_SVR_MSG_INVALID_MSGLIFETIME)];
-    [map setObject:TUIKitLocalizableString(TUIKirErrorSVRFriendAccountNotFoundEx) forKey:@(ERR_SVR_MSG_ACCOUNT_NOT_FOUND)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRMsgBodySizeLimit) forKey:@(ERR_SVR_MSG_BODY_SIZE_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRmsgLongPollingCountLimit) forKey:@(ERR_SVR_MSG_LONGPOLLING_COUNT_LIMIT)];
-    
-    // Group
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRAccountInternalError) forKey:@(ERR_SVR_GROUP_INTERNAL_ERROR)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRGroupApiNameError) forKey:@(ERR_SVR_GROUP_API_NAME_ERROR)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRResInvalidParameters) forKey:@(ERR_SVR_GROUP_INVALID_PARAMETERS)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRGroupAccountCountLimit) forKey:@(ERR_SVR_GROUP_ACOUNT_COUNT_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIkitErrorSVRGroupFreqLimit) forKey:@(ERR_SVR_GROUP_FREQ_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRGroupPermissionDeny) forKey:@(ERR_SVR_GROUP_PERMISSION_DENY)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRGroupInvalidReq) forKey:@(ERR_SVR_GROUP_INVALID_REQ)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRGroupSuperNotAllowQuit) forKey:@(ERR_SVR_GROUP_SUPER_NOT_ALLOW_QUIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRGroupNotFound) forKey:@(ERR_SVR_GROUP_NOT_FOUND)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRGroupJsonParseFailed) forKey:@(ERR_SVR_GROUP_JSON_PARSE_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRGroupInvalidId) forKey:@(ERR_SVR_GROUP_INVALID_ID)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRGroupAllreadyMember) forKey:@(ERR_SVR_GROUP_ALLREADY_MEMBER)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRGroupFullMemberCount) forKey:@(ERR_SVR_GROUP_FULL_MEMBER_COUNT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRGroupInvalidGroupId) forKey:@(ERR_SVR_GROUP_INVALID_GROUPID)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRGroupRejectFromThirdParty) forKey:@(ERR_SVR_GROUP_REJECT_FROM_THIRDPARTY)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRGroupShutDeny) forKey:@(ERR_SVR_GROUP_SHUTUP_DENY)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRGroupRspSizeLimit) forKey:@(ERR_SVR_GROUP_RSP_SIZE_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRGroupAccountNotFound) forKey:@(ERR_SVR_GROUP_ACCOUNT_NOT_FOUND)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRGroupGroupIdInUse) forKey:@(ERR_SVR_GROUP_GROUPID_IN_USED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRGroupSendMsgFreqLimit) forKey:@(ERR_SVR_GROUP_SEND_MSG_FREQ_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRGroupReqAllreadyBeenProcessed) forKey:@(ERR_SVR_GROUP_REQ_ALLREADY_BEEN_PROCESSED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRGroupGroupIdUserdForSuper) forKey:@(ERR_SVR_GROUP_GROUPID_IN_USED_FOR_SUPER)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRGroupSDkAppidDeny) forKey:@(ERR_SVR_GROUP_SDKAPPID_DENY)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRGroupRevokeMsgNotFound) forKey:@(ERR_SVR_GROUP_REVOKE_MSG_NOT_FOUND)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRGroupRevokeMsgTimeLimit) forKey:@(ERR_SVR_GROUP_REVOKE_MSG_TIME_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRGroupRevokeMsgDeny) forKey:@(ERR_SVR_GROUP_REVOKE_MSG_DENY)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRGroupNotAllowRevokeMsg) forKey:@(ERR_SVR_GROUP_NOT_ALLOW_REVOKE_MSG)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRGroupRemoveMsgDeny) forKey:@(ERR_SVR_GROUP_REMOVE_MSG_DENY)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRGroupNotAllowRemoveMsg) forKey:@(ERR_SVR_GROUP_NOT_ALLOW_REMOVE_MSG)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRGroupAvchatRoomCountLimit) forKey:@(ERR_SVR_GROUP_AVCHATROOM_COUNT_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRGroupCountLimit) forKey:@(ERR_SVR_GROUP_COUNT_LIMIT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRGroupMemberCountLimit) forKey:@(ERR_SVR_GROUP_MEMBER_COUNT_LIMIT)];
-    
-    /////////////////////////////////////////////////////////////////////////////////
-    //
-    //                      (3)Version 3 deprecated
-    //
-    /////////////////////////////////////////////////////////////////////////////////
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRNoSuccessResult) forKey:@(ERR_NO_SUCC_RESULT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRToUserInvalid) forKey:@(ERR_TO_USER_INVALID)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRInitCoreFail) forKey:@(ERR_INIT_CORE_FAIL)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorExpiredSessionNode) forKey:@(ERR_EXPIRED_SESSION_NODE)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorLoggedOutBeforeLoginFinished) forKey:@(ERR_LOGGED_OUT_BEFORE_LOGIN_FINISHED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorTLSSDKNotInitialized) forKey:@(ERR_TLSSDK_NOT_INITIALIZED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorTLSSDKUserNotFound) forKey:@(ERR_TLSSDK_USER_NOT_FOUND)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorBindFaildRegTimeout) forKey:@(ERR_BIND_FAIL_REG_TIMEOUT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorBindFaildIsBinding) forKey:@(ERR_BIND_FAIL_ISBINDING)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorPacketFailUnknown) forKey:@(ERR_PACKET_FAIL_UNKNOWN)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorPacketFailReqNoNet) forKey:@(ERR_PACKET_FAIL_REQ_NO_NET)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorPacketFailRespNoNet) forKey:@(ERR_PACKET_FAIL_RESP_NO_NET)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorPacketFailReqNoAuth) forKey:@(ERR_PACKET_FAIL_REQ_NO_AUTH)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorPacketFailSSOErr) forKey:@(ERR_PACKET_FAIL_SSO_ERR)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSVRRequestTimeout) forKey:@(ERR_PACKET_FAIL_REQ_TIMEOUT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorPacketFailRespTimeout) forKey:@(ERR_PACKET_FAIL_RESP_TIMEOUT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorFriendshipProxySyncing) forKey:@(ERR_FRIENDSHIP_PROXY_SYNCING)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorFriendshipProxySyncedFail) forKey:@(ERR_FRIENDSHIP_PROXY_SYNCED_FAIL)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorFriendshipProxyLocalCheckErr) forKey:@(ERR_FRIENDSHIP_PROXY_LOCAL_CHECK_ERR)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorGroupInvalidField) forKey:@(ERR_GROUP_INVALID_FIELD)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorGroupStoreageDisabled) forKey:@(ERR_GROUP_STORAGE_DISABLED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorLoadGrpInfoFailed) forKey:@(ERR_LOADGRPINFO_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorReqNoNetOnReq) forKey:@(ERR_REQ_NO_NET_ON_REQ)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorReqNoNetOnResp) forKey:@(ERR_REQ_NO_NET_ON_RSP)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorServiceNotReady) forKey:@(ERR_SERIVCE_NOT_READY)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorLoginAuthFailed) forKey:@(ERR_LOGIN_AUTH_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorNeverConnectAfterLaunch) forKey:@(ERR_NEVER_CONNECT_AFTER_LAUNCH)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorReqFailed) forKey:@(ERR_REQ_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorReqInvaidReq) forKey:@(ERR_REQ_INVALID_REQ)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorReqOnverLoaded) forKey:@(ERR_REQ_OVERLOADED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorReqKickOff) forKey:@(ERR_REQ_KICK_OFF)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorReqServiceSuspend) forKey:@(ERR_REQ_SERVICE_SUSPEND)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorReqInvalidSign) forKey:@(ERR_REQ_INVALID_SIGN)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorReqInvalidCookie) forKey:@(ERR_REQ_INVALID_COOKIE)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorLoginTlsRspParseFailed) forKey:@(ERR_LOGIN_TLS_RSP_PARSE_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorLoginOpenMsgTimeout) forKey:@(ERR_LOGIN_OPENMSG_TIMEOUT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorLoginOpenMsgRspParseFailed) forKey:@(ERR_LOGIN_OPENMSG_RSP_PARSE_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorLoginTslDecryptFailed) forKey:@(ERR_LOGIN_TLS_DECRYPT_FAILED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorWifiNeedAuth) forKey:@(ERR_WIFI_NEED_AUTH)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorUserCanceled) forKey:@(ERR_USER_CANCELED)];
-    [map setObject:TUIKitLocalizableString(TUIkitErrorRevokeTimeLimitExceed) forKey:@(ERR_REVOKE_TIME_LIMIT_EXCEED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorLackUGExt) forKey:@(ERR_LACK_UGC_EXT)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorAutoLoginNeedUserSig) forKey:@(ERR_AUTOLOGIN_NEED_USERSIG)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorQALNoShortConneAvailable) forKey:@(ERR_QAL_NO_SHORT_CONN_AVAILABLE)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorReqContentAttach) forKey:@(ERR_REQ_CONTENT_ATTACK)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorLoginSigExpire) forKey:@(ERR_LOGIN_SIG_EXPIRE)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorSDKHadInit) forKey:@(ERR_SDK_HAD_INITIALIZED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorOpenBDHBase) forKey:@(ERR_OPENBDH_BASE)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorRequestNoNetOnReq) forKey:@(ERR_REQUEST_NO_NET_ONREQ)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorRequestNoNetOnRsp) forKey:@(ERR_REQUEST_NO_NET_ONRSP)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorRequestOnverLoaded) forKey:@(ERR_REQUEST_OVERLOADED)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorReqKickOff) forKey:@(ERR_REQUEST_KICK_OFF)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorReqServiceSuspend) forKey:@(ERR_REQUEST_SERVICE_SUSPEND)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorReqInvalidSign) forKey:@(ERR_REQUEST_INVALID_SIGN)];
-    [map setObject:TUIKitLocalizableString(TUIKitErrorReqInvalidCookie) forKey:@(ERR_REQUEST_INVALID_COOKIE)];
-}
-+ (NSData *)dictionary2JsonData:(NSDictionary *)dict {
-    if ([NSJSONSerialization isValidJSONObject:dict]) {
-        NSError *error = nil;
-        NSData *data = [NSJSONSerialization dataWithJSONObject:dict options:0 error:&error];
-        if (error) {
-            NSLog(@"[%@] Post Json Error", [self class]);
-        }
-        return data;
-    } else {
-        NSLog(@"[%@] Post Json is not valid", [self class]);
-    }
-    return nil;
-}
-
-+ (NSString *)dictionary2JsonStr:(NSDictionary *)dict {
-    return [[NSString alloc] initWithData:[self dictionary2JsonData:dict] encoding:NSUTF8StringEncoding];
-    ;
-}
-
-+ (NSDictionary *)jsonSring2Dictionary:(NSString *)jsonString {
-    if (jsonString == nil) {
-        return nil;
-    }
-    NSData *data = [jsonString dataUsingEncoding:NSUTF8StringEncoding];
-    NSError *err = nil;
-    NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&err];
-    if (err || ![dic isKindOfClass:[NSDictionary class]]) {
-        NSLog(@"Json parse failed: %@", jsonString);
-        return nil;
-    }
-    return dic;
-}
-
-+ (NSDictionary *)jsonData2Dictionary:(NSData *)jsonData {
-    if (jsonData == nil) {
-        return nil;
-    }
-    NSError *err = nil;
-    NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:&err];
-    if (err || ![dic isKindOfClass:[NSDictionary class]]) {
-        NSLog(@"Json parse failed");
-        return nil;
-    }
-    return dic;
-}
-
-+ (void)asyncDecodeImage:(NSString *)path complete:(TAsyncImageComplete)complete {
-    static dispatch_queue_t queue;
-    static dispatch_once_t onceToken;
-    dispatch_once(&onceToken, ^{
-      queue = dispatch_queue_create("com.tuikit.asyncDecodeImage", DISPATCH_QUEUE_SERIAL);
-    });
-
-    // callback on main thread
-    void (^callback)(NSString *, UIImage *) = ^(NSString *path, UIImage *image) {
-      if (complete == nil) {
-          return;
-      }
-      dispatch_async(dispatch_get_main_queue(), ^{
-        complete(path, image);
-      });
-    };
-
-    if (path == nil) {
-        callback(nil, nil);
-        return;
-    }
-
-    dispatch_async(queue, ^{
-      // The path ends with gif:
-      if ([path tui_containsString:@".gif"]) {
-          UIImage *image = [UIImage sd_imageWithGIFData:[NSData dataWithContentsOfFile:path]];
-          callback(path, image);
-          return;
-      }
-
-      // load origin image
-      UIImage *image = [UIImage imageWithContentsOfFile:path];
-
-      // There is no path ending, but it may actually be a gif image
-      if (image == nil) {
-         NSString *formatPath = [path stringByAppendingString:@".gif"];
-         image = [UIImage sd_imageWithGIFData:[NSData dataWithContentsOfFile:formatPath]];
-         callback(formatPath, image);
-         return;
-      }
-        
-      if (image == nil) {
-          callback(path, image);
-          return;
-      }
-      
-      if (image.sd_imageFormat == SDImageFormatGIF) {
-        image = [UIImage sd_imageWithGIFData:[NSData dataWithContentsOfFile:path]];
-        callback(path, image);
-        return;
-      }
-
-      // SDWebImage is priority
-      UIImage *decodeImage = [SDImageCoderHelper decodedImageWithImage:image];
-      if (decodeImage) {
-          callback(path, decodeImage);
-          return;
-      }
-
-      // Bitmap
-      CGImageRef cgImage = image.CGImage;
-      if (cgImage) {
-          CGImageAlphaInfo alphaInfo = CGImageGetAlphaInfo(cgImage) & kCGBitmapAlphaInfoMask;
-          BOOL hasAlpha = NO;
-          if (alphaInfo == kCGImageAlphaPremultipliedLast || alphaInfo == kCGImageAlphaPremultipliedFirst || alphaInfo == kCGImageAlphaLast ||
-              alphaInfo == kCGImageAlphaFirst) {
-              hasAlpha = YES;
-          }
-          CGBitmapInfo bitmapInfo = kCGBitmapByteOrder32Host;
-          bitmapInfo |= hasAlpha ? kCGImageAlphaPremultipliedFirst : kCGImageAlphaNoneSkipFirst;
-          size_t width = CGImageGetWidth(cgImage);
-          size_t height = CGImageGetHeight(cgImage);
-          CGContextRef context = CGBitmapContextCreate(NULL, width, height, 8, 0, CGColorSpaceCreateDeviceRGB(), bitmapInfo);
-          if (context) {
-              CGContextDrawImage(context, CGRectMake(0, 0, width, height), cgImage);
-              cgImage = CGBitmapContextCreateImage(context);
-              decodeImage = [UIImage imageWithCGImage:cgImage scale:image.scale orientation:image.imageOrientation];
-              CGContextRelease(context);
-              CGImageRelease(cgImage);
-          }
-      }
-      callback(path, decodeImage);
-    });
-}
-
-+ (void)makeToast:(NSString *)str {
-    if ([TUIConfig defaultConfig].enableToast) {
-        [[UIApplication sharedApplication].keyWindow makeToast:str];
-    }
-}
-
-+ (void)makeToast:(NSString *)str duration:(NSTimeInterval)duration {
-    if ([TUIConfig defaultConfig].enableToast) {
-        [[UIApplication sharedApplication].keyWindow makeToast:str duration:duration];
-    }
-}
-
-+ (void)makeToast:(NSString *)str duration:(NSTimeInterval)duration position:(CGPoint)position {
-    if ([TUIConfig defaultConfig].enableToast) {
-        [[UIApplication sharedApplication].keyWindow makeToast:str duration:duration position:[NSValue valueWithCGPoint:position]];
-    }
-}
-
-+ (void)makeToast:(NSString *)str duration:(NSTimeInterval)duration idposition:(id)position {
-    if ([TUIConfig defaultConfig].enableToast) {
-        [[UIApplication sharedApplication].keyWindow makeToast:str duration:duration position:position];
-    }
-}
-
-+ (void)makeToastError:(NSInteger)error msg:(NSString *)msg {
-    if ([TUIConfig defaultConfig].enableToast) {
-        [[UIApplication sharedApplication].keyWindow makeToast:[self convertIMError:error msg:msg]];
-    }
-}
-
-+ (void)hideToast {
-    if ([TUIConfig defaultConfig].enableToast) {
-        [[UIApplication sharedApplication].keyWindow hideToast];
-    }
-}
-
-+ (void)makeToastActivity {
-    if ([TUIConfig defaultConfig].enableToast) {
-        [[UIApplication sharedApplication].keyWindow makeToastActivity:TUICSToastPositionCenter];
-    }
-}
-
-+ (void)hideToastActivity {
-    if ([TUIConfig defaultConfig].enableToast) {
-        [[UIApplication sharedApplication].keyWindow hideToastActivity];
-    }
-}
-
-+ (NSString *)convertDateToStr:(NSDate *)date {
-    if (!date) {
-        return nil;
-    }
-
-    if ([date isEqualToDate:[NSDate distantPast]]) {
-        return @"";
-    }
-
-    static NSDateFormatter *dateFmt = nil;
-    if (dateFmt == nil) {
-        dateFmt = [[NSDateFormatter alloc] init];
-    }
-    dateFmt.locale = nil;
-
-    NSCalendar *calendar = [NSCalendar currentCalendar];
-    calendar.firstWeekday = 7;
-    NSDateComponents *nowComponent = [calendar components:NSCalendarUnitDay | NSCalendarUnitMonth | NSCalendarUnitYear | NSCalendarUnitWeekOfMonth
-                                                 fromDate:NSDate.new];
-    NSDateComponents *dateCompoent = [calendar components:NSCalendarUnitDay | NSCalendarUnitMonth | NSCalendarUnitYear | NSCalendarUnitWeekOfMonth
-                                                 fromDate:date];
-
-    if (nowComponent.year == dateCompoent.year) {
-        // Same year
-        if (nowComponent.month == dateCompoent.month) {
-            // Same month
-            if (nowComponent.weekOfMonth == dateCompoent.weekOfMonth) {
-                // Same week
-                if (nowComponent.day == dateCompoent.day) {
-                    // Same day
-                    dateFmt.dateFormat = @"HH:mm";
-                } else {
-                    // Not same day
-                    dateFmt.dateFormat = @"EEEE";
-                    NSString *identifer = [TUIGlobalization getPreferredLanguage];
-                    dateFmt.locale = [NSLocale localeWithLocaleIdentifier:identifer];
-                }
-            } else {
-                // Not same weeek
-                dateFmt.dateFormat = @"MM/dd";
-            }
-        } else {
-            // Not same month
-            dateFmt.dateFormat = @"MM/dd";
-        }
-    } else {
-        // Not same year
-        dateFmt.dateFormat = @"yyyy/MM/dd";
-    }
-
-    NSString *str = [dateFmt stringFromDate:date];
-    return str;
-}
-
-+ (NSString *)convertDateToHMStr:(NSDate *)date {
-    if (!date) {
-        return nil;
-    }
-
-    if ([date isEqualToDate:[NSDate distantPast]]) {
-        return @"";
-    }
-
-    NSDateFormatter *dateFmt = [[NSDateFormatter alloc] init];
-    dateFmt.dateFormat = @"HH:mm";
-    NSString *str = [dateFmt stringFromDate:date];
-    return str;
-}
-
-+ (NSString *)convertIMError:(NSInteger)code msg:(NSString *)msg {
-    NSString  *resultMsg = @"";
-    resultMsg = gIMErrorMsgMap[@(code)];
-    if (resultMsg.length > 0) {
-        return resultMsg;
-    }
-    return msg;
-}
-
-+ (void)dispatchMainAsync:(dispatch_block_t)block {
-    if ([NSThread isMainThread]) {
-        block();
-    } else {
-        dispatch_async(dispatch_get_main_queue(), block);
-    }
-}
-
-+ (NSString *)genImageName:(NSString *)uuid {
-    NSString *identifier = [[V2TIMManager sharedInstance] getLoginUser];
-    if (uuid == nil) {
-        int value = arc4random() % 1000;
-        uuid = [NSString stringWithFormat:@"%ld_%d", (long)[[NSDate date] timeIntervalSince1970], value];
-    }
-
-    NSString *name = [NSString stringWithFormat:@"%d_%@_image_%@", [TUILogin getSdkAppID], identifier, uuid];
-    return name;
-}
-
-+ (NSString *)genImageExtenionName:(UIImage *)image {
-    if (!image) {
-        return @"";
-    }
-    static NSDictionary *imageFormatExtensionMap = nil;
-    if (imageFormatExtensionMap == nil) {
-        imageFormatExtensionMap = @{
-            @(SDImageFormatUndefined) : @"",
-            @(SDImageFormatJPEG) : @"jpeg",
-            @(SDImageFormatPNG) : @"png",
-            @(SDImageFormatGIF) : @"gif",
-            @(SDImageFormatTIFF) : @"tiff",
-            @(SDImageFormatWebP) : @"webp",
-            @(SDImageFormatHEIC) : @"heic",
-            @(SDImageFormatHEIF) : @"heif",
-            @(SDImageFormatPDF) : @"pdf",
-            @(SDImageFormatSVG) : @"svg",
-            @(SDImageFormatBMP) : @"bmp",
-            @(SDImageFormatRAW) : @"raw"
-        };
-    }
-    return [imageFormatExtensionMap objectForKey:@(image.sd_imageFormat)];
-}
-
-+ (NSString *)genSnapshotName:(NSString *)uuid {
-    NSString *identifier = [[V2TIMManager sharedInstance] getLoginUser];
-    if (uuid == nil) {
-        int value = arc4random() % 1000;
-        uuid = [NSString stringWithFormat:@"%ld_%d", (long)[[NSDate date] timeIntervalSince1970], value];
-    }
-    NSString *name = [NSString stringWithFormat:@"%d_%@_snapshot_%@", [TUILogin getSdkAppID], identifier, uuid];
-    return name;
-}
-
-+ (NSString *)genVideoName:(NSString *)uuid {
-    NSString *identifier = [[V2TIMManager sharedInstance] getLoginUser];
-    if (uuid == nil) {
-        uuid = [NSString stringWithFormat:@"%ld", (long)[[NSDate date] timeIntervalSince1970]];
-    }
-    NSString *name = [NSString stringWithFormat:@"%d_%@_video_%@", [TUILogin getSdkAppID], identifier, uuid];
-    return name;
-}
-
-+ (NSString *)genVoiceName:(NSString *)uuid withExtension:(NSString *)extent {
-    NSString *identifier = [[V2TIMManager sharedInstance] getLoginUser];
-    if (uuid == nil) {
-        uuid = [NSString stringWithFormat:@"%ld", (long)[[NSDate date] timeIntervalSince1970]];
-    }
-    NSString *name = [NSString stringWithFormat:@"%d_%@_voice_%@.%@", [TUILogin getSdkAppID], identifier, uuid, extent];
-    return name;
-}
-
-+ (NSString *)genFileName:(NSString *)uuid {
-    NSString *identifier = [[V2TIMManager sharedInstance] getLoginUser];
-    if (uuid == nil) {
-        uuid = [NSString stringWithFormat:@"%ld", (long)[[NSDate date] timeIntervalSince1970]];
-    }
-    NSString *name = [NSString stringWithFormat:@"%d_%@_file_%@", [TUILogin getSdkAppID], identifier, uuid];
-    return name;
-}
-
-+ (NSString *)deviceModel {
-    static NSString *deviceModel;
-    static dispatch_once_t onceToken;
-    dispatch_once(&onceToken, ^{
-      deviceModel = [[UIDevice currentDevice] model];
-    });
-    return deviceModel;
-}
-
-+ (NSString *)deviceVersion {
-    static NSString *deviceVersion;
-    static dispatch_once_t onceToken;
-    dispatch_once(&onceToken, ^{
-      deviceVersion = [[UIDevice currentDevice] systemVersion];
-    });
-    return deviceVersion;
-}
-
-+ (NSString *)deviceName {
-    static NSString *deviceName;
-    static dispatch_once_t onceToken;
-    dispatch_once(&onceToken, ^{
-      deviceName = [[UIDevice currentDevice] name];
-    });
-    return deviceName;
-}
-
-+ (void)openLinkWithURL:(NSURL *)url {
-    if (@available(iOS 10.0, *)) {
-        [[UIApplication sharedApplication] openURL:url
-                                           options:@{}
-                                 completionHandler:^(BOOL success) {
-                                   if (success) {
-                                       NSLog(@"Opened url");
-                                   }
-                                 }];
-    } else {
-        [[UIApplication sharedApplication] openURL:url];
-    }
-}
-
-+ (void)addUnsupportNotificationInVC:(UIViewController *)vc {
-    [self addUnsupportNotificationInVC:vc debugOnly:YES];
-}
-
-+ (void)addUnsupportNotificationInVC:(UIViewController *)vc debugOnly:(BOOL)debugOnly {
-    BOOL enable = YES;
-    if (debugOnly) {
-#if DEBUG
-        enable = YES;
-#else
-        enable = NO;
-#endif
-    }
-
-    if (!enable) {
-        return;
-    }
-    TUIWeakProxy *weakVC = [TUIWeakProxy proxyWithTarget:vc];
-    [[NSNotificationCenter defaultCenter] addObserverForName:TUIKitNotification_onReceivedUnsupportInterfaceError
-                                                      object:nil
-                                                       queue:nil
-                                                  usingBlock:^(NSNotification *_Nonnull note) {
-                                                    NSDictionary *userInfo = note.userInfo;
-                                                    NSString *service = [userInfo objectForKey:@"service"];
-                                                    NSString *serviceDesc = [userInfo objectForKey:@"serviceDesc"];
-                                                    if (weakVC.target) {
-                                                        [TUITool showUnsupportAlertOfService:service serviceDesc:serviceDesc onVC:weakVC.target];
-                                                    }
-                                                  }];
-}
-
-+ (void)postUnsupportNotificationOfService:(NSString *)service {
-    [self postUnsupportNotificationOfService:service serviceDesc:nil debugOnly:YES];
-}
-
-+ (void)postUnsupportNotificationOfService:(NSString *)service serviceDesc:(NSString *)serviceDesc debugOnly:(BOOL)debugOnly {
-    BOOL enable = YES;
-    if (debugOnly) {
-#if DEBUG
-        enable = YES;
-#else
-        enable = NO;
-#endif
-    }
-
-    if (!enable) {
-        return;
-    }
-
-    if (!service) {
-        NSLog(@"postNotificationOfService, service is nil");
-        return;
-    }
-    [[NSNotificationCenter defaultCenter] postNotificationName:TUIKitNotification_onReceivedUnsupportInterfaceError
-                                                        object:nil
-                                                      userInfo:@{@"service" : service ?: @"", @"serviceDesc" : serviceDesc ?: @""}];
-}
-
-+ (void)showUnsupportAlertOfService:(NSString *)service serviceDesc:(NSString *)serviceDesc onVC:(UIViewController *)vc {
-    NSString *key = [NSString stringWithFormat:@"show_unsupport_alert_%@", service];
-    BOOL isShown = [[NSUserDefaults standardUserDefaults] boolForKey:key];
-    if (isShown) {
-        return;
-    }
-    NSString *desc = [NSString stringWithFormat:@"%@%@%@", service, TUIKitLocalizableString(TUIKitErrorUnsupportIntefaceDesc), serviceDesc ?: @""];
-    NSArray *buttons = @[ TUIKitLocalizableString(TUIKitErrorUnsupportIntefaceIGotIt), TUIKitLocalizableString(TUIKitErrorUnsupportIntefaceNoMoreAlert) ];
-    UIAlertController *alertController = [UIAlertController alertControllerWithTitle:TUIKitLocalizableString(TUIKitErrorUnsupportIntefaceTitle)
-                                                                             message:desc
-                                                                      preferredStyle:UIAlertControllerStyleAlert];
-    NSMutableAttributedString *attrStr = [[NSMutableAttributedString alloc] initWithString:desc];
-    [attrStr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:14] range:NSMakeRange(0, desc.length)];
-    [attrStr addAttribute:NSLinkAttributeName value:@"https://" range:[desc rangeOfString:TUIKitLocalizableString(TUIKitErrorUnsupportIntefaceGuidelines)]];
-    [alertController setValue:attrStr forKey:@"attributedMessage"];
-    UILabel *msgLabel = [TUITool messageLabelInAlertController:alertController];
-    msgLabel.userInteractionEnabled = YES;
-    msgLabel.textAlignment = NSTextAlignmentLeft;
-    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:TUITool.class action:@selector(onTapLabel:)];
-    [msgLabel addGestureRecognizer:tap];
-
-    UIAlertAction *left = [UIAlertAction actionWithTitle:buttons[0]
-                                                   style:UIAlertActionStyleDefault
-                                                 handler:^(UIAlertAction *_Nonnull action){
-                                                 }];
-    UIAlertAction *right = [UIAlertAction actionWithTitle:buttons[1]
-                                                    style:UIAlertActionStyleDefault
-                                                  handler:^(UIAlertAction *_Nonnull action) {
-                                                    [[NSUserDefaults standardUserDefaults] setBool:YES forKey:key];
-                                                    [[NSUserDefaults standardUserDefaults] synchronize];
-                                                  }];
-    [alertController tuitheme_addAction:left];
-    [alertController tuitheme_addAction:right];
-    [vc presentViewController:alertController animated:NO completion:nil];
-}
-
-+ (void)onTapLabel:(UIGestureRecognizer *)ges {
-    NSString *chinesePurchase = @"https://cloud.tencent.com/document/product/269/11673#.E5.9F.BA.E7.A1.80.E6.9C.8D.E5.8A.A1.E8.AF.A6.E6.83.85";
-    NSString *englishPurchase = @"https://intl.cloud.tencent.com/document/product/1047/36021?lang=en&pg=#changing-configuration";
-    NSString *language = [TUIGlobalization tk_localizableLanguageKey];
-    NSURL *url = [NSURL URLWithString:chinesePurchase];
-    if (![language tui_containsString:@"zh-"]) {
-        url = [NSURL URLWithString:englishPurchase];
-    }
-    [TUITool openLinkWithURL:url];
-}
-
-+ (void)addValueAddedUnsupportNeedContactNotificationInVC:(UIViewController *)vc debugOnly:(BOOL)debugOnly {
-    BOOL enable = YES;
-    if (debugOnly) {
-#if DEBUG
-        enable = YES;
-#else
-        enable = NO;
-#endif
-    }
-    if (!enable) {
-        return;
-    }
-
-    [[NSNotificationCenter defaultCenter] addObserverForName:TUIKitNotification_onReceivedValueAddedUnsupportContactNeededError
-                                                      object:nil
-                                                       queue:nil
-                                                  usingBlock:^(NSNotification *_Nonnull note) {
-        NSDictionary *userInfo = note.userInfo;
-        NSString *service = [userInfo objectForKey:@"service"];
-        [TUITool showValueAddedUnsupportNeedContactAlertOfService:service onVC:vc];
-    }];
-}
-
-+ (void)addValueAddedUnsupportNeedPurchaseNotificationInVC:(UIViewController *)vc debugOnly:(BOOL)debugOnly {
-    BOOL enable = YES;
-    if (debugOnly) {
-#if DEBUG
-        enable = YES;
-#else
-        enable = NO;
-#endif
-    }
-    if (!enable) {
-        return;
-    }
-
-    __weak __typeof(vc) weakVC = vc;
-    [[NSNotificationCenter defaultCenter] addObserverForName:TUIKitNotification_onReceivedValueAddedUnsupportPurchaseNeededError
-                                                      object:nil
-                                                       queue:nil
-                                                  usingBlock:^(NSNotification *_Nonnull note) {
-        __strong __typeof(weakVC) strongVC = weakVC;
-        NSDictionary *userInfo = note.userInfo;
-        NSString *service = [userInfo objectForKey:@"service"];
-        [TUITool showValueAddedUnsupportNeedPurchaseAlertOfService:service onVC:strongVC];
-    }];
-}
-
-+ (void)postValueAddedUnsupportNeedContactNotification:(NSString *)service {
-    [self postValueAddedUnsupportNotification:TUIKitNotification_onReceivedValueAddedUnsupportContactNeededError
-                                      service:service
-                                  serviceDesc:nil
-                                    debugOnly:YES];
-}
-
-+ (void)postValueAddedUnsupportNeedPurchaseNotification:(NSString *)service {
-    [self postValueAddedUnsupportNotification:TUIKitNotification_onReceivedValueAddedUnsupportPurchaseNeededError
-                                      service:service
-                                  serviceDesc:nil
-                                    debugOnly:YES];
-}
-
-+ (void)postValueAddedUnsupportNotification:(NSString *)notification service:(NSString *)service serviceDesc:(NSString *)serviceDesc debugOnly:(BOOL)debugOnly {
-    BOOL enable = YES;
-    if (debugOnly) {
-#if DEBUG
-        enable = YES;
-#else
-        enable = NO;
-#endif
-    }
-
-    if (!enable) {
-        return;
-    }
-
-    if (!service) {
-        NSLog(@"postNotificationOfService, service is nil");
-        return;
-    }
-    [[NSNotificationCenter defaultCenter] postNotificationName:notification
-                                                        object:nil
-                                                      userInfo:@{@"service" : service ?: @"",
-                                                                 @"serviceDesc" : serviceDesc ?: @""}];
-}
-
-+ (void)showValueAddedUnsupportNeedContactAlertOfService:(NSString *)service onVC:(UIViewController *)vc {
-    [self showValueAddedUnsupportAlertOfService:service
-                                    serviceDesc:TUIKitLocalizableString(TUIKitErrorValueAddedUnsupportIntefaceContactDesc)
-                                           onVC:vc
-                                  highlightText:TUIKitLocalizableString(TUIKitErrorValueAddedUnsupportIntefaceContactDescHighlight)
-                                            sel:@selector(onTapValueAddedContactLabel)];
-}
-
-+ (void)showValueAddedUnsupportNeedPurchaseAlertOfService:(NSString *)service onVC:(UIViewController *)vc {
-    [self showValueAddedUnsupportAlertOfService:service
-                                    serviceDesc:TUIKitLocalizableString(TUIKitErrorValueAddedUnsupportIntefacePurchaseDesc)
-                                           onVC:vc
-                                  highlightText:TUIKitLocalizableString(TUIKitErrorValueAddedUnsupportIntefacePurchaseDescHighlight)
-                                            sel:@selector(onTapValueAddedPurchaseLabel)];
-}
-
-+ (void)showValueAddedUnsupportAlertOfService:(NSString *)service serviceDesc:(NSString *)serviceDesc onVC:(UIViewController *)vc
-                                highlightText:(NSString *)text sel:(SEL)selector {
-    NSString *desc = [NSString stringWithFormat:@"%@%@", service, serviceDesc ?: @""];
-    NSString *button = TUIKitLocalizableString(TUIKitErrorUnsupportIntefaceIGotIt);
-    UIAlertController *alertController = [UIAlertController alertControllerWithTitle:TUIKitLocalizableString(TUIKitErrorUnsupportIntefaceTitle)
-                                                                             message:desc
-                                                                      preferredStyle:UIAlertControllerStyleAlert];
-    
-    NSMutableAttributedString *attrStr = [[NSMutableAttributedString alloc] initWithString:desc];
-    [attrStr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:14] range:NSMakeRange(0, desc.length)];
-    [attrStr addAttribute:NSLinkAttributeName value:@"https://" range:[desc rangeOfString:text]];
-    [alertController setValue:attrStr forKey:@"attributedMessage"];
-    
-    UILabel *msgLabel = [TUITool messageLabelInAlertController:alertController];
-    msgLabel.userInteractionEnabled = YES;
-    msgLabel.textAlignment = NSTextAlignmentLeft;
-    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:TUITool.class action:selector];
-    [msgLabel addGestureRecognizer:tap];
-    
-    UIAlertAction *ok = [UIAlertAction actionWithTitle:button
-                                                 style:UIAlertActionStyleDefault
-                                               handler:^(UIAlertAction *_Nonnull action){
-                                               }];
-    [alertController tuitheme_addAction:ok];
-    [vc presentViewController:alertController animated:NO completion:nil];
-}
-
-+ (void)onTapValueAddedContactLabel {
-    NSURL *url = [NSURL URLWithString:@"https://zhiliao.qq.com"];
-    [TUITool openLinkWithURL:url];
-}
-
-+ (void)onTapValueAddedPurchaseLabel {
-    NSURL *url = [NSURL URLWithString:@"https://buy.cloud.tencent.com/avc?activeId=plugin&regionId=1"];
-    [TUITool openLinkWithURL:url];
-}
-
-+ (void)checkCommercialAbility:(long long)param succ:(void (^)(BOOL enabled))succ fail:(void (^)(int code, NSString *desc))fail {
-    NSLog(@"checkCommercialAbility param: %lld", param);
-    dispatch_async(dispatch_get_main_queue(), ^{
-      NSNumber *paramNum = [NSNumber numberWithLongLong:param];
-      [[V2TIMManager sharedInstance] callExperimentalAPI:@"isCommercialAbilityEnabled"
-          param:paramNum
-          succ:^(NSObject *result) {
-            dispatch_async(dispatch_get_main_queue(), ^{
-              BOOL isEnabled = [(NSNumber *)result boolValue];
-              NSLog(@"checkCommercialAbility enabled: %d", isEnabled);
-              if (succ) {
-                  succ(isEnabled);
-              }
-            });
-          }
-          fail:^(int code, NSString *desc) {
-            dispatch_async(dispatch_get_main_queue(), ^{
-              NSLog(@"checkCommercialAbility error, code:%d, desc:%@", code, desc);
-              if (fail) {
-                  fail(code, desc);
-              }
-            });
-          }];
-    });
-}
-
-+ (UILabel *)messageLabelInAlertController:(UIAlertController *)alert {
-    UIView *target = [TUITool targetSubviewInAlertController:alert];
-    NSArray *subviews = [target subviews];
-    if (subviews.count == 0) {
-        return nil;
-    }
-    for (UIView *view in subviews) {
-        if ([view isKindOfClass:UILabel.class]) {
-            UILabel *label = (UILabel *)view;
-            if (label.text.length > 10) {
-                return label;
-            }
-        }
-    }
-    return nil;
-}
-
-+ (UIView *)targetSubviewInAlertController:(UIAlertController *)alert {
-    UIView *view = alert.view;
-    for (int i = 0; i < 5; i++) {
-        view = view.subviews.firstObject;
-    }
-    return view;
-}
-
-+ (UIWindow *)applicationKeywindow {
-    UIWindow *keywindow = UIApplication.sharedApplication.keyWindow;
-    if (keywindow == nil) {
-        if (@available(iOS 13.0, *)) {
-            for (UIWindowScene *scene in UIApplication.sharedApplication.connectedScenes) {
-                if (scene.activationState == UISceneActivationStateForegroundActive) {
-                    UIWindow *tmpWindow = nil;
-                    if (@available(iOS 15.0, *)) {
-                        tmpWindow = scene.keyWindow;
-                    }
-                    if (tmpWindow == nil) {
-                        for (UIWindow *window in scene.windows) {
-                            if (window.windowLevel == UIWindowLevelNormal && window.hidden == NO &&
-                                CGRectEqualToRect(window.bounds, UIScreen.mainScreen.bounds)) {
-                                tmpWindow = window;
-                                break;
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    }
-    if (keywindow == nil) {
-        for (UIWindow *window in UIApplication.sharedApplication.windows) {
-            if (window.windowLevel == UIWindowLevelNormal && window.hidden == NO && CGRectEqualToRect(window.bounds, UIScreen.mainScreen.bounds)) {
-                keywindow = window;
-                break;
-            }
-        }
-    }
-    return keywindow;
-}
-
-@end

+ 0 - 83
ThirdParty/TUIKit/TUICore/UIView+TUILayout.h

@@ -1,83 +0,0 @@
-
-//  Created by Tencent on 2023/06/09.
-//  Copyright © 2023 Tencent. All rights reserved.
-
-#define tui_mm_weakify(object) \
-    autoreleasepool {}         \
-    __weak typeof(object) weak##object = object;
-#define tui_mm_strongify(object) \
-    autoreleasepool {}           \
-    __strong typeof(weak##object) object = weak##object;
-
-#import <UIKit/UIKit.h>
-
-@interface UIView (TUILayout)
-
-@property(nonatomic) CGFloat mm_x;       ///<< frame.x
-@property(nonatomic) CGFloat mm_y;       ///<< frame.y
-@property(nonatomic) CGFloat mm_w;       ///<< frame.size.width
-@property(nonatomic) CGFloat mm_h;       ///<< frame.size.height
-@property(nonatomic) CGPoint mm_origin;  ///<< frame.origin
-@property(nonatomic) CGSize  mm_size;    ///<< frame.size
-
-@property(nonatomic) CGFloat mm_r;  ///<< right
-@property(nonatomic) CGFloat mm_b;  ///<< bottom
-
-@property(nonatomic) CGFloat mm_centerX;  ///<< self.center.x
-@property(nonatomic) CGFloat mm_centerY;  ///<< self.center.y
-
-@property(readonly) CGFloat mm_maxY;  ///<< get CGRectGetMaxY
-@property(readonly) CGFloat mm_minY;  ///<< get CGRectGetMinY
-@property(readonly) CGFloat mm_maxX;  ///<< get CGRectGetMaxX
-@property(readonly) CGFloat mm_minX;  ///<< get CGRectGetMinX
-
-@property(readonly) UIView *mm_sibling;
-@property(readonly) UIViewController *mm_viewController;  // self Responder UIViewControler
-
-// iPhoneX adapt
-
-@property(readonly) CGFloat mm_safeAreaBottomGap;
-@property(readonly) CGFloat mm_safeAreaTopGap;
-@property(readonly) CGFloat mm_safeAreaLeftGap;
-@property(readonly) CGFloat mm_safeAreaRightGap;
-
-- (UIView * (^)(CGFloat top))mm_top;             ///< set frame y
-- (UIView * (^)(CGFloat bottom))mm_bottom;       ///< set frame y
-- (UIView * (^)(CGFloat right))mm_flexToBottom;  ///< set frame height
-- (UIView * (^)(CGFloat left))mm_left;           ///< set frame x
-- (UIView * (^)(CGFloat right))mm_right;         ///< set frame x
-- (UIView * (^)(CGFloat right))mm_flexToRight;   ///< set frame width
-- (UIView * (^)(CGFloat width))mm_width;         ///< set frame width
-- (UIView * (^)(CGFloat height))mm_height;       ///< set frame height
-- (UIView * (^)(CGFloat x))mm__centerX;          ///< set center
-- (UIView * (^)(CGFloat y))mm__centerY;          ///< set center
-
-- (UIView * (^)(void))tui_mm_center;
-- (UIView * (^)(void))mm_fill;
-
-- (UIView * (^)(CGFloat space))mm_hstack;
-- (UIView * (^)(CGFloat space))mm_vstack;
-
-- (UIView * (^)(void))mm_sizeToFit;
-- (UIView * (^)(CGFloat w, CGFloat h))mm_sizeToFitThan;
-
-- (UIView *)mm_top:(CGFloat)top;
-- (UIView *)mm_bottom:(CGFloat)bottom;
-- (UIView *)mm_flexToBottom:(CGFloat)bottom NS_SWIFT_NAME(mm_flexToBottom(_:));
-- (UIView *)mm_left:(CGFloat)left;
-- (UIView *)mm_right:(CGFloat)right;
-- (UIView *)mm_flexToRight:(CGFloat)right NS_SWIFT_NAME(mm_flexToRight(_:));
-- (UIView *)mm_width:(CGFloat)width;
-- (UIView *)mm_height:(CGFloat)height;
-- (UIView *)mm__centerX:(CGFloat)x;
-- (UIView *)mm__centerY:(CGFloat)y;
-
-- (UIView *)tui_mm__center;
-- (UIView *)mm__fill;
-
-- (UIView *)mm_hstack:(CGFloat)space;
-- (UIView *)mm_vstack:(CGFloat)space;
-
-- (UIView *)mm__sizeToFit;
-
-@end

+ 0 - 443
ThirdParty/TUIKit/TUICore/UIView+TUILayout.m

@@ -1,443 +0,0 @@
-
-//  Created by Tencent on 2023/06/09.
-//  Copyright © 2023 Tencent. All rights reserved.
-#import <objc/runtime.h>
-#import "UIView+TUILayout.h"
-
-@implementation UIView (TUILayout)
-
-#pragma mark - frame
-- (void)setMm_x:(CGFloat)mm_x {
-    CGRect frame = self.frame;
-    frame.origin.x = mm_x;
-    self.frame = frame;
-}
-
-- (CGFloat)mm_x {
-    return self.frame.origin.x;
-}
-
-- (void)setMm_y:(CGFloat)mm_y {
-    CGRect frame = self.frame;
-    frame.origin.y = mm_y;
-    self.frame = frame;
-}
-- (CGFloat)mm_y {
-    return self.frame.origin.y;
-}
-- (void)setMm_w:(CGFloat)mm_w {
-    CGRect frame = self.frame;
-    frame.size.width = mm_w;
-    self.frame = frame;
-}
-
-- (CGFloat)mm_w {
-    return self.frame.size.width;
-}
-
-- (void)setMm_h:(CGFloat)mm_h {
-    CGRect frame = self.frame;
-    frame.size.height = mm_h;
-    self.frame = frame;
-}
-
-- (CGFloat)mm_h {
-    return self.frame.size.height;
-}
-
-- (CGPoint)mm_origin {
-    return self.frame.origin;
-}
-
-- (void)setMm_origin:(CGPoint)mm_origin {
-    CGRect frame = self.frame;
-    frame.origin = mm_origin;
-    self.frame = frame;
-}
-
-- (CGSize)mm_size {
-    return self.frame.size;
-}
-
-- (void)setMm_size:(CGSize)size {
-    CGRect frame = self.frame;
-    frame.size = size;
-    self.frame = frame;
-}
-
-- (CGFloat)mm_centerX {
-    return self.center.x;
-}
-
-- (CGFloat)mm_centerY {
-    return self.center.y;
-}
-
-- (void)setMm_centerX:(CGFloat)mm_centerX {
-    CGPoint center = self.center;
-    center.x = mm_centerX;
-    self.center = center;
-}
-
-- (void)setMm_centerY:(CGFloat)mm_centerY {
-    CGPoint center = self.center;
-    center.y = mm_centerY;
-    self.center = center;
-}
-
-- (CGFloat)mm_r {
-    NSCAssert(self.superview, @"must add subview first");
-    return self.superview.mm_w - self.mm_maxX;
-}
-
-- (void)setMm_r:(CGFloat)mm_r {
-    self.mm_x += self.mm_r - mm_r;
-}
-
-- (CGFloat)mm_b {
-    NSCAssert(self.superview, @"must add subview first");
-    return self.superview.mm_h - self.mm_maxY;
-}
-
-- (void)setMm_b:(CGFloat)mm_b {
-    self.mm_y += self.mm_b - mm_b;
-}
-
-- (CGFloat)mm_maxY {
-    return CGRectGetMaxY(self.frame);
-}
-- (CGFloat)mm_minY {
-    return CGRectGetMinY(self.frame);
-}
-- (CGFloat)mm_maxX {
-    return CGRectGetMaxX(self.frame);
-}
-- (CGFloat)mm_minX {
-    return CGRectGetMinX(self.frame);
-}
-
-#pragma mark - chain call
-
-- (UIView * (^)(CGFloat))mm_top {
-    @tui_mm_weakify(self);
-    return ^(CGFloat m_top) {
-      @tui_mm_strongify(self);
-      self.mm_y = m_top;
-      return self;
-    };
-}
-
-- (UIView * (^)(CGFloat))mm_bottom {
-    @tui_mm_weakify(self);
-    return ^(CGFloat m_bottom) {
-      @tui_mm_strongify(self);
-      self.mm_b = m_bottom;
-      return self;
-    };
-}
-- (UIView * (^)(CGFloat))mm_flexToBottom {
-    @tui_mm_weakify(self);
-    return ^(CGFloat m_flexToBottom) {
-      @tui_mm_strongify(self);
-      self.mm_h += self.mm_b - m_flexToBottom;
-      return self;
-    };
-}
-- (UIView * (^)(CGFloat))mm_left {
-    @tui_mm_weakify(self);
-    return ^(CGFloat m_left) {
-      @tui_mm_strongify(self);
-      self.mm_x = m_left;
-      return self;
-    };
-}
-
-- (UIView * (^)(CGFloat))mm_right {
-    @tui_mm_weakify(self);
-    return ^(CGFloat m_right) {
-      @tui_mm_strongify(self);
-      self.mm_r = m_right;
-      return self;
-    };
-}
-- (UIView * (^)(CGFloat))mm_flexToRight {
-    @tui_mm_weakify(self);
-    return ^(CGFloat m_flexToRight) {
-      @tui_mm_strongify(self);
-      self.mm_w += self.mm_r - m_flexToRight;
-      return self;
-    };
-}
-
-- (UIView * (^)(CGFloat))mm_width {
-    @tui_mm_weakify(self);
-    return ^(CGFloat m_width) {
-      @tui_mm_strongify(self);
-      self.mm_w = m_width;
-      return self;
-    };
-}
-
-- (UIView * (^)(CGFloat))mm_height {
-    @tui_mm_weakify(self);
-    return ^(CGFloat m_height) {
-      @tui_mm_strongify(self);
-      self.mm_h = m_height;
-      return self;
-    };
-}
-
-- (UIView * (^)(CGFloat))mm__centerX {
-    @tui_mm_weakify(self);
-    return ^(CGFloat x) {
-      @tui_mm_strongify(self);
-      NSAssert(self.mm_w, @"must set width first");
-      self.mm_centerX = x;
-      return self;
-    };
-}
-
-- (UIView * (^)(CGFloat))mm__centerY {
-    @tui_mm_weakify(self);
-    return ^(CGFloat y) {
-      @tui_mm_strongify(self);
-      NSAssert(self.mm_h, @"must set height first");
-      self.mm_centerY = y;
-      return self;
-    };
-}
-
-- (UIView * (^)(void))tui_mm_center {
-    @tui_mm_weakify(self);
-    return ^{
-      @tui_mm_strongify(self);
-      if (self.superview) {
-          self.mm_centerX = self.superview.mm_w / 2;
-          self.mm_centerY = self.superview.mm_h / 2;
-      }
-      return self;
-    };
-}
-
-- (UIView * (^)(void))mm_fill {
-    @tui_mm_weakify(self);
-    return ^{
-      @tui_mm_strongify(self);
-      if (self.superview) {
-          self.mm_x = self.mm_y = 0;
-          self.mm_w = self.superview.mm_w;
-          self.mm_h = self.superview.mm_h;
-      }
-      return self;
-    };
-}
-
-- (UIView * (^)(void))mm_sizeToFit {
-    @tui_mm_weakify(self);
-    return ^{
-      @tui_mm_strongify(self);
-      [self sizeToFit];
-      return self;
-    };
-}
-- (UIView * (^)(CGFloat w, CGFloat h))mm_sizeToFitThan {
-    @tui_mm_weakify(self);
-    return ^(CGFloat w, CGFloat h) {
-      @tui_mm_strongify(self);
-      [self sizeToFit];
-      if (self.mm_w < w) self.mm_w = w;
-      if (self.mm_h < h) self.mm_h = h;
-      return self;
-    };
-}
-
-- (UIView * (^)(CGFloat space))mm_hstack {
-    @tui_mm_weakify(self);
-    return ^(CGFloat space) {
-      @tui_mm_strongify(self);
-      if (self.mm_sibling) {
-          self.mm__centerY(self.mm_sibling.mm_centerY).mm_left(self.mm_sibling.mm_maxX + space);
-      }
-      return self;
-    };
-}
-
-- (UIView * (^)(CGFloat space))mm_vstack {
-    @tui_mm_weakify(self);
-    return ^(CGFloat space) {
-      @tui_mm_strongify(self);
-      if (self.mm_sibling) {
-          self.mm__centerX(self.mm_sibling.mm_centerX).mm_top(self.mm_sibling.mm_maxY + space);
-      }
-      return self;
-    };
-}
-
-- (UIView *)mm_sibling {
-    NSUInteger idx = [self.superview.subviews indexOfObject:self];
-    if (idx == 0 || idx == NSNotFound) return nil;
-    return self.superview.subviews[idx - 1];
-}
-
-- (UIViewController *)mm_viewController {
-    UIView *view = self;
-    while (view) {
-        UIResponder *nextResponder = [view nextResponder];
-        if ([nextResponder isKindOfClass:[UIViewController class]]) {
-            return (UIViewController *)nextResponder;
-        }
-        view = view.superview;
-    }
-    return nil;
-}
-
-static void *gTUIViewLayoutMethodPropertyBottomGap = &gTUIViewLayoutMethodPropertyBottomGap;
-static void *gTUIViewLayoutMethodPropertyTopGap = &gTUIViewLayoutMethodPropertyTopGap;
-static void *gTUIViewLayoutMethodPropertyLeftGap = &gTUIViewLayoutMethodPropertyLeftGap;
-static void *gTUIViewLayoutMethodPropertyRightGap = &gTUIViewLayoutMethodPropertyRightGap;
-
-- (CGFloat)mm_safeAreaBottomGap {
-    NSNumber *gap = objc_getAssociatedObject(self, gTUIViewLayoutMethodPropertyBottomGap);
-    if (gap == nil) {
-        if (@available(iOS 11, *)) {
-            if (self.superview.safeAreaLayoutGuide.layoutFrame.size.height > 0) {
-                gap = @((self.superview.mm_h - self.superview.safeAreaLayoutGuide.layoutFrame.origin.y -
-                         self.superview.safeAreaLayoutGuide.layoutFrame.size.height));
-            } else {
-                gap = nil;
-            }
-        } else {
-            gap = @(0);
-        }
-        objc_setAssociatedObject(self, gTUIViewLayoutMethodPropertyBottomGap, gap, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
-    }
-    return gap.floatValue;
-}
-
-- (CGFloat)mm_safeAreaTopGap {
-    NSNumber *gap = objc_getAssociatedObject(self, gTUIViewLayoutMethodPropertyTopGap);
-    if (gap == nil) {
-        if (@available(iOS 11, *)) {
-            gap = @(self.superview.safeAreaLayoutGuide.layoutFrame.origin.y);
-        } else {
-            gap = @(0);
-        }
-        objc_setAssociatedObject(self, gTUIViewLayoutMethodPropertyTopGap, gap, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
-    }
-    return gap.floatValue;
-}
-
-- (CGFloat)mm_safeAreaLeftGap {
-    NSNumber *gap = objc_getAssociatedObject(self, gTUIViewLayoutMethodPropertyLeftGap);
-    if (gap == nil) {
-        if (@available(iOS 11, *)) {
-            gap = @(self.superview.safeAreaLayoutGuide.layoutFrame.origin.x);
-        } else {
-            gap = @(0);
-        }
-        objc_setAssociatedObject(self, gTUIViewLayoutMethodPropertyLeftGap, gap, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
-    }
-    return gap.floatValue;
-}
-
-- (CGFloat)mm_safeAreaRightGap {
-    NSNumber *gap = objc_getAssociatedObject(self, gTUIViewLayoutMethodPropertyRightGap);
-    if (gap == nil) {
-        if (@available(iOS 11, *)) {
-            gap =
-                @((self.superview.mm_w - self.superview.safeAreaLayoutGuide.layoutFrame.origin.x - self.superview.safeAreaLayoutGuide.layoutFrame.size.width));
-        } else {
-            gap = @(0);
-        }
-        objc_setAssociatedObject(self, gTUIViewLayoutMethodPropertyRightGap, gap, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
-    }
-    return gap.floatValue;
-}
-
-- (UIView *)mm_top:(CGFloat)top {
-    self.mm_y = top;
-    return self;
-}
-
-- (UIView *)mm_bottom:(CGFloat)bottom {
-    self.mm_b = bottom;
-    return self;
-}
-
-- (UIView *)mm_flexToBottom:(CGFloat)bottom {
-    self.mm_h += self.mm_b - bottom;
-    return self;
-}
-
-- (UIView *)mm_left:(CGFloat)left {
-    self.mm_x = left;
-    return self;
-}
-
-- (UIView *)mm_right:(CGFloat)right {
-    self.mm_r = right;
-    return self;
-}
-
-- (UIView *)mm_flexToRight:(CGFloat)right {
-    self.mm_w += self.mm_r - right;
-    return self;
-}
-
-- (UIView *)mm_width:(CGFloat)width {
-    self.mm_w = width;
-    return self;
-}
-
-- (UIView *)mm_height:(CGFloat)height {
-    self.mm_h = height;
-    return self;
-}
-
-- (UIView *)mm__centerX:(CGFloat)x {
-    self.mm_centerX = x;
-    return self;
-}
-
-- (UIView *)mm__centerY:(CGFloat)y {
-    self.mm_centerY = y;
-    return self;
-}
-
-- (UIView *)tui_mm__center {
-    if (self.superview) {
-        self.mm_centerX = self.superview.mm_w / 2;
-        self.mm_centerY = self.superview.mm_h / 2;
-    }
-    return self;
-}
-
-- (UIView *)mm__fill {
-    if (self.superview) {
-        self.mm_x = self.mm_y = 0;
-        self.mm_w = self.superview.mm_w;
-        self.mm_h = self.superview.mm_h;
-    }
-    return self;
-}
-
-- (UIView *)mm_hstack:(CGFloat)space {
-    if (self.mm_sibling) {
-        self.mm__centerY(self.mm_sibling.mm_centerY).mm_left(self.mm_sibling.mm_maxX + space);
-    }
-    return self;
-}
-
-- (UIView *)mm_vstack:(CGFloat)space {
-    if (self.mm_sibling) {
-        self.mm__centerX(self.mm_sibling.mm_centerX).mm_top(self.mm_sibling.mm_maxY + space);
-    }
-    return self;
-}
-
-- (UIView *)mm__sizeToFit {
-    [self sizeToFit];
-    return self;
-}
-
-@end

+ 0 - 463
ThirdParty/TUIKit/TUICore/UIView+TUIToast.h

@@ -1,463 +0,0 @@
-
-//  Created by Tencent on 2023/06/09.
-//  Copyright © 2023 Tencent. All rights reserved.
-//
-//  UIView+Toast.h
-//  Toast
-//
-//  Copyright (c) 2011-2017 Charles Scalesse.
-//
-//  Permission is hereby granted, free of charge, to any person obtaining a
-//  copy of this software and associated documentation files (the
-//  "Software"), to deal in the Software without restriction, including
-//  without limitation the rights to use, copy, modify, merge, publish,
-//  distribute, sublicense, and/or sell copies of the Software, and to
-//  permit persons to whom the Software is furnished to do so, subject to
-//  the following conditions:
-//
-//  The above copyright notice and this permission notice shall be included
-//  in all copies or substantial portions of the Software.
-//
-//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-//  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-//  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-//  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-//  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-//  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-//  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-#import <UIKit/UIKit.h>
-
-extern const NSString *TUICSToastPositionTop;
-extern const NSString *TUICSToastPositionTopLeft;
-extern const NSString *TUICSToastPositionTopRight;
-extern const NSString *TUICSToastPositionCenter;
-extern const NSString *TUICSToastPositionCenterLeft;
-extern const NSString *TUICSToastPositionCenterRight;
-extern const NSString *TUICSToastPositionBottom;
-extern const NSString *TUICSToastPositionBottomLeft;
-extern const NSString *TUICSToastPositionBottomRight;
-
-@class TUICSToastStyle;
-
-/**
- Toast is an Objective-C category that adds toast notifications to the UIView
- object class. It is intended to be simple, lightweight, and easy to use. Most
- toast notifications can be triggered with a single line of code.
-
- The `makeToast:` methods create a new view and then display it as toast.
-
- The `showToast:` methods display any view as toast.
-
- */
-@interface UIView (TUIToast)
-
-/**
- Creates and presents a new toast view with a message and displays it with the
- default duration and position. Styled using the shared style.
-
- @param message The message to be displayed
- */
-- (void)makeToast:(NSString *)message;
-
-/**
- Creates and presents a new toast view with a message. Duration
- can be set explicitly. Styled using the shared style.
-
- @param message The message to be displayed
- @param duration The toast duration
- */
-- (void)makeToast:(NSString *)message duration:(NSTimeInterval)duration;
-
-/**
- Creates and presents a new toast view with a message. Duration and position
- can be set explicitly. Styled using the shared style.
-
- @param message The message to be displayed
- @param duration The toast duration
- @param position The toast's center point. Can be one of the predefined CSToastPosition
-                 constants or a `CGPoint` wrapped in an `NSValue` object.
- */
-- (void)makeToast:(NSString *)message duration:(NSTimeInterval)duration position:(id)position;
-
-/**
- Creates and presents a new toast view with a message. Duration, position, and
- style can be set explicitly.
-
- @param message The message to be displayed
- @param duration The toast duration
- @param position The toast's center point. Can be one of the predefined CSToastPosition
- constants or a `CGPoint` wrapped in an `NSValue` object.
- @param style The style. The shared style will be used when nil
- */
-- (void)makeToast:(NSString *)message duration:(NSTimeInterval)duration position:(id)position style:(TUICSToastStyle *)style;
-
-/**
- Creates and presents a new toast view with a message, title, and image. Duration,
- position, and style can be set explicitly. The completion block executes when the
- toast view completes. `didTap` will be `YES` if the toast view was dismissed from
- a tap.
-
- @param message The message to be displayed
- @param duration The toast duration
- @param position The toast's center point. Can be one of the predefined CSToastPosition
-                 constants or a `CGPoint` wrapped in an `NSValue` object.
- @param title The title
- @param image The image
- @param style The style. The shared style will be used when nil
- @param completion The completion block, executed after the toast view disappears.
-                   didTap will be `YES` if the toast view was dismissed from a tap.
- */
-
-- (void)makeToastParam:(NSDictionary *)info
-              duration:(NSTimeInterval)duration
-              position:(id)position
-            style:(TUICSToastStyle *)style
-            completion:(void (^)(BOOL didTap))completion;
-
-/**
- Creates a new toast view with any combination of message, title, and image.
- The look and feel is configured via the style. Unlike the `makeToast:` methods,
- this method does not present the toast view automatically. One of the showToast:
- methods must be used to present the resulting view.
-
- @warning if message, title, and image are all nil, this method will return nil.
-
- @param message The message to be displayed
- @param title The title
- @param image The image
- @param style The style. The shared style will be used when nil
- @return The newly created toast view
- */
-- (UIView *)toastViewForMessage:(NSString *)message title:(NSString *)title image:(UIImage *)image style:(TUICSToastStyle *)style;
-
-/**
- Hides the active toast. If there are multiple toasts active in a view, this method
- hides the oldest toast (the first of the toasts to have been presented).
-
- @see `hideAllToasts` to remove all active toasts from a view.
-
- @warning This method has no effect on activity toasts. Use `hideToastActivity` to
- hide activity toasts.
- */
-- (void)hideToast;
-
-/**
- Hides an active toast.
-
- @param toast The active toast view to dismiss. Any toast that is currently being displayed
- on the screen is considered active.
-
- @warning this does not clear a toast view that is currently waiting in the queue.
- */
-- (void)hideToast:(UIView *)toast;
-
-/**
- Hides all active toast views and clears the queue.
- */
-- (void)hideAllToasts;
-
-/**
- Hides all active toast views, with options to hide activity and clear the queue.
-
- @param includeActivity If `true`, toast activity will also be hidden. Default is `false`.
- @param clearQueue If `true`, removes all toast views from the queue. Default is `true`.
- */
-- (void)hideAllToasts:(BOOL)includeActivity clearQueue:(BOOL)clearQueue;
-
-/**
- Removes all toast views from the queue. This has no effect on toast views that are
- active. Use `hideAllToasts` to hide the active toasts views and clear the queue.
- */
-- (void)clearToastQueue;
-
-/**
- Creates and displays a new toast activity indicator view at a specified position.
-
- @warning Only one toast activity indicator view can be presented per superview. Subsequent
- calls to `makeToastActivity:` will be ignored until hideToastActivity is called.
-
- @warning `makeToastActivity:` works independently of the showToast: methods. Toast activity
- views can be presented and dismissed while toast views are being displayed. `makeToastActivity:`
- has no effect on the queueing behavior of the showToast: methods.
-
- @param position The toast's center point. Can be one of the predefined CSToastPosition
-                 constants or a `CGPoint` wrapped in an `NSValue` object.
- */
-- (void)makeToastActivity:(id)position;
-
-/**
- Dismisses the active toast activity indicator view.
- */
-- (void)hideToastActivity;
-
-/**
- Displays any view as toast using the default duration and position.
-
- @param toast The view to be displayed as toast
- */
-- (void)showToast:(UIView *)toast;
-
-/**
- Displays any view as toast at a provided position and duration. The completion block
- executes when the toast view completes. `didTap` will be `YES` if the toast view was
- dismissed from a tap.
-
- @param toast The view to be displayed as toast
- @param duration The notification duration
- @param position The toast's center point. Can be one of the predefined CSToastPosition
-                 constants or a `CGPoint` wrapped in an `NSValue` object.
- @param completion The completion block, executed after the toast view disappears.
-                   didTap will be `YES` if the toast view was dismissed from a tap.
- */
-- (void)showToast:(UIView *)toast duration:(NSTimeInterval)duration position:(id)position completion:(void (^)(BOOL didTap))completion;
-
-@end
-
-/**
- `TUICSToastStyle` instances define the look and feel for toast views created via the
- `makeToast:` methods as well for toast views created directly with
- `toastViewForMessage:title:image:style:`.
-
- @warning `TUICSToastStyle` offers relatively simple styling options for the default
- toast view. If you require a toast view with more complex UI, it probably makes more
- sense to create your own custom UIView subclass and present it with the `showToast:`
- methods.
- */
-@interface TUICSToastStyle : NSObject
-
-/**
- The background color. Default is `[UIColor blackColor]` at 80% opacity.
- */
-@property(strong, nonatomic) UIColor *backgroundColor;
-
-/**
- The title color. Default is `[UIColor whiteColor]`.
- */
-@property(strong, nonatomic) UIColor *titleColor;
-
-/**
- The message color. Default is `[UIColor whiteColor]`.
- */
-@property(strong, nonatomic) UIColor *messageColor;
-
-/**
- A percentage value from 0.0 to 1.0, representing the maximum width of the toast
- view relative to it's superview. Default is 0.8 (80% of the superview's width).
- */
-@property(assign, nonatomic) CGFloat maxWidthPercentage;
-
-/**
- A percentage value from 0.0 to 1.0, representing the maximum height of the toast
- view relative to it's superview. Default is 0.8 (80% of the superview's height).
- */
-@property(assign, nonatomic) CGFloat maxHeightPercentage;
-
-/**
- The spacing from the horizontal edge of the toast view to the content. When an image
- is present, and is not set horizontalIntervalPadding, this is also used as the padding between the image and the text.
- Default is 10.0.
- */
-@property(assign, nonatomic) CGFloat horizontalPadding;
-
-/**
- The spacing from the vertical edge of the toast view to the content. When a title
- is present, this is also used as the padding between the title and the message.
- Default is 10.0.
- */
-@property(assign, nonatomic) CGFloat verticalPadding;
-
-/**
- When an image is present, this is used as the padding between the image and the text.
- Default is horizontalPadding.
- */
-@property(assign, nonatomic) CGFloat horizontalIntervalPadding;
-
-/**
- The corner radius. Default is 10.0.
- */
-@property(assign, nonatomic) CGFloat cornerRadius;
-
-/**
- The title font. Default is `[UIFont boldSystemFontOfSize:16.0]`.
- */
-@property(strong, nonatomic) UIFont *titleFont;
-
-/**
- The message font. Default is `[UIFont systemFontOfSize:16.0]`.
- */
-@property(strong, nonatomic) UIFont *messageFont;
-
-/**
- The title text alignment. Default is `NSTextAlignmentLeft`.
- */
-@property(assign, nonatomic) NSTextAlignment titleAlignment;
-
-/**
- The message text alignment. Default is `NSTextAlignmentLeft`.
- */
-@property(assign, nonatomic) NSTextAlignment messageAlignment;
-
-/**
- The maximum number of lines for the title. The default is 0 (no limit).
- */
-@property(assign, nonatomic) NSInteger titleNumberOfLines;
-
-/**
- The maximum number of lines for the message. The default is 0 (no limit).
- */
-@property(assign, nonatomic) NSInteger messageNumberOfLines;
-
-/**
- Enable or disable a shadow on the toast view. Default is `NO`.
- */
-@property(assign, nonatomic) BOOL displayShadow;
-
-/**
- The shadow color. Default is `[UIColor blackColor]`.
- */
-@property(strong, nonatomic) UIColor *shadowColor;
-
-/**
- A value from 0.0 to 1.0, representing the opacity of the shadow.
- Default is 0.8 (80% opacity).
- */
-@property(assign, nonatomic) CGFloat shadowOpacity;
-
-/**
- The shadow radius. Default is 6.0.
- */
-@property(assign, nonatomic) CGFloat shadowRadius;
-
-/**
- The shadow offset. The default is `CGSizeMake(4.0, 4.0)`.
- */
-@property(assign, nonatomic) CGSize shadowOffset;
-
-/**
- The image size. The default is `CGSizeMake(80.0, 80.0)`.
- */
-@property(assign, nonatomic) CGSize imageSize;
-
-/**
- The image ContentMode. The default is `UIViewContentModeScaleAspectFit`.
- */
-@property(assign, nonatomic) UIViewContentMode imageContentMode;
-
-/**
- The size of the toast activity view when `makeToastActivity:` is called.
- Default is `CGSizeMake(100.0, 100.0)`.
- */
-@property(assign, nonatomic) CGSize activitySize;
-
-/**
- The fade in/out animation duration. Default is 0.2.
- */
-@property(assign, nonatomic) NSTimeInterval fadeDuration;
-
-/**
- Creates a new instance of `TUICSToastStyle` with all the default values set.
- */
-- (instancetype)initWithDefaultStyle NS_DESIGNATED_INITIALIZER;
-
-/**
- @warning Only the designated initializer should be used to create
- an instance of `TUICSToastStyle`.
- */
-- (instancetype)init NS_UNAVAILABLE;
-
-@end
-
-/**
- `TUICSToastManager` provides general configuration options for all toast
- notifications. Backed by a singleton instance.
- */
-@interface TUICSToastManager : NSObject
-
-/**
- Sets the shared style on the singleton. The shared style is used whenever
- a `makeToast:` method (or `toastViewForMessage:title:image:style:`) is called
- with with a nil style. By default, this is set to `TUICSToastStyle`'s default
- style.
-
- @param sharedStyle the shared style
- */
-+ (void)setSharedStyle:(TUICSToastStyle *)sharedStyle;
-
-/**
- Gets the shared style from the singlton. By default, this is
- `TUICSToastStyle`'s default style.
-
- @return the shared style
- */
-+ (TUICSToastStyle *)sharedStyle;
-
-/**
- Enables or disables tap to dismiss on toast views. Default is `YES`.
-
- @param tapToDismissEnabled YES or NO
- */
-+ (void)setTapToDismissEnabled:(BOOL)tapToDismissEnabled;
-
-/**
- Returns `YES` if tap to dismiss is enabled, otherwise `NO`.
- Default is `YES`.
-
- @return BOOL YES or NO
- */
-+ (BOOL)isTapToDismissEnabled;
-
-/**
- Enables or disables queueing behavior for toast views. When `YES`,
- toast views will appear one after the other. When `NO`, multiple Toast
- views will appear at the same time (potentially overlapping depending
- on their positions). This has no effect on the toast activity view,
- which operates independently of normal toast views. Default is `NO`.
-
- @param queueEnabled YES or NO
- */
-+ (void)setQueueEnabled:(BOOL)queueEnabled;
-
-/**
- Returns `YES` if the queue is enabled, otherwise `NO`.
- Default is `NO`.
-
- @return BOOL
- */
-+ (BOOL)isQueueEnabled;
-
-/**
- Sets the default duration. Used for the `makeToast:` and
- `showToast:` methods that don't require an explicit duration.
- Default is 3.0.
-
- @param duration The toast duration
- */
-+ (void)setDefaultDuration:(NSTimeInterval)duration;
-
-/**
- Returns the default duration. Default is 3.0.
-
- @return duration The toast duration
-*/
-+ (NSTimeInterval)defaultDuration;
-
-/**
- Sets the default position. Used for the `makeToast:` and
- `showToast:` methods that don't require an explicit position.
- Default is `TUICSToastPositionBottom`.
-
- @param position The default center point. Can be one of the predefined
- CSToastPosition constants or a `CGPoint` wrapped in an `NSValue` object.
- */
-+ (void)setDefaultPosition:(id)position;
-
-/**
- Returns the default toast position. Default is `TUICSToastPositionBottom`.
-
- @return position The default center point. Will be one of the predefined
- CSToastPosition constants or a `CGPoint` wrapped in an `NSValue` object.
- */
-+ (id)defaultPosition;
-
-@end

+ 0 - 644
ThirdParty/TUIKit/TUICore/UIView+TUIToast.m

@@ -1,644 +0,0 @@
-
-//  Created by Tencent on 2023/06/09.
-//  Copyright © 2023 Tencent. All rights reserved.
-//
-//  UIView+Toast.m
-//  Toast
-//
-//  Copyright (c) 2011-2017 Charles Scalesse.
-//
-//  Permission is hereby granted, free of charge, to any person obtaining a
-//  copy of this software and associated documentation files (the
-//  "Software"), to deal in the Software without restriction, including
-//  without limitation the rights to use, copy, modify, merge, publish,
-//  distribute, sublicense, and/or sell copies of the Software, and to
-//  permit persons to whom the Software is furnished to do so, subject to
-//  the following conditions:
-//
-//  The above copyright notice and this permission notice shall be included
-//  in all copies or substantial portions of the Software.
-//
-//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-//  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-//  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-//  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-//  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-//  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-//  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-#import <QuartzCore/QuartzCore.h>
-#import <objc/runtime.h>
-#import "UIView+TUIToast.h"
-
-// Positions
-NSString *TUICSToastPositionTop = @"TUICSToastPositionTop";
-NSString *TUICSToastPositionTopLeft = @"TUICSToastPositionTopLeft";
-NSString *TUICSToastPositionTopRight = @"TUICSToastPositionTopRight";
-NSString *TUICSToastPositionCenter = @"TUICSToastPositionCenter";
-NSString *TUICSToastPositionCenterLeft = @"TUICSToastPositionCenterLeft";
-NSString *TUICSToastPositionCenterRight = @"TUICSToastPositionCenterRight";
-NSString *TUICSToastPositionBottom = @"TUICSToastPositionBottom";
-NSString *TUICSToastPositionBottomLeft = @"TUICSToastPositionBottomLeft";
-NSString *TUICSToastPositionBottomRight = @"TUICSToastPositionBottomRight";
-
-// Keys for values associated with toast views
-static const NSString *TUICSToastTimerKey = @"TUICSToastTimerKey";
-static const NSString *TUICSToastDurationKey = @"TUICSToastDurationKey";
-static const NSString *TUICSToastPositionKey = @"TUICSToastPositionKey";
-static const NSString *TUICSToastCompletionKey = @"TUICSToastCompletionKey";
-
-// Keys for values associated with self
-static const NSString *TUICSToastActiveKey = @"TUICSToastActiveKey";
-static const NSString *TUICSToastActivityViewKey = @"TUICSToastActivityViewKey";
-static const NSString *TUICSToastQueueKey = @"TUICSToastQueueKey";
-
-@interface UIView (TUIToastPrivate)
-
-/**
- These private methods are being prefixed with "cs_" to reduce the likelihood of non-obvious
- naming conflicts with other UIView methods.
-
- @discussion Should the public API also use the cs_ prefix? Technically it should, but it
- results in code that is less legible. The current public method names seem unlikely to cause
- conflicts so I think we should favor the cleaner API for now.
- */
-- (void)cs_showToast:(UIView *)toast duration:(NSTimeInterval)duration position:(id)position;
-- (void)cs_hideToast:(UIView *)toast;
-- (void)cs_hideToast:(UIView *)toast fromTap:(BOOL)fromTap;
-- (void)cs_toastTimerDidFinish:(NSTimer *)timer;
-- (void)cs_handleToastTapped:(UITapGestureRecognizer *)recognizer;
-- (CGPoint)cs_centerPointForPosition:(id)position withToast:(UIView *)toast;
-- (NSMutableArray *)cs_toastQueue;
-
-@end
-
-@implementation UIView (TUIToast)
-
-#pragma mark - Make Toast Methods
-
-- (void)makeToast:(NSString *)message {
-    [self makeToast:message duration:[TUICSToastManager defaultDuration] position:[TUICSToastManager defaultPosition] style:nil];
-}
-
-- (void)makeToast:(NSString *)message duration:(NSTimeInterval)duration {
-    [self makeToast:message duration:duration position:[TUICSToastManager defaultPosition] style:nil];
-}
-
-- (void)makeToast:(NSString *)message duration:(NSTimeInterval)duration position:(id)position {
-    [self makeToast:message duration:duration position:position style:nil];
-}
-
-- (void)makeToast:(NSString *)message duration:(NSTimeInterval)duration position:(id)position style:(TUICSToastStyle *)style {
-    UIView *toast = [self toastViewForMessage:message title:nil image:nil style:style];
-    [self showToast:toast duration:duration position:position completion:nil];
-}
-
-- (void)makeToastParam:(NSDictionary *)info
-              duration:(NSTimeInterval)duration
-              position:(id)position
-            style:(TUICSToastStyle *)style
-       completion:(void (^)(BOOL didTap))completion {
-    NSString *message = info[@"message"];
-    NSString *title = info[@"title"];
-    UIImage *image = info[@"image"];
-    
-    UIView *toast = [self toastViewForMessage:message title:title image:image style:style];
-    [self showToast:toast duration:duration position:position completion:completion];
-}
-
-#pragma mark - Show Toast Methods
-
-- (void)showToast:(UIView *)toast {
-    [self showToast:toast duration:[TUICSToastManager defaultDuration] position:[TUICSToastManager defaultPosition] completion:nil];
-}
-
-- (void)showToast:(UIView *)toast duration:(NSTimeInterval)duration position:(id)position completion:(void (^)(BOOL didTap))completion {
-    // sanity
-    if (toast == nil) return;
-
-    // store the completion block on the toast view
-    objc_setAssociatedObject(toast, &TUICSToastCompletionKey, completion, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
-
-    if ([TUICSToastManager isQueueEnabled] && [self.cs_activeToasts count] > 0) {
-        // we're about to queue this toast view so we need to store the duration and position as well
-        objc_setAssociatedObject(toast, &TUICSToastDurationKey, @(duration), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
-        objc_setAssociatedObject(toast, &TUICSToastPositionKey, position, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
-
-        // enqueue
-        [self.cs_toastQueue addObject:toast];
-    } else {
-        // present
-        [self cs_showToast:toast duration:duration position:position];
-    }
-}
-
-#pragma mark - Hide Toast Methods
-
-- (void)hideToast {
-    [self hideToast:[[self cs_activeToasts] firstObject]];
-}
-
-- (void)hideToast:(UIView *)toast {
-    // sanity
-    if (!toast || ![[self cs_activeToasts] containsObject:toast]) return;
-
-    [self cs_hideToast:toast];
-}
-
-- (void)hideAllToasts {
-    [self hideAllToasts:NO clearQueue:YES];
-}
-
-- (void)hideAllToasts:(BOOL)includeActivity clearQueue:(BOOL)clearQueue {
-    if (clearQueue) {
-        [self clearToastQueue];
-    }
-
-    for (UIView *toast in [self cs_activeToasts]) {
-        [self hideToast:toast];
-    }
-
-    if (includeActivity) {
-        [self hideToastActivity];
-    }
-}
-
-- (void)clearToastQueue {
-    [[self cs_toastQueue] removeAllObjects];
-}
-
-#pragma mark - Private Show/Hide Methods
-
-- (void)cs_showToast:(UIView *)toast duration:(NSTimeInterval)duration position:(id)position {
-    toast.center = [self cs_centerPointForPosition:position withToast:toast];
-    toast.alpha = 0.0;
-
-    if ([TUICSToastManager isTapToDismissEnabled]) {
-        UITapGestureRecognizer *recognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(cs_handleToastTapped:)];
-        [toast addGestureRecognizer:recognizer];
-        toast.userInteractionEnabled = YES;
-        toast.exclusiveTouch = YES;
-    }
-
-    [[self cs_activeToasts] addObject:toast];
-
-    [self addSubview:toast];
-
-    [UIView animateWithDuration:[[TUICSToastManager sharedStyle] fadeDuration]
-        delay:0.0
-        options:(UIViewAnimationOptionCurveEaseOut | UIViewAnimationOptionAllowUserInteraction)
-        animations:^{
-          toast.alpha = 1.0;
-        }
-        completion:^(BOOL finished) {
-          NSTimer *timer = [NSTimer timerWithTimeInterval:duration target:self selector:@selector(cs_toastTimerDidFinish:) userInfo:toast repeats:NO];
-          [[NSRunLoop mainRunLoop] addTimer:timer forMode:NSRunLoopCommonModes];
-          objc_setAssociatedObject(toast, &TUICSToastTimerKey, timer, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
-        }];
-}
-
-- (void)cs_hideToast:(UIView *)toast {
-    [self cs_hideToast:toast fromTap:NO];
-}
-
-- (void)cs_hideToast:(UIView *)toast fromTap:(BOOL)fromTap {
-    NSTimer *timer = (NSTimer *)objc_getAssociatedObject(toast, &TUICSToastTimerKey);
-    [timer invalidate];
-
-    [UIView animateWithDuration:[[TUICSToastManager sharedStyle] fadeDuration]
-        delay:0.0
-        options:(UIViewAnimationOptionCurveEaseIn | UIViewAnimationOptionBeginFromCurrentState)
-        animations:^{
-          toast.alpha = 0.0;
-        }
-        completion:^(BOOL finished) {
-          [toast removeFromSuperview];
-
-          // remove
-          [[self cs_activeToasts] removeObject:toast];
-
-          // execute the completion block, if necessary
-          void (^completion)(BOOL didTap) = objc_getAssociatedObject(toast, &TUICSToastCompletionKey);
-          if (completion) {
-              completion(fromTap);
-          }
-
-          if ([self.cs_toastQueue count] > 0) {
-              // dequeue
-              UIView *nextToast = [[self cs_toastQueue] firstObject];
-              [[self cs_toastQueue] removeObjectAtIndex:0];
-
-              // present the next toast
-              NSTimeInterval duration = [objc_getAssociatedObject(nextToast, &TUICSToastDurationKey) doubleValue];
-              id position = objc_getAssociatedObject(nextToast, &TUICSToastPositionKey);
-              [self cs_showToast:nextToast duration:duration position:position];
-          }
-        }];
-}
-
-#pragma mark - View Construction
-
-- (UIView *)toastViewForMessage:(NSString *)message title:(NSString *)title image:(UIImage *)image style:(TUICSToastStyle *)style {
-    // sanity
-    if (message == nil && title == nil && image == nil) return nil;
-
-    // default to the shared style
-    if (style == nil) {
-        style = [TUICSToastManager sharedStyle];
-    }
-
-    // dynamically build a toast view with any combination of message, title, & image
-    UILabel *messageLabel = nil;
-    UILabel *titleLabel = nil;
-    UIImageView *imageView = nil;
-
-    UIView *wrapperView = [[UIView alloc] init];
-    wrapperView.autoresizingMask = (UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin |
-                                    UIViewAutoresizingFlexibleBottomMargin);
-    wrapperView.layer.cornerRadius = style.cornerRadius;
-
-    if (style.displayShadow) {
-        wrapperView.layer.shadowColor = style.shadowColor.CGColor;
-        wrapperView.layer.shadowOpacity = style.shadowOpacity;
-        wrapperView.layer.shadowRadius = style.shadowRadius;
-        wrapperView.layer.shadowOffset = style.shadowOffset;
-    }
-
-    wrapperView.backgroundColor = style.backgroundColor;
-
-    if (image != nil) {
-        imageView = [[UIImageView alloc] initWithImage:image];
-        if (style.imageContentMode) {
-            imageView.contentMode = style.imageContentMode;
-        } else {
-            imageView.contentMode = UIViewContentModeScaleAspectFit;
-        }
-        imageView.frame = CGRectMake(style.horizontalPadding, style.verticalPadding, style.imageSize.width, style.imageSize.height);
-    }
-
-    CGRect imageRect = CGRectZero;
-
-    if (imageView != nil) {
-        imageRect.origin.x = style.horizontalPadding;
-        imageRect.origin.y = style.verticalPadding;
-        imageRect.size.width = imageView.bounds.size.width;
-        imageRect.size.height = imageView.bounds.size.height;
-    }
-
-    if (title != nil) {
-        titleLabel = [[UILabel alloc] init];
-        titleLabel.numberOfLines = style.titleNumberOfLines;
-        titleLabel.font = style.titleFont;
-        titleLabel.textAlignment = style.titleAlignment;
-        titleLabel.lineBreakMode = NSLineBreakByTruncatingTail;
-        titleLabel.textColor = style.titleColor;
-        titleLabel.backgroundColor = [UIColor clearColor];
-        titleLabel.alpha = 1.0;
-        titleLabel.text = title;
-
-        // size the title label according to the length of the text
-        CGSize maxSizeTitle =
-            CGSizeMake((self.bounds.size.width * style.maxWidthPercentage) - imageRect.size.width, self.bounds.size.height * style.maxHeightPercentage);
-        CGSize expectedSizeTitle = [titleLabel sizeThatFits:maxSizeTitle];
-        // UILabel can return a size larger than the max size when the number of lines is 1
-        expectedSizeTitle = CGSizeMake(MIN(maxSizeTitle.width, expectedSizeTitle.width), MIN(maxSizeTitle.height, expectedSizeTitle.height));
-        titleLabel.frame = CGRectMake(0.0, 0.0, expectedSizeTitle.width, expectedSizeTitle.height);
-    }
-
-    if (message != nil) {
-        messageLabel = [[UILabel alloc] init];
-        messageLabel.numberOfLines = style.messageNumberOfLines;
-        messageLabel.font = style.messageFont;
-        messageLabel.textAlignment = style.messageAlignment;
-        messageLabel.lineBreakMode = NSLineBreakByTruncatingTail;
-        messageLabel.textColor = style.messageColor;
-        messageLabel.backgroundColor = [UIColor clearColor];
-        messageLabel.alpha = 1.0;
-        messageLabel.text = message;
-
-        CGSize maxSizeMessage =
-            CGSizeMake((self.bounds.size.width * style.maxWidthPercentage) - imageRect.size.width, self.bounds.size.height * style.maxHeightPercentage);
-        CGSize expectedSizeMessage = [messageLabel sizeThatFits:maxSizeMessage];
-        // UILabel can return a size larger than the max size when the number of lines is 1
-        expectedSizeMessage = CGSizeMake(MIN(maxSizeMessage.width, expectedSizeMessage.width), MIN(maxSizeMessage.height, expectedSizeMessage.height));
-        messageLabel.frame = CGRectMake(0.0, 0.0, expectedSizeMessage.width, expectedSizeMessage.height);
-    }
-
-    CGRect titleRect = CGRectZero;
-
-    if (titleLabel != nil) {
-        titleRect.origin.x = imageRect.origin.x + imageRect.size.width + style.horizontalIntervalPadding;
-        titleRect.origin.y = style.verticalPadding;
-        titleRect.size.width = titleLabel.bounds.size.width;
-        titleRect.size.height = titleLabel.bounds.size.height;
-    }
-
-    CGRect messageRect = CGRectZero;
-
-    if (messageLabel != nil) {
-        messageRect.origin.x = imageRect.origin.x + imageRect.size.width + style.horizontalIntervalPadding;
-        messageRect.origin.y = titleRect.origin.y + titleRect.size.height + style.verticalPadding;
-        messageRect.size.width = messageLabel.bounds.size.width;
-        messageRect.size.height = messageLabel.bounds.size.height;
-    }
-
-    CGFloat longerWidth = MAX(titleRect.size.width, messageRect.size.width);
-    CGFloat longerX = MAX(titleRect.origin.x, messageRect.origin.x);
-
-    // Wrapper width uses the longerWidth or the image width, whatever is larger. Same logic applies to the wrapper height.
-    CGFloat wrapperWidth = MAX((imageRect.size.width + (style.horizontalPadding * 2.0)), (longerX + longerWidth + style.horizontalPadding));
-    CGFloat wrapperHeight =
-        MAX((messageRect.origin.y + messageRect.size.height + style.verticalPadding), (imageRect.size.height + (style.verticalPadding * 2.0)));
-
-    wrapperView.frame = CGRectMake(0.0, 0.0, wrapperWidth, wrapperHeight);
-
-    if (titleLabel != nil) {
-        titleLabel.frame = titleRect;
-        [wrapperView addSubview:titleLabel];
-    }
-
-    if (messageLabel != nil) {
-        messageLabel.frame = messageRect;
-        [wrapperView addSubview:messageLabel];
-    }
-
-    if (imageView != nil) {
-        [wrapperView addSubview:imageView];
-    }
-
-    return wrapperView;
-}
-
-#pragma mark - Storage
-
-- (NSMutableArray *)cs_activeToasts {
-    NSMutableArray *cs_activeToasts = objc_getAssociatedObject(self, &TUICSToastActiveKey);
-    if (cs_activeToasts == nil) {
-        cs_activeToasts = [[NSMutableArray alloc] init];
-        objc_setAssociatedObject(self, &TUICSToastActiveKey, cs_activeToasts, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
-    }
-    return cs_activeToasts;
-}
-
-- (NSMutableArray *)cs_toastQueue {
-    NSMutableArray *cs_toastQueue = objc_getAssociatedObject(self, &TUICSToastQueueKey);
-    if (cs_toastQueue == nil) {
-        cs_toastQueue = [[NSMutableArray alloc] init];
-        objc_setAssociatedObject(self, &TUICSToastQueueKey, cs_toastQueue, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
-    }
-    return cs_toastQueue;
-}
-
-#pragma mark - Events
-
-- (void)cs_toastTimerDidFinish:(NSTimer *)timer {
-    [self cs_hideToast:(UIView *)timer.userInfo];
-}
-
-- (void)cs_handleToastTapped:(UITapGestureRecognizer *)recognizer {
-    UIView *toast = recognizer.view;
-    NSTimer *timer = (NSTimer *)objc_getAssociatedObject(toast, &TUICSToastTimerKey);
-    [timer invalidate];
-
-    [self cs_hideToast:toast fromTap:YES];
-}
-
-#pragma mark - Activity Methods
-
-- (void)makeToastActivity:(id)position {
-    // sanity
-    UIView *existingActivityView = (UIView *)objc_getAssociatedObject(self, &TUICSToastActivityViewKey);
-    if (existingActivityView != nil) return;
-
-    TUICSToastStyle *style = [TUICSToastManager sharedStyle];
-
-    UIView *activityView = [[UIView alloc] initWithFrame:CGRectMake(0.0, 0.0, style.activitySize.width, style.activitySize.height)];
-    activityView.center = [self cs_centerPointForPosition:position withToast:activityView];
-    activityView.backgroundColor = style.backgroundColor;
-    activityView.alpha = 0.0;
-    activityView.autoresizingMask = (UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin |
-                                     UIViewAutoresizingFlexibleBottomMargin);
-    activityView.layer.cornerRadius = style.cornerRadius;
-
-    if (style.displayShadow) {
-        activityView.layer.shadowColor = style.shadowColor.CGColor;
-        activityView.layer.shadowOpacity = style.shadowOpacity;
-        activityView.layer.shadowRadius = style.shadowRadius;
-        activityView.layer.shadowOffset = style.shadowOffset;
-    }
-
-    UIActivityIndicatorView *activityIndicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
-    activityIndicatorView.center = CGPointMake(activityView.bounds.size.width / 2, activityView.bounds.size.height / 2);
-    [activityView addSubview:activityIndicatorView];
-    [activityIndicatorView startAnimating];
-
-    // associate the activity view with self
-    objc_setAssociatedObject(self, &TUICSToastActivityViewKey, activityView, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
-
-    [self addSubview:activityView];
-
-    [UIView animateWithDuration:style.fadeDuration
-                          delay:0.0
-                        options:UIViewAnimationOptionCurveEaseOut
-                     animations:^{
-                       activityView.alpha = 1.0;
-                     }
-                     completion:nil];
-}
-
-- (void)hideToastActivity {
-    UIView *existingActivityView = (UIView *)objc_getAssociatedObject(self, &TUICSToastActivityViewKey);
-    if (existingActivityView != nil) {
-        [UIView animateWithDuration:[[TUICSToastManager sharedStyle] fadeDuration]
-            delay:0.0
-            options:(UIViewAnimationOptionCurveEaseIn | UIViewAnimationOptionBeginFromCurrentState)
-            animations:^{
-              existingActivityView.alpha = 0.0;
-            }
-            completion:^(BOOL finished) {
-              [existingActivityView removeFromSuperview];
-              objc_setAssociatedObject(self, &TUICSToastActivityViewKey, nil, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
-            }];
-    }
-}
-
-#pragma mark - Helpers
-
-- (CGPoint)cs_centerPointForPosition:(id)point withToast:(UIView *)toast {
-    TUICSToastStyle *style = [TUICSToastManager sharedStyle];
-
-    UIEdgeInsets safeInsets = UIEdgeInsetsZero;
-    if (@available(iOS 11.0, *)) {
-        safeInsets = self.safeAreaInsets;
-    }
-
-    CGFloat topPadding = style.verticalPadding + safeInsets.top;
-    CGFloat bottomPadding = style.verticalPadding + safeInsets.bottom;
-    CGFloat leftPadding = style.horizontalPadding + safeInsets.left;
-    CGFloat rightPadding = style.horizontalPadding + safeInsets.right;
-
-    if ([point isKindOfClass:[NSString class]]) {
-        if ([point caseInsensitiveCompare:TUICSToastPositionTop] == NSOrderedSame) {
-            return CGPointMake(self.bounds.size.width / 2.0, (toast.frame.size.height / 2.0) + topPadding);
-        } else if ([point caseInsensitiveCompare:TUICSToastPositionCenter] == NSOrderedSame) {
-            return CGPointMake(self.bounds.size.width / 2.0, self.bounds.size.height / 2.0);
-        } else if ([point caseInsensitiveCompare:TUICSToastPositionTopLeft] == NSOrderedSame) {
-            return CGPointMake((toast.frame.size.width / 2.0) + leftPadding, (toast.frame.size.height / 2.0) + topPadding);
-        } else if ([point caseInsensitiveCompare:TUICSToastPositionTopRight] == NSOrderedSame) {
-            return CGPointMake(self.bounds.size.width - (toast.frame.size.width / 2.0) - rightPadding, (toast.frame.size.height / 2.0) + topPadding);
-        } else if ([point caseInsensitiveCompare:TUICSToastPositionCenterLeft] == NSOrderedSame) {
-            return CGPointMake((toast.frame.size.width / 2.0) + leftPadding, self.bounds.size.height / 2.0);
-        } else if ([point caseInsensitiveCompare:TUICSToastPositionCenterRight] == NSOrderedSame) {
-            return CGPointMake(self.bounds.size.width - (toast.frame.size.width / 2.0) - rightPadding, self.bounds.size.height / 2.0);
-        } else if ([point caseInsensitiveCompare:TUICSToastPositionBottomLeft] == NSOrderedSame) {
-            return CGPointMake((toast.frame.size.width / 2.0) + leftPadding, (self.bounds.size.height - (toast.frame.size.height / 2.0)) - bottomPadding);
-        } else if ([point caseInsensitiveCompare:TUICSToastPositionBottomRight] == NSOrderedSame) {
-            return CGPointMake(self.bounds.size.width - (toast.frame.size.width / 2.0) - rightPadding,
-                               (self.bounds.size.height - (toast.frame.size.height / 2.0)) - bottomPadding);
-        }
-
-    } else if ([point isKindOfClass:[NSValue class]]) {
-        return [point CGPointValue];
-    }
-
-    // default to bottom
-    return CGPointMake(self.bounds.size.width / 2.0, (self.bounds.size.height - (toast.frame.size.height / 2.0)) - bottomPadding);
-}
-
-@end
-
-@implementation TUICSToastStyle
-
-#pragma mark - Constructors
-
-- (instancetype)initWithDefaultStyle {
-    self = [super init];
-    if (self) {
-        self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.8];
-        self.titleColor = [UIColor whiteColor];
-        self.messageColor = [UIColor whiteColor];
-        self.maxWidthPercentage = 0.8;
-        self.maxHeightPercentage = 0.8;
-        self.horizontalPadding = 10.0;
-        self.verticalPadding = 10.0;
-        self.horizontalIntervalPadding = 0.0f;
-        self.cornerRadius = 10.0;
-        self.titleFont = [UIFont boldSystemFontOfSize:16.0];
-        self.messageFont = [UIFont systemFontOfSize:16.0];
-        self.titleAlignment = NSTextAlignmentLeft;
-        self.messageAlignment = NSTextAlignmentLeft;
-        self.titleNumberOfLines = 0;
-        self.messageNumberOfLines = 0;
-        self.displayShadow = NO;
-        self.shadowOpacity = 0.8;
-        self.shadowRadius = 6.0;
-        self.shadowOffset = CGSizeMake(4.0, 4.0);
-        self.imageSize = CGSizeMake(80.0, 80.0);
-        self.activitySize = CGSizeMake(100.0, 100.0);
-        self.fadeDuration = 0.2;
-    }
-    return self;
-}
-
-- (void)setMaxWidthPercentage:(CGFloat)maxWidthPercentage {
-    _maxWidthPercentage = MAX(MIN(maxWidthPercentage, 1.0), 0.0);
-}
-
-- (void)setMaxHeightPercentage:(CGFloat)maxHeightPercentage {
-    _maxHeightPercentage = MAX(MIN(maxHeightPercentage, 1.0), 0.0);
-}
-
-- (CGFloat)horizontalIntervalPadding {
-    if (_horizontalIntervalPadding == 0) {
-        return _horizontalPadding;
-    }
-    return _horizontalIntervalPadding;
-}
-
-- (instancetype)init NS_UNAVAILABLE {
-    return nil;
-}
-
-@end
-
-@interface TUICSToastManager ()
-
-@property(strong, nonatomic) TUICSToastStyle *sharedStyle;
-@property(assign, nonatomic, getter=isTapToDismissEnabled) BOOL tapToDismissEnabled;
-@property(assign, nonatomic, getter=isQueueEnabled) BOOL queueEnabled;
-@property(assign, nonatomic) NSTimeInterval defaultDuration;
-@property(strong, nonatomic) id defaultPosition;
-
-@end
-
-@implementation TUICSToastManager
-
-#pragma mark - Constructors
-
-+ (instancetype)sharedManager {
-    static TUICSToastManager *sharedManager = nil;
-    static dispatch_once_t oncePredicate;
-    dispatch_once(&oncePredicate, ^{
-      sharedManager = [[self alloc] init];
-    });
-
-    return sharedManager;
-}
-
-- (instancetype)init {
-    self = [super init];
-    if (self) {
-        self.sharedStyle = [[TUICSToastStyle alloc] initWithDefaultStyle];
-        self.tapToDismissEnabled = YES;
-        self.queueEnabled = NO;
-        self.defaultDuration = 3.0;
-        self.defaultPosition = TUICSToastPositionBottom;
-    }
-    return self;
-}
-
-#pragma mark - Singleton Methods
-
-+ (void)setSharedStyle:(TUICSToastStyle *)sharedStyle {
-    [[self sharedManager] setSharedStyle:sharedStyle];
-}
-
-+ (TUICSToastStyle *)sharedStyle {
-    return [[self sharedManager] sharedStyle];
-}
-
-+ (void)setTapToDismissEnabled:(BOOL)tapToDismissEnabled {
-    [[self sharedManager] setTapToDismissEnabled:tapToDismissEnabled];
-}
-
-+ (BOOL)isTapToDismissEnabled {
-    return [[self sharedManager] isTapToDismissEnabled];
-}
-
-+ (void)setQueueEnabled:(BOOL)queueEnabled {
-    [[self sharedManager] setQueueEnabled:queueEnabled];
-}
-
-+ (BOOL)isQueueEnabled {
-    return [[self sharedManager] isQueueEnabled];
-}
-
-+ (void)setDefaultDuration:(NSTimeInterval)duration {
-    [[self sharedManager] setDefaultDuration:duration];
-}
-
-+ (NSTimeInterval)defaultDuration {
-    return [[self sharedManager] defaultDuration];
-}
-
-+ (void)setDefaultPosition:(id)position {
-    if ([position isKindOfClass:[NSString class]] || [position isKindOfClass:[NSValue class]]) {
-        [[self sharedManager] setDefaultPosition:position];
-    }
-}
-
-+ (id)defaultPosition {
-    return [[self sharedManager] defaultPosition];
-}
-
-@end

+ 0 - 24
ThirdParty/TUIKit/TUICore/UIView+TUIUtil.h

@@ -1,24 +0,0 @@
-//
-//  UIView+TUIUtil.h
-//  TUICore
-//
-//  Created by gg on 2021/10/9.
-//  Copyright © 2023 Tencent. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-typedef enum : NSUInteger {
-    TUIOscillatoryAnimationToBigger,
-    TUIOscillatoryAnimationToSmaller,
-} TUIOscillatoryAnimationType;
-
-@interface UIView (TUIUtil)
-- (void)roundedRect:(UIRectCorner)corner withCornerRatio:(CGFloat)cornerRatio;
-+ (void)showOscillatoryAnimationWithLayer:(CALayer *)layer type:(TUIOscillatoryAnimationType)type;
-
-@end
-
-NS_ASSUME_NONNULL_END

+ 0 - 36
ThirdParty/TUIKit/TUICore/UIView+TUIUtil.m

@@ -1,36 +0,0 @@
-//
-//  UIView+TUIUtil.m
-//  TUICore
-//
-//  Created by gg on 2021/10/9.
-//  Copyright © 2023 Tencent. All rights reserved.
-//
-
-#import "UIView+TUIUtil.h"
-
-@implementation UIView (TUIUtil)
-- (void)roundedRect:(UIRectCorner)corner withCornerRatio:(CGFloat)cornerRatio {
-    UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:self.bounds byRoundingCorners:corner cornerRadii:CGSizeMake(cornerRatio, cornerRatio)];
-    CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
-    maskLayer.frame = self.bounds;
-    maskLayer.path = maskPath.CGPath;
-    self.layer.mask = maskLayer;
-}
-
-+ (void)showOscillatoryAnimationWithLayer:(CALayer *)layer type:(TUIOscillatoryAnimationType)type{
-    NSNumber *animationScale1 = type == TUIOscillatoryAnimationToBigger ? @(1.15) : @(0.5);
-    NSNumber *animationScale2 = type == TUIOscillatoryAnimationToBigger ? @(0.92) : @(1.15);
-    
-    [UIView animateWithDuration:0.15 delay:0 options:UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionCurveEaseInOut animations:^{
-        [layer setValue:animationScale1 forKeyPath:@"transform.scale"];
-    } completion:^(BOOL finished) {
-        [UIView animateWithDuration:0.15 delay:0 options:UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionCurveEaseInOut animations:^{
-            [layer setValue:animationScale2 forKeyPath:@"transform.scale"];
-        } completion:^(BOOL finished) {
-            [UIView animateWithDuration:0.1 delay:0 options:UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionCurveEaseInOut animations:^{
-                [layer setValue:@(1.0) forKeyPath:@"transform.scale"];
-            } completion:nil];
-        }];
-    }];
-}
-@end