diff --git a/OpenIMSDK.podspec b/OpenIMSDK.podspec index 63f42bd..ceadafe 100644 --- a/OpenIMSDK.podspec +++ b/OpenIMSDK.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'OpenIMSDK' - s.version = '3.5.1' + s.version = '3.5.1+1' s.summary = 'Open-IM-SDK' # This description is used to generate tags and improve search results. diff --git a/OpenIMSDK/Interface/OIMManager.m b/OpenIMSDK/Interface/OIMManager.m index 9751719..04b7d7a 100644 --- a/OpenIMSDK/Interface/OIMManager.m +++ b/OpenIMSDK/Interface/OIMManager.m @@ -6,13 +6,13 @@ // #import "OIMManager.h" -#import "Reachability.h" +#import "OIMReachability.h" #import "CallbackProxy.h" @interface OIMManager () { OIMCallbacker *_callbacker; - Reachability *internetReachability; + OIMReachability *internetReachability; } @end @@ -50,7 +50,7 @@ - (instancetype)init { name:kReachabilityChangedNotification object:nil]; - internetReachability = [Reachability reachabilityForInternetConnection]; + internetReachability = [OIMReachability reachabilityForInternetConnection]; [internetReachability startNotifier]; } @@ -105,8 +105,8 @@ - (void)applicationWillEnterForeground:(NSNotification *)note { } - (void)reachabilityChanged:(NSNotification *)note { - Reachability *reachability = [note object]; - NSParameterAssert([reachability isKindOfClass:[Reachability class]]); + OIMReachability *reachability = [note object]; + NSParameterAssert([reachability isKindOfClass:[OIMReachability class]]); CallbackProxy *callback = [[CallbackProxy alloc]initWithOnSuccess:^(NSString * _Nullable data) { diff --git a/OpenIMSDK/Model/OIMCustomElem.h b/OpenIMSDK/Model/OIMCustomElem.h index 1b43d17..5060bf5 100644 --- a/OpenIMSDK/Model/OIMCustomElem.h +++ b/OpenIMSDK/Model/OIMCustomElem.h @@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, nullable, copy) NSString *extension; -@property (nonatomic, nullable, copy) NSString *description; +@property (nonatomic, nullable, copy) NSString *description_; @end diff --git a/OpenIMSDK/Model/OIMCustomElem.m b/OpenIMSDK/Model/OIMCustomElem.m index 39805ad..e7aeaf2 100644 --- a/OpenIMSDK/Model/OIMCustomElem.m +++ b/OpenIMSDK/Model/OIMCustomElem.m @@ -6,7 +6,12 @@ // #import "OIMCustomElem.h" +#import @implementation OIMCustomElem -@synthesize description; + ++ (NSDictionary *)mj_replacedKeyFromPropertyName { + return @{@"description_" : @"description"}; +} + @end diff --git a/OpenIMSDK/Utils/Reachability.h b/OpenIMSDK/Utils/OIMReachability.h similarity index 97% rename from OpenIMSDK/Utils/Reachability.h rename to OpenIMSDK/Utils/OIMReachability.h index 50c048c..f95c4d7 100644 --- a/OpenIMSDK/Utils/Reachability.h +++ b/OpenIMSDK/Utils/OIMReachability.h @@ -24,7 +24,7 @@ typedef enum : NSInteger { extern NSString *kReachabilityChangedNotification; -@interface Reachability : NSObject +@interface OIMReachability : NSObject /*! * Use to check the reachability of a given host name. diff --git a/OpenIMSDK/Utils/Reachability.m b/OpenIMSDK/Utils/OIMReachability.m similarity index 94% rename from OpenIMSDK/Utils/Reachability.m rename to OpenIMSDK/Utils/OIMReachability.m index f081a16..d671aa3 100644 --- a/OpenIMSDK/Utils/Reachability.m +++ b/OpenIMSDK/Utils/OIMReachability.m @@ -14,7 +14,7 @@ #import -#import "Reachability.h" +#import "OIMReachability.h" #pragma mark IPv6 Support //Reachability fully support IPv6. For full details, see ReadMe.md. @@ -52,9 +52,9 @@ static void ReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReach { #pragma unused (target, flags) NSCAssert(info != NULL, @"info was NULL in ReachabilityCallback"); - NSCAssert([(__bridge NSObject*) info isKindOfClass: [Reachability class]], @"info was wrong class in ReachabilityCallback"); + NSCAssert([(__bridge NSObject*) info isKindOfClass: [OIMReachability class]], @"info was wrong class in ReachabilityCallback"); - Reachability* noteObject = (__bridge Reachability *)info; + OIMReachability* noteObject = (__bridge OIMReachability *)info; // Post a notification to notify the client that the network reachability changed. [[NSNotificationCenter defaultCenter] postNotificationName: kReachabilityChangedNotification object: noteObject]; } @@ -62,14 +62,14 @@ static void ReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReach #pragma mark - Reachability implementation -@implementation Reachability +@implementation OIMReachability { SCNetworkReachabilityRef _reachabilityRef; } + (instancetype)reachabilityWithHostName:(NSString *)hostName { - Reachability* returnValue = NULL; + OIMReachability* returnValue = NULL; SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(NULL, [hostName UTF8String]); if (reachability != NULL) { @@ -90,7 +90,7 @@ + (instancetype)reachabilityWithAddress:(const struct sockaddr *)hostAddress { SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, hostAddress); - Reachability* returnValue = NULL; + OIMReachability* returnValue = NULL; if (reachability != NULL) {