2023-01-29 12:44:57 +08:00
|
|
|
|
//
|
|
|
|
|
|
// ATUnityUtilities.h
|
|
|
|
|
|
// UnityContainer
|
|
|
|
|
|
//
|
|
|
|
|
|
// Created by Martin Lau on 14/08/2018.
|
|
|
|
|
|
// Copyright © 2018 Martin Lau. All rights reserved.
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
#import <UIKit/UIKit.h>
|
|
|
|
|
|
extern NSString *const kATUnityUtilitiesInterstitialImpressionNotification;
|
|
|
|
|
|
extern NSString *const kATUnityUtilitiesInterstitialCloseNotification;
|
|
|
|
|
|
extern NSString *const kATUnityUtilitiesRewardedVideoImpressionNotification;
|
|
|
|
|
|
extern NSString *const kATUnityUtilitiesRewardedVideoCloseNotification;
|
|
|
|
|
|
extern NSString *const kATUnityUtilitiesAdShowingExtraScenarioKey;
|
2023-09-04 16:57:46 +08:00
|
|
|
|
extern NSString *const kATUnityUserExtraDataKey;
|
|
|
|
|
|
extern NSString *const kATUnityCheckLoadModelAdInfoKey;
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-29 12:44:57 +08:00
|
|
|
|
@interface ATUnityUtilities : NSObject
|
|
|
|
|
|
+(BOOL)isEmpty:(id)object;
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
@interface NSDictionary (KAKit)
|
|
|
|
|
|
-(NSString*) jsonString;
|
2023-09-04 16:57:46 +08:00
|
|
|
|
|
|
|
|
|
|
// 过滤SDK返回参数的 user_load_extra_data 中不支持的类型
|
|
|
|
|
|
-(NSString*) jsonFilterString;
|
|
|
|
|
|
|
2023-01-29 12:44:57 +08:00
|
|
|
|
-(BOOL)containsObjectForKey:(id)key;
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
@interface NSArray (KAKit)
|
|
|
|
|
|
-(NSString*) jsonString;
|
2023-09-04 16:57:46 +08:00
|
|
|
|
|
|
|
|
|
|
// 过滤SDK返回参数的 user_load_extra_data 中不支持的类型
|
|
|
|
|
|
-(NSString*) jsonFilterString;
|
2023-01-29 12:44:57 +08:00
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
@interface NSData(ATKit)
|
|
|
|
|
|
+(instancetype) dataWithUTF8String:(const char*)string;
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
@interface UIColor (Hex)
|
|
|
|
|
|
// 透明度固定为1,以0x开头的十六进制转换成的颜色
|
|
|
|
|
|
+ (UIColor *)colorWithHex:(long)hexColor;
|
|
|
|
|
|
// 0x开头的十六进制转换成的颜色,透明度可调整
|
|
|
|
|
|
+ (UIColor *)colorWithHex:(long)hexColor alpha:(float)opacity;
|
|
|
|
|
|
// 颜色转换三:iOS中十六进制的颜色(以#开头)转换为UIColor
|
|
|
|
|
|
+ (UIColor *) colorWithHexString: (NSString *)color;
|
|
|
|
|
|
|
|
|
|
|
|
@end
|