Skip to content

Commit

Permalink
Merge pull request #1 from JemyCheung/main
Browse files Browse the repository at this point in the history
更新相机授权,更新sdk1.0.0
  • Loading branch information
jerboy authored Feb 3, 2021
2 parents ca73c0f + a843f77 commit f0465f0
Show file tree
Hide file tree
Showing 84 changed files with 2,920 additions and 52 deletions.
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions TDSCommon.framework/Headers
6 changes: 6 additions & 0 deletions TDSCommon.framework/Modules/module.modulemap
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
framework module TDSCommon {
umbrella header "TDSCommon.h"

export *
module * { export * }
}
1 change: 1 addition & 0 deletions TDSCommon.framework/TDSCommon
19 changes: 19 additions & 0 deletions TDSCommon.framework/Versions/A/Headers/EngineBridgeError.h
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;

25 changes: 25 additions & 0 deletions TDSCommon.framework/Versions/A/Headers/NSArray+Safe.h
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
16 changes: 16 additions & 0 deletions TDSCommon.framework/Versions/A/Headers/NSBundle+Tools.h
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
19 changes: 19 additions & 0 deletions TDSCommon.framework/Versions/A/Headers/NSData+JSON.h
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 TDSCommon.framework/Versions/A/Headers/NSDictionary+JSON.h
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 TDSCommon.framework/Versions/A/Headers/NSDictionary+TDSSafe.h
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
17 changes: 17 additions & 0 deletions TDSCommon.framework/Versions/A/Headers/NSError+Ext.h
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 TDSCommon.framework/Versions/A/Headers/NSMutableArray+Safe.h
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 TDSCommon.framework/Versions/A/Headers/NSObject+TDSCoding.h
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 TDSCommon.framework/Versions/A/Headers/NSObject+TDSModel.h
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 TDSCommon.framework/Versions/A/Headers/NSObject+TDSProperty.h
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
28 changes: 28 additions & 0 deletions TDSCommon.framework/Versions/A/Headers/NSString+Tools.h
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
32 changes: 32 additions & 0 deletions TDSCommon.framework/Versions/A/Headers/TDSAccount.h
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 TDSCommon.framework/Versions/A/Headers/TDSAccountNotification.h
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
Loading

0 comments on commit f0465f0

Please sign in to comment.