-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #609 from zapcannon87/develop
feat(rtm): perfect reconstruction
- Loading branch information
Showing
85 changed files
with
3,812 additions
and
4,792 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// | ||
// AVApplication.h | ||
// AVOS | ||
// | ||
// Created by pzheng on 2020/05/20. | ||
// Copyright © 2020 LeanCloud Inc. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface AVApplication : NSObject | ||
|
||
@property (nonatomic, readonly) NSString *identifier; | ||
@property (nonatomic, readonly) NSString *key; | ||
|
||
+ (instancetype)defaultApplication; | ||
|
||
- (void)setWithIdentifier:(NSString *)identifier key:(NSString *)key; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// | ||
// AVApplication.m | ||
// AVOS | ||
// | ||
// Created by pzheng on 2020/05/20. | ||
// Copyright © 2020 LeanCloud Inc. All rights reserved. | ||
// | ||
|
||
#import "AVApplication_Internal.h" | ||
|
||
@implementation AVApplication | ||
|
||
+ (instancetype)defaultApplication | ||
{ | ||
static AVApplication *instance; | ||
static dispatch_once_t onceToken; | ||
dispatch_once(&onceToken, ^{ | ||
instance = [[AVApplication alloc] init]; | ||
}); | ||
return instance; | ||
} | ||
|
||
- (void)setWithIdentifier:(NSString *)identifier key:(NSString *)key | ||
{ | ||
_identifier = [identifier copy]; | ||
_key = [key copy]; | ||
} | ||
|
||
- (NSString *)identifierThrowException | ||
{ | ||
if (!self.identifier) { | ||
[NSException raise:NSInternalInconsistencyException | ||
format:@"Application identifier not found."]; | ||
} | ||
return self.identifier; | ||
} | ||
|
||
- (NSString *)keyThrowException | ||
{ | ||
if (!self.key) { | ||
[NSException raise:NSInternalInconsistencyException | ||
format:@"Application key not found."]; | ||
} | ||
return self.key; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// AVApplication_Internal.h | ||
// AVOS | ||
// | ||
// Created by pzheng on 2020/05/29. | ||
// Copyright © 2020 LeanCloud Inc. All rights reserved. | ||
// | ||
|
||
#import "AVApplication.h" | ||
|
||
@interface AVApplication () | ||
|
||
- (NSString *)identifierThrowException; | ||
- (NSString *)keyThrowException; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.