diff --git a/AVOS/Sources/Foundation/UserAgent.h b/AVOS/Sources/Foundation/UserAgent.h index 70b8eb27..e1c91dd8 100644 --- a/AVOS/Sources/Foundation/UserAgent.h +++ b/AVOS/Sources/Foundation/UserAgent.h @@ -1 +1 @@ -#define SDK_VERSION @"13.7.0" +#define SDK_VERSION @"13.7.1" diff --git a/AVOS/Sources/Realtime/IM/Message/LCIMMessage.m b/AVOS/Sources/Realtime/IM/Message/LCIMMessage.m index 371c0a51..db807938 100644 --- a/AVOS/Sources/Realtime/IM/Message/LCIMMessage.m +++ b/AVOS/Sources/Realtime/IM/Message/LCIMMessage.m @@ -28,6 +28,10 @@ @implementation LCIMMessagePatchedReason @implementation LCIMMessage + (instancetype)messageWithContent:(NSString *)content { + if (content && ![NSString _lc_isTypeOf:content]) { + [NSException raise:NSInvalidArgumentException + format:@"The type of content is not `NSString`."]; + } LCIMMessage *message = [[self alloc] init]; message.content = content; return message; diff --git a/AVOS/Sources/Realtime/IM/TypedMessages/LCIMTypedMessage.m b/AVOS/Sources/Realtime/IM/TypedMessages/LCIMTypedMessage.m index 4e7a45ef..c3d3c600 100644 --- a/AVOS/Sources/Realtime/IM/TypedMessages/LCIMTypedMessage.m +++ b/AVOS/Sources/Realtime/IM/TypedMessages/LCIMTypedMessage.m @@ -174,6 +174,10 @@ - (NSString *)text - (void)setText:(NSString *)text { + if (text && ![NSString _lc_isTypeOf:text]) { + [NSException raise:NSInvalidArgumentException + format:@"The type of text is not `NSString`."]; + } self.messageObject._lctext = text; } diff --git a/LeanCloudObjc.podspec b/LeanCloudObjc.podspec index 1ab604e5..fdc76e84 100644 --- a/LeanCloudObjc.podspec +++ b/LeanCloudObjc.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'LeanCloudObjc' - s.version = '13.7.0' + s.version = '13.7.1' s.homepage = 'https://leancloud.cn/' s.summary = 'LeanCloud Objective-C SDK' s.authors = 'LeanCloud'