File tree Expand file tree Collapse file tree 4 files changed +17
-6
lines changed
Expand file tree Collapse file tree 4 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ NS_ASSUME_NONNULL_BEGIN
166166
167167@property (nonatomic , readonly ) NSString *identifier;
168168@property (nonatomic , readonly ) NSString *key;
169- @property (nonatomic , readonly ) NSString *serverURLString;
169+ @property (nonatomic , readonly , nullable ) NSString *serverURLString;
170170@property (nonatomic , copy , nullable ) NSString *RTMServer;
171171
172172- (void )setWithIdentifier : (NSString *)identifier key : (NSString *)key ;
Original file line number Diff line number Diff line change @@ -193,20 +193,28 @@ - (void)setWithIdentifier:(NSString *)identifier key:(NSString *)key {
193193 _key = [key copy ];
194194}
195195
196+ - (NSString *)identifier {
197+ return [self identifierThrowException ];
198+ }
199+
200+ - (NSString *)key {
201+ return [self keyThrowException ];
202+ }
203+
196204- (NSString *)identifierThrowException {
197- if (!self. identifier ) {
205+ if (!_identifier || _identifier. length == 0 ) {
198206 [NSException raise: NSInternalInconsistencyException
199207 format: @" Application identifier not found." ];
200208 }
201- return self. identifier ;
209+ return _identifier ;
202210}
203211
204212- (NSString *)keyThrowException {
205- if (!self. key ) {
213+ if (!_key || _key. length == 0 ) {
206214 [NSException raise: NSInternalInconsistencyException
207215 format: @" Application key not found." ];
208216 }
209- return self. key ;
217+ return _key ;
210218}
211219
212220@end
Original file line number Diff line number Diff line change 1010
1111@interface LCApplication ()
1212
13+ @property (nonatomic ) NSString *identifier;
14+ @property (nonatomic ) NSString *key;
15+
1316- (NSString *)identifierThrowException ;
1417- (NSString *)keyThrowException ;
1518
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ + (NSString *)serverURLString {
3030}
3131
3232+ (void )setServerURLString : (NSString *)URLString {
33- serverURLString = URLString;
33+ serverURLString = [ URLString copy ] ;
3434}
3535
3636+ (instancetype )sharedInstance
You can’t perform that action at this time.
0 commit comments