Commit b62bc345 authored by lmj_521aiau@163.com's avatar lmj_521aiau@163.com

no message

parent 86a25e19
......@@ -69,6 +69,7 @@
A9F5CFD02547CEFE0035F17B /* GYAdsManager+OpenScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = A9F5CFCF2547CEFE0035F17B /* GYAdsManager+OpenScreen.m */; };
A9F5CFD52547F3F80035F17B /* GYAdsManager+Flow.m in Sources */ = {isa = PBXBuildFile; fileRef = A9F5CFD42547F3F80035F17B /* GYAdsManager+Flow.m */; };
A9F5CFDC254808A50035F17B /* GYAdsManager+RewardedVideo.m in Sources */ = {isa = PBXBuildFile; fileRef = A9F5CFDB254808A50035F17B /* GYAdsManager+RewardedVideo.m */; };
A9F5CFF1254850340035F17B /* GYLoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9F5CFF0254850340035F17B /* GYLoginViewController.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
......@@ -235,6 +236,8 @@
A9F5CFD42547F3F80035F17B /* GYAdsManager+Flow.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "GYAdsManager+Flow.m"; sourceTree = "<group>"; };
A9F5CFDA254808A50035F17B /* GYAdsManager+RewardedVideo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "GYAdsManager+RewardedVideo.h"; sourceTree = "<group>"; };
A9F5CFDB254808A50035F17B /* GYAdsManager+RewardedVideo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "GYAdsManager+RewardedVideo.m"; sourceTree = "<group>"; };
A9F5CFEF254850340035F17B /* GYLoginViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GYLoginViewController.h; sourceTree = "<group>"; };
A9F5CFF0254850340035F17B /* GYLoginViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GYLoginViewController.m; sourceTree = "<group>"; };
F9FEE9190BF3D5E01133A775 /* Pods-GYDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-GYDemo.debug.xcconfig"; path = "Target Support Files/Pods-GYDemo/Pods-GYDemo.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
......@@ -513,6 +516,8 @@
A91A7996253FDEFD00F9B216 /* GYSettingViewController.m */,
A9AB9D912541222A00F0D766 /* GYWebViewController.h */,
A9AB9D922541222A00F0D766 /* GYWebViewController.m */,
A9F5CFEF254850340035F17B /* GYLoginViewController.h */,
A9F5CFF0254850340035F17B /* GYLoginViewController.m */,
A91A791D253EF29B00F9B216 /* GYNative.storyboard */,
);
path = ViewController;
......@@ -795,6 +800,7 @@
A91A7901253EE8E300F9B216 /* KeychainItemWrapper.m in Sources */,
A91A797D253F244F00F9B216 /* GYGiftAlertView.m in Sources */,
A91A79BE25401E3500F9B216 /* GYOrderInfoCell.m in Sources */,
A9F5CFF1254850340035F17B /* GYLoginViewController.m in Sources */,
A9AB9D8B25407BBB00F0D766 /* GYSignInCell.m in Sources */,
A9F5CFDC254808A50035F17B /* GYAdsManager+RewardedVideo.m in Sources */,
A91A7975253F213100F9B216 /* GYAdsTrackMode.m in Sources */,
......
......@@ -13,6 +13,7 @@
@interface AppDelegate: UIResponder<UIApplicationDelegate, UnityFrameworkListener, NativeCallsProtocol, WXApiDelegate>
@property (nonatomic, assign) bool showVideo;
@property (nonatomic, assign) bool showTask;
@property (strong, nonatomic) UIWindow *window;
@property (nonatomic, copy) NSString *payPageName;
......
......@@ -196,12 +196,29 @@ NSDictionary* appLaunchOpts;
// 打开飞的宝箱
- (void)ios_openFlyBox {
self.showVideo = YES;
[[GYAdsManager shared] initWithAdsType:Video_ads window:[[self ufw] appController].window currentVC:[[self ufw] appController].window.rootViewController flowBgView:nil callBack:^(BOOL result, UIView * _Nullable flowView) {
// if (result && flowView) {
// [[GYAdsManager shared] play];
// }
if (result && !flowView) {
self.showVideo = NO;
[self ios_adFlyBox];
}
}];
}
// 获得宝箱点击观看视频
- (void)ios_adFlyBox {
if (self.showVideo == YES) {
[[GYAdsManager shared] play];
return;
}
[[CGNetworkTools shared] postWithAction:OpenBox parameters:@{} success:^(id _Nonnull response) {
if ([[response objectForKey:@"status"] integerValue] == 200) {
NSDictionary *dic = [[response objectForKey:@"result"] objectForKey:@"data"];
......@@ -248,6 +265,16 @@ NSDictionary* appLaunchOpts;
// 云朵加速
- (void)ios_getCloudSpeed {
self.showVideo = YES;
[[GYAdsManager shared] initWithAdsType:Video_ads window:[[self ufw] appController].window currentVC:[[self ufw] appController].window.rootViewController flowBgView:nil callBack:^(BOOL result, UIView * _Nullable flowView) {
if (result && flowView) {
[[GYAdsManager shared] play];
}
if (result && !flowView) {
self.showVideo = NO;
[[CGNetworkTools shared] postWithAction:CloudSpeedUp parameters:@{} success:^(id _Nonnull response) {
if ([[response objectForKey:@"status"] integerValue] == 200) {
NSData *data = [NSJSONSerialization dataWithJSONObject:[[response objectForKey:@"result"] objectForKey:@"data"] options:NSJSONWritingFragmentsAllowed error:nil];
......@@ -257,6 +284,18 @@ NSDictionary* appLaunchOpts;
} failure:^(NSError * _Nonnull error) {
}];
}
}];
// [[CGNetworkTools shared] postWithAction:CloudSpeedUp parameters:@{} success:^(id _Nonnull response) {
// if ([[response objectForKey:@"status"] integerValue] == 200) {
// NSData *data = [NSJSONSerialization dataWithJSONObject:[[response objectForKey:@"result"] objectForKey:@"data"] options:NSJSONWritingFragmentsAllowed error:nil];
// NSString * jsonStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
// [[self ufw] sendMessageToGOWithName: "GameManager" functionName: "onCloudSpeedSuccess" message: [jsonStr UTF8String]];
// }
// } failure:^(NSError * _Nonnull error) {
//
// }];
}
// 获取地块列表
......@@ -376,6 +415,17 @@ NSDictionary* appLaunchOpts;
// 看视频领取种子
- (void)ios_getVideoSeedReceive: (int) seedId {
self.showVideo = YES;
[[GYAdsManager shared] initWithAdsType:Video_ads window:[[self ufw] appController].window currentVC:[[self ufw] appController].window.rootViewController flowBgView:nil callBack:^(BOOL result, UIView * _Nullable flowView) {
if (result && flowView) {
[[GYAdsManager shared] play];
}
if (result && !flowView) {
self.showVideo = NO;
[[CGNetworkTools shared] postWithAction:WatchingForSeed parameters:@{@"id":[NSString stringWithFormat:@"%d", seedId]} success:^(id _Nonnull response) {
if ([[response objectForKey:@"status"] integerValue] == 200) {
NSData *data = [NSJSONSerialization dataWithJSONObject:[[response objectForKey:@"result"] objectForKey:@"data"] options:NSJSONWritingFragmentsAllowed error:nil];
......@@ -385,10 +435,34 @@ NSDictionary* appLaunchOpts;
} failure:^(NSError * _Nonnull error) {
}];
}
}];
// [[CGNetworkTools shared] postWithAction:WatchingForSeed parameters:@{@"id":[NSString stringWithFormat:@"%d", seedId]} success:^(id _Nonnull response) {
// if ([[response objectForKey:@"status"] integerValue] == 200) {
// NSData *data = [NSJSONSerialization dataWithJSONObject:[[response objectForKey:@"result"] objectForKey:@"data"] options:NSJSONWritingFragmentsAllowed error:nil];
// NSString * jsonStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
// [[self ufw] sendMessageToGOWithName: "GameManager" functionName: "onIncrVideoSeedSuccess" message: [jsonStr UTF8String]];
// }
// } failure:^(NSError * _Nonnull error) {
//
// }];
}
// 看视频领取加速剂
- (void)ios_getVideoAcceleratorsReceive: (int)receive {
self.showVideo = YES;
[[GYAdsManager shared] initWithAdsType:Video_ads window:[[self ufw] appController].window currentVC:[[self ufw] appController].window.rootViewController flowBgView:nil callBack:^(BOOL result, UIView * _Nullable flowView) {
if (result && flowView) {
[[GYAdsManager shared] play];
}
if (result && !flowView) {
self.showVideo = NO;
[[CGNetworkTools shared] postWithAction:WatchingForAccelerator parameters:@{@"id":[NSString stringWithFormat:@"%d", receive]} success:^(id _Nonnull response) {
if ([[response objectForKey:@"status"] integerValue] == 200) {
NSData *data = [NSJSONSerialization dataWithJSONObject:[[response objectForKey:@"result"] objectForKey:@"data"] options:NSJSONWritingFragmentsAllowed error:nil];
......@@ -398,6 +472,18 @@ NSDictionary* appLaunchOpts;
} failure:^(NSError * _Nonnull error) {
}];
}
}];
// [[CGNetworkTools shared] postWithAction:WatchingForAccelerator parameters:@{@"id":[NSString stringWithFormat:@"%d", receive]} success:^(id _Nonnull response) {
// if ([[response objectForKey:@"status"] integerValue] == 200) {
// NSData *data = [NSJSONSerialization dataWithJSONObject:[[response objectForKey:@"result"] objectForKey:@"data"] options:NSJSONWritingFragmentsAllowed error:nil];
// NSString * jsonStr = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
// [[self ufw] sendMessageToGOWithName: "GameManager" functionName: "onIncrVideoAcceleratorsSuccess" message: [jsonStr UTF8String]];
// }
// } failure:^(NSError * _Nonnull error) {
//
// }];
}
// 发送 udid 和 idfa
......@@ -520,6 +606,8 @@ NSDictionary* appLaunchOpts;
- (void)onResp:(BaseResp *)resp{
[[CGNetworkTools shared] getWithAdsAction:<#(TQNetwortGetAction)#> parameters:<#(nonnull id)#> success:<#^(id _Nonnull response)success#> failure:<#^(NSError * _Nonnull error)failure#>]
}
@end
......
......@@ -37,7 +37,7 @@
//GDT
- (void)openScreenAdsForGDT:(GYAdsTrackModel *)model{
self.splashAd_GDT = [[GDTSplashAd alloc] initWithPlacementId:@"9040714184494018"];
self.splashAd_GDT = [[GDTSplashAd alloc] initWithPlacementId:model.codeId];
self.splashAd_GDT.delegate = self;
self.splashAd_GDT.fetchDelay = 5;
self.splashAd_GDT.backgroundImage = [UIImage imageNamed:@""];
......
......@@ -17,6 +17,10 @@
[self videoForGDT:model];
}else if ([model.adPlatform isEqualToString:@"kuaishou"]){
[self videoForKS:model];
}else{
if (self.adsFinishCallBack) {
self.adsFinishCallBack(true, nil);
}
}
NSLog(@"common_bigimage============%@", model.adPlatform);
}
......@@ -152,9 +156,9 @@ This method is called when video ad is about to close.
- (void)nativeExpressRewardedVideoAdWillClose:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd{
NSLog(@"close");
rewardedVideoAd = nil;
// if (self.adsFinishCallBack) {
// self.adsFinishCallBack(true, nil);
// }
if (self.adsFinishCallBack) {
self.adsFinishCallBack(true, nil);
}
}
/**
This method is called when video ad is closed.
......@@ -179,9 +183,9 @@ This method is called when video ad play completed or an error occurred.
@param error : the reason of error
*/
- (void)nativeExpressRewardedVideoAdDidPlayFinish:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd didFailWithError:(NSError *_Nullable)error{
if (self.adsFinishCallBack) {
self.adsFinishCallBack(true, nil);
}
// if (self.adsFinishCallBack) {
// self.adsFinishCallBack(true, nil);
// }
}
/**
Server verification which is requested asynchronously is succeeded. now include two v erify methods:
......
//
// GYLoginViewController.h
// GYDemo
//
// Created by 明津李 on 2020/10/27.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface GYLoginViewController : UIViewController
@end
NS_ASSUME_NONNULL_END
//
// GYLoginViewController.m
// GYDemo
//
// Created by 明津李 on 2020/10/27.
//
#import "GYLoginViewController.h"
@interface GYLoginViewController ()
@end
@implementation GYLoginViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
......@@ -23,80 +23,80 @@
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "04A2F2EE-2A6F-42C7-96AC-D3E08E54396F"
uuid = "84AFE34A-7EC5-4DCF-BCBA-F9C6AA27370B"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "GYDemo/GYDemo/AppDelegate.mm"
filePath = "GYDemo/GYDemo/ViewController/GYSettingViewController.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "199"
endingLineNumber = "199"
landmarkName = "-ios_openFlyBox"
startingLineNumber = "95"
endingLineNumber = "95"
landmarkName = "-getAdsDataSource"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "F68CEF0E-9C2F-438C-A002-22BC7EB02222"
uuid = "11E6103D-C6C4-4AC2-89BA-27EAD730297C"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "GYDemo/GYDemo/AppDelegate.mm"
filePath = "GYDemo/GYDemo/ViewController/GYWheelSurfViewController.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "522"
endingLineNumber = "522"
landmarkName = "-onResp:"
startingLineNumber = "122"
endingLineNumber = "122"
landmarkName = "-startBtn:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "84AFE34A-7EC5-4DCF-BCBA-F9C6AA27370B"
uuid = "1C5B6960-1455-4604-9026-83E2AE766033"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "GYDemo/GYDemo/ViewController/GYSettingViewController.m"
filePath = "GYDemo/GYDemo/SCAds/GYAdsManager+Flow.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "95"
endingLineNumber = "95"
landmarkName = "-getAdsDataSource"
startingLineNumber = "49"
endingLineNumber = "49"
landmarkName = "-feedForGDT:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "B3CC090A-C25E-455F-90FA-5AC5110C1D87"
uuid = "7DBCDD81-F2C6-45B0-9C41-B8A632298069"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "GYDemo/GYDemo/SCAds/GYAdsManager+RewardedVideo.m"
filePath = "GYDemo/GYDemo/AppDelegate.mm"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "182"
endingLineNumber = "182"
landmarkName = "-nativeExpressRewardedVideoAdDidPlayFinish:didFailWithError:"
startingLineNumber = "207"
endingLineNumber = "207"
landmarkName = "-ios_openFlyBox"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "11E6103D-C6C4-4AC2-89BA-27EAD730297C"
uuid = "90ED1BA5-6644-44E2-B90B-140576747E9D"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "GYDemo/GYDemo/ViewController/GYWheelSurfViewController.m"
filePath = "GYDemo/GYDemo/AppDelegate.mm"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "122"
endingLineNumber = "122"
landmarkName = "-startBtn:"
startingLineNumber = "608"
endingLineNumber = "608"
landmarkName = "-onResp:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
......
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