Commit 898f66ad authored by zhangshuai's avatar zhangshuai

优化 开屏广告速度

parent ccd30775
...@@ -749,20 +749,21 @@ NSDictionary* appLaunchOpts; ...@@ -749,20 +749,21 @@ NSDictionary* appLaunchOpts;
[[[self ufw] appController].window makeKeyAndVisible]; [[[self ufw] appController].window makeKeyAndVisible];
[[CGUserManager shared] addLocCollection:@"tab_imp" value:@"1"]; [[CGUserManager shared] addLocCollection:@"tab_imp" value:@"1"];
if ([[data Read] objectForKey:@"isFirstInstall"]) {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(launchAdSuccesShow) name:LaunchAdSuccesShow object:nil];
[[IOSADManager shareADManager] showADType:ADType_OpenScreen resultBlock:^(BOOL success) {
[[IOSADManager shareADManager] requestVideoAD];
}];
} else {
[data WirteDic: @"1" Key:@"isFirstInstall"];
[[IOSADManager shareADManager] requestVideoAD];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.25 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self launchAdSuccesShow];
});
}
}); });
}]; }];
if ([[data Read] objectForKey:@"isFirstInstall"]) {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(launchAdSuccesShow) name:LaunchAdSuccesShow object:nil];
[[IOSADManager shareADManager] showADType:ADType_OpenScreen resultBlock:^(BOOL success) {
[[IOSADManager shareADManager] requestVideoAD];
}];
} else {
[data WirteDic: @"1" Key:@"isFirstInstall"];
[[IOSADManager shareADManager] requestVideoAD];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.25 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self launchAdSuccesShow];
});
}
return YES; return YES;
} }
......
...@@ -14,8 +14,14 @@ ...@@ -14,8 +14,14 @@
#ifndef GYPrefixHeader_pch #ifndef GYPrefixHeader_pch
#define GYPrefixHeader_pch #define GYPrefixHeader_pch
//测试
//#define ServerReport @"http://reporttest.zhangxinhulian.com"
//#define ServerHost @"https://feedapitest.zhangxinhulian.com" // 服务端接口地址
//#define ServerAds @"http://bstest.zhangxinhulian.com/v4/ads"
//正式
#define ServerReport @"http://report.clouddistribute.net" #define ServerReport @"http://report.clouddistribute.net"
#define ServerHost @"https://feedapi.clouddistribute.net" // 服务端接口地址 #define ServerHost @"https://feedapi.clouddistribute.net" // 服务端接口地址
#define ServerAds @"http://bs.clouddistribute.net/v4/ads" #define ServerAds @"http://bs.clouddistribute.net/v4/ads"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment