-
Notifications
You must be signed in to change notification settings - Fork 1
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 #1 from JemyCheung/main
更新相机授权,更新sdk1.0.0
- Loading branch information
Showing
84 changed files
with
2,920 additions
and
52 deletions.
There are no files selected for viewing
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 @@ | ||
Versions/Current/Headers |
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,6 @@ | ||
framework module TDSCommon { | ||
umbrella header "TDSCommon.h" | ||
|
||
export * | ||
module * { export * } | ||
} |
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 @@ | ||
Versions/Current/TDSCommon |
19 changes: 19 additions & 0 deletions
19
TDSCommon.framework/Versions/A/Headers/EngineBridgeError.h
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,19 @@ | ||
// | ||
// EngineBridgeError.h | ||
// EngineBridge | ||
// | ||
// Created by xe on 2020/9/28. | ||
// Copyright © 2020 xe. All rights reserved. | ||
// | ||
#import <Foundation/Foundation.h> | ||
|
||
typedef NSString *KLTypeStr NS_STRING_ENUM; | ||
|
||
FOUNDATION_EXPORT KLTypeStr const COMMAND_PARSE_ERROR; | ||
|
||
FOUNDATION_EXPORT KLTypeStr const COMMAND_SERVICE_ERROR; | ||
|
||
FOUNDATION_EXPORT KLTypeStr const COMMAND_METHOD_ERROR; | ||
|
||
FOUNDATION_EXPORT KLTypeStr const COMMAND_ARGS_ERROR; | ||
|
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,25 @@ | ||
// | ||
// NSArray+Safe.h | ||
// TapAchievement | ||
// | ||
// Created by TapTap-David on 2020/9/15. | ||
// Copyright © 2020 taptap. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface NSArray (Safe) | ||
|
||
- (void)tds_each:(void (^)(id object, NSUInteger index))block; | ||
|
||
- (void)tds_apply:(void (^)(id object, NSUInteger index))block; | ||
|
||
- (NSArray *)tds_map:(id (^)(id object, NSUInteger index))block; | ||
|
||
- (id)tds_reduce:(id (^)(id accumulated, id object))block; | ||
|
||
- (NSArray *)tds_filter:(BOOL (^)(id object, NSUInteger index))block; | ||
|
||
- (id)tds_safeObjectAtIndex:(NSUInteger)index; | ||
|
||
@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 @@ | ||
// | ||
// NSBundle+Tools.h | ||
// TDSAchievement | ||
// | ||
// Created by TapTap-David on 2020/8/26. | ||
// Copyright © 2020 taptap. All rights reserved. | ||
// | ||
#import <UIKit/UIKit.h> | ||
|
||
@interface NSBundle (Tools) | ||
+ (instancetype)tds_bundleName:(NSString *)bundleName aClass:(Class)aClass; | ||
- (NSString *)tds_localizedStringForKey:(NSString *)key value:(NSString *)value; | ||
- (NSString *)tds_localizedStringForKey:(NSString *)key; | ||
|
||
- (UIImage *)tds_imageName:(NSString *)imageName; | ||
@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,19 @@ | ||
// | ||
// NSData+JSON.h | ||
// NativeApp | ||
// | ||
// Created by JiangJiahao on 2018/3/9. | ||
// Copyright © 2018年 JiangJiahao. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface NSData (JSON) | ||
|
||
- (NSArray *)tds_arrayFromJsonData; | ||
|
||
- (NSDictionary *)tds_dictionaryFromJsonData; | ||
|
||
- (NSString *)tds_stringFromData; | ||
|
||
@end |
17 changes: 17 additions & 0 deletions
17
TDSCommon.framework/Versions/A/Headers/NSDictionary+JSON.h
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,17 @@ | ||
// | ||
// NSDictionary+JSON.h | ||
// NativeApp | ||
// | ||
// Created by JiangJiahao on 2018/10/11. | ||
// Copyright © 2018 JiangJiahao. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface NSDictionary (JSON) | ||
- (NSString *)tds_jsonString; | ||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
24 changes: 24 additions & 0 deletions
24
TDSCommon.framework/Versions/A/Headers/NSDictionary+TDSSafe.h
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 @@ | ||
// | ||
// NSDictionary+TDSSafe.h | ||
// TDSCommon | ||
// | ||
// Created by Insomnia on 2020/10/20. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface NSDictionary (TDSSafe) | ||
|
||
- (BOOL)tds_boolForKey:(NSString *)key; | ||
- (NSInteger)tds_integerForKey:(NSString *)key; | ||
- (NSDictionary *)tds_dicForKey:(NSString *)key; | ||
- (NSString *)tds_stringForKey:(NSString *)key; | ||
- (NSArray *)tds_arrayForKey:(NSString *)key; | ||
- (NSSet *)tds_setForKey:(NSString *)key; | ||
- (NSNumber *)tds_numberForKey:(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,17 @@ | ||
// | ||
// NSError+Ext.h | ||
// TapAchievement | ||
// | ||
// Created by TapTap-David on 2020/9/22. | ||
// Copyright © 2020 taptap. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface NSError (Ext) | ||
+ (instancetype)errorWithMessage:(NSString *)errorMsg code:(NSInteger)code; | ||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
23 changes: 23 additions & 0 deletions
23
TDSCommon.framework/Versions/A/Headers/NSMutableArray+Safe.h
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,23 @@ | ||
// | ||
// NSMutableArray+Safe.h | ||
// TapAchievement | ||
// | ||
// Created by TapTap-David on 2020/9/24. | ||
// Copyright © 2020 taptap. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface NSMutableArray (Safe) | ||
- (void)tt_safeAddObject:(id)anObject; | ||
|
||
- (void)tt_addNonNullObject:(id)anObject; | ||
|
||
- (void)tt_safeInsertObject:(id)anObject atIndex:(NSUInteger)index; | ||
|
||
- (void)tt_safeReplaceObjectAtIndex:(NSUInteger)index withObject:(id)anObject; | ||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
23 changes: 23 additions & 0 deletions
23
TDSCommon.framework/Versions/A/Headers/NSObject+TDSCoding.h
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,23 @@ | ||
// | ||
// NSObject+TDSCoding.h | ||
// TDSCommon | ||
// | ||
// Created by Insomnia on 2020/10/20. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface NSObject (TDSCoding) | ||
/** | ||
* 解码(从文件中解析对象) | ||
*/ | ||
- (void)tds_decode:(NSCoder *)decoder; | ||
/** | ||
* 编码(将对象写入文件中) | ||
*/ | ||
- (void)tds_encode:(NSCoder *)encoder; | ||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
30 changes: 30 additions & 0 deletions
30
TDSCommon.framework/Versions/A/Headers/NSObject+TDSModel.h
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,30 @@ | ||
// | ||
// NSObject+TDSModel.h | ||
// TDSCommon | ||
// | ||
// Created by Insomnia on 2020/10/20. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@protocol TDSModel <NSObject> | ||
@optional | ||
|
||
+ (NSDictionary *)replacedKeyFromPropertyName; | ||
+ (NSString *)replacedKeyFromPropertyName:(NSString *)propertyName; | ||
+ (NSDictionary *)objectClassInArray; | ||
+ (Class)objectClassInArray:(NSString *)propertyName; | ||
|
||
@end | ||
|
||
@interface NSObject (TDSModel) <TDSModel> | ||
|
||
+ (instancetype)tds_modelWithKeyValues:(id)keyValues; | ||
|
||
- (NSDictionary *)tds_keyValues; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
25 changes: 25 additions & 0 deletions
25
TDSCommon.framework/Versions/A/Headers/NSObject+TDSProperty.h
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,25 @@ | ||
// | ||
// NSObject+TDSProperty.h | ||
// TDSCommon | ||
// | ||
// Created by Insomnia on 2020/10/20. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
#import "TDSModelHelper.h" | ||
#import "TDSMacros.h" | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
typedef void (^TDSClassesEnumerator) (Class cls, BOOL *stop); | ||
|
||
typedef void (^TDSPropertiesEnumerator) (TDSProperty *property, BOOL *stop); | ||
|
||
@interface NSObject (TDSProperty) | ||
+ (void)tds_enumerateProperties:(TDSPropertiesEnumerator)enumerator; | ||
|
||
+ (void)tds_enumerateClasses:(TDSClassesEnumerator)enumerator; | ||
|
||
@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,28 @@ | ||
// | ||
// NSString+Tools.h | ||
// TDS | ||
// | ||
// Created by JiangJiahao on 2018/4/24. | ||
// Copyright © 2018年 dyy. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface NSString (Tools) | ||
- (NSString *)tds_URLEncodedString; | ||
- (NSString *)tds_URLDecodedString; | ||
///反转字符串 | ||
- (NSString *)tds_reverse; | ||
|
||
// MD5 hash of the file on the filesystem specified by path | ||
+ (NSString *)tds_stringWithMD5OfFile:(NSString *) path; | ||
// The string's MD5 hash | ||
- (NSString *)tds_MD5Hash; | ||
|
||
// base64 | ||
- (NSString *)tds_base64Encode; | ||
- (NSString *)tds_base64Dencode; | ||
|
||
/// 是否是空字符串 | ||
+ (BOOL)tds_isEmpty:(NSString *)string; | ||
@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,32 @@ | ||
// | ||
// TDSAccount.h | ||
// TDSCommon | ||
// | ||
// Created by Bottle K on 2020/9/29. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
typedef NS_ENUM (NSInteger, TDSAccountType) { | ||
TAP, | ||
XD, | ||
XDG | ||
}; | ||
|
||
@interface TDSAccount : NSObject | ||
@property (nonatomic, copy, readonly) NSString *token; | ||
@property (nonatomic, copy, readonly) NSString *kid; | ||
@property (nonatomic, copy, readonly) NSString *accessToken; | ||
@property (nonatomic, copy, readonly) NSString *tokenType; | ||
@property (nonatomic, copy, readonly) NSString *macKey; | ||
@property (nonatomic, copy, readonly) NSString *macAlgorithm; | ||
|
||
- (instancetype)initWithToken:(NSString *)token type:(TDSAccountType)type; | ||
|
||
- (TDSAccountType)getAccountType; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
20 changes: 20 additions & 0 deletions
20
TDSCommon.framework/Versions/A/Headers/TDSAccountNotification.h
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,20 @@ | ||
// | ||
// TDSAccountNotification.h | ||
// TDSCommon | ||
// | ||
// Created by Bottle K on 2020/10/13. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@protocol TDSAccountNotification <NSObject> | ||
|
||
- (void)onAccountChanged:(TDSAccount *)newAccount | ||
oldAccount:(TDSAccount *)oldAccount; | ||
|
||
- (void)onAccountLogout:(TDSAccount *)newAccount; | ||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
Oops, something went wrong.