diff --git a/.gitignore b/.gitignore index 1e4b4e7..6fbad96 100644 --- a/.gitignore +++ b/.gitignore @@ -54,4 +54,6 @@ sysinfo.txt # Crashlytics generated file crashlytics-build.properties -.DS_Store \ No newline at end of file +.DS_Store +.vscode/ + diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Api/ATCallbackInfo.cs b/Assets/AnyThinkPlugin/AnyThinkAds/Api/ATCallbackInfo.cs index cc95a2f..3d320f3 100644 --- a/Assets/AnyThinkPlugin/AnyThinkAds/Api/ATCallbackInfo.cs +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Api/ATCallbackInfo.cs @@ -40,6 +40,16 @@ namespace AnyThinkAds.Api public readonly int abtest_id; public readonly string reward_custom_data; + public readonly int placement_type; + public readonly string shared_placement_id; + public readonly string bid_floor; + public readonly int dismiss_type; + public readonly int ad_source_type; + public readonly string ad_source_custom_ext; + public readonly string network_name; + public readonly string show_custom_ext; + public readonly string e_c; + public readonly int s_id; private string callbackJson; @@ -94,6 +104,16 @@ namespace AnyThinkAds.Api reward_custom_data = jsonData.ContainsKey("reward_custom_data") ? (string)jsonData["reward_custom_data"] : ""; + placement_type = int.Parse(jsonData.ContainsKey("placement_type") ? jsonData["placement_type"].ToString() : "0"); + shared_placement_id = jsonData.ContainsKey("shared_placement_id") ? jsonData["shared_placement_id"].ToString() : ""; + bid_floor = jsonData.ContainsKey("bid_floor") ? jsonData["bid_floor"].ToString() : ""; + dismiss_type = int.Parse(jsonData.ContainsKey("dismiss_type") ? jsonData["dismiss_type"].ToString() : "0"); + ad_source_type = int.Parse(jsonData.ContainsKey("ad_source_type") ? jsonData["ad_source_type"].ToString() : "0"); + ad_source_custom_ext = jsonData.ContainsKey("ad_source_custom_ext") ? jsonData["ad_source_custom_ext"].ToString() : ""; + network_name = jsonData.ContainsKey("network_name") ? jsonData["network_name"].ToString() : ""; + show_custom_ext = jsonData.ContainsKey("show_custom_ext") ? jsonData["show_custom_ext"].ToString() : ""; + e_c = jsonData.ContainsKey("e_c") ? jsonData["e_c"].ToString() : ""; + s_id = int.Parse(jsonData.ContainsKey("s_id") ? jsonData["s_id"].ToString() : "0"); } catch (System.Exception e) { System.Console.WriteLine("Exception caught: {0}", e); @@ -150,6 +170,16 @@ namespace AnyThinkAds.Api dataDictionary.Add("custom_rule", custom_rule); dataDictionary.Add("ext_info", ext_info); dataDictionary.Add("reward_custom_data", reward_custom_data); + dataDictionary.Add("placement_type", placement_type); + dataDictionary.Add("shared_placement_id", shared_placement_id); + dataDictionary.Add("bid_floor", bid_floor); + dataDictionary.Add("dismiss_type", dismiss_type); + dataDictionary.Add("ad_source_type", ad_source_type); + dataDictionary.Add("ad_source_custom_ext", ad_source_custom_ext); + dataDictionary.Add("network_name", network_name); + dataDictionary.Add("show_custom_ext", show_custom_ext); + dataDictionary.Add("e_c", e_c); + dataDictionary.Add("s_id", s_id); return dataDictionary; } diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Bridge/anythink_bridge.aar b/Assets/AnyThinkPlugin/AnyThinkAds/Bridge/anythink_bridge.aar index 9098530..5adbac1 100644 Binary files a/Assets/AnyThinkPlugin/AnyThinkAds/Bridge/anythink_bridge.aar and b/Assets/AnyThinkPlugin/AnyThinkAds/Bridge/anythink_bridge.aar differ diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/ATSDKAPIClient.cs b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/ATSDKAPIClient.cs index 3a2d91c..3209269 100644 --- a/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/ATSDKAPIClient.cs +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/ATSDKAPIClient.cs @@ -198,12 +198,13 @@ namespace AnyThinkAds.iOS { public void showDebuggerUI() { Debug.Log("Unity:ATSDKAPIClient::showDebuggerUI()"); - ATManager.showDebuggerUI(); + ATManager.showDebuggerUI(""); } public void showDebuggerUI(string debugKey) { - //TODO 待iOS支持线上测试的SDK版本上线 + Debug.Log("Unity:ATSDKAPIClient::showDebuggerUI(debugKey)"); + ATManager.showDebuggerUI(debugKey); } } } diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATBaseUnityWrapper.m b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATBaseUnityWrapper.m index 18e46f8..5143a79 100644 --- a/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATBaseUnityWrapper.m +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATBaseUnityWrapper.m @@ -8,9 +8,9 @@ #import "ATBaseUnityWrapper.h" #import "ATUnityUtilities.h" +#import "ATUnitySafeThreadDictionary.h" @interface ATBaseUnityWrapper() -@property(nonatomic, readonly) NSMutableDictionary *callbacks; -@property(nonatomic, readonly) dispatch_queue_t callbackAccessQueue; +@property(nonatomic, strong) ATUnitySafeThreadDictionary *callbacks; @end @implementation ATBaseUnityWrapper +(instancetype) sharedInstance { @@ -20,35 +20,29 @@ -(instancetype) init { self = [super init]; if (self != nil) { - _callbacks = [NSMutableDictionary dictionary]; - _callbackAccessQueue = dispatch_queue_create("com.anythink.UnityPackage", DISPATCH_QUEUE_CONCURRENT); + _callbacks = [ATUnitySafeThreadDictionary dictionary]; + } return self; } -(void) setCallBack:(void (*)(const char *, const char *))callback forKey:(NSString *)key { __weak ATBaseUnityWrapper* weakSelf = self; - if (callback != NULL && [key length] > 0) - dispatch_barrier_async(_callbackAccessQueue, ^{ - weakSelf.callbacks[key] = [NSValue valueWithPointer:(void*)callback]; - }); + if (callback != NULL && [key length] > 0) { + [self.callbacks setValue:[NSValue valueWithPointer:(void*)callback] forKey:key]; + } } -(void) removeCallbackForKey:(NSString *)key { - __weak ATBaseUnityWrapper* weakSelf = self; - if ([key length] > 0) - dispatch_barrier_async(_callbackAccessQueue, ^{ - [weakSelf.callbacks removeObjectForKey:key]; - }); + if ([key length] > 0) { + [self.callbacks removeObjectForKey:key]; + } } -(void(*)(const char*, const char *)) callbackForKey:(NSString*)key { __block void(*callback)(const char*, const char *) = NULL; if ([key length] > 0) { - __weak ATBaseUnityWrapper* weakSelf = self; - dispatch_barrier_sync(_callbackAccessQueue, ^{ - callback = (void(*)(const char*, const char *))[weakSelf.callbacks[key] pointerValue]; - }); + callback = (void(*)(const char*, const char *))[self.callbacks[key] pointerValue]; } return callback; } @@ -61,89 +55,100 @@ return nil; } --(void) invokeCallback:(NSString*)callback placementID:(NSString*)placementID error:(NSError*)error extra:(NSDictionary*)extra { - if ([self callbackForKey:placementID] != NULL) { - if ([callback isKindOfClass:[NSString class]] && [callback length] > 0) { +-(void) invokeCallback:(NSString*)callback placementID:(NSString*)placementID error:(NSError*)error extra:(NSDictionary*)extraParams { + + __block NSDictionary* extra = extraParams; + + dispatch_async(dispatch_get_main_queue(), ^{ + @try { - NSMutableDictionary *paraDict = [NSMutableDictionary dictionaryWithObject:callback forKey:@"callback"]; - - NSMutableDictionary *msgDict = [NSMutableDictionary dictionary]; - - if (![ATUnityUtilities isEmpty:extra]) { - - // 过滤SDK返回参数的 user_load_extra_data 中不支持的类型 - if (extra[kATUnityUserExtraDataKey] != nil) { - NSMutableDictionary *extraDictM = [NSMutableDictionary dictionaryWithDictionary:extra]; - NSMutableDictionary *extraDataTemp = [NSMutableDictionary dictionary]; - NSMutableDictionary *extraDataDictM = [NSMutableDictionary dictionaryWithDictionary:extra[kATUnityUserExtraDataKey]]; - for (NSString *key in extraDataDictM.allKeys) { - if ([extraDataDictM[key] isKindOfClass:[NSString class]] || [extraDataDictM[key] isKindOfClass:[NSNumber class]]) { - [extraDataTemp setValue:extraDataDictM[key] forKey:key]; + if ([self callbackForKey:placementID] != NULL) { + if ([callback isKindOfClass:[NSString class]] && [callback length] > 0) { + + NSMutableDictionary *paraDict = [NSMutableDictionary dictionaryWithObject:callback forKey:@"callback"]; + + NSMutableDictionary *msgDict = [NSMutableDictionary dictionary]; + + if (![ATUnityUtilities isEmpty:extra]) { + + // 过滤SDK返回参数的 user_load_extra_data 中不支持的类型 + if (extra[kATUnityUserExtraDataKey] != nil) { + NSMutableDictionary *extraDictM = [NSMutableDictionary dictionaryWithDictionary:extra]; + NSMutableDictionary *extraDataTemp = [NSMutableDictionary dictionary]; + NSMutableDictionary *extraDataDictM = [NSMutableDictionary dictionaryWithDictionary:extra[kATUnityUserExtraDataKey]]; + for (NSString *key in extraDataDictM.allKeys) { + if ([extraDataDictM[key] isKindOfClass:[NSString class]] || [extraDataDictM[key] isKindOfClass:[NSNumber class]]) { + [extraDataTemp setValue:extraDataDictM[key] forKey:key]; + } + } + if ([extraDataTemp count]) { + [extraDictM setValue:extraDataTemp forKey:kATUnityUserExtraDataKey]; + } else { + [extraDictM removeObjectForKey:kATUnityUserExtraDataKey]; + } + extra = extraDictM; + } + + if (extra[@"extra"] != nil) { + msgDict[@"extra"] = extra[@"extra"]; + msgDict[@"rewarded"] = extra[@"rewarded"]; + } else { + msgDict[@"extra"] = extra; } } - if ([extraDataTemp count]) { - [extraDictM setValue:extraDataTemp forKey:kATUnityUserExtraDataKey]; - } else { - [extraDictM removeObjectForKey:kATUnityUserExtraDataKey]; + + paraDict[@"msg"] = msgDict; + + if ([placementID isKindOfClass:[NSString class]] && ![ATUnityUtilities isEmpty:placementID]) { + msgDict[@"placement_id"] = placementID; + }; + + if ([error isKindOfClass:[NSError class]]) { + + NSMutableDictionary *errorDict = [NSMutableDictionary dictionaryWithObject:[NSString stringWithFormat:@"%ld", error.code] forKey:@"code"]; + + if (![ATUnityUtilities isEmpty:error.userInfo[NSLocalizedDescriptionKey]]) { + errorDict[@"desc"] = [NSString stringWithFormat:@"%@",error.userInfo[NSLocalizedDescriptionKey]]; + } else { + errorDict[@"desc"] = @""; + } + if (![ATUnityUtilities isEmpty:error.userInfo[NSLocalizedFailureReasonErrorKey]]) { + errorDict[@"reason"] = [NSString stringWithFormat:@"%@",error.userInfo[NSLocalizedFailureReasonErrorKey]]; + } else { + errorDict[@"reason"] = @""; + } + msgDict[@"error"] = errorDict; } - extra = extraDictM; - } - - if (extra[@"extra"] != nil) { - msgDict[@"extra"] = extra[@"extra"]; - msgDict[@"rewarded"] = extra[@"rewarded"]; - } else { - msgDict[@"extra"] = extra; + + [self callbackForKey:placementID]([self scriptWrapperClass].UTF8String, paraDict.jsonString.UTF8String); } } + } @catch (NSException *exception) { - paraDict[@"msg"] = msgDict; - - if ([placementID isKindOfClass:[NSString class]] && ![ATUnityUtilities isEmpty:placementID]) { - msgDict[@"placement_id"] = placementID; - }; - - if ([error isKindOfClass:[NSError class]]) { - - NSMutableDictionary *errorDict = [NSMutableDictionary dictionaryWithObject:[NSString stringWithFormat:@"%ld", error.code] forKey:@"code"]; - - if (![ATUnityUtilities isEmpty:error.userInfo[NSLocalizedDescriptionKey]]) { - errorDict[@"desc"] = [NSString stringWithFormat:@"%@",error.userInfo[NSLocalizedDescriptionKey]]; - } else { - errorDict[@"desc"] = @""; - } - if (![ATUnityUtilities isEmpty:error.userInfo[NSLocalizedFailureReasonErrorKey]]) { - errorDict[@"reason"] = [NSString stringWithFormat:@"%@",error.userInfo[NSLocalizedFailureReasonErrorKey]]; - } else { - errorDict[@"reason"] = @""; - } - msgDict[@"error"] = errorDict; - } - - [self callbackForKey:placementID]([self scriptWrapperClass].UTF8String, paraDict.jsonString.UTF8String); - } - } + } @finally {} + + }); } - (NSArray *)jsonStrToArray:(NSString *)jsonString{ - + NSError *error; NSArray *array = [NSArray array]; @try { NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding]; - + array = [NSJSONSerialization JSONObjectWithData:jsonData - options:NSJSONReadingMutableContainers - error:&error]; + options:NSJSONReadingMutableContainers + error:&error]; if(error){ return [NSArray array]; } } @catch (NSException *exception) { NSLog(@"jsonStrToArray --- exception:%@",exception); } @finally {} - + return array; } diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATNativeAdWrapper.m b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATNativeAdWrapper.m index 5457140..2d804d7 100644 --- a/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATNativeAdWrapper.m +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATNativeAdWrapper.m @@ -186,9 +186,12 @@ UIEdgeInsets SafeAreaInsets_ATUnityNative() { CGRect adViewFrame = CGRectFromString(at_parseUnityProperties(metrics[@"parent"])[kParsedPropertiesFrameKey]); CGRect mediaViewFrame = CGRectFromString(parsedMetrics[kNativeAssetMainImage][kParsedPropertiesFrameKey]); + CGRect logoFrame = CGRectFromString(parsedMetrics[kNativeAssetSponsorImage][kParsedPropertiesFrameKey]); ATNativeADConfiguration *configuration = [ATNativeADConfiguration new]; configuration.ADFrame = CGRectMake(0, 0, CGRectGetWidth(adViewFrame), CGRectGetHeight(adViewFrame)); configuration.mediaViewFrame = mediaViewFrame; + configuration.logoViewFrame = logoFrame; + configuration.delegate = self; if (extraDict[kATNativeAdAdaptiveHeightKey] != nil) { configuration.sizeToFit = [extraDict[kATNativeAdAdaptiveHeightKey] boolValue]; @@ -206,13 +209,13 @@ UIEdgeInsets SafeAreaInsets_ATUnityNative() { selfRenderView.backgroundColor = [UIColor colorWithHexString:parsedMetrics[kNativeAssetMainImage][@"background_color"]]; - NSBundle *bundle = [NSBundle bundleWithPath:[[NSBundle bundleForClass:[self class]] pathForResource:@"AnyThinkSDK" ofType:@"bundle"]]; - - UIImage * img = [UIImage imageNamed:@"icon_webview_close" inBundle:bundle compatibleWithTraitCollection:nil]; - [selfRenderView.dislikeButton setImage:img forState:0]; - ATNativeADView *adview = [self getNativeADView:configuration offer:offer selfRenderView:selfRenderView withPlacementId:placementID]; [self prepareWithNativePrepareInfo:selfRenderView nativeADView:adview]; + [offer rendererWithConfiguration:configuration selfRenderView:selfRenderView nativeADView:adview]; + // 是否隐藏内部渲染logoView + if (logoFrame.size.width == 0 || logoFrame.size.height == 0) { + adview.logoImageView.hidden = YES; + } adview.ctaLabel.hidden = [adview.nativeAd.ctaText length] == 0; if (adview != nil) { [self removeNativeAdViewWithPlacementID:placementID]; @@ -251,7 +254,6 @@ UIEdgeInsets SafeAreaInsets_ATUnityNative() { prepareInfo.ratingLabel = selfRenderView.ratingLabel; prepareInfo.iconImageView = selfRenderView.iconImageView; prepareInfo.mainImageView = selfRenderView.mainImageView; - prepareInfo.logoImageView = selfRenderView.logoImageView; prepareInfo.dislikeButton = selfRenderView.dislikeButton; prepareInfo.ctaLabel = selfRenderView.ctaLabel; prepareInfo.mediaView = selfRenderView.mediaView; @@ -290,8 +292,6 @@ UIEdgeInsets SafeAreaInsets_ATUnityNative() { selfRenderView.mediaView = mediaView; [selfRenderView addSubview:mediaView]; - //避免被遮挡 - [selfRenderView bringSubviewToFront:selfRenderView.logoImageView]; } [nativeADView registerClickableViewArray:array]; diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATNativeSelfRenderView.h b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATNativeSelfRenderView.h index ec2c260..9f97b7e 100644 --- a/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATNativeSelfRenderView.h +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATNativeSelfRenderView.h @@ -21,7 +21,6 @@ NS_ASSUME_NONNULL_BEGIN @property(nonatomic, strong) UILabel *ratingLabel; @property(nonatomic, strong) UIImageView *iconImageView; @property(nonatomic, strong) UIImageView *mainImageView; -@property(nonatomic, strong) UIImageView *logoImageView; @property(nonatomic, strong) UIImageView *sponsorImageView; @property(nonatomic, strong) UIButton *dislikeButton; diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATNativeSelfRenderView.m b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATNativeSelfRenderView.m index ce63ac4..8e22d30 100644 --- a/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATNativeSelfRenderView.m +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATNativeSelfRenderView.m @@ -97,25 +97,26 @@ self.mainImageView.translatesAutoresizingMaskIntoConstraints = false; [self addSubview:self.mainImageView]; - self.logoImageView = [[UIImageView alloc]init]; - self.logoImageView.contentMode = UIViewContentModeScaleAspectFit; - self.logoImageView.userInteractionEnabled = YES; - self.logoImageView.translatesAutoresizingMaskIntoConstraints = false; - [self addSubview:self.logoImageView]; - self.dislikeButton = [UIButton buttonWithType:UIButtonTypeCustom]; self.dislikeButton.translatesAutoresizingMaskIntoConstraints = false; - UIImage *closeImg = [UIImage imageNamed:@"icon_webview_close" inBundle:[NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:@"AnyThinkSDK" ofType:@"bundle"]] compatibleWithTraitCollection:nil]; - self.dislikeButton.backgroundColor = [UIColor whiteColor]; - [self.dislikeButton setImage:closeImg forState:0]; + [self.dislikeButton setImage:[self getCloseImage] forState:0]; [self addSubview:self.dislikeButton]; } +- (UIImage *)getCloseImage { + + NSString *imageBase64String = @"iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAAAXNSR0IArs4c6QAAAIRlWElmTU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABIAAAAAQAAAEgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAEigAwAEAAAAAQAAAEgAAAAAYwsr7AAAAAlwSFlzAAALEwAACxMBAJqcGAAAABxpRE9UAAAAAgAAAAAAAAAkAAAAKAAAACQAAAAkAAACiSuooU0AAAJVSURBVHgB5JqhbsMwEECLisqGhldYNNaxqlJRP2CoY8Wjo/ub4UllI5VGy8f6ASMBA0XbvWiuXKtpnOQcO+lJJ8eRY989351dqYNBuzKU5W5EJ6IPogvRx39dS2ureb+U94zlm1vR3glQcA5Hn0RtCHWfmetOdCTaSbGh1IXg+52B1QlQgLkX1YoUX0iMIyVZO8moignGhWhACas0hMKJUa6hsfvYRJ2KJkTNVDQ2iLL1sRFbWxXyPMWoKYKFra3VJlIqRhEuct73PTYHT7mJLOJrUKrj8CGIcISm6nRVu/BFVfoQOS5EtUgib93J+9KnnjaSkXzdxYLsu4H4ho+1ZChfdeko94XijsNHfK0sXbgEus7W7eNrJelz3SmCWKkeXUNquaC8U61P9x0XQlm/9H5ERb/G6DHgONWGl4qRSvRsNpv3/X7/tdvtPufz+YssaAxQb99ElNe6GEWNowc4v5ZkWfYdCtK5tRQ2ozCKVE4udtPikz+GgOTCMWvOZjONiD37M2SpQH+93W4/jLF2qwmpCA5raPggc8DiREbSU6kP4/H4GUNtOOZZA1IRnMPh8LNarV61/JB5Toq1SnoZ46g5ISC1CIdgmYgehZBSiSAzjzakluHA4iTNVOFoQ4oABx7H04zfIEEAMW/TSIoEx/DgfwR5rpkXQdq6kCLDgUVeh6bsdGitCikBODCBTV6MggNiA3whJQIHJgsANf55gfO+Wgap6KIZ4J7jYzNs2gUEyEuQzKXSbiPBAWAOyIek+hhfSBHhGJ/904Pd19QySAnAWf8BAAD///Z/hqsAAAJUSURBVOWaoVLDQBCGT6HqUGgqq3CVnc5U9QFQwVVja3mMGjSamTpMXwBbXB8AU4Gogv1DfyYtuSS929xd2p25WSYkd/992d3bMBhjzCzmWK1Wb98W2263n+PxeB5Tn6wdD9ByuXy1sPm7nAAkcx8DUhM4pBQREtiEB2SDs9vtvgCDYIo+EqQpAE1kBKtDVXCyLHtCzUkIUg5oGApQHRzqSAgS2JgBhbXpm8KhhkQggY25pqi2/KlwqCMBSDeixVzJeKAobe8KhzoiQxIZv4ZipF6ofeFQUyRIeYHe89GvQ1pwIkK6JRx4pJlaBGnDobbAkdQDmKKppNlisXguNnj8GU0g+hxZ0OtFVEHabDYfvvPvnz9IL0IaaEwOkYRCrwWH+qogjUajOe/z8AfpJfPkhjTzPs3W6/U7wcBrwxGNeQTaIPX7/Ufe4+jz7y95ttTu5KpaCrQFhxqLkLDWixh/5+HBwGoqUSSzzxDqCm+z0ctSXAvR8684H9PyjiIA6uiojB6CQhRF+RtRZKiVtYdw6PEN0tUocNVdenIRSJkfXhAk7PVku5RUQ2phr06Giu7dG8kcrmHf9nPYW+2pVUfunOvRyXXHBkvlMySxSMKeVO2c+qNG/Y4LvXOIJPXIOQaJvO1i4YZm1NMg1pNVutRtQys0BzX0Dl1oJqHRuc/RIIqUSzGaoClYSjUBiZMhBVCoNdASNWpswJDnsUAlDaYMGFJvKqPtzwWsMZCRZMSIrlpDVGnCQqR0HkoVNRROvHGcLtgo6lZZ7eL1yf5ePIP/IwgaKT805vxmzF7SHAAAAABJRU5ErkJggg=="; + + UIImage *closeImage = [UIImage imageWithData:[[NSData alloc] initWithBase64EncodedString:imageBase64String options:NSDataBase64DecodingIgnoreUnknownCharacters]]; + NSLog(@"getCloseImage--%@",closeImage); + return closeImage; +} + + - (void)setupUI{ - if (self.nativeAdOffer.nativeAd.icon) { self.iconImageView.image = self.nativeAdOffer.nativeAd.icon; } @@ -125,8 +126,6 @@ dispatch_async(dispatch_get_main_queue(), ^{ [self.iconImageView setImage:image]; }); - - } }]; @@ -139,28 +138,12 @@ dispatch_async(dispatch_get_main_queue(), ^{ [self.mainImageView setImage:image]; }); - } }]; NSLog(@"🔥----imageUrl:%@",self.nativeAdOffer.nativeAd.imageUrl); - [[ATImageLoader shareLoader]loadImageWithURL:[NSURL URLWithString:self.nativeAdOffer.nativeAd.logoUrl] completion:^(UIImage *image, NSError *error) { - - if (!error) { - dispatch_async(dispatch_get_main_queue(), ^{ - [self.logoImageView setImage:image]; - }); - } - }]; - - - - NSLog(@"🔥----logoUrl:%@",self.nativeAdOffer.nativeAd.logoUrl); - - - self.advertiserLabel.text = self.nativeAdOffer.nativeAd.advertiser; @@ -182,7 +165,8 @@ self.textLabel.backgroundColor = [UIColor clearColor]; } -(void) configureMetrics:(NSDictionary *)metrics { - NSDictionary *views = @{kNativeAssetTitle:_titleLabel, kNativeAssetText:_textLabel, kNativeAssetCta:_ctaLabel, kNativeAssetRating:_ratingLabel, kNativeAssetAdvertiser:_advertiserLabel, kNativeAssetIcon:_iconImageView, kNativeAssetMainImage:_mainImageView, kNativeAssetSponsorImage:_logoImageView, kNativeAssetDislike:_dislikeButton}; + + NSDictionary *views = @{kNativeAssetTitle:_titleLabel, kNativeAssetText:_textLabel, kNativeAssetCta:_ctaLabel, kNativeAssetRating:_ratingLabel, kNativeAssetAdvertiser:_advertiserLabel, kNativeAssetIcon:_iconImageView, kNativeAssetMainImage:_mainImageView, kNativeAssetDislike:_dislikeButton}; [views enumerateKeysAndObjectsUsingBlock:^(id _Nonnull key, id _Nonnull obj, BOOL * _Nonnull stop) { CGRect frame = CGRectFromString(metrics[key][kParsedPropertiesFrameKey]); [self addConstraintsWithVisualFormat:[NSString stringWithFormat:@"|-x-[%@(w)]", key] options:0 metrics:@{@"x":@(frame.origin.x), @"w":@(frame.size.width)} views:views]; diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATSplashAdWrapper.m b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATSplashAdWrapper.m index 12c2a19..13d7e4f 100644 --- a/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATSplashAdWrapper.m +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATSplashAdWrapper.m @@ -69,11 +69,7 @@ } NSString *defaultAdSourceConfig = extra[@"default_adSource_config"]; NSLog(@"ATSplashAdWrapper::extra = %@", extra); - [[ATAdManager sharedManager] loadADWithPlacementID:placementID - extra:extra - delegate:self - containerView:nil - defaultAdSourceConfig:defaultAdSourceConfig]; + [[ATAdManager sharedManager] loadADWithPlacementID:placementID extra:extra delegate:self containerView:nil]; } diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATUnityManager.m b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATUnityManager.m index 4800db5..1fcf355 100644 --- a/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATUnityManager.m +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATUnityManager.m @@ -99,9 +99,7 @@ char * at_get_string_message_for_unity(const char *msg, void(*callback)(const ch return [NSNumber numberWithBool:[self startSDKWithAppID:firstObject appKey:lastObject]]; } else if ([selector isEqualToString:@"subjectToGDPR"]) { return [NSNumber numberWithBool:[self subjectToGDPR]]; - } else if ([selector isEqualToString:@"presentDataConsentDialog"]) { - [self presentDataConsentDialog]; - } else if ([selector isEqualToString:@"showGDPRConsentDialog:"]) { + }else if ([selector isEqualToString:@"showGDPRConsentDialog:"]) { [self showGDPRConsentDialog:callback]; } else if ([selector isEqualToString:@"getUserLocation:"]) { [self getUserLocation:callback]; @@ -140,17 +138,17 @@ char * at_get_string_message_for_unity(const char *msg, void(*callback)(const ch } else if ([selector isEqualToString:@"getArea:"]) { [self getArea:callback]; } else if ([selector isEqualToString:@"setWXStatus:"]) { - [self setWXStatus:firstObject]; + [self setWXStatus:[NSNumber numberWithDouble:firstObject.boolValue]]; } else if ([selector isEqualToString:@"setLocationLongitude:dimension:"]) { [self setLocationLongitude:[NSNumber numberWithDouble:firstObject.doubleValue] dimension:[NSNumber numberWithDouble:lastObject.doubleValue]]; - } else if ([selector isEqualToString:@"showDebuggerUI"]) { - [self showDebuggerUI]; + }else if ([selector isEqualToString:@"showDebuggerUI:"]) { + [self showDebuggerUI:firstObject]; } return nil; } -(BOOL) startSDKWithAppID:(NSString*)appID appKey:(NSString*)appKey { - [[ATAPI sharedInstance]setSystemPlatformType:ATSystemPlatformTypeUnity]; + [[ATSDKGlobalSetting sharedManager] setSystemPlatformType:ATSystemPlatformTypeUnity]; return [[ATAPI sharedInstance] startWithAppID:appID appKey:appKey error:nil]; } @@ -158,12 +156,6 @@ char * at_get_string_message_for_unity(const char *msg, void(*callback)(const ch return [@[@"AT", @"BE", @"BG", @"HR", @"CY", @"CZ", @"DK", @"EE", @"FI", @"FR", @"DE", @"GR", @"HU", @"IS", @"IE", @"IT", @"LV", @"LI", @"LT", @"LU", @"MT", @"NL", @"NO", @"PL", @"PT", @"RO", @"SK", @"SI", @"ES", @"SE", @"GB", @"UK"] containsObject:[[CTTelephonyNetworkInfo new].subscriberCellularProvider.isoCountryCode length] > 0 ? [[CTTelephonyNetworkInfo new].subscriberCellularProvider.isoCountryCode uppercaseString] : @""]; } --(void) presentDataConsentDialog { - [[ATAPI sharedInstance] presentDataConsentDialogInViewController:[UIApplication sharedApplication].delegate.window.rootViewController dismissalCallback:^{ - - }]; -} - -(void) showGDPRConsentDialog:(void(*)(const char*))callback { [[ATAPI sharedInstance] showGDPRConsentDialogInViewController:[UIApplication sharedApplication].delegate.window.rootViewController dismissalCallback:^{ if (callback != NULL) { callback(@"".UTF8String); } @@ -189,24 +181,24 @@ char * at_get_string_message_for_unity(const char *msg, void(*callback)(const ch } -(void) setChannel:(NSString*)channel { - [[ATAPI sharedInstance] setChannel:channel]; + [[ATSDKGlobalSetting sharedManager] setChannel:channel]; } -(void) setSubChannel:(NSString*)subChannel { - [[ATAPI sharedInstance] setSubchannel:subChannel]; + [[ATSDKGlobalSetting sharedManager] setSubchannel:subChannel]; } -(void) setCustomData:(NSString*)customDataStr { if ([customDataStr isKindOfClass:[NSString class]] && [customDataStr length] > 0) { NSDictionary *customData = [NSJSONSerialization JSONObjectWithData:[customDataStr dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingAllowFragments error:nil]; - [[ATAPI sharedInstance] setCustomData:customData]; + [[ATSDKGlobalSetting sharedManager] setCustomData:customData]; } } -(void) setCustomData:(NSString*)customDataStr forPlacementID:(NSString*)placementID { if ([customDataStr isKindOfClass:[NSString class]] && [customDataStr length] > 0) { NSDictionary *customData = [NSJSONSerialization JSONObjectWithData:[customDataStr dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingAllowFragments error:nil]; - [[ATAPI sharedInstance] setCustomData:customData forPlacementID:placementID]; + [[ATSDKGlobalSetting sharedManager] setCustomData:customData forPlacementID:placementID]; } } @@ -219,7 +211,7 @@ char * at_get_string_message_for_unity(const char *msg, void(*callback)(const ch } -(void) setDataConsent:(NSNumber*)dataConsent { - [[ATAPI sharedInstance] setDataConsentSet:[@{@0:@(ATDataConsentSetPersonalized), @1:@(ATDataConsentSetNonpersonalized), @2:@(ATDataConsentSetUnknown)}[dataConsent] integerValue] consentString:nil]; + [[ATAPI sharedInstance] setDataConsentSet:[@{@0:@(ATDataConsentSetPersonalized), @1:@(ATDataConsentSetNonpersonalized), @2:@(ATDataConsentSetUnknown)}[dataConsent] integerValue] consentString:@{}]; } -(BOOL) inDataProtectionArea { @@ -230,7 +222,7 @@ char * at_get_string_message_for_unity(const char *msg, void(*callback)(const ch NSLog(@"ATUnityManager::deniedUploadDeviceInfo = %@", deniedInfo); if (![ATUnityUtilities isEmpty:deniedInfo]) { NSArray *deniedInfoArray = [NSJSONSerialization JSONObjectWithData:[deniedInfo dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingAllowFragments error:nil]; - [[ATAPI sharedInstance] setDeniedUploadInfoArray:deniedInfoArray]; + [[ATSDKGlobalSetting sharedManager] setDeniedUploadInfoArray:deniedInfoArray]; } } @@ -266,7 +258,7 @@ char * at_get_string_message_for_unity(const char *msg, void(*callback)(const ch NSLog(@"ATUnityManager::setExcludeBundleIdArray = %@", bundleIds); if (![ATUnityUtilities isEmpty:bundleIds]) { NSArray *bundleIdArray = [NSJSONSerialization JSONObjectWithData:[bundleIds dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingAllowFragments error:nil]; - [[ATAPI sharedInstance] setExludeAppleIdArray:bundleIdArray]; + [[ATSDKGlobalSetting sharedManager] setExludeAppleIdArray:bundleIdArray]; } } @@ -301,38 +293,60 @@ char * at_get_string_message_for_unity(const char *msg, void(*callback)(const ch }]; } --(void) setWXStatus:(NSString *)statusStr { - NSLog(@"ATUnityManager::setWXStatus=%@",statusStr); - [[ATAPI sharedInstance] setWXStatus:[statusStr boolValue]]; +-(void) setWXStatus:(NSNumber *)flag { + NSLog(@"ATUnityManager::setWXStatus=%d",flag.boolValue); + [ATSDKGlobalSetting sharedManager].isInstallWX = flag.boolValue; } -(void) setLocationLongitude:(NSNumber*)longitude dimension:(NSNumber*)latitude { NSLog(@"ATUnityManager::setLocationLongitude=%@ dimension=%@",longitude,latitude); - [[ATAPI sharedInstance] setLocationLongitude:longitude.doubleValue dimension:latitude.doubleValue]; + [[ATSDKGlobalSetting sharedManager] setLocationLongitude:longitude.doubleValue dimension:latitude.doubleValue]; } - --(void) showDebuggerUI -{ - // 此处用反射方式调用,发布时可以不用导入AnyThinkDebuggerUISDK库 - NSLog(@"ATUnityManager::showDebuggerUI"); + +- (void)showDebuggerUI:(NSString *)debugKey { + NSLog(@"ATUnityManager::showDebuggerUI with key: %@", debugKey); NSString *classStr = @"ATDebuggerAPI"; Class debuggerAPIClass = NSClassFromString(classStr); if(!debuggerAPIClass) { - NSLog(@"ATUnityManager::showDebuggerUI- NO %@",classStr); + NSLog(@"ATUnityManager::showDebuggerUI - NO %@", classStr); return; - } else { - NSObject *debuger = [debuggerAPIClass performSelector:@selector(sharedInstance)]; - NSString *fuctionStr = @"showDebuggerInViewController:showType:"; - SEL sel = NSSelectorFromString(fuctionStr); - if(!debuger || ![debuger respondsToSelector:sel]) { - NSLog(@"ATUnityManager::showDebuggerUI- NO %@",fuctionStr); - return; - } else { - UIWindow *win = [UIApplication sharedApplication].keyWindow; - [debuger performSelector:sel withObject:win.rootViewController withObject:@1]; + } + + SEL sharedInstanceSel = @selector(sharedInstance); + if (![debuggerAPIClass respondsToSelector:sharedInstanceSel]) { + NSLog(@"ATUnityManager::showDebuggerUI - NO sharedInstance selector"); + return; + } + + // 通过sharedInstanceSel获取单例对象 + id debugger = [debuggerAPIClass performSelector:sharedInstanceSel]; + + NSString *functionStr = @"showDebuggerInViewController:showType:debugkey:"; + SEL sel = NSSelectorFromString(functionStr); + if ([debugger respondsToSelector:sel]) { + NSMethodSignature *signature = [debugger methodSignatureForSelector:sel]; + if (signature) { + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; + [invocation setTarget:debugger]; + [invocation setSelector:sel]; + + // 设置参数 + UIWindow *keyWindow = [UIApplication sharedApplication].keyWindow; + UIViewController *rootViewController = keyWindow.rootViewController; + NSNumber *showType = @1; // 假设 showType 为1 + + [invocation setArgument:&rootViewController atIndex:2]; // 注意:参数索引从2开始,0和1被target和selector占用 + [invocation setArgument:&showType atIndex:3]; + [invocation setArgument:&debugKey atIndex:4]; + + // 调用方法 + [invocation invoke]; } + } else { + NSLog(@"ATUnityManager::showDebuggerUI - NO %@", functionStr); } } + @end diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATUnitySafeThreadDictionary.h b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATUnitySafeThreadDictionary.h new file mode 100644 index 0000000..0d92efe --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATUnitySafeThreadDictionary.h @@ -0,0 +1,22 @@ +// ATSafeThreadDictionary.h +// ATSDK +// +// Created by topon on 2020/9/21. +// Copyright © 2020 AnyThink. All rights reserved. +// + +#import + +/** + A simple implementation of thread safe mutable dictionary. + + @discussion Generally, access performance is lower than NSMutableDictionary, + but higher than using @synchronized, NSLock, or pthread_mutex_t. + + @warning Fast enumerate(for...in) and enumerator is not thread safe, + use enumerate using block instead. When enumerate or sort with block/callback, + do *NOT* send message to the dictionary inside the block/callback. + */ +@interface ATUnitySafeThreadDictionary : NSMutableDictionary + +@end diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATUnitySafeThreadDictionary.h.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATUnitySafeThreadDictionary.h.meta new file mode 100644 index 0000000..89bdf1f --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATUnitySafeThreadDictionary.h.meta @@ -0,0 +1,27 @@ +fileFormatVersion: 2 +guid: 1e8f2e9c89b25426183174547a15d247 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATUnitySafeThreadDictionary.m b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATUnitySafeThreadDictionary.m new file mode 100644 index 0000000..76e59f7 --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATUnitySafeThreadDictionary.m @@ -0,0 +1,261 @@ +// ATSafeThreadDictionary.h +// ATSDK +// +// Created by topon on 2020/9/21. +// Copyright © 2020 AnyThink. All rights reserved. +// + +#import "ATUnitySafeThreadDictionary.h" +#import + + +#define INIT(...) self = super.init; \ +if (!self) return nil; \ +__VA_ARGS__; \ +if (!_dic) return nil; \ +[self __initMutex:&_mutex_lock];\ +return self; + + +#define LOCK(...) pthread_mutex_lock(&_mutex_lock); \ +__VA_ARGS__; \ +pthread_mutex_unlock(&_mutex_lock); + +@implementation ATUnitySafeThreadDictionary { + NSMutableDictionary *_dic; //Subclass a class cluster... + pthread_mutex_t _mutex_lock; + pthread_mutexattr_t _attr; + +} + +#pragma mark - init + +- (void)__initMutex:(pthread_mutex_t *)mutex { + // 递归锁:允许同一个线程对一把锁进行重复加锁 + // 初始化属性 + pthread_mutexattr_init(&_attr); + pthread_mutexattr_settype(&_attr, PTHREAD_MUTEX_RECURSIVE); + // 初始化锁 + pthread_mutex_init(mutex, &_attr); +} + +- (instancetype)init { + + INIT(_dic = [[NSMutableDictionary alloc] init]); +} + +- (instancetype)initWithObjects:(NSArray *)objects forKeys:(NSArray *)keys { + INIT(_dic = [[NSMutableDictionary alloc] initWithObjects:objects forKeys:keys]); +} + +- (instancetype)initWithCapacity:(NSUInteger)capacity { + INIT(_dic = [[NSMutableDictionary alloc] initWithCapacity:capacity]); +} + +- (instancetype)initWithObjects:(const id[])objects forKeys:(const id [])keys count:(NSUInteger)cnt { + INIT(_dic = [[NSMutableDictionary alloc] initWithObjects:objects forKeys:keys count:cnt]); +} + +- (instancetype)initWithDictionary:(NSDictionary *)otherDictionary { + INIT(_dic = [[NSMutableDictionary alloc] initWithDictionary:otherDictionary]); +} + +- (instancetype)initWithDictionary:(NSDictionary *)otherDictionary copyItems:(BOOL)flag { + INIT(_dic = [[NSMutableDictionary alloc] initWithDictionary:otherDictionary copyItems:flag]); +} + + +#pragma mark - method + +- (NSUInteger)count { + LOCK(NSUInteger c = _dic.count); return c; +} + +- (id)objectForKey:(id)aKey { + LOCK(id o = [_dic objectForKey:aKey]); return o; +} + +- (NSEnumerator *)keyEnumerator { + LOCK(NSEnumerator * e = [_dic keyEnumerator]); return e; +} + +- (NSArray *)allKeys { + LOCK(NSArray * a = [_dic allKeys]); return a; +} + +- (NSArray *)allKeysForObject:(id)anObject { + LOCK(NSArray * a = [_dic allKeysForObject:anObject]); return a; +} + +- (NSArray *)allValues { + LOCK(NSArray * a = [_dic allValues]); return a; +} + +- (NSString *)description { + LOCK(NSString * d = [_dic description]); return d; +} + +- (NSString *)descriptionInStringsFileFormat { + LOCK(NSString * d = [_dic descriptionInStringsFileFormat]); return d; +} + +- (NSString *)descriptionWithLocale:(id)locale { + LOCK(NSString * d = [_dic descriptionWithLocale:locale]); return d; +} + +- (NSString *)descriptionWithLocale:(id)locale indent:(NSUInteger)level { + LOCK(NSString * d = [_dic descriptionWithLocale:locale indent:level]); return d; +} + +- (BOOL)isEqualToDictionary:(NSDictionary *)otherDictionary { + if (otherDictionary == self) return YES; + + if ([otherDictionary isKindOfClass:ATUnitySafeThreadDictionary.class]) { + ATUnitySafeThreadDictionary *other = (id)otherDictionary; + BOOL isEqual; + pthread_mutex_lock(&_mutex_lock); + pthread_mutex_lock(&(other->_mutex_lock)); + isEqual = [_dic isEqual:other->_dic]; + pthread_mutex_unlock(&_mutex_lock); + pthread_mutex_unlock(&(other->_mutex_lock)); + return isEqual; + } + return NO; +} + +- (NSEnumerator *)objectEnumerator { + LOCK(NSEnumerator * e = [_dic objectEnumerator]); return e; +} + +- (NSArray *)objectsForKeys:(NSArray *)keys notFoundMarker:(id)marker { + LOCK(NSArray * a = [_dic objectsForKeys:keys notFoundMarker:marker]); return a; +} + +- (NSArray *)keysSortedByValueUsingSelector:(SEL)comparator { + LOCK(NSArray * a = [_dic keysSortedByValueUsingSelector:comparator]); return a; +} + +- (void)getObjects:(id __unsafe_unretained[])objects andKeys:(id __unsafe_unretained[])keys { + LOCK([_dic getObjects:objects andKeys:keys]); +} + +- (id)objectForKeyedSubscript:(id)key { + LOCK(id o = [_dic objectForKeyedSubscript:key]); return o; +} + +- (void)enumerateKeysAndObjectsUsingBlock:(__attribute__((noescape)) void (^)(id key, id obj, BOOL *stop))block { + LOCK([_dic enumerateKeysAndObjectsUsingBlock:block]); +} + +- (void)enumerateKeysAndObjectsWithOptions:(NSEnumerationOptions)opts usingBlock:(__attribute__((noescape)) void (^)(id key, id obj, BOOL *stop))block { + LOCK([_dic enumerateKeysAndObjectsWithOptions:opts usingBlock:block]); +} + +- (NSArray *)keysSortedByValueUsingComparator:(__attribute__((noescape)) NSComparator)cmptr { + LOCK(NSArray * a = [_dic keysSortedByValueUsingComparator:cmptr]); return a; +} + +- (NSArray *)keysSortedByValueWithOptions:(NSSortOptions)opts usingComparator:(__attribute__((noescape)) NSComparator)cmptr { + LOCK(NSArray * a = [_dic keysSortedByValueWithOptions:opts usingComparator:cmptr]); return a; +} + +- (NSSet *)keysOfEntriesPassingTest:(__attribute__((noescape)) BOOL (^)(id key, id obj, BOOL *stop))predicate { + LOCK(NSSet * a = [_dic keysOfEntriesPassingTest:predicate]); return a; +} + +- (NSSet *)keysOfEntriesWithOptions:(NSEnumerationOptions)opts passingTest:(__attribute__((noescape)) BOOL (^)(id key, id obj, BOOL *stop))predicate { + LOCK(NSSet * a = [_dic keysOfEntriesWithOptions:opts passingTest:predicate]); return a; +} + +#pragma mark - mutable + +- (void)removeObjectForKey:(id)aKey { + LOCK( + if (aKey) { + [_dic removeObjectForKey:aKey]; + }); +} + +- (void)setObject:(id)anObject forKey:(id )aKey { + LOCK( + if (anObject && aKey) { + [_dic setObject:anObject forKey:aKey]; + }); +} + +- (void)addEntriesFromDictionary:(NSDictionary *)otherDictionary { + LOCK( + if (otherDictionary) { + [_dic addEntriesFromDictionary:otherDictionary]; + }); +} + +- (void)removeAllObjects { + LOCK([_dic removeAllObjects]); +} + +- (void)removeObjectsForKeys:(NSArray *)keyArray { + LOCK([_dic removeObjectsForKeys:keyArray]); +} + +- (void)setDictionary:(NSDictionary *)otherDictionary { + LOCK( + if (otherDictionary) { + [_dic setDictionary:otherDictionary]; + }); +} + +- (void)setObject:(id)obj forKeyedSubscript:(id )key { + LOCK( + if (obj && key) { + [_dic setObject:obj forKeyedSubscript:key]; + }); +} + +#pragma mark - protocol + +- (id)copyWithZone:(NSZone *)zone { + return [self mutableCopyWithZone:zone]; +} + +- (id)mutableCopyWithZone:(NSZone *)zone { + LOCK(id copiedDictionary = [[self.class allocWithZone:zone] initWithDictionary:_dic]); + return copiedDictionary; +} + +- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state + objects:(id __unsafe_unretained[])stackbuf + count:(NSUInteger)len { + LOCK(NSUInteger count = [_dic countByEnumeratingWithState:state objects:stackbuf count:len]); + return count; +} + +- (BOOL)isEqual:(id)object { + if (object == self) return YES; + + if ([object isKindOfClass:ATUnitySafeThreadDictionary.class]) { + ATUnitySafeThreadDictionary *other = object; + BOOL isEqual; + pthread_mutex_lock(&_mutex_lock); + pthread_mutex_lock(&(other->_mutex_lock)); + isEqual = [_dic isEqual:other->_dic]; + pthread_mutex_unlock(&_mutex_lock); + pthread_mutex_unlock(&(other->_mutex_lock)); + + return isEqual; + } + return NO; +} + +- (NSUInteger)hash { + LOCK(NSUInteger hash = [_dic hash]); + return hash; +} + +- (void)dealloc { + pthread_mutex_destroy(&_mutex_lock); + pthread_mutexattr_destroy(&_attr); +} + + +@end diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/open_ad_sdk_6.2.1.7.aar.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATUnitySafeThreadDictionary.m.meta similarity index 80% rename from Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/open_ad_sdk_6.2.1.7.aar.meta rename to Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATUnitySafeThreadDictionary.m.meta index e77a263..338c7eb 100644 --- a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/open_ad_sdk_6.2.1.7.aar.meta +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATUnitySafeThreadDictionary.m.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e50d797179f3d284ab428f94ea344342 +guid: 3062b0f1e56a64e7ea4d843dde2aa0c2 PluginImporter: externalObjects: {} serializedVersion: 2 @@ -11,11 +11,6 @@ PluginImporter: isExplicitlyReferenced: 0 validateReferences: 1 platformData: - - first: - Android: Android - second: - enabled: 1 - settings: {} - first: Any: second: @@ -27,6 +22,16 @@ PluginImporter: enabled: 0 settings: DefaultValueInitialized: true + - first: + iPhone: iOS + second: + enabled: 1 + settings: {} + - first: + tvOS: tvOS + second: + enabled: 1 + settings: {} userData: assetBundleName: assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATUnityUtilities.m b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATUnityUtilities.m index 59f80ec..537a93f 100644 --- a/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATUnityUtilities.m +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/C/ATUnityUtilities.m @@ -23,6 +23,16 @@ NSString *const kATUnityCheckLoadModelAdInfoKey = @"adInfo"; @end @implementation NSDictionary (KAKit) -(NSString*) jsonString { + + @try { + // can not serialization, return a value is null array string + if (![NSJSONSerialization isValidJSONObject:self]) { + return @"[]"; + } + } @catch (NSException *exception) { + return @"[]"; + } @finally {} + NSError *error; NSData *jsonData; @try { diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/Script/ATManager.cs b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/Script/ATManager.cs index 1ef807c..65cce52 100644 --- a/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/Script/ATManager.cs +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Platform/iOS/Internal/Script/ATManager.cs @@ -121,10 +121,10 @@ public class ATManager { ATUnityCBridge.SendMessageToC("ATUnityManager", "setLocationLongitude:dimension:", new object[] {longitude, latitude}); } - public static void showDebuggerUI() + public static void showDebuggerUI(string debugKey) { Debug.Log("Unity:ATManager::showDebuggerUI()"); - ATUnityCBridge.SendMessageToC("ATUnityManager", "showDebuggerUI", null); + ATUnityCBridge.SendMessageToC("ATUnityManager", "showDebuggerUI:", new object[] {debugKey}); } public static void showGDPRConsentDialog(Func callback) diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/China/anythink_base/anythink_banner.aar b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/China/anythink_base/anythink_banner.aar index 4e80cba..aac6aa0 100644 Binary files a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/China/anythink_base/anythink_banner.aar and b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/China/anythink_base/anythink_banner.aar differ diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/China/anythink_base/anythink_china_core.aar b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/China/anythink_base/anythink_china_core.aar index a81bcef..6419eb4 100644 Binary files a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/China/anythink_base/anythink_china_core.aar and b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/China/anythink_base/anythink_china_core.aar differ diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/China/anythink_base/anythink_core.aar b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/China/anythink_base/anythink_core.aar index 9db64f1..700c229 100644 Binary files a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/China/anythink_base/anythink_core.aar and b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/China/anythink_base/anythink_core.aar differ diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/China/anythink_base/anythink_interstitial.aar b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/China/anythink_base/anythink_interstitial.aar index 6970a1c..d0ec080 100644 Binary files a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/China/anythink_base/anythink_interstitial.aar and b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/China/anythink_base/anythink_interstitial.aar differ diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/China/anythink_base/anythink_native.aar b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/China/anythink_base/anythink_native.aar index cdc72cb..6bc705e 100644 Binary files a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/China/anythink_base/anythink_native.aar and b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/China/anythink_base/anythink_native.aar differ diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/China/anythink_base/anythink_rewardvideo.aar b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/China/anythink_base/anythink_rewardvideo.aar index dc54745..3fdeac0 100644 Binary files a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/China/anythink_base/anythink_rewardvideo.aar and b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/China/anythink_base/anythink_rewardvideo.aar differ diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/China/anythink_base/anythink_splash.aar b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/China/anythink_base/anythink_splash.aar index a5a9ad9..8698b39 100644 Binary files a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/China/anythink_base/anythink_splash.aar and b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/China/anythink_base/anythink_splash.aar differ diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/anythink_network_csj_mix.aar b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/anythink_network_csj_mix.aar deleted file mode 100644 index 9d38e4b..0000000 Binary files a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/anythink_network_csj_mix.aar and /dev/null differ diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/anythink_network_mobrain_mix_plus.aar b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/anythink_network_mobrain_mix_plus.aar index aa11822..f8fab9d 100644 Binary files a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/anythink_network_mobrain_mix_plus.aar and b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/anythink_network_mobrain_mix_plus.aar differ diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/open_ad_sdk_6.2.1.7.aar b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/open_ad_sdk_6.2.1.7.aar deleted file mode 100644 index ce97139..0000000 Binary files a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/open_ad_sdk_6.2.1.7.aar and /dev/null differ diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/open_ad_sdk_6.6.0.7.aar b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/open_ad_sdk_6.6.0.7.aar new file mode 100644 index 0000000..90e2a42 Binary files /dev/null and b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/open_ad_sdk_6.6.0.7.aar differ diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/anythink_network_csj_mix.aar.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/open_ad_sdk_6.6.0.7.aar.meta similarity index 93% rename from Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/anythink_network_csj_mix.aar.meta rename to Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/open_ad_sdk_6.6.0.7.aar.meta index 51ceada..c33ccf1 100644 --- a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/anythink_network_csj_mix.aar.meta +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/Android/open_ad_sdk_6.6.0.7.aar.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 0f4a0fb45277676429a81bc79f9252f1 +guid: d1114d7069dbda64c88d1e55a8139d2a PluginImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS.meta new file mode 100644 index 0000000..2d3f3c0 --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 79e7d078a28b97e4aa88261277efdc65 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China.meta new file mode 100644 index 0000000..bf04d2e --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f4a837cf60e40c84690ece85b75c748e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/baidu.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/baidu.meta new file mode 100644 index 0000000..653acd4 --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/baidu.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c711e887715a14f16b1f1c51b0b51cb6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/baidu/Editor.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/baidu/Editor.meta new file mode 100644 index 0000000..222eee3 --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/baidu/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a2bc97553ae314289a9a2013322cd4a9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/baidu/Editor/Dependencies.xml b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/baidu/Editor/Dependencies.xml new file mode 100644 index 0000000..2a45bfc --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/baidu/Editor/Dependencies.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/baidu/Editor/Dependencies.xml.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/baidu/Editor/Dependencies.xml.meta new file mode 100644 index 0000000..712b560 --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/baidu/Editor/Dependencies.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6675c71972048453abf7c20a06967d5b +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/baidu/network_data.json b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/baidu/network_data.json new file mode 100644 index 0000000..af2a782 --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/baidu/network_data.json @@ -0,0 +1 @@ +{"name":"baidu","version":"5.373","country":1,"path":"Assets/AnyThinkPlugin/AnyThinkAds\\Plugins/iOS/China/baidu"} \ No newline at end of file diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/baidu/network_data.json.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/baidu/network_data.json.meta new file mode 100644 index 0000000..c6206c4 --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/baidu/network_data.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: aa4ff5b557e70ce45bfe14aa9dad7b09 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/bigo.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/bigo.meta new file mode 100644 index 0000000..cfc2b45 --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/bigo.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2e7707ce5f0d545658dfd9b8fe6e52ff +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/bigo/Editor.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/bigo/Editor.meta new file mode 100644 index 0000000..8738618 --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/bigo/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 552357a8d145344c69eb52e710b96576 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/bigo/Editor/Dependencies.xml b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/bigo/Editor/Dependencies.xml new file mode 100644 index 0000000..8a678e5 --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/bigo/Editor/Dependencies.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/bigo/Editor/Dependencies.xml.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/bigo/Editor/Dependencies.xml.meta new file mode 100644 index 0000000..90f1826 --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/bigo/Editor/Dependencies.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b55087d78ea64405396da6d5bdbc5767 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/bigo/network_data.json b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/bigo/network_data.json new file mode 100644 index 0000000..9c49ebd --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/bigo/network_data.json @@ -0,0 +1 @@ +{"name":"bigo","version":"4.6.0","country":1,"path":"Assets/AnyThinkPlugin/AnyThinkAds\\Plugins/iOS/China/bigo"} \ No newline at end of file diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/bigo/network_data.json.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/bigo/network_data.json.meta new file mode 100644 index 0000000..f82a6c5 --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/bigo/network_data.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4b4abb456bd407f42afab46733e791c7 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/core.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/core.meta new file mode 100644 index 0000000..d40a581 --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/core.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c8ce81554dbcd4e9896ee0f1cb782685 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/core/Editor.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/core/Editor.meta new file mode 100644 index 0000000..198a0a1 --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/core/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: faf88f547152a4fa0b48ea5d4e233b85 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/core/Editor/Dependencies.xml b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/core/Editor/Dependencies.xml new file mode 100644 index 0000000..419af0b --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/core/Editor/Dependencies.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/core/Editor/Dependencies.xml.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/core/Editor/Dependencies.xml.meta new file mode 100644 index 0000000..2b4e8ad --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/core/Editor/Dependencies.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4fc1bcc62310548f4a6bddd58180eef9 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/gdt.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/gdt.meta new file mode 100644 index 0000000..6565143 --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/gdt.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f014b4b54a4c14658bb414d8bab45881 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/gdt/Editor.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/gdt/Editor.meta new file mode 100644 index 0000000..470c24e --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/gdt/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e9c9c9037adb147c6a23506e8d09da1d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/gdt/Editor/Dependencies.xml b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/gdt/Editor/Dependencies.xml new file mode 100644 index 0000000..6d490bf --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/gdt/Editor/Dependencies.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/gdt/Editor/Dependencies.xml.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/gdt/Editor/Dependencies.xml.meta new file mode 100644 index 0000000..cb9498d --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/gdt/Editor/Dependencies.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 776c604368e524ec1979fdc2145dc4a9 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/gdt/network_data.json b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/gdt/network_data.json new file mode 100644 index 0000000..6f646e1 --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/gdt/network_data.json @@ -0,0 +1 @@ +{"name":"gdt","version":"4.15.22","country":1,"path":"Assets/AnyThinkPlugin/AnyThinkAds\\Plugins/iOS/China/gdt"} \ No newline at end of file diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/gdt/network_data.json.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/gdt/network_data.json.meta new file mode 100644 index 0000000..fffa6af --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/gdt/network_data.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c070344429af04b47b4acb3ee8301e55 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/kuaishou.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/kuaishou.meta new file mode 100644 index 0000000..304725f --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/kuaishou.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 22ed74d747c3a4e8d9be02f0655ec916 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/kuaishou/Editor.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/kuaishou/Editor.meta new file mode 100644 index 0000000..afd1b28 --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/kuaishou/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e73b56682c38e413aac2484a4523d197 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/kuaishou/Editor/Dependencies.xml b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/kuaishou/Editor/Dependencies.xml new file mode 100644 index 0000000..a235c11 --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/kuaishou/Editor/Dependencies.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/kuaishou/Editor/Dependencies.xml.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/kuaishou/Editor/Dependencies.xml.meta new file mode 100644 index 0000000..c627041 --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/kuaishou/Editor/Dependencies.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3d70d9e3e50ca41cf8ed11587a469d3c +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/kuaishou/network_data.json b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/kuaishou/network_data.json new file mode 100644 index 0000000..3294c01 --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/kuaishou/network_data.json @@ -0,0 +1 @@ +{"name":"kuaishou","version":"3.3.74","country":1,"path":"Assets/AnyThinkPlugin/AnyThinkAds\\Plugins/iOS/China/kuaishou"} \ No newline at end of file diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/kuaishou/network_data.json.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/kuaishou/network_data.json.meta new file mode 100644 index 0000000..f878b4d --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/kuaishou/network_data.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d1ec7085a1737ec45b6dcbc106fb9f21 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/sigmob.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/sigmob.meta new file mode 100644 index 0000000..f2b1c6a --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/sigmob.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 21b36bafe93f54b118240a3c32373f2a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/sigmob/Editor.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/sigmob/Editor.meta new file mode 100644 index 0000000..18e313e --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/sigmob/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a3ee56d73942543dd82e64f770cfe8fe +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/sigmob/Editor/Dependencies.xml b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/sigmob/Editor/Dependencies.xml new file mode 100644 index 0000000..59a35c9 --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/sigmob/Editor/Dependencies.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/sigmob/Editor/Dependencies.xml.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/sigmob/Editor/Dependencies.xml.meta new file mode 100644 index 0000000..07d91c4 --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/sigmob/Editor/Dependencies.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ea0d12cb31c714f42b27f4815033c999 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/sigmob/network_data.json b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/sigmob/network_data.json new file mode 100644 index 0000000..f30daa4 --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/sigmob/network_data.json @@ -0,0 +1 @@ +{"name":"sigmob","version":"4.12.3","country":1,"path":"Assets/AnyThinkPlugin/AnyThinkAds\\Plugins/iOS/China/sigmob"} \ No newline at end of file diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/sigmob/network_data.json.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/sigmob/network_data.json.meta new file mode 100644 index 0000000..182b715 --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/sigmob/network_data.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: cc814e4fd257faa46b5f9d2ca03dddc4 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/tapjoy.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/tapjoy.meta new file mode 100644 index 0000000..f35733f --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/tapjoy.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ba33ef28b434a4f8c84894b7dffe183d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/tapjoy/Editor.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/tapjoy/Editor.meta new file mode 100644 index 0000000..84afb34 --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/tapjoy/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9ff4698e0cb23484080a1f1024c0d7bb +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/tapjoy/Editor/Dependencies.xml b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/tapjoy/Editor/Dependencies.xml new file mode 100644 index 0000000..78c785b --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/tapjoy/Editor/Dependencies.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/tapjoy/Editor/Dependencies.xml.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/tapjoy/Editor/Dependencies.xml.meta new file mode 100644 index 0000000..c5645fe --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/tapjoy/Editor/Dependencies.xml.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 003d4a29535ae4c15a11b3fb837f4460 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/tapjoy/network_data.json b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/tapjoy/network_data.json new file mode 100644 index 0000000..a15ac08 --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/tapjoy/network_data.json @@ -0,0 +1 @@ +{"name":"tapjoy","version":"12.11.0","country":1,"path":"Assets/AnyThinkPlugin/AnyThinkAds\\Plugins/iOS/China/tapjoy"} \ No newline at end of file diff --git a/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/tapjoy/network_data.json.meta b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/tapjoy/network_data.json.meta new file mode 100644 index 0000000..76f0b84 --- /dev/null +++ b/Assets/AnyThinkPlugin/AnyThinkAds/Plugins/iOS/China/tapjoy/network_data.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 63decd1f920a3854183396647471bd3a +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/Resources/json/2.1.3/plugin_hot_fix_data.json b/Assets/AnyThinkPlugin/Resources/json/2.1.3/plugin_hot_fix_data.json index 9e58393..4ca16da 100644 --- a/Assets/AnyThinkPlugin/Resources/json/2.1.3/plugin_hot_fix_data.json +++ b/Assets/AnyThinkPlugin/Resources/json/2.1.3/plugin_hot_fix_data.json @@ -1,7 +1 @@ -{ - "status": 1, - "file_name": "AnyThinkHotFixPlugin_1.0.1.unitypackage", - "hot_fix_version": "1.0.1", - "download_url": "https://topon-sdk-release.oss-cn-hangzhou.aliyuncs.com/Unity_Release/plugin/2.1.3/hotfix/1.0.1/AnyThinkHotFixPlugin_1.0.1.unitypackage", - "plugin_version": "2.1.3" -} \ No newline at end of file +{"plugin_version":"2.1.3","hot_fix_version":"1.0.2","download_url":"https://topon-sdk-release.oss-cn-hangzhou.aliyuncs.com/Unity_Release/plugin/2.1.3/hotfix/1.0.2/AnyThinkHotFixPlugin_1.0.2.unitypackage","status":1,"file_name":"AnyThinkHotFixPlugin_1.0.2.unitypackage"} \ No newline at end of file diff --git a/Assets/AnyThinkPlugin/Resources/json/2.1.5.meta b/Assets/AnyThinkPlugin/Resources/json/2.1.5.meta new file mode 100644 index 0000000..96fb5f2 --- /dev/null +++ b/Assets/AnyThinkPlugin/Resources/json/2.1.5.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d3befc5627f3ea041b413f77cf102af7 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/Resources/json/2.1.5/plugin_setting_data.json b/Assets/AnyThinkPlugin/Resources/json/2.1.5/plugin_setting_data.json new file mode 100644 index 0000000..69dcfaf --- /dev/null +++ b/Assets/AnyThinkPlugin/Resources/json/2.1.5/plugin_setting_data.json @@ -0,0 +1 @@ +{"curCountry":1,"china":{"android_version":"6.4.56","ios_version":"6.4.42","androidXSetting":0,"country":1,"android_admob_app_id":"","ios_admob_app_id":""},"nonchina":{"android_version":"","ios_version":"","androidXSetting":0,"country":2,"android_admob_app_id":"","ios_admob_app_id":""}} \ No newline at end of file diff --git a/Assets/AnyThinkPlugin/Resources/json/2.1.5/plugin_setting_data.json.meta b/Assets/AnyThinkPlugin/Resources/json/2.1.5/plugin_setting_data.json.meta new file mode 100644 index 0000000..204b1cd --- /dev/null +++ b/Assets/AnyThinkPlugin/Resources/json/2.1.5/plugin_setting_data.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 34f8d733fac6bf94380c73b27d423133 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AnyThinkPlugin/Script/IntegrationManager/Editor/ATConfig.cs b/Assets/AnyThinkPlugin/Script/IntegrationManager/Editor/ATConfig.cs index 061e28f..f71aa01 100644 --- a/Assets/AnyThinkPlugin/Script/IntegrationManager/Editor/ATConfig.cs +++ b/Assets/AnyThinkPlugin/Script/IntegrationManager/Editor/ATConfig.cs @@ -16,7 +16,7 @@ namespace AnyThink.Scripts.IntegrationManager.Editor public class ATConfig { -public static string PLUGIN_VERSION = "2.1.3"; +public static string PLUGIN_VERSION = "2.1.5"; public static bool isDebug = false; public static int PLUGIN_TYPE = 1; @@ -77,7 +77,7 @@ public static bool isDebug = false; string _path = AssetDatabase.GUIDToAssetPath(path[0]).Replace((@"/" +scriptName +".cs"),""); return _path; } - + //保存插件设置的数据,保存时机:安装core包、选择国家、切换SDK、androidX设置发生变化时 public static void savePluginSettingData(PluginSettingData settingData) {