diff --git a/ChatKit-OC/Example/AppDelegate.h b/ChatKit-OC/Example/AppDelegate.h index dcd00be2..66359ced 100644 --- a/ChatKit-OC/Example/AppDelegate.h +++ b/ChatKit-OC/Example/AppDelegate.h @@ -5,7 +5,7 @@ // v0.8.5 Created by ElonChan on 16/2/24. // Copyright © 2016年 LeanCloud. All rights reserved. // - + #import @interface AppDelegate : UIResponder diff --git a/ChatKit-OC/Podfile b/ChatKit-OC/Podfile index b42b2cca..0ea38b51 100644 --- a/ChatKit-OC/Podfile +++ b/ChatKit-OC/Podfile @@ -15,6 +15,5 @@ target 'ChatKit-OC' do pod 'TWMessageBarManager', '1.8.1' pod 'MLPAutoCompleteTextField', '1.5' pod 'FTPopOverMenu', '1.3.2' - pod 'RedpacketLib' ,'3.4.1' pod 'FXForms', '1.2.14' end diff --git a/ChatKit-OC/Pods/AVOSCloudIM/AVOS/AVOSCloudIM/WebSocket/AVIMWebSocketWrapper.m b/ChatKit-OC/Pods/AVOSCloudIM/AVOS/AVOSCloudIM/WebSocket/AVIMWebSocketWrapper.m new file mode 100644 index 00000000..01de599f --- /dev/null +++ b/ChatKit-OC/Pods/AVOSCloudIM/AVOS/AVOSCloudIM/WebSocket/AVIMWebSocketWrapper.m @@ -0,0 +1,1003 @@ +// +// AVIMWebSocketWrapper.m +// AVOSCloudIM +// +// Created by Qihe Bian on 12/4/14. +// Copyright (c) 2014 LeanCloud Inc. All rights reserved. +// + +#import "AVIMWebSocketWrapper.h" +#import "AVIMWebSocket.h" +#import "LCNetworkReachabilityManager.h" +#import "AVIMErrorUtil.h" +#import "AVIMBlockHelper.h" +#import "AVIMClient_Internal.h" +#import "AVIMUserOptions.h" +#import "AVPaasClient.h" +#import "AVOSCloud_Internal.h" +#import "LCRouter.h" +#import "LCKeyValueStore.h" +#import "SDMacros.h" +#import + +#define PING_INTERVAL 60*3 +#define TIMEOUT_CHECK_INTERVAL 1 + +#define LCIM_OUT_COMMAND_LOG_FORMAT \ + @"\n\n" \ + @"------ BEGIN LeanCloud IM Out Command ------\n" \ + @"cmd: %@\n" \ + @"type: %@\n" \ + @"content: %@\n" \ + @"------ END ---------------------------------\n" \ + @"\n" + +#define LCIM_IN_COMMAND_LOG_FORMAT \ + @"\n\n" \ + @"------ BEGIN LeanCloud IM In Command ------\n" \ + @"content: %@\n" \ + @"------ END --------------------------------\n" \ + @"\n" + +static NSTimeInterval AVIMWebSocketDefaultTimeoutInterval = 15.0; +static NSString *const LCPushRouterCacheKey = @"LCPushRouterCacheKey"; + +typedef enum : NSUInteger { + //mutually exclusive + AVIMURLQueryOptionDefault = 0, + AVIMURLQueryOptionKeepLastValue, + AVIMURLQueryOptionKeepFirstValue, + AVIMURLQueryOptionUseArrays, + AVIMURLQueryOptionAlwaysUseArrays, + + //can be |ed with other values + AVIMURLQueryOptionUseArraySyntax = 8, + AVIMURLQueryOptionSortKeys = 16 +} AVIMURLQueryOptions; + +NSString *const AVIMProtocolJSON1 = @"lc.json.1"; +NSString *const AVIMProtocolMessagePack1 = @"lc.msgpack.1"; +NSString *const AVIMProtocolPROTOBUF1 = @"lc.protobuf.1"; + +NSString *const AVIMProtocolJSON2 = @"lc.json.2"; +NSString *const AVIMProtocolMessagePack2 = @"lc.msgpack.2"; +NSString *const AVIMProtocolPROTOBUF2 = @"lc.protobuf.2"; + +@interface AVIMCommandCarrier : NSObject +@property(nonatomic, strong) AVIMGenericCommand *command; +@property(nonatomic)NSTimeInterval timestamp; + +@end +@implementation AVIMCommandCarrier +- (void)timeoutInSeconds:(NSTimeInterval)seconds { + NSTimeInterval timestamp = [[NSDate date] timeIntervalSince1970]; + timestamp += seconds; + self.timestamp = timestamp; +} +@end + +@interface AVIMWebSocketWrapper () { + BOOL _isClosed; + NSTimer *_pingTimer; + NSTimer *_timeoutCheckTimer; + NSTimer *_pingTimeoutCheckTimer; + + int _observerCount; + int32_t _ttl; + NSTimeInterval _lastPingTimestamp; + NSTimeInterval _lastPongTimestamp; + NSTimeInterval _reconnectInterval; + + BOOL _waitingForPong; + NSMutableDictionary *_commandDictionary; + NSMutableArray *_serialIdArray; + NSMutableArray *_messageIdArray; +} + +@property (nonatomic, assign) BOOL security; +@property (nonatomic, assign) BOOL isOpening; +@property (nonatomic, assign) BOOL useSecondary; +@property (nonatomic, assign) BOOL needRetry; +@property (nonatomic, strong) LCNetworkReachabilityManager *reachabilityMonitor; +@property (nonatomic, strong) NSTimer *reconnectTimer; +@property (nonatomic, strong) AVIMWebSocket *webSocket; +@property (nonatomic, copy) AVIMBooleanResultBlock openCallback; +@property (nonatomic, strong) NSMutableDictionary *IPTable; +@property (nonatomic, copy) NSString *routerPath; + +@end + +@implementation AVIMWebSocketWrapper ++ (instancetype)sharedInstance { + static dispatch_once_t onceToken; + static AVIMWebSocketWrapper *sharedInstance = nil; + dispatch_once(&onceToken, ^{ + sharedInstance = [[self alloc] init]; + }); + return sharedInstance; +} + ++ (instancetype)sharedSecurityInstance { + static dispatch_once_t onceToken; + static AVIMWebSocketWrapper *sharedInstance = nil; + dispatch_once(&onceToken, ^{ + sharedInstance = [[self alloc] init]; + sharedInstance.security = YES; + }); + + return sharedInstance; +} + ++ (void)setTimeoutIntervalInSeconds:(NSTimeInterval)seconds { + if (seconds > 0) { + AVIMWebSocketDefaultTimeoutInterval = seconds; + } +} + +- (id)init { + self = [super init]; + if (self) { + // _dataQueue = [[NSMutableArray alloc] init]; + // _commandQueue = [[NSMutableArray alloc] init]; + _commandDictionary = [[NSMutableDictionary alloc] init]; + _serialIdArray = [[NSMutableArray alloc] init]; + _messageIdArray = [[NSMutableArray alloc] init]; + _ttl = -1; + _observerCount = 0; + _timeout = AVIMWebSocketDefaultTimeoutInterval; + + _lastPongTimestamp = [[NSDate date] timeIntervalSince1970]; + + _reconnectInterval = 1; + _isOpening = NO; + _needRetry = YES; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(routerDidUpdate:) name:LCRouterDidUpdateNotification object:nil]; + + _routerPath = [self absoluteRouterPath:[LCRouter sharedInstance].pushRouterURLString]; + +#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) + // Register for notification when the app shuts down + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidFinishLaunching:) name:UIApplicationDidFinishLaunchingNotification object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillTerminate:) name:UIApplicationWillTerminateNotification object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidEnterBackground:) name:UIApplicationDidEnterBackgroundNotification object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillEnterForeground:) name:UIApplicationWillEnterForegroundNotification object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillResignActive:) name:UIApplicationWillResignActiveNotification object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidBecomeActive:) name:UIApplicationDidBecomeActiveNotification object:nil]; + +#else + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillTerminate:) name:NSApplicationWillTerminateNotification object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidEnterBackground:) name:NSApplicationDidResignActiveNotification object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillEnterForeground:) name:NSApplicationDidBecomeActiveNotification object:nil]; +#endif + [self startNotifyReachability]; + } + return self; +} + +- (void)routerDidUpdate:(NSNotification *)notification { + self.routerPath = [self absoluteRouterPath:[LCRouter sharedInstance].pushRouterURLString]; +} + +- (NSString *)absoluteRouterPath:(NSString *)routerHost { + return [[[NSURL URLWithString:routerHost] URLByAppendingPathComponent:@"v1/route"] absoluteString]; +} + +- (void)startNotifyReachability { + @weakify(self, ws); + + _reachabilityMonitor = [LCNetworkReachabilityManager manager]; + [_reachabilityMonitor setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) { + switch (status) { + case AFNetworkReachabilityStatusUnknown: + case AFNetworkReachabilityStatusNotReachable: + [ws networkDidBecomeUnreachable]; + break; + case AFNetworkReachabilityStatusReachableViaWWAN: + case AFNetworkReachabilityStatusReachableViaWiFi: + [ws networkDidBecomeReachable]; + break; + } + }]; + + [_reachabilityMonitor startMonitoring]; +} + +- (BOOL)isReachable { + return _reachabilityMonitor.networkReachabilityStatus != AFNetworkReachabilityStatusNotReachable; +} + +- (void)dealloc { + [_reachabilityMonitor stopMonitoring]; + if (!_isClosed) { + [self closeWebSocketConnectionRetry:NO]; + } +} + +- (void)increaseObserverCount { + ++_observerCount; +} + +- (void)decreaseObserverCount { + --_observerCount; + if (_observerCount <= 0) { + _observerCount = 0; + [self closeWebSocketConnectionRetry:NO]; + } +} + +- (void)addMessageId:(NSString *)messageId { + if (![_messageIdArray containsObject:messageId]) { + [_messageIdArray addObject:messageId]; + } + while (1) { + if (_messageIdArray.count > 5) { + [_messageIdArray removeObjectAtIndex:0]; + } else { + break; + } + } +} + +- (BOOL)messageIdExists:(NSString *)messageId { + return [_messageIdArray containsObject:messageId]; +} + +#pragma mark - process application notification +- (void)applicationDidFinishLaunching:(id)sender { + _messageIdArray = [[[NSUserDefaults standardUserDefaults] arrayForKey:@"AVIMMessageIdArray"] mutableCopy]; +} + +- (void)applicationDidEnterBackground:(id)sender { + [self closeWebSocketConnectionRetry:NO]; + [[NSUserDefaults standardUserDefaults] setObject:_messageIdArray forKey:@"AVIMMessageIdArray"]; + [[NSUserDefaults standardUserDefaults] synchronize]; +} + +- (void)applicationWillEnterForeground:(id)sender { + _messageIdArray = [[[NSUserDefaults standardUserDefaults] arrayForKey:@"AVIMMessageIdArray"] mutableCopy]; + _reconnectInterval = 1; + if (_observerCount > 0) { + [self openWebSocketConnection]; + } +} + +- (void)applicationWillResignActive:(id)sender { + [[NSUserDefaults standardUserDefaults] setObject:_messageIdArray forKey:@"AVIMMessageIdArray"]; + [[NSUserDefaults standardUserDefaults] synchronize]; +} + +- (void)applicationDidBecomeActive:(id)sender { + _messageIdArray = [[[NSUserDefaults standardUserDefaults] arrayForKey:@"AVIMMessageIdArray"] mutableCopy]; +} + +- (void)applicationWillTerminate:(id)sender { + [self closeWebSocketConnectionRetry:NO]; +} + +#pragma mark - ping timer fierd +- (void)timerFired:(id)sender { + if (_lastPongTimestamp > 0 && [[NSDate date] timeIntervalSince1970] - _lastPongTimestamp >= 5 * 60) { + [self closeWebSocketConnection]; + return; + } + + if (_webSocket.readyState == AVIM_OPEN) { + [self sendPing]; + } +} + ++ (NSString *)URLEncodedString:(NSString *)string { + CFStringRef encoded = CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, + (__bridge CFStringRef)string, + NULL, + CFSTR("!*'\"();:@&=+$,/?%#[]% "), + kCFStringEncodingUTF8); + return CFBridgingRelease(encoded); +} + ++ (NSString *)URLQueryWithParameters:(NSDictionary *)parameters { + return [self URLQueryWithParameters:parameters options:AVIMURLQueryOptionDefault]; +} + ++ (NSString *)URLQueryWithParameters:(NSDictionary *)parameters options:(AVIMURLQueryOptions)options { + options = options ?: AVIMURLQueryOptionUseArrays; + + BOOL sortKeys = !!(options & AVIMURLQueryOptionSortKeys); + if (sortKeys) { + options -= AVIMURLQueryOptionSortKeys; + } + + BOOL useArraySyntax = !!(options & AVIMURLQueryOptionUseArraySyntax); + if (useArraySyntax) { + options -= AVIMURLQueryOptionUseArraySyntax; + NSAssert(options == AVIMURLQueryOptionUseArrays || options == AVIMURLQueryOptionAlwaysUseArrays, + @"AVIMURLQueryOptionUseArraySyntax has no effect unless combined with AVIMURLQueryOptionUseArrays or AVIMURLQueryOptionAlwaysUseArrays option"); + } + + NSMutableString *result = [NSMutableString string]; + NSArray *keys = [parameters allKeys]; + if (sortKeys) keys = [keys sortedArrayUsingSelector:@selector(compare:)]; + for (NSString *key in keys) { + id value = parameters[key]; + NSString *encodedKey = [self URLEncodedString:[key description]]; + if ([value isKindOfClass:[NSArray class]]) { + if (options == AVIMURLQueryOptionKeepFirstValue && [(NSArray *)value count]) { + if ([result length]) { + [result appendString:@"&"]; + } + [result appendFormat:@"%@=%@", encodedKey, [self URLEncodedString:[[value firstObject] description]]]; + } else if (options == AVIMURLQueryOptionKeepLastValue && [(NSArray *)value count]) { + if ([result length]) { + [result appendString:@"&"]; + } + [result appendFormat:@"%@=%@", encodedKey, [self URLEncodedString:[[value lastObject] description]]]; + } else { + for (NSString *element in value) { + if ([result length]) { + [result appendString:@"&"]; + } + if (useArraySyntax) { + [result appendFormat:@"%@[]=%@", encodedKey, [self URLEncodedString:[element description]]]; + } else { + [result appendFormat:@"%@=%@", encodedKey, [self URLEncodedString:[element description]]]; + } + } + } + } else { + if ([result length]) { + [result appendString:@"&"]; + } + if (useArraySyntax && options == AVIMURLQueryOptionAlwaysUseArrays) { + [result appendFormat:@"%@[]=%@", encodedKey, [self URLEncodedString:[value description]]]; + } else { + [result appendFormat:@"%@=%@", encodedKey, [self URLEncodedString:[value description]]]; + } + } + } + return result; +} + +#pragma mark - API to use websocket + +- (void)networkDidBecomeReachable { + BOOL shouldOpen = YES; + +#if TARGET_OS_IOS + if (!getenv("LCIM_BACKGROUND_CONNECT_ENABLED") && [UIApplication sharedApplication].applicationState != UIApplicationStateActive) + shouldOpen = NO; +#endif + + if (shouldOpen) { + _reconnectInterval = 1; + [self openWebSocketConnection]; + } +} + +- (void)networkDidBecomeUnreachable { + [self closeWebSocketConnectionRetry:NO]; +} + +- (void)openWebSocketConnection { + [self openWebSocketConnectionWithCallback:nil]; +} + +- (void)openWebSocketConnectionWithCallback:(AVIMBooleanResultBlock)callback { + @weakify(self); + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + @strongify(self); + + AVLoggerInfo(AVLoggerDomainIM, @"Open websocket connection."); + self.openCallback = callback; + + if (self.isOpening) { + AVLoggerError(AVLoggerDomainIM, @"Return because websocket is opening."); + return; + } + + self.needRetry = YES; + self.isOpening = YES; + [self.reconnectTimer invalidate]; + + if (!(self.webSocket && (self.webSocket.readyState == AVIM_OPEN || self.webSocket.readyState == AVIM_CONNECTING))) { + if (!self.openCallback) { + [[NSNotificationCenter defaultCenter] postNotificationName:AVIM_NOTIFICATION_WEBSOCKET_RECONNECT object:self userInfo:nil]; + } + + NSDictionary *cachedRouterInformation = [self cachedRouterInformation]; + +// if (cachedRouterInformation) { +// [self openConnectionForRouterInformation:cachedRouterInformation]; +// return; +// } + + NSString *appId = [AVOSCloud getApplicationId]; + + if (!appId) { + @throw [NSException exceptionWithName:@"AVOSCloudIM Exception" reason:@"Application id is nil." userInfo:nil]; + } + + NSMutableDictionary *parameters = [[NSMutableDictionary alloc] init]; + + parameters[@"appId"] = appId; + + /* + * iOS SDK *must* use IP address to access IM server to prevent DNS hijacking. + * And IM server *must* issue the pinned certificate. + */ + parameters[@"ip"] = @"true"; + + if (self.security) { + parameters[@"secure"] = @"1"; + } + + /* Back door for user to connect to puppet environment. */ + if (getenv("LC_IM_PUPPET_ENABLED") && getenv("SIMULATOR_UDID")) { + parameters[@"debug"] = @"true"; + } + + [[AVPaasClient sharedInstance] getObject:self.routerPath withParameters:parameters block:^(id object, NSError *error) { + NSInteger code = error.code; + + if (object && !error) { /* Everything is OK. */ + self.useSecondary = NO; + [self openConnectionForRouterInformation:object]; + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + [self cacheRouterInformationIfPossible:object]; + }); + } else if (code == 404) { /* 404, stop reconnection. */ + self.isOpening = NO; + NSError *httpError = [AVIMErrorUtil errorWithCode:code reason:[NSHTTPURLResponse localizedStringForStatusCode:code]]; + if (self.openCallback) { + [AVIMBlockHelper callBooleanResultBlock:self.openCallback error:httpError]; + self.openCallback = nil; + } else { + [[NSNotificationCenter defaultCenter] postNotificationName:AVIM_NOTIFICATION_WEBSOCKET_CLOSED object:self userInfo:@{@"error": error}]; + } + } else if ((!object && !error) || code >= 400 || error) { /* Something error, try to reconnect. */ + self.isOpening = NO; + if (!error) { + if (code >= 404) { + error = [AVIMErrorUtil errorWithCode:code reason:[NSHTTPURLResponse localizedStringForStatusCode:code]]; + } else { + error = [AVIMErrorUtil errorWithCode:kAVIMErrorInvalidData reason:@"No data received"]; + } + } + if (self.openCallback) { + [AVIMBlockHelper callBooleanResultBlock:self.openCallback error:error]; + self.openCallback = nil; + } else { + [self reconnect]; + } + } + }]; + } + }); +} + +/** + Open connection for router information. + + It will choose a RTM server from router infomation firstly, + then, create connection to that server. + + If RTM server not found, it will retry from scratch. + */ +- (void)openConnectionForRouterInformation:(NSDictionary *)routerInformation { + NSString *server = [self chooseServerFromRouterInformation:routerInformation]; + + if (server) { + [self internalOpenWebSocketConnection:server]; + } else { + AVLoggerError(AVLoggerDomainIM, @"RTM server not found, try reconnection..."); + [self reconnect]; + } +} + +/** + Choose a RTM server from router information. + Router information may contain both primary server and secondary server. + + If `_useSecondary` is true, it will choose secondary server preferentially. + Otherwise, it will choose primary server preferentially. + */ +- (NSString *)chooseServerFromRouterInformation:(NSDictionary *)routerInformation { + NSString *server = nil; + + NSString *primary = routerInformation[@"server"]; + NSString *secondary = routerInformation[@"secondary"]; + + if (_useSecondary) + server = secondary ?: primary; + else + server = primary ?: secondary; + + return server; +} + +/** + Cache router infomation if possible. It will cache two things: + 1. Push router + 2. Response of push router + + Currently, SDK will not cache the router information if `ttl` is not given by server. + */ +- (void)cacheRouterInformationIfPossible:(NSDictionary *)routerInformation { + NSTimeInterval TTL = [routerInformation[@"ttl"] doubleValue]; + + if (TTL <= 0) + return; + + [self cachePushRouter:routerInformation TTL:TTL]; + [self cacheRouterInformation:routerInformation TTL:TTL]; +} + +- (void)cachePushRouter:(NSDictionary *)routerInformation TTL:(NSTimeInterval)TTL { + NSString *routerUrl = routerInformation[@"groupUrl"]; + NSString *routerHost = [[NSURL URLWithString:routerUrl] host]; + + if (!routerHost) { + AVLoggerInfo(AVLoggerDomainIM, @"Push router not found, nothing to cache."); + return; + } + + NSTimeInterval lastModified = [[NSDate date] timeIntervalSince1970]; + + [[LCRouter sharedInstance] cachePushRouterHostWithHost:routerHost lastModified:lastModified TTL:TTL]; +} + +- (void)cacheRouterInformation:(NSDictionary *)routerInformation TTL:(NSTimeInterval)TTL { + NSDictionary *cacheItem = @{ + @"ttl": @(TTL), + @"lastModified": @([[NSDate date] timeIntervalSince1970]), + @"router": routerInformation + }; + + NSError *error = nil; + NSData *data = [NSJSONSerialization dataWithJSONObject:cacheItem options:0 error:&error]; + + if (error || !data) { + AVLoggerError(AVLoggerDomainIM, @"Cannot serialize push router information, error: %@", error); + return; + } + + [[LCKeyValueStore sharedInstance] setData:data forKey:LCPushRouterCacheKey]; +} + +- (NSDictionary *)cachedRouterInformation { + NSData *data = [[LCKeyValueStore sharedInstance] dataForKey:LCPushRouterCacheKey]; + + if (!data) + return nil; + + /* If connect has failed 3 times (2^3) continuously, we assume that the router information is expired. */ + if (_reconnectInterval >= 8) { + [self clearRouterInformationCache]; + return nil; + } + + NSError *error = nil; + NSDictionary *cacheItem = [NSJSONSerialization JSONObjectWithData:data options:0 error:&error]; + + if (error || !cacheItem) { + [self clearRouterInformationCache]; + return nil; + } + + NSTimeInterval TTL = [cacheItem[@"ttl"] doubleValue]; + NSTimeInterval lastModified = [cacheItem[@"lastModified"] doubleValue]; + NSTimeInterval now = [[NSDate date] timeIntervalSince1970]; + + if (now < lastModified || now >= lastModified + TTL) { + [self clearRouterInformationCache]; + return nil; + } + + return cacheItem[@"router"]; +} + +- (void)clearRouterInformationCache { + [[LCKeyValueStore sharedInstance] deleteKey:LCPushRouterCacheKey]; +} + +SecCertificateRef LCGetCertificateFromBase64String(NSString *base64); + +- (NSArray *)pinnedCertificates { + id cert = (__bridge_transfer id)LCGetCertificateFromBase64String(LCRootCertificate); + return cert ? @[cert] : @[]; +} + +- (void)internalOpenWebSocketConnection:(NSString *)server { + _webSocket.delegate = nil; + [_webSocket close]; +#if USE_DEBUG_SERVER + server = DEBUG_SERVER; +#endif + AVLoggerInfo(AVLoggerDomainIM, @"Open websocket with url: %@", server); + + NSMutableSet *protocols = [NSMutableSet set]; + NSDictionary *userOptions = [AVIMClient userOptions]; + + if ([userOptions[AVIMUserOptionUseUnread] boolValue]) { + [protocols addObject:AVIMProtocolPROTOBUF2]; + } else { + [protocols addObject:AVIMProtocolPROTOBUF1]; + } + + if (userOptions[AVIMUserOptionCustomProtocols]) { + [protocols removeAllObjects]; + [protocols addObjectsFromArray:userOptions[AVIMUserOptionCustomProtocols]]; + } + + NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:server]]; + + if ([protocols count]) { + _webSocket = [[AVIMWebSocket alloc] initWithURLRequest:request protocols:[protocols allObjects]]; + } else { + _webSocket = [[AVIMWebSocket alloc] initWithURLRequest:request]; + } + + if (self.security) { + request.AVIM_SSLPinnedCertificates = [self pinnedCertificates]; + _webSocket.SSLPinningMode = AVIMSSLPinningModePublicKey; + } + + _webSocket.delegate = self; + [_webSocket open]; +} + +- (void)closeWebSocketConnection { + AVLoggerInfo(AVLoggerDomainIM, @"Close websocket connection."); + [_pingTimer invalidate]; + _isOpening = NO; + [_webSocket close]; + [[NSNotificationCenter defaultCenter] postNotificationName:AVIM_NOTIFICATION_WEBSOCKET_CLOSED object:self userInfo:nil]; + _isClosed = YES; +} + +- (void)closeWebSocketConnectionRetry:(BOOL)retry { + AVLoggerInfo(AVLoggerDomainIM, @"Close websocket connection."); + [_pingTimer invalidate]; + _needRetry = retry; + _isOpening = NO; + [_webSocket close]; + [[NSNotificationCenter defaultCenter] postNotificationName:AVIM_NOTIFICATION_WEBSOCKET_CLOSED object:self userInfo:nil]; + _isClosed = YES; +} + +- (void)checkTimeout:(NSTimer *)timer { + NSTimeInterval now = [[NSDate date] timeIntervalSince1970]; + if (_waitingForPong && now - _lastPingTimestamp > _timeout) { + _lastPingTimestamp = 0; + _lastPongTimestamp = 0; + [self closeWebSocketConnection]; + if (_pingTimeoutCheckTimer) { + [_pingTimeoutCheckTimer invalidate]; + _pingTimeoutCheckTimer = nil; + } + } + NSMutableArray *array = nil; + for (NSNumber *num in _serialIdArray) { + AVIMCommandCarrier *carrier = [_commandDictionary objectForKey:num]; + NSTimeInterval timestamp = carrier.timestamp; + // NSLog(@"now:%lf expire:%lf", now, timestamp); + if (now > timestamp) { + if (!array) { + array = [[NSMutableArray alloc] init]; + } + [array addObject:num]; + AVIMGenericCommand *command = [self dequeueCommandWithId:num]; + AVIMCommandResultBlock callback = command.callback; + if (callback) { + NSError *error = [AVIMErrorUtil errorWithCode:kAVIMErrorTimeout reason:@"The request timed out."]; + callback(command, nil, error); + } + if (now - _lastPingTimestamp > _timeout) { + [self sendPing]; + } + } else { + break; + } + } + if (array) { + [_serialIdArray removeObjectsInArray:array]; + } +} + +- (void)enqueueCommand:(AVIMGenericCommand *)command { + AVIMCommandCarrier *carrier = [[AVIMCommandCarrier alloc] init]; + carrier.command = command; + [carrier timeoutInSeconds:_timeout]; + NSNumber *num = @(command.i); + [_commandDictionary setObject:carrier forKey:num]; + if (!_timeoutCheckTimer) { + _timeoutCheckTimer = [NSTimer scheduledTimerWithTimeInterval:TIMEOUT_CHECK_INTERVAL target:self selector:@selector(checkTimeout:) userInfo:nil repeats:YES]; + } +} + +- (AVIMGenericCommand *)dequeueCommandWithId:(NSNumber *)num { + if (!num) + return nil; + AVIMCommandCarrier *carrier = [_commandDictionary objectForKey:num]; + AVIMGenericCommand *command = carrier.command; + [_commandDictionary removeObjectForKey:num]; + if (_commandDictionary.count == 0) { + [_timeoutCheckTimer invalidate]; + _timeoutCheckTimer = nil; + } + return command; +} + +- (BOOL)checkSizeForData:(id)data { + if ([data isKindOfClass:[NSString class]] && [(NSString *)data length] > 5000) { + return NO; + } else if ([data isKindOfClass:[NSData class]] && [(NSData *)data length] > 5000) { + return NO; + } + return YES; +} + +- (void)sendCommand:(AVIMGenericCommand *)genericCommand { + LCIMMessage *messageCommand = [genericCommand avim_messageCommand]; + BOOL needResponse = genericCommand.needResponse; + if (messageCommand && _webSocket.readyState == AVIM_OPEN) { + if (needResponse) { + [genericCommand avim_addOrRefreshSerialId]; + [self enqueueCommand:genericCommand]; + NSNumber *num = @(genericCommand.i); + [_serialIdArray addObject:num]; + } + NSError *error = nil; + id data = [genericCommand data]; + if (![self checkSizeForData:data]) { + AVIMCommandResultBlock callback = genericCommand.callback; + if (callback) { + error = [AVIMErrorUtil errorWithCode:kAVIMErrorMessageTooLong reason:@"Message data to send is too long."]; + callback(genericCommand, nil, error); + } + return; + } + [_webSocket send:data]; + if (!needResponse) { + AVIMCommandResultBlock callback = genericCommand.callback; + if (callback) { + callback(genericCommand, nil, nil); + } + } + } else { + AVIMCommandResultBlock callback = genericCommand.callback; + NSError *error = [AVIMErrorUtil errorWithCode:kAVIMErrorConnectionLost reason:@"websocket not opened"]; + if (callback) { + callback(genericCommand, nil, error); + } else { + [[NSNotificationCenter defaultCenter] postNotificationName:AVIM_NOTIFICATION_WEBSOCKET_ERROR object:self userInfo:@{@"error": error}]; + } + } + AVLoggerInfo(AVLoggerDomainIM, LCIM_OUT_COMMAND_LOG_FORMAT, [AVIMCommandFormatter commandType:genericCommand.cmd], [genericCommand avim_messageClass], [genericCommand avim_description] ); +} + +- (void)sendPing { + if ([self isConnectionOpen]) { + AVLoggerInfo(AVLoggerDomainIM, @"Websocket send ping."); + _lastPingTimestamp = [[NSDate date] timeIntervalSince1970]; + _waitingForPong = YES; + if (!_pingTimeoutCheckTimer) { + _pingTimeoutCheckTimer = [NSTimer scheduledTimerWithTimeInterval:TIMEOUT_CHECK_INTERVAL target:self selector:@selector(checkTimeout:) userInfo:nil repeats:YES]; + } + [_webSocket sendPing:[@"" dataUsingEncoding:NSUTF8StringEncoding]]; + } +} + +- (BOOL)isConnectionOpen { + return _webSocket.readyState == AVIM_OPEN; +} + +#pragma mark - SRWebSocketDelegate +- (void)webSocketDidOpen:(AVIMWebSocket *)webSocket { + AVLoggerInfo(AVLoggerDomainIM, @"Websocket connection opened."); + _isOpening = NO; + + [[NSNotificationCenter defaultCenter] postNotificationName:AVIM_NOTIFICATION_WEBSOCKET_OPENED object:self userInfo:nil]; + + [_reconnectTimer invalidate]; + + [_pingTimer invalidate]; + _pingTimer = [NSTimer scheduledTimerWithTimeInterval:PING_INTERVAL target:self selector:@selector(timerFired:) userInfo:nil repeats:YES]; +} + +- (void)webSocket:(AVIMWebSocket *)webSocket didReceiveMessage:(id)message { + _reconnectInterval = 1; + NSError *error = nil; + /* message for server which is in accordance with protobuf protocol must be data type, there is no need to convert string to data. */ + AVIMGenericCommand *command = [AVIMGenericCommand parseFromData:message error:&error]; + AVLoggerInfo(AVLoggerDomainIM, LCIM_IN_COMMAND_LOG_FORMAT, [command avim_description]); + + if (!command) { + AVLoggerError(AVLoggerDomainIM, @"Not handled data."); + return; + } + if (command.i > 0) { + NSNumber *num = @(command.i); + AVIMGenericCommand *outCommand = [self dequeueCommandWithId:num]; + if (outCommand) { + [_serialIdArray removeObject:num]; + if ([command avim_hasError]) { + error = [command avim_errorObject]; + } + AVIMCommandResultBlock callback = outCommand.callback; + if (callback) { + callback(outCommand, command, error); + /* 另外,对于情景:单点登录, 由于未上传 deviceToken 就 open,如果用户没有 force 登录,会报错, + 详见 https://leanticket.cn/t/leancloud/925 + + sessionMessage { + code: 4111 + reason: "SESSION_CONFLICT" + } + 这种情况不仅要告知用户登录失败,同时也要也要在 `-[AVIMClient processSessionCommand:]` 中统一进行异常处理, + 触发代理方法 `-client:didOfflineWithError:` 告知用户需要将 force 设为 YES。 + */ + if (command.hasSessionMessage && error) { + [self notifyCommand:command]; + } + } else { + [self notifyCommand:command]; + } + } else { + AVLoggerError(AVLoggerDomainIM, @"No out message matched the in message %@", message); + } + } else { + [self notifyCommand:command]; + } +} + +- (void)notifyCommand:(AVIMGenericCommand *)command { + [[NSNotificationCenter defaultCenter] postNotificationName:AVIM_NOTIFICATION_WEBSOCKET_COMMAND object:self userInfo:@{@"command": command}]; +} + +- (void)webSocket:(AVIMWebSocket *)webSocket didReceivePong:(id)data { + AVLoggerInfo(AVLoggerDomainIM, @"Websocket receive pong."); + _lastPongTimestamp = [[NSDate date] timeIntervalSince1970]; + _waitingForPong = NO; + if (_pingTimeoutCheckTimer) { + [_pingTimeoutCheckTimer invalidate]; + _pingTimeoutCheckTimer = nil; + } +} + +- (void)webSocket:(AVIMWebSocket *)webSocket didCloseWithCode:(NSInteger)code reason:(NSString *)reason wasClean:(BOOL)wasClean { + AVLoggerDebug(AVLoggerDomainIM, @"Websocket closed with code:%ld, reason:%@.", (long)code, reason); + _isOpening = NO; + + NSError *error = [AVIMErrorUtil errorWithCode:code reason:reason]; + for (NSNumber *num in _serialIdArray) { + AVIMGenericCommand *outCommand = [self dequeueCommandWithId:num]; + if (outCommand) { + AVIMCommandResultBlock callback = outCommand.callback; + if (callback) { + callback(outCommand, nil, error); + } + } else { + AVLoggerError(AVLoggerDomainIM, @"No out message matched serial id %@", num); + } + } + [_serialIdArray removeAllObjects]; + if (_webSocket.readyState != AVIM_CLOSED) { + [[NSNotificationCenter defaultCenter] postNotificationName:AVIM_NOTIFICATION_WEBSOCKET_CLOSED object:self userInfo:@{@"error": error}]; + } + if ([self isReachable]) { + [self retryIfNeeded]; + } +} + +- (void)forwardError:(NSError *)error forWebSocket:(AVIMWebSocket *)webSocket { + AVLoggerError(AVLoggerDomainIM, @"Websocket open failed with error:%@.", error); + + _isOpening = NO; + _useSecondary = YES; + + for (NSNumber *num in _serialIdArray) { + AVIMGenericCommand *outCommand = [self dequeueCommandWithId:num]; + if (outCommand) { + AVIMCommandResultBlock callback = outCommand.callback; + if (callback) { + callback(outCommand, nil, error); + } + } else { + AVLoggerError(AVLoggerDomainIM, @"No out message matched serial id %@", num); + } + } + + [_serialIdArray removeAllObjects]; + + [[NSNotificationCenter defaultCenter] postNotificationName:AVIM_NOTIFICATION_WEBSOCKET_ERROR object:self userInfo:@{@"error": error}]; + + if (self.openCallback) { + [AVIMBlockHelper callBooleanResultBlock:self.openCallback error:error]; + self.openCallback = nil; + } else { + if ([self isReachable]) { + [self retryIfNeeded]; + } + } +} + +- (BOOL)isValidIPAddress:(NSString *)address { + if (!address) + return NO; + + const char *str = [address UTF8String]; + + struct in_addr dst; + int success = inet_pton(AF_INET, str, &dst); + + if (success != 1) { + struct in6_addr dst6; + success = inet_pton(AF_INET6, str, &dst6); + } + + return success == 1; +} + +- (BOOL)shouldTryIP:(NSString *)IP forHost:(NSString *)host { + if (!IP) + return NO; + + NSMutableSet *IPs = self.IPTable[host]; + + if (IPs) { + if ([IPs containsObject:IP]) { + return NO; + } else { + [IPs addObject:IP]; + } + } else { + self.IPTable[host] = [NSMutableSet setWithObject:IP]; + } + + return YES; +} + +- (NSString *)selectIP:(NSArray *)IPs forHost:(NSString *)host { + for (NSString *IP in IPs) { + if ([self shouldTryIP:IP forHost:host]) { + return IP; + } + } + + return nil; +} + +- (void)webSocket:(AVIMWebSocket *)webSocket didFailWithError:(NSError *)error { + [self forwardError:error forWebSocket:webSocket]; +} + +- (NSMutableDictionary *)IPTable { + return _IPTable ?: (_IPTable = [NSMutableDictionary dictionary]); +} + +#pragma mark - reconnect + +- (void)reconnect { + AVLoggerDebug(AVLoggerDomainIM, @"Websocket connection reconnect in %ld seconds.", (long)_reconnectInterval); + dispatch_async(dispatch_get_main_queue(), ^{ + _reconnectTimer = [NSTimer scheduledTimerWithTimeInterval:_reconnectInterval target:self selector:@selector(openWebSocketConnection) userInfo:nil repeats:NO]; + }); + _reconnectInterval *= 2; +} + +- (void)retryIfNeeded { + if (!_needRetry) { + return; + } + [self reconnect]; +} + +@end diff --git a/ChatKit.podspec b/ChatKit.podspec index f54c65e2..5197f392 100644 --- a/ChatKit.podspec +++ b/ChatKit.podspec @@ -15,12 +15,13 @@ Pod::Spec.new do |s| s.requires_arc = true s.dependency "AVOSCloud" , "~> 11.5.1" s.dependency "AVOSCloudIM", "~> 11.5.1" - s.dependency "MJRefresh" , "~> 3.1.9" + s.dependency "MJRefresh" s.dependency "Masonry" , "~> 1.0.1" s.dependency "SDWebImage" , "~> 3.8.0" s.dependency "FMDB" , "~> 2.6.2" s.dependency "pop", "~> 1.0.9" - s.dependency "UITableView+FDTemplateLayoutCell" , "~> 1.5.beta" + #s.dependency "UITableView+FDTemplateLayoutCell" , "~> 1.5.beta" + s.dependency "UITableView+FDTemplateLayoutCell" s.dependency "FDStackView" , "~> 1.0" s.dependency "DACircularProgress" , "~> 2.3.1" s.dependency "MLLabel" , "~> 1.10.5" diff --git a/ChatKit/ChatKit.xcodeproj/project.pbxproj b/ChatKit/ChatKit.xcodeproj/project.pbxproj index a42e8288..a343753d 100644 --- a/ChatKit/ChatKit.xcodeproj/project.pbxproj +++ b/ChatKit/ChatKit.xcodeproj/project.pbxproj @@ -502,6 +502,8 @@ 9AC44E9D1E15154300619112 /* UITableView+FDTemplateLayoutCellDebug.m in Sources */ = {isa = PBXBuildFile; fileRef = 9AC44D7D1E15154300619112 /* UITableView+FDTemplateLayoutCellDebug.m */; }; 9AC44E9E1E15154300619112 /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 9AC44D7E1E15154300619112 /* LICENSE */; }; 9AC44E9F1E15154300619112 /* README.md in Sources */ = {isa = PBXBuildFile; fileRef = 9AC44D7F1E15154300619112 /* README.md */; }; + A16B478E229429CA00A222B8 /* Lan.bundle in Resources */ = {isa = PBXBuildFile; fileRef = A16B478D229429CA00A222B8 /* Lan.bundle */; }; + A16B496122966BE500A222B8 /* EmojiLocalizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = A16B496322966BE500A222B8 /* EmojiLocalizable.strings */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -1004,6 +1006,11 @@ 9AC44D7D1E15154300619112 /* UITableView+FDTemplateLayoutCellDebug.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UITableView+FDTemplateLayoutCellDebug.m"; sourceTree = ""; }; 9AC44D7E1E15154300619112 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; 9AC44D7F1E15154300619112 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + A16B478D229429CA00A222B8 /* Lan.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Lan.bundle; sourceTree = ""; }; + A16B496222966BE500A222B8 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/EmojiLocalizable.strings; sourceTree = ""; }; + A16B496422966BE800A222B8 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/EmojiLocalizable.strings"; sourceTree = ""; }; + A16B496522966BE900A222B8 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/EmojiLocalizable.strings"; sourceTree = ""; }; + A16B496622966BEA00A222B8 /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/EmojiLocalizable.strings; sourceTree = ""; }; A9601FCE9729A0FE4669D33E /* libPods-ChatKit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ChatKit.a"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -1343,6 +1350,7 @@ 9AAFA1A91E14FBA3006618E0 /* Resources */ = { isa = PBXGroup; children = ( + A16B478D229429CA00A222B8 /* Lan.bundle */, 9AAFA1AA1E14FBA4006618E0 /* BarButtonIcon.bundle */, 9AAFA1AB1E14FBA4006618E0 /* ChatKeyboard.bundle */, 9AAFA1AC1E14FBA4006618E0 /* DateTools.bundle */, @@ -1354,6 +1362,7 @@ 9AAFA1B21E14FBA4006618E0 /* Other.bundle */, 9AAFA1B31E14FBA4006618E0 /* Placeholder.bundle */, 9AAFA1B41E14FBA4006618E0 /* VoiceMessageSource.bundle */, + A16B496322966BE500A222B8 /* EmojiLocalizable.strings */, ); path = Resources; sourceTree = ""; @@ -2402,6 +2411,8 @@ knownRegions = ( en, "zh-Hans", + "zh-Hant", + ar, ); mainGroup = 9A6060781CEC831800D14D73; productRefGroup = 9A6060831CEC831800D14D73 /* Products */; @@ -2420,6 +2431,7 @@ files = ( 9AAFA2841E14FBA5006618E0 /* Emoji.bundle in Resources */, 9AAFA2871E14FBA5006618E0 /* MBProgressHUD.bundle in Resources */, + A16B496122966BE500A222B8 /* EmojiLocalizable.strings in Resources */, 9AC44E181E15154300619112 /* ImageSelectedSmallOn@2x.png in Resources */, 9AAFA2821E14FBA5006618E0 /* ChatKeyboard.bundle in Resources */, 9AC44E9E1E15154300619112 /* LICENSE in Resources */, @@ -2439,6 +2451,7 @@ 9AAFA2811E14FBA5006618E0 /* BarButtonIcon.bundle in Resources */, 9AC44E1A1E15154300619112 /* PlayButtonOverlayLarge.png in Resources */, 9AC44DC71E15154300619112 /* LICENSE in Resources */, + A16B478E229429CA00A222B8 /* Lan.bundle in Resources */, 9AC44E0B1E15154300619112 /* ImageError.png in Resources */, 9AC44E141E15154300619112 /* ImageSelectedSmallOff.png in Resources */, 9AC44E281E15154300619112 /* UIBarButtonItemGrid@3x.png in Resources */, @@ -2694,6 +2707,20 @@ }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXVariantGroup section */ + A16B496322966BE500A222B8 /* EmojiLocalizable.strings */ = { + isa = PBXVariantGroup; + children = ( + A16B496222966BE500A222B8 /* en */, + A16B496422966BE800A222B8 /* zh-Hans */, + A16B496522966BE900A222B8 /* zh-Hant */, + A16B496622966BEA00A222B8 /* ar */, + ); + name = EmojiLocalizable.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + /* Begin XCBuildConfiguration section */ 9A6060881CEC831800D14D73 /* Debug */ = { isa = XCBuildConfiguration; diff --git a/ChatKit/Class/LCChatKit.h b/ChatKit/Class/LCChatKit.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/LCChatKit.m b/ChatKit/Class/LCChatKit.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Model/AVIMMessage+LCCKExtension.h b/ChatKit/Class/Model/AVIMMessage+LCCKExtension.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Model/AVIMMessage+LCCKExtension.m b/ChatKit/Class/Model/AVIMMessage+LCCKExtension.m old mode 100644 new mode 100755 index 74f9a83d..497eba02 --- a/ChatKit/Class/Model/AVIMMessage+LCCKExtension.m +++ b/ChatKit/Class/Model/AVIMMessage+LCCKExtension.m @@ -33,6 +33,7 @@ - (AVIMTypedMessage *)lcck_getValidTypedMessage { } NSString *messageText; NSDictionary *attr; + BOOL ibreakIntext = NO; if ([[self class] isSubclassOfClass:[AVIMMessage class]]) { //当存在无法识别的自定义消息,SDK会返回 AVIMMessage 类型 AVIMMessage *message = self; @@ -42,6 +43,10 @@ - (AVIMTypedMessage *)lcck_getValidTypedMessage { NSString *customMessageDegradeKey = [json valueForKey:@"_lctext"]; if (customMessageDegradeKey.length > 0) { messageText = customMessageDegradeKey; + if ([json valueForKey:@"_lcattrs"] != nil) { + attr = [json valueForKey:@"_lcattrs"]; + } + ibreakIntext = YES; break; } attr = [json valueForKey:@"_lcattrs"]; @@ -60,6 +65,9 @@ - (AVIMTypedMessage *)lcck_getValidTypedMessage { [typedMessage setValue:@(self.sendTimestamp) forKey:@"sendTimestamp"]; [typedMessage setValue:self.clientId forKey:@"clientId"]; [typedMessage lcck_setObject:@(YES) forKey:LCCKCustomMessageIsCustomKey]; + if (ibreakIntext && attr != nil) { + [typedMessage lcck_setObject:attr forKey:@"olCustom"]; + } return typedMessage; } diff --git a/ChatKit/Class/Model/AVIMTypedMessage+LCCKExtension.h b/ChatKit/Class/Model/AVIMTypedMessage+LCCKExtension.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Model/AVIMTypedMessage+LCCKExtension.m b/ChatKit/Class/Model/AVIMTypedMessage+LCCKExtension.m old mode 100644 new mode 100755 index d25d791b..4817924c --- a/ChatKit/Class/Model/AVIMTypedMessage+LCCKExtension.m +++ b/ChatKit/Class/Model/AVIMTypedMessage+LCCKExtension.m @@ -15,7 +15,11 @@ @implementation AVIMTypedMessage (LCCKExtension) - (BOOL)lcck_isSupportThisCustomMessage { NSNumber *typeDictKey = @([(AVIMTypedMessage *)self mediaType]); Class class = [_typeDict objectForKey:typeDictKey]; - return class; + if (class != nil) { + return true; + }else{ + return false; + } } + (AVIMTypedMessage *)lcck_messageWithLCCKMessage:(LCCKMessage *)message { diff --git a/ChatKit/Class/Model/LCCKMessage.h b/ChatKit/Class/Model/LCCKMessage.h old mode 100644 new mode 100755 index b0b39433..209bc9e0 --- a/ChatKit/Class/Model/LCCKMessage.h +++ b/ChatKit/Class/Model/LCCKMessage.h @@ -14,6 +14,8 @@ @interface LCCKMessage : NSObject +@property (nonatomic, strong) AVIMMessage *message; + @property (nonatomic, copy, readonly) NSString *text; @property (nonatomic, copy, readonly) NSString *systemText; @property (nonatomic, strong, readwrite) UIImage *photo; diff --git a/ChatKit/Class/Model/LCCKMessage.m b/ChatKit/Class/Model/LCCKMessage.m old mode 100644 new mode 100755 index c5c5bb0a..df0129c0 --- a/ChatKit/Class/Model/LCCKMessage.m +++ b/ChatKit/Class/Model/LCCKMessage.m @@ -376,6 +376,7 @@ + (id)messageWithAVIMTypedMessage:(AVIMTypedMessage *)message { lcckMessage.ownerType = LCCKMessageOwnerTypeOther; } lcckMessage.sendStatus = (LCCKMessageSendState)message.status; + lcckMessage.message = message; return lcckMessage; } diff --git a/ChatKit/Class/Model/LCCKMessageDelegate.h b/ChatKit/Class/Model/LCCKMessageDelegate.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Model/LCCKUserDelegate.h b/ChatKit/Class/Model/LCCKUserDelegate.h old mode 100644 new mode 100755 index 44acb968..83afa1e4 --- a/ChatKit/Class/Model/LCCKUserDelegate.h +++ b/ChatKit/Class/Model/LCCKUserDelegate.h @@ -31,6 +31,7 @@ * @brief The user's id in LeanCloud SDK, it may be equal to `userId`. */ @property (nonatomic, copy, readwrite) NSString *clientId; +@property (nonatomic, copy, readwrite) NSString *sex; - (instancetype)initWithUserId:(NSString *)userId name:(NSString *)name avatarURL:(NSURL *)avatarURL clientId:(NSString *)clientId; + (instancetype)userWithUserId:(NSString *)userId name:(NSString *)name avatarURL:(NSURL *)avatarURL clientId:(NSString *)clientId; diff --git a/ChatKit/Class/Model/NSMutableArray+LCCKMessageExtention.h b/ChatKit/Class/Model/NSMutableArray+LCCKMessageExtention.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Model/NSMutableArray+LCCKMessageExtention.m b/ChatKit/Class/Model/NSMutableArray+LCCKMessageExtention.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Model/NSObject+LCCKExtension.h b/ChatKit/Class/Model/NSObject+LCCKExtension.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Model/NSObject+LCCKExtension.m b/ChatKit/Class/Model/NSObject+LCCKExtension.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Base/LCCKBaseConversationViewController.h b/ChatKit/Class/Module/Base/LCCKBaseConversationViewController.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Base/LCCKBaseConversationViewController.m b/ChatKit/Class/Module/Base/LCCKBaseConversationViewController.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Base/LCCKBaseNavigationController.h b/ChatKit/Class/Module/Base/LCCKBaseNavigationController.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Base/LCCKBaseNavigationController.m b/ChatKit/Class/Module/Base/LCCKBaseNavigationController.m old mode 100644 new mode 100755 index bc77667b..604c458d --- a/ChatKit/Class/Module/Base/LCCKBaseNavigationController.m +++ b/ChatKit/Class/Module/Base/LCCKBaseNavigationController.m @@ -8,19 +8,46 @@ #import "LCCKBaseNavigationController.h" +@interface LCCKBaseNavigationController() +{ + BOOL _pushing; +} +@end + @implementation LCCKBaseNavigationController - (void)viewDidLoad { [super viewDidLoad]; + _pushing = NO; self.view.backgroundColor = [UIColor whiteColor]; self.navigationBar.barStyle = UIBarStyleBlack; + self.delegate = self; } - (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated { if (self.viewControllers.count > 0) { viewController.hidesBottomBarWhenPushed = YES; } + if (_pushing == YES) { + return; + }else{ + _pushing = NO; + } + [super pushViewController:viewController animated:animated]; } + +// 实现当delegate为其他的时候, 还能调到这个方法 +- (void)setDelegate:(id)delegate { + [super setDelegate:delegate]; + + // 待实现 +} + +#pragma mark - UINavigationControllerDelegate +-(void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated { + _pushing = NO; //完成PUSH +} + @end diff --git a/ChatKit/Class/Module/Base/LCCKBaseTableViewController.h b/ChatKit/Class/Module/Base/LCCKBaseTableViewController.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Base/LCCKBaseViewController.h b/ChatKit/Class/Module/Base/LCCKBaseViewController.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Base/LCCKBaseViewController.m b/ChatKit/Class/Module/Base/LCCKBaseViewController.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/ContactList/Controller/LCCKContactListViewController.h b/ChatKit/Class/Module/ContactList/Controller/LCCKContactListViewController.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/ContactList/Controller/LCCKContactListViewController.m b/ChatKit/Class/Module/ContactList/Controller/LCCKContactListViewController.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/ContactList/Model/LCCKContact.h b/ChatKit/Class/Module/ContactList/Model/LCCKContact.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/ContactList/Model/LCCKContact.m b/ChatKit/Class/Module/ContactList/Model/LCCKContact.m old mode 100644 new mode 100755 index 4cfb5a5a..48bc7d10 --- a/ChatKit/Class/Module/ContactList/Model/LCCKContact.m +++ b/ChatKit/Class/Module/ContactList/Model/LCCKContact.m @@ -13,8 +13,10 @@ @implementation LCCKContact @synthesize name = _name; @synthesize avatarURL = _avatarURL; @synthesize clientId = _clientId; +@synthesize sex = _sex; -- (instancetype)initWithUserId:(NSString *)userId name:(NSString *)name avatarURL:(NSURL *)avatarURL clientId:(NSString *)clientId { + +- (instancetype)initWithUserId:(NSString *)userId name:(NSString *)name avatarURL:(NSURL *)avatarURL clientId:(NSString *)clientId sex:(NSString *)sex { self = [super init]; if (!self) { return nil; @@ -23,11 +25,12 @@ - (instancetype)initWithUserId:(NSString *)userId name:(NSString *)name avatarUR _name = name; _avatarURL = avatarURL; _clientId = clientId; + _sex = sex; return self; } -+ (instancetype)userWithUserId:(NSString *)userId name:(NSString *)name avatarURL:(NSURL *)avatarURL clientId:(NSString *)clientId{ - LCCKContact *user = [[LCCKContact alloc] initWithUserId:userId name:name avatarURL:avatarURL clientId:clientId]; ++ (instancetype)userWithUserId:(NSString *)userId name:(NSString *)name avatarURL:(NSURL *)avatarURL clientId:(NSString *)clientId sex:(NSString *)sex { + LCCKContact *user = [[LCCKContact alloc] initWithUserId:userId name:name avatarURL:avatarURL clientId:clientId sex:sex]; return user; } @@ -36,6 +39,7 @@ - (id)copyWithZone:(NSZone *)zone { name:self.name avatarURL:self.avatarURL clientId:self.clientId + sex:self.sex ]; } @@ -44,6 +48,7 @@ - (void)encodeWithCoder:(NSCoder *)aCoder { [aCoder encodeObject:self.name forKey:@"name"]; [aCoder encodeObject:self.avatarURL forKey:@"avatarURL"]; [aCoder encodeObject:self.clientId forKey:@"clientId"]; + [aCoder encodeObject:self.sex forKey:@"sex"]; } - (id)initWithCoder:(NSCoder *)aDecoder { @@ -52,6 +57,7 @@ - (id)initWithCoder:(NSCoder *)aDecoder { _name = [aDecoder decodeObjectForKey:@"name"]; _avatarURL = [aDecoder decodeObjectForKey:@"avatarURL"]; _clientId = [aDecoder decodeObjectForKey:@"clientId"]; + _sex = [aDecoder decodeObjectForKey:@"sex"]; } return self; } diff --git a/ChatKit/Class/Module/ContactList/View/LCCKContactCell.h b/ChatKit/Class/Module/ContactList/View/LCCKContactCell.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/ContactList/View/LCCKContactCell.m b/ChatKit/Class/Module/ContactList/View/LCCKContactCell.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/ContactList/View/LCCKContactCell.xib b/ChatKit/Class/Module/ContactList/View/LCCKContactCell.xib old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Controller/LCCKConversationViewController.h b/ChatKit/Class/Module/Conversation/Controller/LCCKConversationViewController.h old mode 100644 new mode 100755 index 83e56f14..8e419115 --- a/ChatKit/Class/Module/Conversation/Controller/LCCKConversationViewController.h +++ b/ChatKit/Class/Module/Conversation/Controller/LCCKConversationViewController.h @@ -21,6 +21,25 @@ FOUNDATION_EXTERN NSString *const LCCKConversationViewControllerErrorDomain; */ @property (nonatomic, copy, readonly) NSString *conversationId; +// 消息的类型:私聊还是群聊 +@property (nonatomic, copy) NSString *messageType; + +// 消息的来源:狼人杀还是小语 werewolf | xiaoyu +@property (nonatomic, copy) NSString *messageFromApp; + +// 对方的信息 +@property (nonatomic, copy) NSString *peerIcon; +@property (nonatomic, copy) NSString *peerName; +@property (nonatomic, copy) NSString *peerID; +@property (nonatomic, copy) NSString *peerSex; + +// 自己的信息 +@property (nonatomic, copy) NSString *selfIcon; +@property (nonatomic, copy) NSString *selfName; +@property (nonatomic, copy) NSString *selfID; +@property (nonatomic, copy) NSString *selfSex; + + /*! * @brief Id of the peer, single conversation should be initialized with this property. * @details Initialization method is `-initWithPeerId:`. diff --git a/ChatKit/Class/Module/Conversation/Controller/LCCKConversationViewController.m b/ChatKit/Class/Module/Conversation/Controller/LCCKConversationViewController.m old mode 100644 new mode 100755 index b76f4e0a..6af9a302 --- a/ChatKit/Class/Module/Conversation/Controller/LCCKConversationViewController.m +++ b/ChatKit/Class/Module/Conversation/Controller/LCCKConversationViewController.m @@ -48,6 +48,7 @@ #endif NSString *const LCCKConversationViewControllerErrorDomain = @"LCCKConversationViewControllerErrorDomain"; +NSString *const RNNotificationName = @"sendMessageToRNNotificationName"; @interface LCCKConversationViewController () @@ -73,6 +74,76 @@ @interface LCCKConversationViewController () *)mentionList { + if (self.conversationId == nil) { + return; + } if ([text length] > 0 ) { LCCKMessage *lcckMessage = [[LCCKMessage alloc] initWithText:text senderId:self.userId @@ -297,7 +377,24 @@ - (void)sendTextMessage:(NSString *)text mentionList:(NSArray *)ment timestamp:LCCK_CURRENT_TIMESTAMP serverMessageId:nil]; [self makeSureSendValidMessage:lcckMessage afterFetchedConversationShouldWithAssert:NO]; + [self.chatViewModel sendMessage:lcckMessage mentionList:mentionList]; + + [[NSNotificationCenter defaultCenter] + postNotificationName:RNNotificationName + object:@{ + @"USER_SEX": self.peerSex, + @"READ":@YES, + @"MSG_TYPE": self.messageType, + @"APP": self.messageFromApp, + @"USER_ICON": self.peerIcon, + @"USER_NAME": self.peerName, + @"CONVERSATION_ID": self.conversationId, + @"USER_ID": self.peerID, + @"MESSAGE_TYPE": @"MESSAGE_TYPE_CHAT", + @"CHAT_TIME": [NSString stringWithFormat:@"%f", LCCK_CURRENT_TIMESTAMP], + @"CHAT_MESSAGE":[NSString stringWithFormat:@"%@", text] + }]; } } @@ -313,6 +410,9 @@ - (void)sendImageMessage:(UIImage *)image { } - (void)sendImageMessageData:(NSData *)imageData { + if (self.conversationId == nil) { + return; + } NSString *path = [[LCCKSettingService sharedInstance] tmpPath]; NSError *error; [imageData writeToFile:path options:NSDataWritingAtomic error:&error]; @@ -331,6 +431,21 @@ - (void)sendImageMessageData:(NSData *)imageData { ]; [self makeSureSendValidMessage:message afterFetchedConversationShouldWithAssert:NO]; [self.chatViewModel sendMessage:message]; + [[NSNotificationCenter defaultCenter] + postNotificationName:RNNotificationName + object:@{ + @"USER_SEX": self.peerSex, + @"USER_ICON": self.peerIcon, + @"READ":@YES, + @"MSG_TYPE": self.messageType, + @"APP": self.messageFromApp, + @"USER_NAME": self.peerName, + @"CONVERSATION_ID": self.conversationId, + @"USER_ID": self.peerID, + @"MESSAGE_TYPE": @"MESSAGE_TYPE_CHAT", + @"CHAT_TIME": [NSString stringWithFormat:@"%f", LCCK_CURRENT_TIMESTAMP], + @"CHAT_MESSAGE":@"图片消息" + }]; } else { [self alert:@"write image to file error"]; } @@ -338,6 +453,10 @@ - (void)sendImageMessageData:(NSData *)imageData { - (void)sendVoiceMessageWithPath:(NSString *)voicePath time:(NSTimeInterval)recordingSeconds { + if (self.conversationId == nil) { + return; + } + LCCKMessage *message = [[LCCKMessage alloc] initWithVoicePath:voicePath voiceURL:nil voiceDuration:[NSString stringWithFormat:@"%@", @(recordingSeconds)] @@ -346,6 +465,21 @@ - (void)sendVoiceMessageWithPath:(NSString *)voicePath time:(NSTimeInterval)reco timestamp:LCCK_CURRENT_TIMESTAMP serverMessageId:nil]; [self makeSureSendValidMessage:message afterFetchedConversationShouldWithAssert:NO]; + [[NSNotificationCenter defaultCenter] + postNotificationName:RNNotificationName + object:@{ + @"USER_SEX": self.peerSex, + @"USER_ICON": self.peerIcon, + @"USER_NAME": self.peerName, + @"CONVERSATION_ID": self.conversationId, + @"READ":@YES, + @"MSG_TYPE": self.messageType, + @"APP": self.messageFromApp, + @"USER_ID": self.peerID, + @"MESSAGE_TYPE": @"MESSAGE_TYPE_CHAT", + @"CHAT_TIME": [NSString stringWithFormat:@"%f", LCCK_CURRENT_TIMESTAMP], + @"CHAT_MESSAGE":@"语音消息" + }]; [self.chatViewModel sendMessage:message]; } @@ -371,6 +505,12 @@ - (void)sendLocalFeedbackTextMessge:(NSString *)localFeedbackTextMessge { } - (void)sendCustomMessage:(AVIMTypedMessage *)customMessage { + if (self.conversationId == nil) { + return; + } + if (!self.isAvailable) { + return; + } [self makeSureSendValidMessageAfterFetchedConversation:customMessage]; [self.chatViewModel sendCustomMessage:customMessage]; } @@ -379,6 +519,12 @@ - (void)sendCustomMessage:(AVIMTypedMessage *)customMessage progressBlock:(AVProgressBlock)progressBlock success:(LCCKBooleanResultBlock)success failed:(LCCKBooleanResultBlock)failed { + if (self.conversationId == nil) { + return; + } + if (!self.isAvailable) { + return; + } [self makeSureSendValidMessageAfterFetchedConversation:customMessage]; [self.chatViewModel sendCustomMessage:customMessage progressBlock:progressBlock success:success failed:failed]; } @@ -400,10 +546,11 @@ - (void)makeSureSendValidMessage:(id)message afterFetchedConversationShouldWithA @(__LINE__), @"Remember to check if `isAvailable` is ture, making sure sending message after conversation has been fetched"]; if (!withAssert) { - LCCKLog(@"🔴类名与方法名:%@(在第%@行),描述:%@", @(__PRETTY_FUNCTION__), @(__LINE__), reason); + LCCKLog(@"�类名与方法名:%@(在第%@行),描述:%@", @(__PRETTY_FUNCTION__), @(__LINE__), reason); return; } - NSAssert(NO, reason); +// NSAssert(NO, reason); + return; } if ([message isKindOfClass:[LCCKMessage class]]) { return; @@ -576,7 +723,7 @@ - (void)callbackCurrentConversationEvenNotExists:(AVIMConversation *)conversatio if (conversation.createAt) { if (!conversation.imClient) { [conversation setValue:[LCCKSessionService sharedInstance].client forKey:@"imClient"]; - LCCKLog(@"🔴类名与方法名:%@(在第%@行),描述:%@", @(__PRETTY_FUNCTION__), @(__LINE__), @"imClient is nil"); + LCCKLog(@"�类名与方法名:%@(在第%@行),描述:%@", @(__PRETTY_FUNCTION__), @(__LINE__), @"imClient is nil"); } BOOL hasDraft = (conversation.lcck_draft.length > 0); if (hasDraft) { @@ -643,11 +790,11 @@ - (void)handleLoadHistoryMessagesHandlerIfIsJoined:(BOOL)isJoined { } __weak __typeof(self) weakSelf = self; [self.chatViewModel loadMessagesFirstTimeWithCallback:^(BOOL succeeded, id object, NSError *error) { - dispatch_async(dispatch_get_main_queue(),^{ - [weakSelf loadLatestMessagesHandler:succeeded error:error]; - BOOL isFirstTimeMeet = (([object count] == 0) && succeeded); - [self sendWelcomeMessageIfNeeded:isFirstTimeMeet]; - }); +// dispatch_async(dispatch_get_main_queue(),^{ +// [weakSelf loadLatestMessagesHandler:succeeded error:error]; +// BOOL isFirstTimeMeet = (([object count] == 0) && succeeded); +// [self sendWelcomeMessageIfNeeded:isFirstTimeMeet]; +// }); }]; } @@ -760,7 +907,15 @@ - (void)chatBarFrameDidChange:(LCCKChatBar *)chatBar shouldScrollToBottom:(BOOL) - (void)messageCellTappedHead:(LCCKChatMessageCell *)messageCell { LCCKOpenProfileBlock openProfileBlock = [LCCKUIService sharedInstance].openProfileBlock; - !openProfileBlock ?: openProfileBlock(messageCell.message.senderId, messageCell.message.sender, self); + if ([messageCell.message lcck_isCustomMessage]) { + id sender = [[LCCKUserSystemService sharedInstance] getProfileForUserId:self.conversation.lcck_peerId error:nil]; + if (sender != nil) { + //!openProfileBlock ?: openProfileBlock(self.conversation.lcck_peerId, sender, self); + !openProfileBlock ?: openProfileBlock(((AVIMMessage *)messageCell.message).clientId, sender, self); + } + }else{ + !openProfileBlock ?: openProfileBlock(messageCell.message.senderId, messageCell.message.sender, self); + } } - (void)messageCellTappedBlank:(LCCKChatMessageCell *)messageCell { diff --git a/ChatKit/Class/Module/Conversation/Controller/LCCKLocationController.h b/ChatKit/Class/Module/Conversation/Controller/LCCKLocationController.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Controller/LCCKLocationController.m b/ChatKit/Class/Module/Conversation/Controller/LCCKLocationController.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Controller/LCCKTextFullScreenViewController.h b/ChatKit/Class/Module/Conversation/Controller/LCCKTextFullScreenViewController.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Controller/LCCKTextFullScreenViewController.m b/ChatKit/Class/Module/Conversation/Controller/LCCKTextFullScreenViewController.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Model/AVIMConversation+LCCKExtension.h b/ChatKit/Class/Module/Conversation/Model/AVIMConversation+LCCKExtension.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Model/AVIMConversation+LCCKExtension.m b/ChatKit/Class/Module/Conversation/Model/AVIMConversation+LCCKExtension.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Model/LCCKConversationViewModel.h b/ChatKit/Class/Module/Conversation/Model/LCCKConversationViewModel.h old mode 100644 new mode 100755 index 5a4fecac..6810884f --- a/ChatKit/Class/Module/Conversation/Model/LCCKConversationViewModel.h +++ b/ChatKit/Class/Module/Conversation/Model/LCCKConversationViewModel.h @@ -32,6 +32,14 @@ typedef void (^LCCKSendMessageSuccessFailedBlock)(NSString *messageUUID, NSError @property (nonatomic, assign, readonly) NSUInteger messageCount; + +@property (nonatomic, copy) NSString *peerIcon; +@property (nonatomic, copy) NSString *peerName; +@property (nonatomic, copy) NSString *peerID; +@property (nonatomic, copy) NSString *peerSex; +@property (nonatomic, copy) NSString *messageType; +@property (nonatomic, copy) NSString *messageFromApp; + @property (nonatomic, weak) id delegate; - (instancetype)initWithParentViewController:(LCCKConversationViewController *)parentViewController; diff --git a/ChatKit/Class/Module/Conversation/Model/LCCKConversationViewModel.m b/ChatKit/Class/Module/Conversation/Model/LCCKConversationViewModel.m index 6168834b..85c94412 100644 --- a/ChatKit/Class/Module/Conversation/Model/LCCKConversationViewModel.m +++ b/ChatKit/Class/Module/Conversation/Model/LCCKConversationViewModel.m @@ -543,6 +543,14 @@ - (void)sendMessage:(id)aMessage avimTypedMessage = aMessage; } [avimTypedMessage lcck_setObject:@([self.parentConversationViewController getConversationIfExists].lcck_type) forKey:LCCKCustomMessageConversationTypeKey]; + [avimTypedMessage lcck_setObject:self.parentConversationViewController.selfSex forKey:@"USER_SEX"]; + [avimTypedMessage lcck_setObject:self.parentConversationViewController.selfIcon forKey:@"USER_ICON"]; + [avimTypedMessage lcck_setObject:self.parentConversationViewController.selfName forKey:@"USER_NAME"]; + [avimTypedMessage lcck_setObject:self.parentConversationViewController.selfID forKey:@"USER_ID"]; + [avimTypedMessage lcck_setObject:self.parentConversationViewController.messageType forKey:@"MSG_TYPE"]; + [avimTypedMessage lcck_setObject:self.parentConversationViewController.messageFromApp forKey:@"APP"]; + [avimTypedMessage lcck_setObject:self.currentConversationId forKey:@"CONVERSATION_ID"]; + [avimTypedMessage setValue:[LCCKSessionService sharedInstance].clientId forKey:@"clientId"];//for LCCKSendMessageHookBlock if (mentionList.count > 0) { avimTypedMessage.mentionList = mentionList; diff --git a/ChatKit/Class/Module/Conversation/Tool/DisableImageMemoryCache/LCCKImageManager.h b/ChatKit/Class/Module/Conversation/Tool/DisableImageMemoryCache/LCCKImageManager.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Tool/DisableImageMemoryCache/LCCKImageManager.m b/ChatKit/Class/Module/Conversation/Tool/DisableImageMemoryCache/LCCKImageManager.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Tool/DisableImageMemoryCache/LCCKWeakReference.h b/ChatKit/Class/Module/Conversation/Tool/DisableImageMemoryCache/LCCKWeakReference.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Tool/DisableImageMemoryCache/LCCKWeakReference.m b/ChatKit/Class/Module/Conversation/Tool/DisableImageMemoryCache/LCCKWeakReference.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Tool/DisableImageMemoryCache/NSBundle+LCCKCaleArray.m b/ChatKit/Class/Module/Conversation/Tool/DisableImageMemoryCache/NSBundle+LCCKCaleArray.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Tool/DisableImageMemoryCache/NSBundle+LCCKSCaleArray.h b/ChatKit/Class/Module/Conversation/Tool/DisableImageMemoryCache/NSBundle+LCCKSCaleArray.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Tool/DisableImageMemoryCache/NSMutableDictionary+LCCKWeakReference.h b/ChatKit/Class/Module/Conversation/Tool/DisableImageMemoryCache/NSMutableDictionary+LCCKWeakReference.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Tool/DisableImageMemoryCache/NSMutableDictionary+LCCKWeakReference.m b/ChatKit/Class/Module/Conversation/Tool/DisableImageMemoryCache/NSMutableDictionary+LCCKWeakReference.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Tool/DisableImageMemoryCache/NSString+LCCKAddScale.h b/ChatKit/Class/Module/Conversation/Tool/DisableImageMemoryCache/NSString+LCCKAddScale.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Tool/DisableImageMemoryCache/NSString+LCCKAddScale.m b/ChatKit/Class/Module/Conversation/Tool/DisableImageMemoryCache/NSString+LCCKAddScale.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Tool/LCCKAVAudioPlayer.h b/ChatKit/Class/Module/Conversation/Tool/LCCKAVAudioPlayer.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Tool/LCCKAVAudioPlayer.m b/ChatKit/Class/Module/Conversation/Tool/LCCKAVAudioPlayer.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Tool/LCCKBubbleImageFactory.h b/ChatKit/Class/Module/Conversation/Tool/LCCKBubbleImageFactory.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Tool/LCCKBubbleImageFactory.m b/ChatKit/Class/Module/Conversation/Tool/LCCKBubbleImageFactory.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Tool/LCCKCellIdentifierFactory.h b/ChatKit/Class/Module/Conversation/Tool/LCCKCellIdentifierFactory.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Tool/LCCKCellIdentifierFactory.m b/ChatKit/Class/Module/Conversation/Tool/LCCKCellIdentifierFactory.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Tool/LCCKCellRegisterController.h b/ChatKit/Class/Module/Conversation/Tool/LCCKCellRegisterController.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Tool/LCCKCellRegisterController.m b/ChatKit/Class/Module/Conversation/Tool/LCCKCellRegisterController.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Tool/LCCKChat.h b/ChatKit/Class/Module/Conversation/Tool/LCCKChat.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Tool/LCCKChatUntiles.h b/ChatKit/Class/Module/Conversation/Tool/LCCKChatUntiles.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Tool/LCCKFaceManager.h b/ChatKit/Class/Module/Conversation/Tool/LCCKFaceManager.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Tool/LCCKFaceManager.m b/ChatKit/Class/Module/Conversation/Tool/LCCKFaceManager.m old mode 100644 new mode 100755 index de609055..c9ea7e38 --- a/ChatKit/Class/Module/Conversation/Tool/LCCKFaceManager.m +++ b/ChatKit/Class/Module/Conversation/Tool/LCCKFaceManager.m @@ -104,7 +104,7 @@ + (void)configEmotionWithMutableAttributedString:(NSMutableAttributedString *)at return; } //2、通过正则表达式来匹配字符串 - NSString *regex_emoji = @"\\[[a-zA-Z0-9\\/\\u4e00-\\u9fa5]+\\]"; //匹配表情 + NSString *regex_emoji = @"\\[[^\\]]+\\]"; //匹配表情 NSError *error = nil; NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:regex_emoji options:NSRegularExpressionCaseInsensitive error:&error]; @@ -130,9 +130,12 @@ + (void)configEmotionWithMutableAttributedString:(NSMutableAttributedString *)at NSRange range = [match range]; //获取原字符串中对应的值 NSString *subStr = [text substringWithRange:range]; + //因为输入框的时候把文字变成国际化的文案,所以现在要将国际化的文案变成原来name + NSBundle *bundle = [NSBundle bundleForClass: [LCCKFaceManager class]]; + NSString *originImageName = NSLocalizedStringFromTableInBundle(subStr, @"EmojiLocalizable", bundle, @""); NSMutableArray *emojiFaceArrays = [[LCCKFaceManager shareInstance] emojiFaceArrays]; for (NSDictionary *dict in emojiFaceArrays) { - if ([dict[kFaceNameKey] isEqualToString:subStr]) { + if ([dict[kFaceNameKey] isEqualToString:originImageName]) { //face[i][@"png"]就是我们要加载的图片 //新建文字附件来存放我们的图片,iOS7才新加的对象 NSTextAttachment *textAttachment = [[NSTextAttachment alloc] init]; @@ -170,7 +173,7 @@ + (NSMutableAttributedString *)emotionStrWithString:(NSString *)text { //1、创建一个可变的属性字符串 NSMutableAttributedString *attributeString = [[NSMutableAttributedString alloc] initWithString:text]; //2、通过正则表达式来匹配字符串 - NSString *regex_emoji = @"\\[[a-zA-Z0-9\\/\\u4e00-\\u9fa5]+\\]"; //匹配表情 + NSString *regex_emoji = @"\\[[^\\]]+\\]"; //匹配表情 NSError *error = nil; NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:regex_emoji options:NSRegularExpressionCaseInsensitive error:&error]; @@ -197,8 +200,10 @@ + (NSMutableAttributedString *)emotionStrWithString:(NSString *)text { //获取原字符串中对应的值 NSString *subStr = [text substringWithRange:range]; NSMutableArray *emojiFaceArrays = [[LCCKFaceManager shareInstance] emojiFaceArrays]; + NSBundle *bundle = [NSBundle bundleForClass: [LCCKFaceManager class]]; + NSString *originImageName = NSLocalizedStringFromTableInBundle(subStr, @"EmojiLocalizable", bundle, @""); for (NSDictionary *dict in emojiFaceArrays) { - if ([dict[kFaceNameKey] isEqualToString:subStr]) { + if ([dict[kFaceNameKey] isEqualToString:originImageName]) { //face[i][@"png"]就是我们要加载的图片 //新建文字附件来存放我们的图片,iOS7才新加的对象 NSTextAttachment *textAttachment = [[NSTextAttachment alloc] init]; diff --git a/ChatKit/Class/Module/Conversation/Tool/LCCKLastMessageTypeManager.h b/ChatKit/Class/Module/Conversation/Tool/LCCKLastMessageTypeManager.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Tool/LCCKLastMessageTypeManager.m b/ChatKit/Class/Module/Conversation/Tool/LCCKLastMessageTypeManager.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Tool/LCCKLocationManager.h b/ChatKit/Class/Module/Conversation/Tool/LCCKLocationManager.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Tool/LCCKLocationManager.m b/ChatKit/Class/Module/Conversation/Tool/LCCKLocationManager.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Tool/LCCKMessageVoiceFactory.h b/ChatKit/Class/Module/Conversation/Tool/LCCKMessageVoiceFactory.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Tool/LCCKMessageVoiceFactory.m b/ChatKit/Class/Module/Conversation/Tool/LCCKMessageVoiceFactory.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Tool/LCCKSoundManager.h b/ChatKit/Class/Module/Conversation/Tool/LCCKSoundManager.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/Tool/LCCKSoundManager.m b/ChatKit/Class/Module/Conversation/Tool/LCCKSoundManager.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKChatBar.h b/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKChatBar.h old mode 100644 new mode 100755 index 5d88b6e7..b862e4de --- a/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKChatBar.h +++ b/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKChatBar.h @@ -48,6 +48,8 @@ typedef NS_ENUM(NSUInteger, LCCKFunctionViewShowType){ */ @property (copy, nonatomic) NSString *cachedText; @property (nonatomic, assign) LCCKFunctionViewShowType showType; +@property (nonatomic,assign) BOOL isGaming; +@property (nonatomic,copy) void(^startVoiceWhenGaming)(); /*! * 在 `-presentViewController:animated:completion:` 的completion回调中调用该方法,屏蔽来自其它 ViewController 的键盘通知事件。 diff --git a/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKChatBar.m b/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKChatBar.m old mode 100644 new mode 100755 index 28db33e1..ef706b42 --- a/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKChatBar.m +++ b/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKChatBar.m @@ -375,7 +375,9 @@ - (void)faceViewSendFace:(NSString *)faceName { self.cachedText = @""; self.showType = LCCKFunctionViewShowFace; } else { - [self appendString:faceName beginInputing:NO]; + NSBundle *bundle = [NSBundle bundleForClass: [LCCKChatBar class]]; + NSString *localFaceName = NSLocalizedStringFromTableInBundle(faceName, @"EmojiLocalizable", bundle, @""); + [self appendString:localFaceName beginInputing:NO]; } } @@ -448,6 +450,14 @@ - (void)keyboardWillHide:(NSNotification *)notification { } [self updateChatBarKeyBoardConstraints]; [self updateChatBarConstraintsIfNeeded]; + if (@available(iOS 11.0, *)) { + UIWindow *keyWindow = [[[UIApplication sharedApplication] delegate] window]; + // 获取底部安全区域高度,iPhone X 竖屏下为 34.0,横屏下为 21.0,其他类型设备都为 0 + CGFloat bottomSafeInset = keyWindow.safeAreaInsets.bottom; + if (bottomSafeInset == 34.0f || bottomSafeInset == 21.0f) { + [self safeAreaInsetsDidChange]; + } + } } - (void)keyboardWillShow:(NSNotification *)notification { @@ -518,9 +528,13 @@ - (void)setup { * 开始录音 */ - (void)startRecordVoice { - [LCCKProgressHUD show]; - self.voiceRecordButton.highlighted = YES; - [self.MP3 startRecord]; + if (self.isGaming) { + _startVoiceWhenGaming(); + }else{ + [LCCKProgressHUD show]; + self.voiceRecordButton.highlighted = YES; + [self.MP3 startRecord]; + } } /** @@ -585,6 +599,14 @@ - (void)setShowType:(LCCKFunctionViewShowType)showType { break; } [self updateChatBarConstraintsIfNeeded]; + if (@available(iOS 11.0, *)) { + UIWindow *keyWindow = [[[UIApplication sharedApplication] delegate] window]; + // 获取底部安全区域高度,iPhone X 竖屏下为 34.0,横屏下为 21.0,其他类型设备都为 0 + CGFloat bottomSafeInset = keyWindow.safeAreaInsets.bottom; + if (bottomSafeInset == 34.0f || bottomSafeInset == 21.0f) { + [self safeAreaInsetsDidChange]; + } + } } - (void)buttonAction:(UIButton *)button { @@ -791,8 +813,8 @@ - (UIButton *)voiceRecordButton { [_voiceRecordButton setBackgroundImage:voiceRecordButtonNormalBackgroundImage forState:UIControlStateNormal]; [_voiceRecordButton setBackgroundImage:voiceRecordButtonHighlightedBackgroundImage forState:UIControlStateHighlighted]; _voiceRecordButton.titleLabel.font = [UIFont systemFontOfSize:14.0f]; - [_voiceRecordButton setTitle:@"按住 说话" forState:UIControlStateNormal]; - [_voiceRecordButton setTitle:@"松开 结束" forState:UIControlStateHighlighted]; + [_voiceRecordButton setTitle:[NSBundle lcck_getLocalizedString:@"按住 说话" class:[self class]] forState:UIControlStateNormal]; + [_voiceRecordButton setTitle:[NSBundle lcck_getLocalizedString:@"松开 结束" class:[self class]] forState:UIControlStateHighlighted]; [_voiceRecordButton addTarget:self action:@selector(startRecordVoice) forControlEvents:UIControlEventTouchDown]; [_voiceRecordButton addTarget:self action:@selector(cancelRecordVoice) forControlEvents:UIControlEventTouchUpOutside]; [_voiceRecordButton addTarget:self action:@selector(confirmRecordVoice) forControlEvents:UIControlEventTouchUpInside]; @@ -873,4 +895,23 @@ - (UIColor *)messageInputViewRecordTextColor { return _messageInputViewRecordTextColor; } +- (void)safeAreaInsetsDidChange { + CGFloat safeAreaOffset = 0; + if ((_showType != LCCKFunctionViewShowFace) && (_showType != LCCKFunctionViewShowMore)) { + safeAreaOffset = -self.safeAreaInsets.bottom; + } + [self.voiceButton mas_updateConstraints:^(MASConstraintMaker *make) { + make.bottom.equalTo(self.inputBarBackgroundView.mas_bottom).with.offset(-kChatBarBottomOffset+safeAreaOffset); + }]; + [self.moreButton mas_updateConstraints:^(MASConstraintMaker *make) { + make.bottom.equalTo(self.inputBarBackgroundView.mas_bottom).with.offset(-kChatBarBottomOffset+safeAreaOffset); + }]; + [self.faceButton mas_updateConstraints:^(MASConstraintMaker *make) { + make.bottom.equalTo(self.inputBarBackgroundView.mas_bottom).with.offset(-kChatBarBottomOffset+safeAreaOffset); + }]; + [self.textView mas_updateConstraints:^(MASConstraintMaker *make) { + make.bottom.equalTo(self.inputBarBackgroundView.mas_bottom).with.offset(-kChatBarBottomOffset+safeAreaOffset); + }]; +} + @end diff --git a/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKChatFaceView.h b/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKChatFaceView.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKChatFaceView.m b/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKChatFaceView.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKChatMoreView.h b/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKChatMoreView.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKChatMoreView.m b/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKChatMoreView.m old mode 100644 new mode 100755 index 6efb2e55..f89b0bde --- a/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKChatMoreView.m +++ b/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKChatMoreView.m @@ -203,21 +203,21 @@ - (void)setupItems { item.tag = idx; [item addTarget:self action:@selector(itemClickAction:) forControlEvents:UIControlEventTouchUpInside]; [self.scrollView addSubview:item]; - if (!item) { - NSString *formatString = @"\n\n\ - ------ BEGIN NSException Log ---------------\n \ - class name: %@ \n \ - ------line: %@ \n \ - ----reason: %@ \n \ - ------ END -------------------------------- \n\n"; - NSString *reason = [NSString stringWithFormat:formatString, - @(__PRETTY_FUNCTION__), - @(__LINE__), - @"Please make sure the custom InputViewPlugin type increase from 1 consecutively.[Chinese:]请确保自定义插件的 type 值从1开始连续递增,详情请查看文档:https://github.com/leancloud/ChatKit-OC/blob/master/ChatKit%20%E8%87%AA%E5%AE%9A%E4%B9%89%E4%B8%9A%E5%8A%A1.md#%E8%87%AA%E5%AE%9A%E4%B9%89%E8%BE%93%E5%85%A5%E6%A1%86%E6%8F%92%E4%BB%B6"]; - @throw [NSException exceptionWithName:NSGenericException - reason:reason - userInfo:nil]; - } +// if (!item) { +// NSString *formatString = @"\n\n\ +// ------ BEGIN NSException Log ---------------\n \ +// class name: %@ \n \ +// ------line: %@ \n \ +// ----reason: %@ \n \ +// ------ END -------------------------------- \n\n"; +// NSString *reason = [NSString stringWithFormat:formatString, +// @(__PRETTY_FUNCTION__), +// @(__LINE__), +// @"Please make sure the custom InputViewPlugin type increase from 1 consecutively.[Chinese:]请确保自定义插件的 type 值从1开始连续递增,详情请查看文档:https://github.com/leancloud/ChatKit-OC/blob/master/ChatKit%20%E8%87%AA%E5%AE%9A%E4%B9%89%E4%B8%9A%E5%8A%A1.md#%E8%87%AA%E5%AE%9A%E4%B9%89%E8%BE%93%E5%85%A5%E6%A1%86%E6%8F%92%E4%BB%B6"]; +// @throw [NSException exceptionWithName:NSGenericException +// reason:reason +// userInfo:nil]; +// } [self.itemViews addObject:item]; column ++; if (idx == self.titles.count - 1) { diff --git a/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKFacePageView.h b/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKFacePageView.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKFacePageView.m b/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKFacePageView.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKInputViewPlugin.h b/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKInputViewPlugin.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKInputViewPlugin.m b/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKInputViewPlugin.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKInputViewPluginLocation.h b/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKInputViewPluginLocation.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKInputViewPluginLocation.m b/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKInputViewPluginLocation.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKInputViewPluginPickImage.h b/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKInputViewPluginPickImage.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKInputViewPluginPickImage.m b/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKInputViewPluginPickImage.m old mode 100644 new mode 100755 index b23ef211..0f52ead3 --- a/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKInputViewPluginPickImage.m +++ b/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKInputViewPluginPickImage.m @@ -40,7 +40,7 @@ - (UIImage *)pluginIconImage { * 插件名称 */ - (NSString *)pluginTitle { - return @"照片"; + return [NSBundle lcck_getLocalizedString:@"照片" class:[self class]]; } /*! diff --git a/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKInputViewPluginTakePhoto.h b/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKInputViewPluginTakePhoto.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKInputViewPluginTakePhoto.m b/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKInputViewPluginTakePhoto.m old mode 100644 new mode 100755 index b7e5a861..85e588c6 --- a/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKInputViewPluginTakePhoto.m +++ b/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKInputViewPluginTakePhoto.m @@ -40,7 +40,7 @@ - (UIImage *)pluginIconImage { * 插件名称 */ - (NSString *)pluginTitle { - return @"拍摄"; + return [NSBundle lcck_getLocalizedString:@"拍照" class:[self class]]; } /*! diff --git a/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKProgressHUD.h b/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKProgressHUD.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKProgressHUD.m b/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKProgressHUD.m old mode 100644 new mode 100755 index be1ba144..95b78446 --- a/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKProgressHUD.m +++ b/ChatKit/Class/Module/Conversation/View/ChatBar/LCCKProgressHUD.m @@ -46,9 +46,9 @@ - (void)setup{ - (void)show { self.angle = 0.0f; self.seconds = 0; - self.subTitleLabel.text = @"向上滑动取消"; + self.subTitleLabel.text = [NSBundle lcck_getLocalizedString:@"向上滑动取消" class:[self class]]; self.centerLabel.text = @"60"; - self.titleLabel.text = @"录音时间"; + self.titleLabel.text = [NSBundle lcck_getLocalizedString:@"录音时间" class:[self class]]; [self timer]; dispatch_async(dispatch_get_main_queue(), ^{ if(!self.superview) @@ -125,13 +125,13 @@ - (void)dismiss{ - (void)setProgressState:(LCCKProgressState)progressState { switch (progressState) { case LCCKProgressSuccess: - self.centerLabel.text = @"录音成功"; + self.centerLabel.text = [NSBundle lcck_getLocalizedString:@"录音成功" class:[self class]]; break; case LCCKProgressShort: - self.centerLabel.text = @"时间太短,请重试"; + self.centerLabel.text = [NSBundle lcck_getLocalizedString:@"时间太短,请重试" class:[self class]]; break; case LCCKProgressError: - self.centerLabel.text = @"录音失败"; + self.centerLabel.text = [NSBundle lcck_getLocalizedString:@"录音失败" class:[self class]]; break; case LCCKProgressMessage: break; @@ -185,7 +185,7 @@ - (UILabel *)titleLabel{ if (!_titleLabel) { _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 150, 20)]; _titleLabel.center = CGPointMake([[UIScreen mainScreen] bounds].size.width/2,[[UIScreen mainScreen] bounds].size.height/2 - 30); - _titleLabel.text = @"录音时间"; + _titleLabel.text = [NSBundle lcck_getLocalizedString:@"录音时间" class:[self class]]; _titleLabel.textAlignment = NSTextAlignmentCenter; _titleLabel.font = [UIFont boldSystemFontOfSize:18]; _titleLabel.textColor = [UIColor whiteColor]; @@ -198,7 +198,7 @@ - (UILabel *)subTitleLabel{ if (!_subTitleLabel) { _subTitleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 150, 20)]; _subTitleLabel.center = CGPointMake([[UIScreen mainScreen] bounds].size.width/2,[[UIScreen mainScreen] bounds].size.height/2 + 30); - _subTitleLabel.text = @"向上滑动取消录音"; + _subTitleLabel.text = [NSBundle lcck_getLocalizedString:@"向上滑动取消录音" class:[self class]]; _subTitleLabel.textAlignment = NSTextAlignmentCenter; _subTitleLabel.font = [UIFont boldSystemFontOfSize:14]; _subTitleLabel.textColor = [UIColor whiteColor]; diff --git a/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKChatImageMessageCell.h b/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKChatImageMessageCell.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKChatImageMessageCell.m b/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKChatImageMessageCell.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKChatLocationMessageCell.h b/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKChatLocationMessageCell.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKChatLocationMessageCell.m b/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKChatLocationMessageCell.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKChatMessageCell.h b/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKChatMessageCell.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKChatMessageCell.m b/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKChatMessageCell.m old mode 100644 new mode 100755 index 314f2c08..c295374c --- a/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKChatMessageCell.m +++ b/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKChatMessageCell.m @@ -314,19 +314,67 @@ - (void)setup { - (void)configureCellWithData:(id)message { NSString *nickName = nil; NSURL *avatarURL = nil; + + NSString* payload = @""; + //看到这句话,你已经更新了2018.0214的代码了 + if([message isKindOfClass: [AVIMMessage class]]) { + payload = ((AVIMMessage *)message).payload; + } else if([message isKindOfClass: [LCCKMessage class]]) { + payload = ((LCCKMessage *)message).message.payload == nil ? @"" : ((LCCKMessage *)message).message.payload; + } + + NSData *data = [payload dataUsingEncoding:NSUTF8StringEncoding]; + id orginData = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil]; + id json = [orginData objectForKey:@"_lcattrs"]; + + NSString *name = [json objectForKey: @"USER_NAME"]; + if (name != nil) { + nickName = name; + } + NSString *icon = [json objectForKey: @"USER_ICON"]; + NSURL *url = [NSURL URLWithString:icon]; + avatarURL = url; +// if(icon == nil +// || (icon != nil && [icon isEqualToString:@""])) { +// avatarURL = self.message.sender.avatarURL; +// } +// +// if(avatarURL == nil +// || (avatarURL != nil && [avatarURL.absoluteString isEqualToString:@""])) { +// id defSender = [[LCCKUserSystemService sharedInstance] fetchCurrentUser]; +// avatarURL = defSender.avatarURL; +// } + LCCKMessageSendState sendStatus; if ([message lcck_isCustomMessage]) { NSString *senderClientId = [(AVIMTypedMessage *)message clientId]; NSError *error; //TODO:如果我正在群里聊天,这时有人进入群聊,需要异步获取头像等信息,模仿ConversationList的做法。 [[LCCKUserSystemService sharedInstance] getCachedProfileIfExists:senderClientId name:&nickName avatarURL:&avatarURL error:&error]; - if (!nickName) { nickName = senderClientId; } - self.message = nil; + if (!nickName) { + nickName = senderClientId; + NSString *name = [json objectForKey: @"USER_NAME"]; + if (name != nil) { + nickName = name; + } + } + self.message = message; sendStatus = (LCCKMessageSendState)[(AVIMTypedMessage *)message status]; } else { self.message = message; - nickName = self.message.localDisplayName; - avatarURL = self.message.sender.avatarURL; + NSString *name = [json objectForKey: @"USER_NAME"]; + if (name != nil) { + nickName = name; + } + if(!nickName) { + nickName = self.message.localDisplayName; + } + NSString *icon = [json objectForKey: @"USER_ICON"]; + NSURL *url = [NSURL URLWithString:icon]; + avatarURL = url; + if(!avatarURL) { + avatarURL = self.message.sender.avatarURL; + } sendStatus = self.message.sendStatus; //FIXME: SDK 暂不支持已读未读 // if ([(LCCKMessage *)message messageReadState]) { diff --git a/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKChatSystemMessageCell.h b/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKChatSystemMessageCell.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKChatSystemMessageCell.m b/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKChatSystemMessageCell.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKChatTextMessageCell.h b/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKChatTextMessageCell.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKChatTextMessageCell.m b/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKChatTextMessageCell.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKChatVoiceMessageCell.h b/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKChatVoiceMessageCell.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKChatVoiceMessageCell.m b/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKChatVoiceMessageCell.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKContentView.h b/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKContentView.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKContentView.m b/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKContentView.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKMessageSendStateView.h b/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKMessageSendStateView.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKMessageSendStateView.m b/ChatKit/Class/Module/Conversation/View/ChatMessageCell/LCCKMessageSendStateView.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/View/LCCKConversationNavigationTitleView.h b/ChatKit/Class/Module/Conversation/View/LCCKConversationNavigationTitleView.h old mode 100644 new mode 100755 index 3bb29111..62d16b22 --- a/ChatKit/Class/Module/Conversation/View/LCCKConversationNavigationTitleView.h +++ b/ChatKit/Class/Module/Conversation/View/LCCKConversationNavigationTitleView.h @@ -12,6 +12,8 @@ @interface LCCKConversationNavigationTitleView : UIView +@property (nonatomic, strong) UILabel *conversationNameView; + - (instancetype)initWithConversation:(AVIMConversation *)conversation navigationController:(UINavigationController *)navigationController; @end diff --git a/ChatKit/Class/Module/Conversation/View/LCCKConversationNavigationTitleView.m b/ChatKit/Class/Module/Conversation/View/LCCKConversationNavigationTitleView.m old mode 100644 new mode 100755 index bc1e61d5..f859b3f9 --- a/ChatKit/Class/Module/Conversation/View/LCCKConversationNavigationTitleView.m +++ b/ChatKit/Class/Module/Conversation/View/LCCKConversationNavigationTitleView.m @@ -28,7 +28,6 @@ @interface LCCKConversationNavigationTitleView () -@property (nonatomic, strong) UILabel *conversationNameView; @property (nonatomic, strong) UILabel *membersCountView; @property (nonatomic, weak) UINavigationController *navigationController; @property (nonatomic, strong) UIStackView *containerView; @@ -166,7 +165,7 @@ - (void)resetConversationNameWithMembersCountChanged:(BOOL)membersCountChanged { if (conversationName.length == 0 || !conversationName) { conversationName = LCCKLocalizedStrings(@"Chat"); } - self.conversationNameView.text = conversationName; + self.conversationNameView.text = @"";//conversationName; if (membersCountChanged) { NSUInteger membersCount = self.conversation.members.count; self.membersCountView.text = [NSString stringWithFormat:@"(%@)", @(membersCount)]; diff --git a/ChatKit/Class/Module/Conversation/View/LCCKMenuItem.h b/ChatKit/Class/Module/Conversation/View/LCCKMenuItem.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/Conversation/View/LCCKMenuItem.m b/ChatKit/Class/Module/Conversation/View/LCCKMenuItem.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/ConversationList/Controller/LCCKConversationListViewController.h b/ChatKit/Class/Module/ConversationList/Controller/LCCKConversationListViewController.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/ConversationList/Controller/LCCKConversationListViewController.m b/ChatKit/Class/Module/ConversationList/Controller/LCCKConversationListViewController.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/ConversationList/Model/LCCKConversationListViewModel.h b/ChatKit/Class/Module/ConversationList/Model/LCCKConversationListViewModel.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/ConversationList/Model/LCCKConversationListViewModel.m b/ChatKit/Class/Module/ConversationList/Model/LCCKConversationListViewModel.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/ConversationList/View/LCCKConversationListCell.h b/ChatKit/Class/Module/ConversationList/View/LCCKConversationListCell.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Module/ConversationList/View/LCCKConversationListCell.m b/ChatKit/Class/Module/ConversationList/View/LCCKConversationListCell.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_Camera@2x.png b/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_Camera@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_Camera@3x.png b/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_Camera@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_InfoMulti@2x.png b/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_InfoMulti@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_InfoMulti@3x.png b/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_InfoMulti@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_InfoSingle@2x.png b/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_InfoSingle@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_InfoSingle@3x.png b/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_InfoSingle@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_Operate@2x.png b/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_Operate@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_Operate@3x.png b/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_Operate@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_add@2x.png b/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_add@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_add@3x.png b/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_add@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_addfriends@2x.png b/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_addfriends@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_addfriends@3x.png b/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_addfriends@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_back@2x.png b/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_back@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_back@3x.png b/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_back@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_back_cube@2x.png b/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_back_cube@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_back_cube@3x.png b/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_back_cube@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_delete@2x.png b/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_delete@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_delete@3x.png b/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_delete@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_more@2x.png b/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_more@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_more@3x.png b/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_more@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_more_black@2x.png b/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_more_black@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_more_black@3x.png b/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_more_black@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_more_cube@2x.png b/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_more_cube@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_more_cube@3x.png b/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_more_cube@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_question@2x.png b/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_question@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_question@3x.png b/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_question@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_set@2x.png b/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_set@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_set@3x.png b/ChatKit/Class/Resources/BarButtonIcon.bundle/barbuttonicon_set@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/ToolViewEmotion@2x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/ToolViewEmotion@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/ToolViewEmotion@3x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/ToolViewEmotion@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/ToolViewEmotionHL@2x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/ToolViewEmotionHL@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/ToolViewEmotionHL@3x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/ToolViewEmotionHL@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/ToolViewInputVoice@2x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/ToolViewInputVoice@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/ToolViewInputVoice@3x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/ToolViewInputVoice@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/ToolViewInputVoiceHL@2x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/ToolViewInputVoiceHL@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/ToolViewInputVoiceHL@3x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/ToolViewInputVoiceHL@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/ToolViewKeyboard@2x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/ToolViewKeyboard@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/ToolViewKeyboard@3x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/ToolViewKeyboard@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/ToolViewKeyboardHL@2x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/ToolViewKeyboardHL@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/ToolViewKeyboardHL@3x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/ToolViewKeyboardHL@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/TypeSelectorBtnHL_Black@2x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/TypeSelectorBtnHL_Black@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/TypeSelectorBtnHL_Black@3x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/TypeSelectorBtnHL_Black@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/TypeSelectorBtn_Black@2x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/TypeSelectorBtn_Black@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/TypeSelectorBtn_Black@3x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/TypeSelectorBtn_Black@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/VoiceBtn_Black@2x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/VoiceBtn_Black@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/VoiceBtn_Black@3x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/VoiceBtn_Black@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/VoiceBtn_BlackHL@2x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/VoiceBtn_BlackHL@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/VoiceBtn_BlackHL@3x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/VoiceBtn_BlackHL@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_emoji_highlight@2x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_emoji_highlight@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_emoji_normal@2x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_emoji_normal@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_face_highlight@3x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_face_highlight@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_face_normal@3x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_face_normal@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_icons_camera@3x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_icons_camera@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_icons_location@3x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_icons_location@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_icons_pic@3x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_icons_pic@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_input_normal@2x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_input_normal@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_more_highlight@3x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_more_highlight@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_more_normal@3x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_more_normal@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_picture_normal@2x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_picture_normal@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_recent_highlight@2x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_recent_highlight@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_recent_normal@2x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_recent_normal@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_record_circle@2x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_record_circle@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_voice_normal@2x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/chat_bar_voice_normal@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/input_bar_flat@2x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/input_bar_flat@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/input_field_cover@2x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/input_field_cover@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/location_green_icon@2x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/location_green_icon@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/preview_background@2x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/preview_background@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/sharemore_pic@2x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/sharemore_pic@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/sharemore_pic@3x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/sharemore_pic@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/sharemore_video@2x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/sharemore_video@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/sharemore_video@3x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/sharemore_video@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/show_user_location_normal@2x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/show_user_location_normal@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/show_user_location_pressed@2x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/show_user_location_pressed@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ChatKeyboard.bundle/show_user_location_selected@2x.png b/ChatKit/Class/Resources/ChatKeyboard.bundle/show_user_location_selected@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/ar.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/ar.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/bg.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/bg.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/ca.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/ca.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/cs.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/cs.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/cy.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/cy.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/da.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/da.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/de.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/de.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/en.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/en.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/es.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/es.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/eu.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/eu.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/fi.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/fi.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/fr.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/fr.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/gre.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/gre.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/hu.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/hu.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/id.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/id.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/is.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/is.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/it.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/it.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/ja.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/ja.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/lv.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/lv.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/nb.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/nb.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/nl.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/nl.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/pl.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/pl.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/pt-PT.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/pt-PT.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/pt.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/pt.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/ru.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/ru.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/sv.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/sv.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/th.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/th.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/tr.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/tr.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/uk.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/uk.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/vi.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/vi.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/zh-Hans.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/zh-Hans.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/DateTools.bundle/zh-Hant.lproj/DateTools.strings b/ChatKit/Class/Resources/DateTools.bundle/zh-Hant.lproj/DateTools.strings old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\344\271\210\344\271\210\345\223\222]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\344\271\210\344\271\210\345\223\222]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\344\271\210\344\271\210\345\223\222]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\344\271\210\344\271\210\345\223\222]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\201\267\347\254\221]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\201\267\347\254\221]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\201\267\347\254\221]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\201\267\347\254\221]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\202\262\346\205\242]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\202\262\346\205\242]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\202\262\346\205\242]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\202\262\346\205\242]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\210\240\351\231\244]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\210\240\351\231\244]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\217\257\346\200\234]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\217\257\346\200\234]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\217\257\346\200\234]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\217\257\346\200\234]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\217\257\347\210\261]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\217\257\347\210\261]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\217\257\347\210\261]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\217\257\347\210\261]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\217\263\345\223\274\345\223\274]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\217\263\345\223\274\345\223\274]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\217\263\345\223\274\345\223\274]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\217\263\345\223\274\345\223\274]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\220\220]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\220\220]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\220\220]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\220\220]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\220\223]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\220\223]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\220\223]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\220\223]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\222\222\351\252\202]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\222\222\351\252\202]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\222\222\351\252\202]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\222\222\351\252\202]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\233\260]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\233\260]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\233\260]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\233\260]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\235\217\347\254\221]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\235\217\347\254\221]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\235\217\347\254\221]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\235\217\347\254\221]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\244\247\345\223\255]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\244\247\345\223\255]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\244\247\345\223\255]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\244\247\345\223\255]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\245\213\346\226\227]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\245\213\346\226\227]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\245\213\346\226\227]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\245\213\346\226\227]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\256\263\347\276\236]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\256\263\347\276\236]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\256\263\347\276\236]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\256\263\347\276\236]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\267\246\345\223\274\345\223\274]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\267\246\345\223\274\345\223\274]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\267\246\345\223\274\345\223\274]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\267\246\345\223\274\345\223\274]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\267\256\345\212\262]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\267\256\345\212\262]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\267\256\345\212\262]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\267\256\345\212\262]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\277\203\347\242\216\344\272\206]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\277\203\347\242\216\344\272\206]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\277\203\347\242\216\344\272\206]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\277\203\347\242\216\344\272\206]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\277\253\345\223\255\344\272\206]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\277\253\345\223\255\344\272\206]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\345\277\253\345\223\255\344\272\206]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\345\277\253\345\223\255\344\272\206]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\346\200\222]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\346\200\222]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\346\200\222]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\346\200\222]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\346\203\212\346\201\220]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\346\203\212\346\201\220]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\346\203\212\346\201\220]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\346\203\212\346\201\220]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\346\203\212\350\256\266]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\346\203\212\350\256\266]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\346\203\212\350\256\266]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\346\203\212\350\256\266]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\346\212\223\347\213\202]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\346\212\223\347\213\202]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\346\212\223\347\213\202]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\346\212\223\347\213\202]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\346\212\240\351\274\273]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\346\212\240\351\274\273]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\346\212\240\351\274\273]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\346\212\240\351\274\273]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\346\212\261\346\212\261]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\346\212\261\346\212\261]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\346\212\261\346\212\261]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\346\212\261\346\212\261]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\346\222\207\345\230\264]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\346\222\207\345\230\264]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\346\222\207\345\230\264]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\346\222\207\345\230\264]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\346\223\246\346\261\227]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\346\223\246\346\261\227]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\346\223\246\346\261\227]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\346\223\246\346\261\227]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\346\231\225]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\346\231\225]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\346\231\225]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\346\231\225]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\346\265\201\346\263\252]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\346\265\201\346\263\252]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\346\265\201\346\263\252]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\346\265\201\346\263\252]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\347\210\261\345\277\203]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\347\210\261\345\277\203]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\347\210\261\345\277\203]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\347\210\261\345\277\203]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\347\214\252\345\244\264]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\347\214\252\345\244\264]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\347\214\252\345\244\264]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\347\214\252\345\244\264]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\347\226\221\351\227\256]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\347\226\221\351\227\256]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\347\226\221\351\227\256]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\347\226\221\351\227\256]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\347\235\241\350\247\211]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\347\235\241\350\247\211]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\347\235\241\350\247\211]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\347\235\241\350\247\211]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\347\244\272\347\210\261]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\347\244\272\347\210\261]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\347\244\272\347\210\261]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\347\244\272\347\210\261]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\347\254\221cry]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\347\254\221cry]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\347\254\221cry]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\347\254\221cry]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\347\263\227\345\244\247\344\272\206]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\347\263\227\345\244\247\344\272\206]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\347\263\227\345\244\247\344\272\206]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\347\263\227\345\244\247\344\272\206]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\350\211\262]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\350\211\262]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\350\211\262]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\350\211\262]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\350\241\260]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\350\241\260]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\350\241\260]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\350\241\260]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\350\260\203\347\232\256]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\350\260\203\347\232\256]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\350\260\203\347\232\256]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\350\260\203\347\232\256]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\351\204\231\350\247\206]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\351\204\231\350\247\206]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\351\204\231\350\247\206]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\351\204\231\350\247\206]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\351\227\255\345\230\264]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\351\227\255\345\230\264]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\351\227\255\345\230\264]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\351\227\255\345\230\264]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\351\274\223\346\216\214]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\351\274\223\346\216\214]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\351\274\223\346\216\214]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\351\274\223\346\216\214]@3x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\351\276\207\347\211\231]@2x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\351\276\207\347\211\231]@2x.png" old mode 100644 new mode 100755 diff --git "a/ChatKit/Class/Resources/Emoji.bundle/[\351\276\207\347\211\231]@3x.png" "b/ChatKit/Class/Resources/Emoji.bundle/[\351\276\207\347\211\231]@3x.png" old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/Emoji.bundle/face.plist b/ChatKit/Class/Resources/Emoji.bundle/face.plist old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/LCCKPhotoBrowser.bundle/LCCKPhotoBrowser_arrowLeft.png b/ChatKit/Class/Resources/LCCKPhotoBrowser.bundle/LCCKPhotoBrowser_arrowLeft.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/LCCKPhotoBrowser.bundle/LCCKPhotoBrowser_arrowLeft@2x.png b/ChatKit/Class/Resources/LCCKPhotoBrowser.bundle/LCCKPhotoBrowser_arrowLeft@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/LCCKPhotoBrowser.bundle/LCCKPhotoBrowser_arrowRight.png b/ChatKit/Class/Resources/LCCKPhotoBrowser.bundle/LCCKPhotoBrowser_arrowRight.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/LCCKPhotoBrowser.bundle/LCCKPhotoBrowser_arrowRight@2x.png b/ChatKit/Class/Resources/LCCKPhotoBrowser.bundle/LCCKPhotoBrowser_arrowRight@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/LCCKPhotoBrowser.bundle/LCCKPhotoBrowser_error.png b/ChatKit/Class/Resources/LCCKPhotoBrowser.bundle/LCCKPhotoBrowser_error.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/LCCKPhotoBrowser.bundle/LCCKPhotoBrowser_error@2x.png b/ChatKit/Class/Resources/LCCKPhotoBrowser.bundle/LCCKPhotoBrowser_error@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/Lan.bundle/ar.lproj/Localizable.strings b/ChatKit/Class/Resources/Lan.bundle/ar.lproj/Localizable.strings new file mode 100644 index 00000000..c61d60b9 --- /dev/null +++ b/ChatKit/Class/Resources/Lan.bundle/ar.lproj/Localizable.strings @@ -0,0 +1,19 @@ +/* + File.strings + ChatKit + + Created by zhihanhe on 2019/5/22. + Copyright © 2019 ElonChan. All rights reserved. +*/ + +"按住 说话" = "اضغط للتحدث"; +"松开 结束" = "سحب للإنهاء"; +"向上滑动取消" = "حرك الأعلى للإلغا"; +"录音时间" = "وقت التسجيل"; +"向上滑动取消录音" = "حرك الأعلى لإلغاء التسجي"; +"录音失败" = "فشل التسجيل"; +"时间太短,请重试" = "لوقت قصير جدا، يرجى المحاولة مرة أخرى"; +"录音成功" = "نجح التسجيل"; +"照片" = "الصور"; +"拍摄" = "التقط"; +"拍照" = "التقط"; diff --git a/ChatKit/Class/Resources/Lan.bundle/en.lproj/Localizable.strings b/ChatKit/Class/Resources/Lan.bundle/en.lproj/Localizable.strings new file mode 100644 index 00000000..1b1fb50d --- /dev/null +++ b/ChatKit/Class/Resources/Lan.bundle/en.lproj/Localizable.strings @@ -0,0 +1,18 @@ +/* + Localizable.strings + ChatKit + + Created by zhihanhe on 2019/5/21. + Copyright © 2019 ElonChan. All rights reserved. +*/ +"按住 说话" = "press to speak"; +"松开 结束" = "release to end"; +"向上滑动取消" = "swipe up to cancel"; +"录音时间" = "recording time"; +"向上滑动取消录音" = "swipe up to cancel"; +"录音失败" = "recording failed"; +"时间太短,请重试" = "too short, try again"; +"录音成功" = "success"; +"照片" = "photo"; +"拍摄" = "camera"; +"拍照" = "camera"; diff --git a/ChatKit/Class/Resources/Lan.bundle/zh-Hans.lproj/Localizable.strings b/ChatKit/Class/Resources/Lan.bundle/zh-Hans.lproj/Localizable.strings new file mode 100644 index 00000000..a5e2ff0e --- /dev/null +++ b/ChatKit/Class/Resources/Lan.bundle/zh-Hans.lproj/Localizable.strings @@ -0,0 +1,18 @@ +/* + Localizable.strings + ChatKit + + Created by zhihanhe on 2019/5/21. + Copyright © 2019 ElonChan. All rights reserved. +*/ +"按住 说话" = "按住 说话"; +"松开 结束" = "松开 结束"; +"向上滑动取消" = "向上滑动取消"; +"录音时间" = "录音时间"; +"向上滑动取消录音" = "向上滑动取消录音"; +"录音失败" = "录音失败"; +"时间太短,请重试" = "时间太短,请重试"; +"录音成功" = "录音成功"; +"照片" = "照片"; +"拍摄" = "拍摄"; +"拍照" = "拍照"; diff --git a/ChatKit/Class/Resources/Lan.bundle/zh-Hant.lproj/Localizable.strings b/ChatKit/Class/Resources/Lan.bundle/zh-Hant.lproj/Localizable.strings new file mode 100644 index 00000000..e2f9e81e --- /dev/null +++ b/ChatKit/Class/Resources/Lan.bundle/zh-Hant.lproj/Localizable.strings @@ -0,0 +1,19 @@ +/* + Localizable.strings + ChatKit + + Created by zhihanhe on 2019/5/21. + Copyright © 2019 ElonChan. All rights reserved. +*/ + +"按住 说话" = "按住 說話"; +"松开 结束" = "鬆開 結束"; +"向上滑动取消" = "向上滑動取消"; +"录音时间" = "錄音時間"; +"向上滑动取消录音" = "向上滑動取消錄音"; +"录音失败" = "錄音失敗"; +"时间太短,请重试" = "時間太短,請重試"; +"录音成功" = "錄音成功"; +"照片" = "照片"; +"拍摄" = "拍攝"; +"拍照" = "拍照"; diff --git a/ChatKit/Class/Resources/MBProgressHUD.bundle/error@2x.png b/ChatKit/Class/Resources/MBProgressHUD.bundle/error@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MBProgressHUD.bundle/success@2x.png b/ChatKit/Class/Resources/MBProgressHUD.bundle/success@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/MessageBubble-Customize.plist b/ChatKit/Class/Resources/MessageBubble.bundle/MessageBubble-Customize.plist old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/MessageBubble_Location@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/MessageBubble_Location@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/MessageBubble_Receiver@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/MessageBubble_Receiver@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/MessageBubble_Sender@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/MessageBubble_Sender@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/MessageBubble_Video@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/MessageBubble_Video@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/MessageBubble_Video@3x.png b/ChatKit/Class/Resources/MessageBubble.bundle/MessageBubble_Video@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/MessageSendFail@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/MessageSendFail@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/MessageSendFail@3x.png b/ChatKit/Class/Resources/MessageBubble.bundle/MessageSendFail@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/ReceiverVoiceNodePlaying000@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/ReceiverVoiceNodePlaying000@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/ReceiverVoiceNodePlaying001@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/ReceiverVoiceNodePlaying001@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/ReceiverVoiceNodePlaying002@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/ReceiverVoiceNodePlaying002@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/ReceiverVoiceNodePlaying003@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/ReceiverVoiceNodePlaying003@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/ReceiverVoiceNodePlaying@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/ReceiverVoiceNodePlaying@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/RecordCancel@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/RecordCancel@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/RecordingBkg@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/RecordingBkg@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/RecordingSignal001@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/RecordingSignal001@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/RecordingSignal002@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/RecordingSignal002@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/RecordingSignal003@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/RecordingSignal003@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/RecordingSignal004@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/RecordingSignal004@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/RecordingSignal005@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/RecordingSignal005@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/RecordingSignal006@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/RecordingSignal006@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/RecordingSignal007@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/RecordingSignal007@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/RecordingSignal008@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/RecordingSignal008@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/SenderVoiceNodePlaying000@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/SenderVoiceNodePlaying000@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/SenderVoiceNodePlaying001@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/SenderVoiceNodePlaying001@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/SenderVoiceNodePlaying002@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/SenderVoiceNodePlaying002@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/SenderVoiceNodePlaying003@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/SenderVoiceNodePlaying003@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/SenderVoiceNodePlaying@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/SenderVoiceNodePlaying@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/VoiceMessage_Unread@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/VoiceMessage_Unread@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/message_hollow_receiver_background_highlight@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/message_hollow_receiver_background_highlight@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/message_hollow_receiver_background_highlight@3x.png b/ChatKit/Class/Resources/MessageBubble.bundle/message_hollow_receiver_background_highlight@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/message_hollow_receiver_background_normal@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/message_hollow_receiver_background_normal@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/message_hollow_receiver_background_normal@3x.png b/ChatKit/Class/Resources/MessageBubble.bundle/message_hollow_receiver_background_normal@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/message_hollow_sender_background_highlight@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/message_hollow_sender_background_highlight@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/message_hollow_sender_background_highlight@3x.png b/ChatKit/Class/Resources/MessageBubble.bundle/message_hollow_sender_background_highlight@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/message_hollow_sender_background_normal@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/message_hollow_sender_background_normal@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/message_hollow_sender_background_normal@3x.png b/ChatKit/Class/Resources/MessageBubble.bundle/message_hollow_sender_background_normal@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/message_receiver_background_highlight@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/message_receiver_background_highlight@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/message_receiver_background_highlight@3x.png b/ChatKit/Class/Resources/MessageBubble.bundle/message_receiver_background_highlight@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/message_receiver_background_normal@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/message_receiver_background_normal@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/message_receiver_background_normal@3x.png b/ChatKit/Class/Resources/MessageBubble.bundle/message_receiver_background_normal@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/message_sender_background_highlight@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/message_sender_background_highlight@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/message_sender_background_highlight@3x.png b/ChatKit/Class/Resources/MessageBubble.bundle/message_sender_background_highlight@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/message_sender_background_normal@2x.png b/ChatKit/Class/Resources/MessageBubble.bundle/message_sender_background_normal@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/MessageBubble.bundle/message_sender_background_normal@3x.png b/ChatKit/Class/Resources/MessageBubble.bundle/message_sender_background_normal@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/Other.bundle/AddGroupMemberBtn@2x.png b/ChatKit/Class/Resources/Other.bundle/AddGroupMemberBtn@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/Other.bundle/AddGroupMemberBtnHL@2x.png b/ChatKit/Class/Resources/Other.bundle/AddGroupMemberBtnHL@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/Other.bundle/CellBlueSelected@2x.png b/ChatKit/Class/Resources/Other.bundle/CellBlueSelected@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/Other.bundle/CellGraySelected@2x.png b/ChatKit/Class/Resources/Other.bundle/CellGraySelected@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/Other.bundle/ChatKit-Settings.plist b/ChatKit/Class/Resources/Other.bundle/ChatKit-Settings.plist old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/Other.bundle/ChatKit-Theme.plist b/ChatKit/Class/Resources/Other.bundle/ChatKit-Theme.plist old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/Other.bundle/Connectkeyboad_banner_mute@2x.png b/ChatKit/Class/Resources/Other.bundle/Connectkeyboad_banner_mute@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/Other.bundle/Connectkeyboad_banner_mute@3x.png b/ChatKit/Class/Resources/Other.bundle/Connectkeyboad_banner_mute@3x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/Other.bundle/Remind_Mute.png b/ChatKit/Class/Resources/Other.bundle/Remind_Mute.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/Other.bundle/SearchContactsBarIcon@2x.png b/ChatKit/Class/Resources/Other.bundle/SearchContactsBarIcon@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/Other.bundle/chatMuteOn@2x.png b/ChatKit/Class/Resources/Other.bundle/chatMuteOn@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/Other.bundle/conversationViewController_default_backgroundImage.png b/ChatKit/Class/Resources/Other.bundle/conversationViewController_default_backgroundImage.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/Other.bundle/en.lproj/LCChatKitString.strings b/ChatKit/Class/Resources/Other.bundle/en.lproj/LCChatKitString.strings old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/Other.bundle/safari-icon.png b/ChatKit/Class/Resources/Other.bundle/safari-icon.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/Other.bundle/safari-icon@2x.png b/ChatKit/Class/Resources/Other.bundle/safari-icon@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/Other.bundle/zh-Hans.lproj/LCChatKitString.strings b/ChatKit/Class/Resources/Other.bundle/zh-Hans.lproj/LCChatKitString.strings old mode 100644 new mode 100755 index fbc05849..5bd2e2cd --- a/ChatKit/Class/Resources/Other.bundle/zh-Hans.lproj/LCChatKitString.strings +++ b/ChatKit/Class/Resources/Other.bundle/zh-Hans.lproj/LCChatKitString.strings @@ -51,7 +51,7 @@ "requestForceSingleSignOnAuthorization" = "当前账号已在其它设备登录,请问是否强制登录?强制登录会踢掉当前已经登录的设备。"; "unknownMessage" = "当前版本暂不支持查看此消息,请尝试升级APP查看"; "unknownMessageType" = "未知消息类型"; -"SingleWelcomeMessage" = "我们已经是好友啦,一起来聊天吧!"; +"SingleWelcomeMessage" = "你好"; "GroupWelcomeMessage" = "大家好"; "GroupWelcomeMessageWithNickName" = "大家好,我是"; "SingleConversation" = "单聊"; diff --git a/ChatKit/Class/Resources/Placeholder.bundle/Placeholder_Accept_Defeat@2x.png b/ChatKit/Class/Resources/Placeholder.bundle/Placeholder_Accept_Defeat@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/Placeholder.bundle/Placeholder_Avatar@2x.png b/ChatKit/Class/Resources/Placeholder.bundle/Placeholder_Avatar@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/Placeholder.bundle/Placeholder_Group@2x.png b/ChatKit/Class/Resources/Placeholder.bundle/Placeholder_Group@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/Placeholder.bundle/Placeholder_Image@2x.png b/ChatKit/Class/Resources/Placeholder.bundle/Placeholder_Image@2x.png old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/VoiceMessageSource.bundle/loudReceive.caf b/ChatKit/Class/Resources/VoiceMessageSource.bundle/loudReceive.caf old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/VoiceMessageSource.bundle/receive.caf b/ChatKit/Class/Resources/VoiceMessageSource.bundle/receive.caf old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/VoiceMessageSource.bundle/send.caf b/ChatKit/Class/Resources/VoiceMessageSource.bundle/send.caf old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Resources/ar.lproj/EmojiLocalizable.strings b/ChatKit/Class/Resources/ar.lproj/EmojiLocalizable.strings new file mode 100644 index 00000000..45236273 --- /dev/null +++ b/ChatKit/Class/Resources/ar.lproj/EmojiLocalizable.strings @@ -0,0 +1,94 @@ +/* + EmojiLocalizable.strings + ChatKit + + Created by zhihanhe on 2019/5/23. + Copyright © 2019 ElonChan. All rights reserved. +*/ + + +"[爱心]" = "[love]]"; +"[龇牙]" = "[grin]"; +"[调皮]" = "[tongue]"; +"[偷笑]" = "[chuckle]"; +"[擦汗]" = "[speechless]"; +"[流泪]" = "[tear]"; +"[大哭]" = "[cry]"; +"[抓狂]" = "[scream]"; +"[可爱]" = "[lovely]"; +"[色]" = "[drool]"; +"[害羞]" = "[shy]"; +"[吐]" = "[puke]"; +"[怒]" = "[angry]"; +"[惊恐]" = "[ Frightened]"; +"[傲慢]" = "[smug]"; +"[惊讶]" = "[surprised]"; +"[疑问]" = "[shocked]"; +"[困]" = "[drowsy]"; +"[么么哒]" = "[kiss]"; +"[衰]" = "[down]"; +"[撇嘴]" = "[grimace]"; +"[奋斗]" = "[fight]"; +"[左哼哼]" = "[bah!L]"; +"[右哼哼]" = "[bah!R]"; +"[抱抱]" = "[hug]"; +"[坏笑]" = "[trick]"; +"[鄙视]" = "[down]"; +"[晕]" = "[sleepy face]"; +"[可怜]" = "[whimper]"; +"[闭嘴]" = "[shhh]"; +"[睡觉]" = "[sleep ]"; +"[咒骂]" = "[scold]"; +"[抠鼻]" = "[nosepick]"; +"[鼓掌]" = "[clap]"; +"[糗大了]" = "[Embarrassed]"; +"[快哭了]" = "[tearing]"; +"[吓]" = "[scare]"; +"[猪头]" = "[pig]"; +"[爱心]" = "[love]"; +"[示爱]" = "[show love]"; +"[差劲]" = "[poor strength]"; +"[心碎了]" = "[heart broken]"; + +"[love]]" = "[爱心]"; +"[grin]" = "[龇牙]"; +"[tongue]" = "[调皮]"; +"[chuckle]" = "[偷笑]"; +"[speechless]" = "[擦汗]"; +"[tear]" = "[流泪]"; +"[cry]" = "[大哭]"; +"[scream]" = "[抓狂]"; +"[lovely]" = "[可爱]"; +"[drool]" = "[色]"; +"[shy]" = "[害羞]"; +"[puke]" = "[吐]"; +"[angry]" = "[怒]"; +"[ Frightened]" = "[惊恐]"; +"[smug]" = "[傲慢]"; +"[surprised]" = "[惊讶]"; +"[shocked]" = "[疑问]"; +"[drowsy]" = "[困]"; +"[kiss]" = "[么么哒]"; +"[down]" = "[衰]"; +"[grimace]" = "[撇嘴]"; +"[fight]" = "[奋斗]"; +"[bah!L]" = "[左哼哼]"; +"[bah!R]" = "[右哼哼]"; +"[hug]" = "[抱抱]"; +"[trick]" = "[坏笑]"; +"[down]" = "[鄙视]"; +"[sleepy face]" = "[晕]"; +"[whimper]" = "[可怜]"; +"[shhh]" = "[闭嘴]"; +"[sleep ]" = "[睡觉]"; +"[scold]" = "[咒骂]"; +"[nosepick]" = "[抠鼻]"; +"[clap]" = "[鼓掌]"; +"[Embarrassed]" = "[糗大了]"; +"[tearing]" = "[快哭了]"; +"[scare]" = "[吓]"; +"[pig]" = "[猪头]"; +"[love]" = "[爱心]"; +"[show love]" = "[示爱]"; +"[poor strength]" = "[差劲]"; +"[heart broken]" = "[心碎了]"; diff --git a/ChatKit/Class/Resources/en.lproj/EmojiLocalizable.strings b/ChatKit/Class/Resources/en.lproj/EmojiLocalizable.strings new file mode 100644 index 00000000..45236273 --- /dev/null +++ b/ChatKit/Class/Resources/en.lproj/EmojiLocalizable.strings @@ -0,0 +1,94 @@ +/* + EmojiLocalizable.strings + ChatKit + + Created by zhihanhe on 2019/5/23. + Copyright © 2019 ElonChan. All rights reserved. +*/ + + +"[爱心]" = "[love]]"; +"[龇牙]" = "[grin]"; +"[调皮]" = "[tongue]"; +"[偷笑]" = "[chuckle]"; +"[擦汗]" = "[speechless]"; +"[流泪]" = "[tear]"; +"[大哭]" = "[cry]"; +"[抓狂]" = "[scream]"; +"[可爱]" = "[lovely]"; +"[色]" = "[drool]"; +"[害羞]" = "[shy]"; +"[吐]" = "[puke]"; +"[怒]" = "[angry]"; +"[惊恐]" = "[ Frightened]"; +"[傲慢]" = "[smug]"; +"[惊讶]" = "[surprised]"; +"[疑问]" = "[shocked]"; +"[困]" = "[drowsy]"; +"[么么哒]" = "[kiss]"; +"[衰]" = "[down]"; +"[撇嘴]" = "[grimace]"; +"[奋斗]" = "[fight]"; +"[左哼哼]" = "[bah!L]"; +"[右哼哼]" = "[bah!R]"; +"[抱抱]" = "[hug]"; +"[坏笑]" = "[trick]"; +"[鄙视]" = "[down]"; +"[晕]" = "[sleepy face]"; +"[可怜]" = "[whimper]"; +"[闭嘴]" = "[shhh]"; +"[睡觉]" = "[sleep ]"; +"[咒骂]" = "[scold]"; +"[抠鼻]" = "[nosepick]"; +"[鼓掌]" = "[clap]"; +"[糗大了]" = "[Embarrassed]"; +"[快哭了]" = "[tearing]"; +"[吓]" = "[scare]"; +"[猪头]" = "[pig]"; +"[爱心]" = "[love]"; +"[示爱]" = "[show love]"; +"[差劲]" = "[poor strength]"; +"[心碎了]" = "[heart broken]"; + +"[love]]" = "[爱心]"; +"[grin]" = "[龇牙]"; +"[tongue]" = "[调皮]"; +"[chuckle]" = "[偷笑]"; +"[speechless]" = "[擦汗]"; +"[tear]" = "[流泪]"; +"[cry]" = "[大哭]"; +"[scream]" = "[抓狂]"; +"[lovely]" = "[可爱]"; +"[drool]" = "[色]"; +"[shy]" = "[害羞]"; +"[puke]" = "[吐]"; +"[angry]" = "[怒]"; +"[ Frightened]" = "[惊恐]"; +"[smug]" = "[傲慢]"; +"[surprised]" = "[惊讶]"; +"[shocked]" = "[疑问]"; +"[drowsy]" = "[困]"; +"[kiss]" = "[么么哒]"; +"[down]" = "[衰]"; +"[grimace]" = "[撇嘴]"; +"[fight]" = "[奋斗]"; +"[bah!L]" = "[左哼哼]"; +"[bah!R]" = "[右哼哼]"; +"[hug]" = "[抱抱]"; +"[trick]" = "[坏笑]"; +"[down]" = "[鄙视]"; +"[sleepy face]" = "[晕]"; +"[whimper]" = "[可怜]"; +"[shhh]" = "[闭嘴]"; +"[sleep ]" = "[睡觉]"; +"[scold]" = "[咒骂]"; +"[nosepick]" = "[抠鼻]"; +"[clap]" = "[鼓掌]"; +"[Embarrassed]" = "[糗大了]"; +"[tearing]" = "[快哭了]"; +"[scare]" = "[吓]"; +"[pig]" = "[猪头]"; +"[love]" = "[爱心]"; +"[show love]" = "[示爱]"; +"[poor strength]" = "[差劲]"; +"[heart broken]" = "[心碎了]"; diff --git a/ChatKit/Class/Resources/zh-Hans.lproj/EmojiLocalizable.strings b/ChatKit/Class/Resources/zh-Hans.lproj/EmojiLocalizable.strings new file mode 100644 index 00000000..e48a91b6 --- /dev/null +++ b/ChatKit/Class/Resources/zh-Hans.lproj/EmojiLocalizable.strings @@ -0,0 +1,51 @@ +/* + EmojiLocalizable.strings + ChatKit + + Created by zhihanhe on 2019/5/23. + Copyright © 2019 ElonChan. All rights reserved. +*/ + + +"[爱心]" = "[爱心]"; +"[龇牙]" = "[龇牙]"; +"[调皮]" = "[调皮]"; +"[偷笑]" = "[偷笑]"; +"[擦汗]" = "[擦汗]"; +"[流泪]" = "[流泪]"; +"[大哭]" = "[大哭]"; +"[抓狂]" = "[抓狂]"; +"[可爱]" = "[可爱]"; +"[色]" = "[色]"; +"[害羞]" = "[害羞]"; +"[吐]" = "[吐]"; +"[怒]" = "[怒]"; +"[惊恐]" = "[惊恐]"; +"[傲慢]" = "[傲慢]"; +"[惊讶]" = "[惊讶]"; +"[疑问]" = "[疑问]"; +"[困]" = "[困]"; +"[么么哒]" = "[么么哒]"; +"[衰]" = "[衰]"; +"[撇嘴]" = "[撇嘴]"; +"[奋斗]" = "[奋斗]"; +"[左哼哼]" = "[左哼哼]"; +"[右哼哼]" = "[右哼哼]"; +"[抱抱]" = "[抱抱]"; +"[坏笑]" = "[坏笑]"; +"[鄙视]" = "[鄙视]"; +"[晕]" = "[晕]"; +"[可怜]" = "[可怜]"; +"[闭嘴]" = "[闭嘴]"; +"[睡觉]" = "[睡觉]"; +"[咒骂]" = "[咒骂]"; +"[抠鼻]" = "[抠鼻]"; +"[鼓掌]" = "[鼓掌]"; +"[糗大了]" = "[糗大了]"; +"[快哭了]" = "[快哭了]"; +"[吓]" = "[吓]"; +"[猪头]" = "[猪头]"; +"[爱心]" = "[爱心]"; +"[示爱]" = "[示爱]"; +"[差劲]" = "[差劲]"; +"[心碎了]" = "[心碎了]"; diff --git a/ChatKit/Class/Resources/zh-Hant.lproj/EmojiLocalizable.strings b/ChatKit/Class/Resources/zh-Hant.lproj/EmojiLocalizable.strings new file mode 100644 index 00000000..7ca790ab --- /dev/null +++ b/ChatKit/Class/Resources/zh-Hant.lproj/EmojiLocalizable.strings @@ -0,0 +1,94 @@ +/* + EmojiLocalizable.strings + Pods + + Created by tianlc on 2019/5/23. + + */ + +"[爱心]" = "[愛心]"; +"[龇牙]" = "[齜牙]"; +"[调皮]" = "[調皮]"; +"[偷笑]" = "[偷笑]"; +"[擦汗]" = "[擦汗]"; +"[流泪]" = "[流淚]"; +"[大哭]" = "[大哭]"; +"[抓狂]" = "[抓狂]"; +"[可爱]" = "[可愛]"; +"[色]" = "[色]"; +"[害羞]" = "[害羞]"; +"[吐]" = "[吐]"; +"[怒]" = "[怒]"; +"[惊恐]" = "[驚恐]"; +"[傲慢]" = "[傲慢]"; +"[惊讶]" = "[驚訝]"; +"[疑问]" = "[疑問]"; +"[困]" = "[困]"; +"[么么哒]" = "[麼麼噠]"; +"[衰]" = "[衰]"; +"[撇嘴]" = "[撇嘴]"; +"[奋斗]" = "[奮鬥]"; +"[左哼哼]" = "[左哼哼]"; +"[右哼哼]" = "[右哼哼]"; +"[抱抱]" = "[抱抱]"; +"[坏笑]" = "[坏笑]"; +"[鄙视]" = "[鄙視]"; +"[晕]" = "[暈]"; +"[可怜]" = "[可憐]"; +"[闭嘴]" = "[閉嘴]"; +"[睡觉]" = "[睡覺]"; +"[咒骂]" = "[咒罵]"; +"[抠鼻]" = "[摳鼻]"; +"[鼓掌]" = "[鼓掌]"; +"[糗大了]" = "[糗大了]"; +"[快哭了]" = "[快哭了]"; +"[吓]" = "[嚇]"; +"[猪头]" = "[豬頭]"; +"[爱心]" = "[愛心]"; +"[示爱]" = "[示愛]"; +"[差劲]" = "[差勁]"; +"[心碎了]" = "[心碎了]"; + + +"[愛心]" = "[爱心]"; +"[齜牙]" = "[龇牙]"; +"[調皮]" = "[调皮]"; +"[偷笑]" = "[偷笑]"; +"[擦汗]" = "[擦汗]"; +"[流淚]" = "[流泪]"; +"[大哭]" = "[大哭]"; +"[抓狂]" = "[抓狂]"; +"[可愛]" = "[可爱]"; +"[色]" = "[色]"; +"[害羞]" = "[害羞]"; +"[吐]" = "[吐]"; +"[怒]" = "[怒]"; +"[驚恐]" = "[惊恐]"; +"[傲慢]" = "[傲慢]"; +"[驚訝]" = "[惊讶]"; +"[疑問]" = "[疑问]"; +"[困]" = "[困]"; +"[麼麼噠]" = "[么么哒]"; +"[衰]" = "[衰]"; +"[撇嘴]" = "[撇嘴]"; +"[奮鬥]" = "[奋斗]"; +"[左哼哼]" = "[左哼哼]"; +"[右哼哼]" = "[右哼哼]"; +"[抱抱]" = "[抱抱]"; +"[坏笑]" = "[坏笑]"; +"[鄙視]" = "[鄙视]"; +"[暈]" = "[晕]"; +"[可憐]" = "[可怜]"; +"[閉嘴]" = "[闭嘴]"; +"[睡覺]" = "[睡觉]"; +"[咒罵]" = "[咒骂]"; +"[摳鼻]" = "[抠鼻]"; +"[鼓掌]" = "[鼓掌]"; +"[糗大了]" = "[糗大了]"; +"[快哭了]" = "[快哭了]"; +"[嚇]" = "[吓]"; +"[豬頭]" = "[猪头]"; +"[愛心]" = "[爱心]"; +"[示愛]" = "[示爱]"; +"[差勁]" = "[差劲]"; +"[心碎了]" = "[心碎了]"; diff --git a/ChatKit/Class/Tool/Categories/NSBundle+LCCKExtension.h b/ChatKit/Class/Tool/Categories/NSBundle+LCCKExtension.h old mode 100644 new mode 100755 index 412d7b87..21db33cf --- a/ChatKit/Class/Tool/Categories/NSBundle+LCCKExtension.h +++ b/ChatKit/Class/Tool/Categories/NSBundle+LCCKExtension.h @@ -11,5 +11,6 @@ @interface NSBundle (LCCKExtension) + (NSBundle *)lcck_bundleForName:(NSString *)bundleName class:(Class)aClass; ++ (NSString *) lcck_getLocalizedString:(NSString *)key class:(Class)aClass; @end diff --git a/ChatKit/Class/Tool/Categories/NSBundle+LCCKExtension.m b/ChatKit/Class/Tool/Categories/NSBundle+LCCKExtension.m old mode 100644 new mode 100755 index 65b3e851..6ac472df --- a/ChatKit/Class/Tool/Categories/NSBundle+LCCKExtension.m +++ b/ChatKit/Class/Tool/Categories/NSBundle+LCCKExtension.m @@ -33,4 +33,9 @@ + (NSBundle *)lcck_bundleForName:(NSString *)bundleName class:(Class)aClass { return bundle; } ++ (NSString *) lcck_getLocalizedString:(NSString *)key class:(Class)aClass { + NSBundle *bundle = [NSBundle lcck_bundleForName:@"Lan" class:aClass]; + return NSLocalizedStringFromTableInBundle(key, nil, bundle, key); +} + @end diff --git a/ChatKit/Class/Tool/Categories/NSFileManager+LCCKExtension.h b/ChatKit/Class/Tool/Categories/NSFileManager+LCCKExtension.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Categories/NSFileManager+LCCKExtension.m b/ChatKit/Class/Tool/Categories/NSFileManager+LCCKExtension.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Categories/NSString+LCCKExtension.h b/ChatKit/Class/Tool/Categories/NSString+LCCKExtension.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Categories/NSString+LCCKExtension.m b/ChatKit/Class/Tool/Categories/NSString+LCCKExtension.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Categories/NSString+LCCKMD5.h b/ChatKit/Class/Tool/Categories/NSString+LCCKMD5.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Categories/NSString+LCCKMD5.m b/ChatKit/Class/Tool/Categories/NSString+LCCKMD5.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Categories/UIColor+LCCKExtension.h b/ChatKit/Class/Tool/Categories/UIColor+LCCKExtension.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Categories/UIColor+LCCKExtension.m b/ChatKit/Class/Tool/Categories/UIColor+LCCKExtension.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Categories/UIImage+LCCKExtension.h b/ChatKit/Class/Tool/Categories/UIImage+LCCKExtension.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Categories/UIImage+LCCKExtension.m b/ChatKit/Class/Tool/Categories/UIImage+LCCKExtension.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Categories/UIImageView+LCCKExtension.h b/ChatKit/Class/Tool/Categories/UIImageView+LCCKExtension.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Categories/UIImageView+LCCKExtension.m b/ChatKit/Class/Tool/Categories/UIImageView+LCCKExtension.m old mode 100644 new mode 100755 index 81312072..a7dfa45e --- a/ChatKit/Class/Tool/Categories/UIImageView+LCCKExtension.m +++ b/ChatKit/Class/Tool/Categories/UIImageView+LCCKExtension.m @@ -56,13 +56,13 @@ @implementation LCCKImageObserver - (instancetype)initWithImageView:(UIImageView *)imageView { if (self = [super init]) { self.originImageView = imageView; - [imageView addObserver:self forKeyPath:@"image" options:NSKeyValueObservingOptionNew context:nil]; - [imageView addObserver:self forKeyPath:@"contentMode" options:NSKeyValueObservingOptionNew context:nil]; - __unsafe_unretained __typeof(self) weakSelf = self; - [self cyl_executeAtDealloc:^{ - [weakSelf.originImageView removeObserver:weakSelf forKeyPath:@"image"]; - [weakSelf.originImageView removeObserver:weakSelf forKeyPath:@"contentMode"]; - }]; +// [imageView addObserver:self forKeyPath:@"image" options:NSKeyValueObservingOptionNew context:nil]; +// [imageView addObserver:self forKeyPath:@"contentMode" options:NSKeyValueObservingOptionNew context:nil]; +// __unsafe_unretained __typeof(self) weakSelf = self; +// [self cyl_executeAtDealloc:^{ +// [weakSelf.originImageView removeObserver:weakSelf forKeyPath:@"image"]; +// [weakSelf.originImageView removeObserver:weakSelf forKeyPath:@"contentMode"]; +// }]; } return self; } diff --git a/ChatKit/Class/Tool/Categories/UIView+LCCKExtension.h b/ChatKit/Class/Tool/Categories/UIView+LCCKExtension.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Categories/UIView+LCCKExtension.m b/ChatKit/Class/Tool/Categories/UIView+LCCKExtension.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/ChatKitHeaders.h b/ChatKit/Class/Tool/ChatKitHeaders.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/LCCKConstants.h b/ChatKit/Class/Tool/LCCKConstants.h old mode 100644 new mode 100755 index 30cb0966..1a27aece --- a/ChatKit/Class/Tool/LCCKConstants.h +++ b/ChatKit/Class/Tool/LCCKConstants.h @@ -48,7 +48,7 @@ static NSString *const LCCKBadgeTextForNumberGreaterThanLimit = @"···"; #ifndef LCCKLocalizedStrings #define LCCKLocalizedStrings(key) \ - NSLocalizedStringFromTableInBundle(key, @"LCChatKitString", [NSBundle lcck_bundleForName:@"Other" class:[self class]], nil) + NSLocalizedStringFromTableInBundle(key, @"LCChatKitString", [NSBundle lcck_bundleForName:@"Other" class:[LCCKContact class]], nil) #endif diff --git a/ChatKit/Class/Tool/LCCKServiceDefinition.h b/ChatKit/Class/Tool/LCCKServiceDefinition.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/LCCKSingleton.h b/ChatKit/Class/Tool/LCCKSingleton.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/LCCKSingleton.m b/ChatKit/Class/Tool/LCCKSingleton.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/LCChatKit_Internal.h b/ChatKit/Class/Tool/LCChatKit_Internal.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Service/LCCKConversationListService.h b/ChatKit/Class/Tool/Service/LCCKConversationListService.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Service/LCCKConversationListService.m b/ChatKit/Class/Tool/Service/LCCKConversationListService.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Service/LCCKConversationService.h b/ChatKit/Class/Tool/Service/LCCKConversationService.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Service/LCCKSessionService.h b/ChatKit/Class/Tool/Service/LCCKSessionService.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Service/LCCKSessionService.m b/ChatKit/Class/Tool/Service/LCCKSessionService.m old mode 100644 new mode 100755 index ed8bc9be..b7ef79c2 --- a/ChatKit/Class/Tool/Service/LCCKSessionService.m +++ b/ChatKit/Class/Tool/Service/LCCKSessionService.m @@ -284,7 +284,7 @@ - (void)conversation:(AVIMConversation *)conversation didReceiveTypedMessage:(AV return; } if (!message.messageId) { - LCCKLog(@"🔴类名与方法名:%@(在第%@行),描述:%@", @(__PRETTY_FUNCTION__), @(__LINE__), @"Receive Message , but MessageId is nil"); + LCCKLog(@"�类名与方法名:%@(在第%@行),描述:%@", @(__PRETTY_FUNCTION__), @(__LINE__), @"Receive Message , but MessageId is nil"); return; } void (^fetchedConversationCallback)() = ^() { @@ -310,12 +310,18 @@ - (void)didReceiveStatusMessage:(AVIMMessage *)message conversation:(AVIMConvers - (void)conversation:(AVIMConversation *)conversation didUpdateForKey:(AVIMConversationUpdatedKey)key { + NSString *notificationName = @"AVIMConversationDidUpdateForKey"; NSString *currentConversationId = LCCKConversationService.sharedInstance.currentConversationId; NSString *conversationId = conversation.conversationId; if ([key isEqualToString:AVIMConversationUpdatedKeyUnreadMessagesCount]) { if ([currentConversationId isEqualToString:conversationId]) { // do nothing. } else { + [[NSNotificationCenter defaultCenter] postNotificationName:notificationName + object:@{ + @"key": key, + @"conversation":conversation + }]; [LCCKConversationService.sharedInstance insertRecentConversation:conversation shouldRefreshWhenFinished:true]; } } @@ -323,6 +329,11 @@ - (void)conversation:(AVIMConversation *)conversation didUpdateForKey:(AVIMConve if ([currentConversationId isEqualToString:conversationId]) { // do nothing } else { + [[NSNotificationCenter defaultCenter] postNotificationName:notificationName + object:@{ + @"key": key, + @"conversation":conversation + }]; [LCCKConversationService.sharedInstance insertRecentConversation:conversation shouldRefreshWhenFinished:true]; } } @@ -330,6 +341,11 @@ - (void)conversation:(AVIMConversation *)conversation didUpdateForKey:(AVIMConve if ([currentConversationId isEqualToString:conversationId]) { // do nothing } else { + [[NSNotificationCenter defaultCenter] postNotificationName:notificationName + object:@{ + @"key": key, + @"conversation":conversation + }]; [LCCKConversationService.sharedInstance insertRecentConversation:conversation shouldRefreshWhenFinished:true]; } } @@ -353,7 +369,7 @@ - (void)makeSureConversation:(AVIMConversation *)conversation isAvailableCallbac !callback ?: callback(); return; } - LCCKLog(@"🔴类名与方法名:%@(在第%@行),描述:%@", @(__PRETTY_FUNCTION__), @(__LINE__), error); + LCCKLog(@"�类名与方法名:%@(在第%@行),描述:%@", @(__PRETTY_FUNCTION__), @(__LINE__), error); }]; } else { !callback ?: callback(); @@ -390,20 +406,122 @@ - (void)receiveMessage:(AVIMTypedMessage *)message conversation:(AVIMConversatio - (void)receiveMessages:(NSArray *)messages conversation:(AVIMConversation *)conversation isUnreadMessage:(BOOL)isUnreadMessage { void (^checkMentionedMessageCallback)() = ^(NSArray *filterdMessages) { + // - 插入最近对话列表 // 下面的LCCKNotificationMessageReceived也会通知ConversationListVC刷新 + // TESTME: 这个方法还支持吧? [[LCCKConversationService sharedInstance] insertRecentConversation:conversation shouldRefreshWhenFinished:NO]; // - 播放接收音 if (!isUnreadMessage) { [self playLoudReceiveSoundIfNeededForConversation:conversation]; } + NSDictionary *userInfo = @{ LCCKMessageNotifacationUserInfoConversationKey : conversation, LCCKDidReceiveMessagesUserInfoMessagesKey : filterdMessages, }; // - 通知相关页面接收到了消息:“当前对话页面”、“最近对话页面”; [[NSNotificationCenter defaultCenter] postNotificationName:LCCKNotificationMessageReceived object:userInfo]; + + AVIMTypedMessage * userObj = userInfo[@"receivedMessages"][0]; + if(![userObj respondsToSelector:@selector(attributes)]) { + return; + } + NSDictionary * userInformation = userObj.attributes; + + NSString *userSex = userInformation[@"USER_SEX"]; + NSString *userIcon = userInformation[@"USER_ICON"]; + NSString *userName = userInformation[@"USER_NAME"]; + NSString *convId = userInformation[@"CONVERSATION_ID"]; + NSString *userId = userInformation[@"USER_ID"]; + NSString *msgType = userInformation[@"MSG_TYPE"]; + NSString *fromApp = userInformation[@"APP"]; + NSString *path = [NSString stringWithFormat:@"%@/Documents/%@.BL",NSHomeDirectory(),_clientId]; + NSFileManager *manager = [NSFileManager defaultManager]; + NSMutableDictionary *block = [[NSMutableDictionary alloc] init]; + if ([manager fileExistsAtPath:path]) { + block = [NSKeyedUnarchiver unarchiveObjectWithFile:path]; + if (block != nil) { + if (userId != nil) { + if (block[userId] != nil) { + return; + } + }else{ + return; + } + } + } + + + [[LCCKConversationService sharedInstance] insertRecentConversation:conversation shouldRefreshWhenFinished:NO]; + [[LCCKConversationService sharedInstance] increaseUnreadCount:filterdMessages.count withConversationId:conversation.conversationId shouldRefreshWhenFinished:NO]; + // - 播放接收音 + if (!isUnreadMessage) { + BOOL isTransient = userObj.transient; + if (isTransient == NO) { + [self playLoudReceiveSoundIfNeededForConversation:conversation]; + } + } + + if(fromApp == nil) { + fromApp = @""; + } + + if(userSex == nil) { + userSex = @""; + } + + if(userIcon == nil) { + userIcon = @""; + } + + if(userName == nil) { + userName = @""; + } + + if(userId == nil) { + userId = userObj.clientId; + } + + if(msgType == nil) { + msgType = @""; + } + + if(convId == nil) { + convId = @""; + } + + NSString * finalMessage = @"收到新消息"; + + if (userObj.mediaType == kAVIMMessageMediaTypeAudio) { + finalMessage = @"语音消息"; + } else if (userObj.mediaType == kAVIMMessageMediaTypeImage) { + finalMessage = @"图片消息"; + } else if (userObj.text != nil) { + finalMessage = userObj.text; + } + //edit by no02 20180309 + BOOL isTransient = userObj.transient; + if (isTransient) { + //暂态消息不回转发 + }else{ + [[NSNotificationCenter defaultCenter] postNotificationName:@"sendMessageToRNNotificationName" + object:@{ + @"USER_SEX": userSex, + @"USER_ICON": userIcon, + @"USER_NAME": userName, + @"USER_ID": userId, + @"CONVERSATION_ID": convId, + @"MESSAGE_TYPE": @"MESSAGE_TYPE_CHAT", + @"MSG_TYPE": msgType, + @"APP": fromApp, + @"CHAT_TIME": [NSString stringWithFormat:@"%f", LCCK_CURRENT_TIMESTAMP], + @"CHAT_MESSAGE":finalMessage + }]; + } + }; + void(^filteredMessageCallback)(NSArray *originalMessages) = ^(NSArray *filterdMessages) { if (filterdMessages.count == 0) { return; } @@ -439,6 +557,8 @@ - (void)receiveMessages:(NSArray *)messages conversation:(AV * 如果是未读消息,会在 query 时播放一次,避免重复播放 */ - (void)playLoudReceiveSoundIfNeededForConversation:(AVIMConversation *)conversation { + // 当时进入退出的临时消息也会出现震动和声音(对方的手机)。所以这边把所有的声音和震动都关掉。 + return; if ([LCCKConversationService sharedInstance].chatting) { return; } diff --git a/ChatKit/Class/Tool/Service/LCCKSettingService.h b/ChatKit/Class/Tool/Service/LCCKSettingService.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Service/LCCKSettingService.m b/ChatKit/Class/Tool/Service/LCCKSettingService.m old mode 100644 new mode 100755 index e602ea4b..6b7a00fb --- a/ChatKit/Class/Tool/Service/LCCKSettingService.m +++ b/ChatKit/Class/Tool/Service/LCCKSettingService.m @@ -120,6 +120,7 @@ - (void)syncBadge { } else { // NSLog(@"badge not changed"); } + [UIApplication sharedApplication].applicationIconBadgeNumber = 0; } - (void)setUseDevPushCerticate:(BOOL)useDevPushCerticate { diff --git a/ChatKit/Class/Tool/Service/LCCKSignatureService.h b/ChatKit/Class/Tool/Service/LCCKSignatureService.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Service/LCCKSignatureService.m b/ChatKit/Class/Tool/Service/LCCKSignatureService.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Service/LCCKUIService.h b/ChatKit/Class/Tool/Service/LCCKUIService.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Service/LCCKUIService.m b/ChatKit/Class/Tool/Service/LCCKUIService.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Service/LCCKUserSystemService.h b/ChatKit/Class/Tool/Service/LCCKUserSystemService.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Service/LCCKUserSystemService.m b/ChatKit/Class/Tool/Service/LCCKUserSystemService.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Vendor/DateTools/LCCKDateToolsConstants.h b/ChatKit/Class/Tool/Vendor/DateTools/LCCKDateToolsConstants.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Vendor/DateTools/LCCKError.h b/ChatKit/Class/Tool/Vendor/DateTools/LCCKError.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Vendor/DateTools/LCCKError.m b/ChatKit/Class/Tool/Vendor/DateTools/LCCKError.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Vendor/DateTools/NSDate+LCCKDateTools.h b/ChatKit/Class/Tool/Vendor/DateTools/NSDate+LCCKDateTools.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Vendor/DateTools/NSDate+LCCKDateTools.m b/ChatKit/Class/Tool/Vendor/DateTools/NSDate+LCCKDateTools.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Vendor/LCCKAlertController/LCCKAlertController.h b/ChatKit/Class/Tool/Vendor/LCCKAlertController/LCCKAlertController.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Vendor/LCCKAlertController/LCCKAlertController.m b/ChatKit/Class/Tool/Vendor/LCCKAlertController/LCCKAlertController.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Vendor/LCCKPhotoBrowser/LCCKCaptionView.h b/ChatKit/Class/Tool/Vendor/LCCKPhotoBrowser/LCCKCaptionView.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Vendor/LCCKPhotoBrowser/LCCKCaptionView.m b/ChatKit/Class/Tool/Vendor/LCCKPhotoBrowser/LCCKCaptionView.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Vendor/LCCKPhotoBrowser/LCCKPBConstants.h b/ChatKit/Class/Tool/Vendor/LCCKPhotoBrowser/LCCKPBConstants.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Vendor/LCCKPhotoBrowser/LCCKPhoto.h b/ChatKit/Class/Tool/Vendor/LCCKPhotoBrowser/LCCKPhoto.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Vendor/LCCKPhotoBrowser/LCCKPhoto.m b/ChatKit/Class/Tool/Vendor/LCCKPhotoBrowser/LCCKPhoto.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Vendor/LCCKPhotoBrowser/LCCKPhotoBrowser.h b/ChatKit/Class/Tool/Vendor/LCCKPhotoBrowser/LCCKPhotoBrowser.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Vendor/LCCKPhotoBrowser/LCCKPhotoBrowser.m b/ChatKit/Class/Tool/Vendor/LCCKPhotoBrowser/LCCKPhotoBrowser.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Vendor/LCCKPhotoBrowser/LCCKPhotoProtocol.h b/ChatKit/Class/Tool/Vendor/LCCKPhotoBrowser/LCCKPhotoProtocol.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Vendor/LCCKPhotoBrowser/LCCKTapDetectingImageView.h b/ChatKit/Class/Tool/Vendor/LCCKPhotoBrowser/LCCKTapDetectingImageView.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Vendor/LCCKPhotoBrowser/LCCKTapDetectingImageView.m b/ChatKit/Class/Tool/Vendor/LCCKPhotoBrowser/LCCKTapDetectingImageView.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Vendor/LCCKPhotoBrowser/LCCKTapDetectingView.h b/ChatKit/Class/Tool/Vendor/LCCKPhotoBrowser/LCCKTapDetectingView.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Vendor/LCCKPhotoBrowser/LCCKTapDetectingView.m b/ChatKit/Class/Tool/Vendor/LCCKPhotoBrowser/LCCKTapDetectingView.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Vendor/LCCKPhotoBrowser/LCCKZoomingScrollView.h b/ChatKit/Class/Tool/Vendor/LCCKPhotoBrowser/LCCKZoomingScrollView.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Vendor/LCCKPhotoBrowser/LCCKZoomingScrollView.m b/ChatKit/Class/Tool/Vendor/LCCKPhotoBrowser/LCCKZoomingScrollView.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Vendor/LCCKWebViewController/LCCKSafariActivity/LCCKSafariActivity.h b/ChatKit/Class/Tool/Vendor/LCCKWebViewController/LCCKSafariActivity/LCCKSafariActivity.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Vendor/LCCKWebViewController/LCCKSafariActivity/LCCKSafariActivity.m b/ChatKit/Class/Tool/Vendor/LCCKWebViewController/LCCKSafariActivity/LCCKSafariActivity.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Vendor/LCCKWebViewController/LCCKWebViewProgress/LCCKWebViewProgress.h b/ChatKit/Class/Tool/Vendor/LCCKWebViewController/LCCKWebViewProgress/LCCKWebViewProgress.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Vendor/LCCKWebViewController/LCCKWebViewProgress/LCCKWebViewProgress.m b/ChatKit/Class/Tool/Vendor/LCCKWebViewController/LCCKWebViewProgress/LCCKWebViewProgress.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Vendor/LCCKWebViewController/LCCKWebViewProgress/LCCKWebViewProgressView.h b/ChatKit/Class/Tool/Vendor/LCCKWebViewController/LCCKWebViewProgress/LCCKWebViewProgressView.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Vendor/LCCKWebViewController/LCCKWebViewProgress/LCCKWebViewProgressView.m b/ChatKit/Class/Tool/Vendor/LCCKWebViewController/LCCKWebViewProgress/LCCKWebViewProgressView.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Vendor/VoiceLib/lame.framework/Headers/lame.h b/ChatKit/Class/Tool/Vendor/VoiceLib/lame.framework/Headers/lame.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/Tool/Vendor/VoiceLib/lame.framework/lame b/ChatKit/Class/Tool/Vendor/VoiceLib/lame.framework/lame old mode 100644 new mode 100755 diff --git a/ChatKit/Class/View/LCCKBadgeView.h b/ChatKit/Class/View/LCCKBadgeView.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/View/LCCKBadgeView.m b/ChatKit/Class/View/LCCKBadgeView.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/View/LCCKConversationRefreshHeader.h b/ChatKit/Class/View/LCCKConversationRefreshHeader.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/View/LCCKConversationRefreshHeader.m b/ChatKit/Class/View/LCCKConversationRefreshHeader.m old mode 100644 new mode 100755 diff --git a/ChatKit/Class/View/LCCKStatusView.h b/ChatKit/Class/View/LCCKStatusView.h old mode 100644 new mode 100755 diff --git a/ChatKit/Class/View/LCCKStatusView.m b/ChatKit/Class/View/LCCKStatusView.m old mode 100644 new mode 100755 diff --git "a/\345\220\210\345\271\266\346\226\271\346\263\225" "b/\345\220\210\345\271\266\346\226\271\346\263\225" new file mode 100644 index 00000000..7a170cd9 --- /dev/null +++ "b/\345\220\210\345\271\266\346\226\271\346\263\225" @@ -0,0 +1,15 @@ +创建指定版本分支 +git checkout -b master_190222(新分支名) master(来源分支) +合并远程URL到当前分支 +git pull git://github.com/leancloud/ChatKit-OC.git(远程分支) master(指定分支或者版本) + +比如: +先从stable分支拉出一个stable_190222版本用于合并新代码: +git checkout -b stable_190222 stable +去leancloud看到发布了新的版本: +https://github.com/leancloud/ChatKit-OC/releases +v2.3.10 然后 提交的号是:cc714e918d952ea88d2bf6b044df819897690b1a +合并: +git pull git://github.com/leancloud/ChatKit-OC.git cc714e918d952ea88d2bf6b044df819897690b1a + +这样就合并完成了 \ No newline at end of file