Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
L
LuckFarm
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lmj
LuckFarm
Commits
b283a9ba
Commit
b283a9ba
authored
Nov 13, 2020
by
Mazy
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'refs/remotes/origin/master'
Conflicts: GYDemo/GYDemo/AppDelegate.mm
parents
6a4f4123
e3e6e25f
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
51 additions
and
13 deletions
+51
-13
GYTaskAlertView.m
GYDemo/GYDemo/Alert/GYTaskAlertView.m
+2
-0
AppDelegate.mm
GYDemo/GYDemo/AppDelegate.mm
+14
-4
IOSADManager.m
GYDemo/GYDemo/SCAds/IOSADManager.m
+13
-7
GYAdsTrackModel.h
GYDemo/GYDemo/SCAds/model/GYAdsTrackModel.h
+1
-0
AddCSJADManager.m
GYDemo/GYDemo/SCAds/platform/AddCSJADManager.m
+8
-1
AddGDTADManager.m
GYDemo/GYDemo/SCAds/platform/AddGDTADManager.m
+4
-1
AddRuiShiADManager.m
GYDemo/GYDemo/SCAds/platform/AddRuiShiADManager.m
+5
-0
AddSigmobADManager.m
GYDemo/GYDemo/SCAds/platform/AddSigmobADManager.m
+2
-0
GYWheelSurfViewController.m
GYDemo/GYDemo/ViewController/GYWheelSurfViewController.m
+2
-0
UserInterfaceState.xcuserstate
...cuserdata/mazy.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
No files found.
GYDemo/GYDemo/Alert/GYTaskAlertView.m
View file @
b283a9ba
...
...
@@ -118,7 +118,9 @@
break
;
case
4
:
NSLog
(
@"激励视频"
);
[
IOSADManager
shareADManager
].
advertisingSpace
=
@"play_adVideo_end_receive_coinTask"
;
[[
IOSADManager
shareADManager
]
showADType
:
ADType_Video
resultBlock
:
^
(
BOOL
success
)
{
if
(
success
)
{
}
else
{
...
...
GYDemo/GYDemo/AppDelegate.mm
View file @
b283a9ba
...
...
@@ -264,8 +264,6 @@ NSDictionary* appLaunchOpts;
// 打开飞的宝箱
- (void)ios_openFlyBox {
self.showVideo = YES;
[[CGUserManager shared] addLocCollection:@"show_flyBox_dialog" value:@""];
...
...
@@ -276,7 +274,7 @@ NSDictionary* appLaunchOpts;
[[CGUserManager shared] addLocCollection:@"click_flyBox_video_btn" value:@""];
[[CGUserManager shared] addLocCollection:@"play_adVideo_end_fly_box" value:@""];
[IOSADManager shareADManager].advertisingSpace = @"play_adVideo_end_fly_box";
[[IOSADManager shareADManager] showADType:ADType_Video resultBlock:^(BOOL success) {
if (success) {
...
...
@@ -344,6 +342,7 @@ NSDictionary* appLaunchOpts;
- (void)ios_getCloudSpeed {
[[CGUserManager shared] addLocCollection:@"click_cloud_speed_up_video_btn" value:@""];
[IOSADManager shareADManager].advertisingSpace = @"play_adVideo_end_cloud_speed_up";
[[IOSADManager shareADManager] showADType:ADType_Video resultBlock:^(BOOL success) {
if (success) {
...
...
@@ -486,6 +485,7 @@ NSDictionary* appLaunchOpts;
// 看视频领取种子
- (void)ios_getVideoSeedReceive: (int) seedId {
[[CGUserManager shared] addLocCollection:@"click_Insufficient_seeds_video_btn" value:@""];
[IOSADManager shareADManager].advertisingSpace = @"play_adVideo_end_free_get_seed";
[[IOSADManager shareADManager] showADType:ADType_Video resultBlock:^(BOOL success) {
if (success) {
...
...
@@ -511,7 +511,8 @@ NSDictionary* appLaunchOpts;
// 看视频领取加速剂
- (void)ios_getVideoAcceleratorsReceive: (int)receive {
[[CGUserManager shared] addLocCollection:@"click_free_get_accelerometer_video_btn" value:@""];
[IOSADManager shareADManager].advertisingSpace = @"play_adVideo_end_free_get_accelerometer";
[[IOSADManager shareADManager] showADType:ADType_Video resultBlock:^(BOOL success) {
if (success) {
...
...
@@ -736,6 +737,15 @@ NSDictionary* appLaunchOpts;
[[IOSADManager shareADManager] requestVideoAD];
}];
NSString *status = [[CGUserManager shared].appSwitch[@"isopenH5"] stringValue];
NSLog(@"isopenH5 = %@", status);
if (![status isEqualToString:@"1"]) {
Data * data = [[Data alloc] init];
if([[data Read] objectForKey:@"refresh_token"] == nil) {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(launchAdSuccesShow) name:LaunchAdSuccesShow object:nil];
}
}
return YES;
}
...
...
GYDemo/GYDemo/SCAds/IOSADManager.m
View file @
b283a9ba
...
...
@@ -202,7 +202,7 @@ static IOSADManager * manager = nil;
// 什么都不做或者 直接加载
}
else
{
NSInteger
time
=
0
.
1
;
if
(
self
.
csjAd
==
nil
)
{
if
(
self
.
csjAd
==
nil
||
self
.
loadADDataArray
.
count
>
1
)
{
time
=
0
.
1
;
}
else
{
time
=
5
;
...
...
@@ -363,7 +363,7 @@ static IOSADManager * manager = nil;
}
else
if
([
showData
.
adPlatform
isEqualToString
:
@"ruishi"
]){
[
self
.
ruishiAd
showAdWithData
:
showData
withADType
:
adType
];
}
if
(
self
.
videoModels
.
count
=
=
1
)
{
if
(
self
.
videoModels
.
count
<
=
1
)
{
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
[
weakSelf
requestVideoAD
];
});
...
...
@@ -495,7 +495,7 @@ static IOSADManager * manager = nil;
[
weakSelf
.
videoModels
addObjectsFromArray
:
models
];
//有缓存
if
(
weakSelf
.
cachevideo
.
count
==
0
&&
weakSelf
.
videoModels
>
0
)
{
if
(
weakSelf
.
cachevideo
.
count
==
0
&&
weakSelf
.
videoModels
.
count
==
1
)
{
[
weakSelf
loadAdWithData
:
weakSelf
.
videoModels
.
firstObject
withADType
:
ADType_Video
];
}
else
{
if
(
weakSelf
.
videoModels
.
count
>=
2
)
{
...
...
@@ -508,14 +508,14 @@ static IOSADManager * manager = nil;
}
else
{
[[
CGUserManager
shared
]
addLocCollection
:
@"reward_request"
value
:
@"reward_request_failed"
];
}
[
MBProgressHUD
hideHUD
];
}
failure
:^
(
NSError
*
_Nonnull
error
)
{
requestToTry
+=
1
;
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
2
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
[
weakSelf
requestVideoAD
];
});
[[
CGUserManager
shared
]
addLocCollection
:
@"reward_request"
value
:
@"reward_request_failed"
];
[
MBProgressHUD
hideHUD
];
}];
...
...
@@ -537,6 +537,7 @@ static IOSADManager * manager = nil;
weakSelf
.
haveLodeAD
=
NO
;
[
MBProgressHUD
hideHUD
];
if
(
success
)
{
[[
CGUserManager
shared
]
addLocCollection
:
@"reward_request"
value
:
@"reward_back_success"
];
[
weakSelf
.
cachevideo
addObject
:
model
];
if
(
weakSelf
.
showNow
){
...
...
@@ -544,6 +545,7 @@ static IOSADManager * manager = nil;
}
}
else
{
[[
CGUserManager
shared
]
addLocCollection
:
@"reward_request"
value
:
@"reward_back_failed"
];
[
weakSelf
clearCache
:
model
];
}
...
...
@@ -600,9 +602,13 @@ static IOSADManager * manager = nil;
}];
}
else
{
[[
CGUserManager
shared
]
addLocCollection
:
@"reward_request"
value
:
@"reward_display_success"
];
[[
CGUserManager
shared
]
addLocCollection
:
@"reward_request"
value
:
@"reward_display_failed"
];
if
(
self
.
advertisingSpace
)
{
[[
CGUserManager
shared
]
addLocCollection
:
self
.
advertisingSpace
value
:
@""
];
}
}
}
else
if
(
model
.
loadADType
==
ADType_OpenScreen
){
if
(
success
)
{
...
...
GYDemo/GYDemo/SCAds/model/GYAdsTrackModel.h
View file @
b283a9ba
...
...
@@ -43,6 +43,7 @@ NS_ASSUME_NONNULL_BEGIN
//逻辑字段
@property
(
nonatomic
,
assign
)
BOOL
firstFailure
;
// 第一个失败
@property
(
nonatomic
,
assign
)
eADType
loadADType
;
//这个广告所属的广告类型
@property
(
nonatomic
,
retain
)
NSError
*
ADError
;
//广告错误回调
+
(
instancetype
)
modelWithDic
:(
NSDictionary
*
)
dict
;
...
...
GYDemo/GYDemo/SCAds/platform/AddCSJADManager.m
View file @
b283a9ba
...
...
@@ -110,6 +110,7 @@
*/
-
(
void
)
splashAd
:
(
BUSplashAdView
*
)
splashAd
didFailWithError
:
(
NSError
*
_Nullable
)
error
;{
self
.
loadSuccessCallbackBlock
(
self
.
currentData
,
NO
);
self
.
currentData
.
ADError
=
error
;
}
...
...
@@ -210,6 +211,8 @@
self
.
loadSuccessCallbackBlock
(
self
.
currentData
,
NO
);
self
.
splashAd_CSJ
.
hidden
=
YES
;
[
self
.
splashAd_CSJ
removeFromSuperview
];
self
.
currentData
.
ADError
=
error
;
}
/**
...
...
@@ -346,6 +349,7 @@
*/
-
(
void
)
nativeExpressAdFailToLoad
:
(
BUNativeExpressAdManager
*
)
nativeExpressAd
error
:
(
NSError
*
_Nullable
)
error
;{
self
.
loadSuccessCallbackBlock
(
self
.
currentData
,
NO
);
self
.
currentData
.
ADError
=
error
;
}
...
...
@@ -361,6 +365,8 @@
*/
-
(
void
)
nativeExpressAdViewRenderFail
:
(
BUNativeExpressAdView
*
)
nativeExpressAdView
error
:
(
NSError
*
_Nullable
)
error
;{
self
.
showSuccessCallbackBlock
(
self
.
currentData
,
NO
);
self
.
currentData
.
ADError
=
error
;
}
/**
...
...
@@ -391,7 +397,8 @@ Sent when a playerw playback status changed.
* @param error : error of player
*/
-
(
void
)
nativeExpressAdViewPlayerDidPlayFinish
:
(
BUNativeExpressAdView
*
)
nativeExpressAdView
error
:
(
NSError
*
)
error
;{
self
.
currentData
.
ADError
=
error
;
}
/**
...
...
GYDemo/GYDemo/SCAds/platform/AddGDTADManager.m
View file @
b283a9ba
...
...
@@ -111,6 +111,7 @@
*/
-
(
void
)
splashAdFailToPresent
:
(
GDTSplashAd
*
)
splashAd
withError
:
(
NSError
*
)
error
;{
self
.
showSuccessCallbackBlock
(
self
.
currentData
,
NO
);
self
.
currentData
.
ADError
=
error
;
}
...
...
@@ -271,7 +272,8 @@
NSLog
(
@"页面加载失败"
);
}
NSLog
(
@"ERROR: %@"
,
error
);
self
.
currentData
.
ADError
=
error
;
self
.
loadSuccessCallbackBlock
(
self
.
currentData
,
NO
);
}
...
...
@@ -315,6 +317,7 @@
*/
-
(
void
)
nativeExpressAdFailToLoad
:
(
GDTNativeExpressAd
*
)
nativeExpressAd
error
:
(
NSError
*
)
error
;{
self
.
loadSuccessCallbackBlock
(
self
.
currentData
,
NO
);
self
.
currentData
.
ADError
=
error
;
}
...
...
GYDemo/GYDemo/SCAds/platform/AddRuiShiADManager.m
View file @
b283a9ba
...
...
@@ -92,6 +92,7 @@
*/
-
(
void
)
vl_splashAd
:
(
VLNSplashAd
*
)
splashAd
didFailWithError
:
(
NSError
*
)
error
{
self
.
showSuccessCallbackBlock
(
self
.
currentData
,
NO
);
self
.
currentData
.
ADError
=
error
;
}
...
...
@@ -170,6 +171,7 @@
*/
-
(
void
)
vl_rewardVideoAd
:
(
VLNRewardedVideoAd
*
)
rewardedVideoAd
loadFailedWithError
:
(
NSError
*
)
error
{
self
.
loadSuccessCallbackBlock
(
self
.
currentData
,
NO
);
self
.
currentData
.
ADError
=
error
;
}
...
...
@@ -178,6 +180,8 @@
*/
-
(
void
)
vl_rewardVideoAd
:
(
VLNRewardedVideoAd
*
)
rewardedVideoAd
playFailedWithError
:
(
NSError
*
)
error
{
self
.
showSuccessCallbackBlock
(
self
.
currentData
,
NO
);
self
.
currentData
.
ADError
=
error
;
}
/**
...
...
@@ -213,6 +217,7 @@
*/
-
(
void
)
vl_nativeAd
:
(
VLNNativeAd
*
)
nativeAd
didFailWithError
:
(
NSError
*
)
error
;{
self
.
loadSuccessCallbackBlock
(
self
.
currentData
,
NO
);
self
.
currentData
.
ADError
=
error
;
}
...
...
GYDemo/GYDemo/SCAds/platform/AddSigmobADManager.m
View file @
b283a9ba
...
...
@@ -88,6 +88,7 @@
*/
-
(
void
)
onSplashAdFailToPresent
:
(
WindSplashAd
*
)
splashAd
withError
:
(
NSError
*
)
error
;{
self
.
showSuccessCallbackBlock
(
self
.
currentData
,
NO
);
self
.
currentData
.
ADError
=
error
;
}
...
...
@@ -155,6 +156,7 @@
*/
-
(
void
)
onVideoAdPlayError
:
(
NSError
*
)
error
placementId
:
(
NSString
*
)
placementId
;{
self
.
showSuccessCallbackBlock
(
self
.
currentData
,
NO
);
self
.
currentData
.
ADError
=
error
;
}
/**
...
...
GYDemo/GYDemo/ViewController/GYWheelSurfViewController.m
View file @
b283a9ba
...
...
@@ -81,6 +81,8 @@
-
(
IBAction
)
startBtn
:
(
UIButton
*
)
sender
{
WEAKSELF
;
if
(
self
.
isVideo
)
{
[
IOSADManager
shareADManager
].
advertisingSpace
=
@"play_adVideo_end_turntable"
;
[[
IOSADManager
shareADManager
]
showADType
:
ADType_Video
resultBlock
:
^
(
BOOL
success
)
{
if
(
success
)
{
[[
CGUserManager
shared
]
addLocCollection
:
@"play_adVideo_end_turntable"
value
:
@""
];
...
...
farm.xcworkspace/xcuserdata/mazy.xcuserdatad/UserInterfaceState.xcuserstate
View file @
b283a9ba
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment