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

fix bug

parent e0bb0cf7
......@@ -69,7 +69,6 @@
A9AB9D9E2541228E00F0D766 /* MBProgressHUD+MJ.m in Sources */ = {isa = PBXBuildFile; fileRef = A9AB9D9C2541228E00F0D766 /* MBProgressHUD+MJ.m */; };
A9AB9D9F2541228E00F0D766 /* MBProgressHUD.bundle in Resources */ = {isa = PBXBuildFile; fileRef = A9AB9D9D2541228E00F0D766 /* MBProgressHUD.bundle */; };
A9AB9DCC2541C3AA00F0D766 /* GYBaseModel.m in Sources */ = {isa = PBXBuildFile; fileRef = A9AB9DCB2541C3AA00F0D766 /* GYBaseModel.m */; };
A9F5CF8E2546C74C0035F17B /* libGDTMobSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A9F5CF872546C74C0035F17B /* libGDTMobSDK.a */; };
A9F5CFCB2547CC0F0035F17B /* GYAdsManager.m in Sources */ = {isa = PBXBuildFile; fileRef = A9F5CFCA2547CC0F0035F17B /* GYAdsManager.m */; };
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 */; };
......@@ -218,30 +217,6 @@
A9AB9DCA2541C3AA00F0D766 /* GYBaseModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GYBaseModel.h; sourceTree = "<group>"; };
A9AB9DCB2541C3AA00F0D766 /* GYBaseModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GYBaseModel.m; sourceTree = "<group>"; };
A9F5CF402546728E0035F17B /* GYDemo.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = GYDemo.entitlements; sourceTree = "<group>"; };
A9F5CF762546C74C0035F17B /* GDTRewardVideoAdNetworkAdapterProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTRewardVideoAdNetworkAdapterProtocol.h; sourceTree = "<group>"; };
A9F5CF772546C74C0035F17B /* GDTNativeExpressAdView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTNativeExpressAdView.h; sourceTree = "<group>"; };
A9F5CF782546C74C0035F17B /* GDTAdParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTAdParams.h; sourceTree = "<group>"; };
A9F5CF792546C74C0035F17B /* GDTAdTestSetting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTAdTestSetting.h; sourceTree = "<group>"; };
A9F5CF7A2546C74C0035F17B /* GDTUnifiedBannerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTUnifiedBannerView.h; sourceTree = "<group>"; };
A9F5CF7B2546C74C0035F17B /* GDTSDKConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTSDKConfig.h; sourceTree = "<group>"; };
A9F5CF7C2546C74C0035F17B /* GDTBaseAdNetworkAdapterProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTBaseAdNetworkAdapterProtocol.h; sourceTree = "<group>"; };
A9F5CF7D2546C74C0035F17B /* GDTRewardVideoAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTRewardVideoAd.h; sourceTree = "<group>"; };
A9F5CF7E2546C74C0035F17B /* GDTSplashAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTSplashAd.h; sourceTree = "<group>"; };
A9F5CF7F2546C74C0035F17B /* GDTNativeExpressAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTNativeExpressAd.h; sourceTree = "<group>"; };
A9F5CF802546C74C0035F17B /* GDTLogoView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTLogoView.h; sourceTree = "<group>"; };
A9F5CF812546C74C0035F17B /* GDTMediaView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTMediaView.h; sourceTree = "<group>"; };
A9F5CF822546C74C0035F17B /* GDTUnifiedNativeAdView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTUnifiedNativeAdView.h; sourceTree = "<group>"; };
A9F5CF832546C74C0035F17B /* GDTHybridAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTHybridAd.h; sourceTree = "<group>"; };
A9F5CF842546C74C0035F17B /* GDTUnifiedNativeAdDataObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTUnifiedNativeAdDataObject.h; sourceTree = "<group>"; };
A9F5CF852546C74C0035F17B /* GDTSDKDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTSDKDefines.h; sourceTree = "<group>"; };
A9F5CF862546C74C0035F17B /* GDTUnifiedInterstitialAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTUnifiedInterstitialAd.h; sourceTree = "<group>"; };
A9F5CF872546C74C0035F17B /* libGDTMobSDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libGDTMobSDK.a; sourceTree = "<group>"; };
A9F5CF882546C74C0035F17B /* GDTNativeExpressProAdView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTNativeExpressProAdView.h; sourceTree = "<group>"; };
A9F5CF892546C74C0035F17B /* GDTLoadAdParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTLoadAdParams.h; sourceTree = "<group>"; };
A9F5CF8A2546C74C0035F17B /* GDTRewardVideoAdNetworkConnectorProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTRewardVideoAdNetworkConnectorProtocol.h; sourceTree = "<group>"; };
A9F5CF8B2546C74C0035F17B /* GDTNativeExpressProAdManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTNativeExpressProAdManager.h; sourceTree = "<group>"; };
A9F5CF8C2546C74C0035F17B /* GDTUnifiedNativeAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTUnifiedNativeAd.h; sourceTree = "<group>"; };
A9F5CF8D2546C74C0035F17B /* GDTVideoConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTVideoConfig.h; sourceTree = "<group>"; };
A9F5CFC92547CC0F0035F17B /* GYAdsManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GYAdsManager.h; sourceTree = "<group>"; };
A9F5CFCA2547CC0F0035F17B /* GYAdsManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GYAdsManager.m; sourceTree = "<group>"; };
A9F5CFCE2547CEFE0035F17B /* GYAdsManager+OpenScreen.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "GYAdsManager+OpenScreen.h"; sourceTree = "<group>"; };
......@@ -263,7 +238,6 @@
files = (
6E42AF336D54EF2C5073BB5C /* Pods_GYDemo.framework in Frameworks */,
64E8CA16254133CF00AF1416 /* Foundation.framework in Frameworks */,
A9F5CF8E2546C74C0035F17B /* libGDTMobSDK.a in Frameworks */,
64D45DF125495D010066055C /* UnityFramework.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
......@@ -478,7 +452,6 @@
A91A796F253F213100F9B216 /* SCAds */ = {
isa = PBXGroup;
children = (
A9F5CF752546C74C0035F17B /* GDTLib */,
A91A7973253F213100F9B216 /* GYAdsTrackModel.h */,
A91A7971253F213100F9B216 /* GYAdsTrackMode.m */,
A9F5CFC92547CC0F0035F17B /* GYAdsManager.h */,
......@@ -548,37 +521,6 @@
path = ViewController;
sourceTree = "<group>";
};
A9F5CF752546C74C0035F17B /* GDTLib */ = {
isa = PBXGroup;
children = (
A9F5CF762546C74C0035F17B /* GDTRewardVideoAdNetworkAdapterProtocol.h */,
A9F5CF772546C74C0035F17B /* GDTNativeExpressAdView.h */,
A9F5CF782546C74C0035F17B /* GDTAdParams.h */,
A9F5CF792546C74C0035F17B /* GDTAdTestSetting.h */,
A9F5CF7A2546C74C0035F17B /* GDTUnifiedBannerView.h */,
A9F5CF7B2546C74C0035F17B /* GDTSDKConfig.h */,
A9F5CF7C2546C74C0035F17B /* GDTBaseAdNetworkAdapterProtocol.h */,
A9F5CF7D2546C74C0035F17B /* GDTRewardVideoAd.h */,
A9F5CF7E2546C74C0035F17B /* GDTSplashAd.h */,
A9F5CF7F2546C74C0035F17B /* GDTNativeExpressAd.h */,
A9F5CF802546C74C0035F17B /* GDTLogoView.h */,
A9F5CF812546C74C0035F17B /* GDTMediaView.h */,
A9F5CF822546C74C0035F17B /* GDTUnifiedNativeAdView.h */,
A9F5CF832546C74C0035F17B /* GDTHybridAd.h */,
A9F5CF842546C74C0035F17B /* GDTUnifiedNativeAdDataObject.h */,
A9F5CF852546C74C0035F17B /* GDTSDKDefines.h */,
A9F5CF862546C74C0035F17B /* GDTUnifiedInterstitialAd.h */,
A9F5CF872546C74C0035F17B /* libGDTMobSDK.a */,
A9F5CF882546C74C0035F17B /* GDTNativeExpressProAdView.h */,
A9F5CF892546C74C0035F17B /* GDTLoadAdParams.h */,
A9F5CF8A2546C74C0035F17B /* GDTRewardVideoAdNetworkConnectorProtocol.h */,
A9F5CF8B2546C74C0035F17B /* GDTNativeExpressProAdManager.h */,
A9F5CF8C2546C74C0035F17B /* GDTUnifiedNativeAd.h */,
A9F5CF8D2546C74C0035F17B /* GDTVideoConfig.h */,
);
path = GDTLib;
sourceTree = "<group>";
};
F3B88C56CEC53AED2210A6AA /* Pods */ = {
isa = PBXGroup;
children = (
......@@ -1044,7 +986,7 @@
"$(inherited)",
"$(PROJECT_DIR)/GYDemo/SCAds/GDTLib",
);
MARKETING_VERSION = 1.0.0;
MARKETING_VERSION = 1.0.1;
PRODUCT_BUNDLE_IDENTIFIER = com.xy.nongchang;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "Lucky farm";
......@@ -1076,7 +1018,7 @@
"$(inherited)",
"$(PROJECT_DIR)/GYDemo/SCAds/GDTLib",
);
MARKETING_VERSION = 1.0.0;
MARKETING_VERSION = 1.0.1;
PRODUCT_BUNDLE_IDENTIFIER = com.xy.nongchang;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "Lucky farm";
......
......@@ -7,7 +7,7 @@
<key>GYDemo.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>9</integer>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
......
......@@ -18,6 +18,8 @@ NS_ASSUME_NONNULL_BEGIN
- (void)show:(UIView * _Nullable)superView;
@property(nonatomic, copy) void(^closeCallBack)(void);
@end
NS_ASSUME_NONNULL_END
......@@ -76,6 +76,7 @@
- (void)setWheelSurfModel:(GYWheelSurfModel *)wheelSurfModel{
//奖励类型 1 水滴 2 果子 3 种子 4 金币 5 加速剂 6 现金红包 7钻石
_wheelSurfModel = wheelSurfModel;
_giftHeaderImv.image = [UIImage imageNamed:[NSString stringWithFormat:@"gift_header_%ld", (long)wheelSurfModel.awardType]];
self.dataSource = [NSMutableArray new];
switch (wheelSurfModel.awardType) {
case 3:
......@@ -89,11 +90,11 @@
break;
case 7:
[self.dataSource addObject:[GYExtModel new]];
_giftHeaderImv.image = [UIImage imageNamed:[NSString stringWithFormat:@"order_header"]];
break;
default:
break;
}
_giftHeaderImv.image = [UIImage imageNamed:[NSString stringWithFormat:@"gift_header_%ld", (long)wheelSurfModel.awardType]];
[self.giftBgView bringSubviewToFront:self.collectionView];
[self.collectionView reloadData];
}
......@@ -137,6 +138,9 @@
[_bgView.layer addAnimation:animation forKey:nil];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.30 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
if(self.closeCallBack){
self.closeCallBack();
}
self.hidden = YES;
[self removeFromSuperview];
});
......
......@@ -87,8 +87,7 @@
[[CGNetworkTools shared] postWithAction:DrawOrder parameters:@{} success:^(id _Nonnull response) {
// [(AppDelegate*)[UIApplication sharedApplication].delegate ios_getOrderData];
// [self refreshDataSource];
[[CGUserManager shared] addLocCollection:[NSString stringWithFormat:@"click_receive_reward_order_level_%ld", (long)self.model.orderLevel] value:@""];
[self dismiss];
} failure:^(NSError * _Nonnull error) {
......
......@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, copy) NSString * awardNum;
- (void)show:(UIView *)superView;
- (void)show:(UIView * _Nullable)superView;
@end
......
......@@ -78,6 +78,10 @@
}];
}
- (void)clickNone{
}
- (void)dismiss{
[UIView animateWithDuration:0.5 animations:^{
......@@ -97,9 +101,9 @@
[[CGNetworkTools shared] postWithAction:DrawDayTask parameters:@{@"id":[NSString stringWithFormat:@"%ld", model.id]} success:^(id _Nonnull response) {
if ([[response objectForKey:@"status"] integerValue] == 200) {
model.status = 0;
model.status = 1;
// [self.dataSource replaceObjectAtIndex:sender.tag-0x64 withObject:model];
[self.collectionView reloadData];
GYOpenBoxModel * boxModel = [GYOpenBoxModel new];
boxModel.type = 2;
boxModel.awardNum = [model.awardNum integerValue];
......@@ -186,10 +190,17 @@
cell.confirmBtn.tag = 0x64+indexPath.row;
if (model.status == 0) {
[cell.confirmBtn setImage:[UIImage imageNamed:@"task_cell_completion"] forState:(UIControlStateNormal)];
[cell.confirmBtn removeTarget:self action:@selector(clickNone) forControlEvents:UIControlEventTouchUpInside];
[cell.confirmBtn removeTarget:self action:@selector(drawTask:) forControlEvents:UIControlEventTouchUpInside];
[cell.confirmBtn addTarget:self action:@selector(dismiss) forControlEvents:(UIControlEventTouchUpInside)];
}else if (model.status == 1){
[cell.confirmBtn setImage:[UIImage imageNamed:@"task_cell_done"] forState:(UIControlStateNormal)];
[cell.confirmBtn removeTarget:self action:@selector(drawTask:) forControlEvents:UIControlEventTouchUpInside];
[cell.confirmBtn removeTarget:self action:@selector(dismiss) forControlEvents:UIControlEventTouchUpInside];
[cell.confirmBtn addTarget:self action:@selector(clickNone) forControlEvents:(UIControlEventTouchUpInside)];
}else{
[cell.confirmBtn removeTarget:self action:@selector(dismiss) forControlEvents:UIControlEventTouchUpInside];
[cell.confirmBtn removeTarget:self action:@selector(clickNone) forControlEvents:UIControlEventTouchUpInside];
[cell.confirmBtn addTarget:self action:@selector(drawTask:) forControlEvents:(UIControlEventTouchUpInside)];
[cell.confirmBtn setImage:[UIImage imageNamed:@"task_cell_draw"] forState:(UIControlStateNormal)];
}
......
This diff is collapsed.
......@@ -18,12 +18,12 @@
//#define ServerHost @"https://feedapitest.zhangxinhulian.com" // 服务端接口地址
//#define ServerAds @"http://bstest.zhangxinhulian.com/v4/ads"
#define ServerReport @"http://feedapi.clouddistribute.net"
#define ServerReport @"http://report.clouddistribute.net"
#define ServerHost @"https://feedapi.clouddistribute.net" // 服务端接口地址
#define ServerAds @"http://bs.zhangxinhulian.com/v4/ads"
#define ServerAds @"http://bs.clouddistribute.net/v4/ads"
#define WXAppId @"wx007d3159b1e66018"
#define WXAppSecret @"d8c8c1f6479f8f6ea22d0b3d24f04087"
#define WXAppId @"wxe7a03eb52cce1b51"
#define WXAppSecret @"6fa72a89ea188c4dff5729cff328b587"
#define WXUniversalLink @"https://feedapi.clouddistribute.net/LuckFarm/"
#define WXLoginState @"WTF"
#define WXLoginName @"WXLogin"
......
......@@ -27,7 +27,7 @@
<string>weixin</string>
<key>CFBundleURLSchemes</key>
<array>
<string>wx007d3159b1e66018</string>
<string>wxe7a03eb52cce1b51</string>
</array>
</dict>
</array>
......
......@@ -87,7 +87,7 @@ typedef enum : NSUInteger {
//- (void)postWithBodyAction: (TQNetwortPostAction)action parameters:(id)parameters body: (id)body success: (void(^)(NSDictionary *response))success failure:(void(^)(NSError * error)) failure;
//埋点
//- (void)postWithLogCollection: (TQNetwortPostAction)action parameters:(id) parameters success: (void(^)(id _Nullable * _Nullable response))success failure:(void(^)(NSError * error)) failure;
- (void)postWithLogCollection: (TQNetwortPostAction)action parameters:(id) parameters success: (void(^)(id _Nullable * _Nullable response))success failure:(void(^)(NSError * error)) failure;
//Ads请求
- (void)getWithAdsAction: (TQNetwortGetAction)action parameters:(id)parameters success: (void(^)(id response))success failure:(void(^)(NSError * error)) failure;
......
......@@ -231,44 +231,44 @@ static CGNetworkTools* _tools = nil;
}];
}
//// POST 请求
//- (void)postWithLogCollection: (TQNetwortPostAction)action parameters:(id) parameters success: (void(^)(id *response))success failure:(void(^)(NSError * error)) failure {
//
// // post 请求
// NSString *urlString = [ServerReport stringByAppendingPathComponent: [self convertPostActionToString:action]];
//
// NSDictionary *dic= parameters;
// NSData *data = [NSJSONSerialization dataWithJSONObject:dic options:NSJSONWritingFragmentsAllowed error:nil];
// NSString *jsonString =[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
// NSLog(@"ZJAESCommonjsonString成功了 %@", jsonString);
//
// NSString *encryptStr = aesEncryptString(jsonString, aesKey);
//
// NSMutableDictionary *mutaDict = @{}.mutableCopy;
//
// NSDictionary *ddd = [self setRequestParams: mutaDict];
//
// AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
//
// NSString *aaa = @"";
// for (NSString *key in ddd.allKeys) {
// NSString *bb = [key stringByAppendingFormat:@"=%@", ddd[key]];
// aaa = [aaa stringByAppendingFormat:@"&%@", bb];
// }
// NSLog(@"%@", [urlString stringByAppendingFormat:@"?%@", aaa]);
//
// NSMutableURLRequest *req = [[AFJSONRequestSerializer serializer] requestWithMethod:@"POST" URLString: [urlString stringByAppendingFormat:@"?%@", aaa] parameters:nil error:nil];
// req.timeoutInterval= 10;
// [req setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
// [req setValue:@"application/json" forHTTPHeaderField:@"Accept"];
//
// [req setHTTPBody:[encryptStr dataUsingEncoding: NSUTF8StringEncoding]];
// NSLog(@"ZJAESCommonDecrypt----成功了 %@", [encryptStr dataUsingEncoding: NSUTF8StringEncoding]);
//// NSLog(@"NSJSONSerialization成功了%@", dd);
// [[manager dataTaskWithRequest:req uploadProgress:nil downloadProgress:nil completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) {
// NSLog(@"post成功了%@", responseObject);
// }] resume];
//}
// POST 请求
- (void)postWithLogCollection: (TQNetwortPostAction)action parameters:(id) parameters success: (void(^)(id *response))success failure:(void(^)(NSError * error)) failure {
// post 请求
NSString *urlString = [ServerReport stringByAppendingPathComponent: [self convertPostActionToString:action]];
NSDictionary *dic= parameters;
NSData *data = [NSJSONSerialization dataWithJSONObject:dic options:NSJSONWritingFragmentsAllowed error:nil];
NSString *jsonString =[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSLog(@"ZJAESCommonjsonString成功了 %@", jsonString);
NSString *encryptStr = aesEncryptString(jsonString, aesKey);
NSMutableDictionary *mutaDict = @{}.mutableCopy;
NSDictionary *ddd = [self setRequestParams: mutaDict];
AFURLSessionManager *manager = [[AFURLSessionManager alloc] initWithSessionConfiguration:[NSURLSessionConfiguration defaultSessionConfiguration]];
NSString *aaa = @"";
for (NSString *key in ddd.allKeys) {
NSString *bb = [key stringByAppendingFormat:@"=%@", ddd[key]];
aaa = [aaa stringByAppendingFormat:@"&%@", bb];
}
NSLog(@"%@", [urlString stringByAppendingFormat:@"?%@", aaa]);
NSMutableURLRequest *req = [[AFJSONRequestSerializer serializer] requestWithMethod:@"POST" URLString: [urlString stringByAppendingFormat:@"?%@", aaa] parameters:nil error:nil];
req.timeoutInterval= 10;
[req setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
[req setValue:@"application/json" forHTTPHeaderField:@"Accept"];
[req setHTTPBody:[encryptStr dataUsingEncoding: NSUTF8StringEncoding]];
NSLog(@"ZJAESCommonDecrypt----成功了 %@", [encryptStr dataUsingEncoding: NSUTF8StringEncoding]);
// NSLog(@"NSJSONSerialization成功了%@", dd);
[[manager dataTaskWithRequest:req uploadProgress:nil downloadProgress:nil completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) {
NSLog(@"post成功了%@", responseObject);
}] resume];
}
////支付验证
//// POST 请求
......
......@@ -96,13 +96,13 @@
- (void)splashAd:(BUSplashAdView *)splashAd didFailWithError:(NSError *)error {
[splashAd removeFromSuperview];
[MobClick event:@"splash_display" label:@"splash_display_failed"];
[[CGUserManager shared] addLocCollection:@"splash_display" value:@"splash_display_failed"];
self.openScreenIndex += 1;
[self openScreenPrepareModel];
}
- (void)splashAdWillVisible:(BUSplashAdView *)splashAd {
[MobClick event:@"splash_display" label:@"splash_display_success"];
[[CGUserManager shared] addLocCollection:@"splash_display" value:@"splash_display_success"];
NSString * clkTracking = self.currentAdsModel.imp_tracking[0];
if (clkTracking.length > 0) {
[[CGNetworkTools shared] pureGetWithAdsTrackingAction:clkTracking success:^(id _Nonnull response) {
......@@ -136,7 +136,7 @@
- (void)splashAdSuccessPresentScreen:(GDTSplashAd *)splashAd
{
NSLog(@"%s",__FUNCTION__);
[MobClick event:@"splash_display" label:@"splash_display_success"];
[[CGUserManager shared] addLocCollection:@"splash_display" value:@"splash_display_success"];
NSString * clkTracking = self.currentAdsModel.imp_tracking[0];
if (clkTracking.length > 0) {
[[CGNetworkTools shared] pureGetWithAdsTrackingAction:clkTracking success:^(id _Nonnull response) {
......@@ -150,7 +150,7 @@
- (void)splashAdFailToPresent:(GDTSplashAd *)splashAd withError:(NSError *)error
{
NSLog(@"%s%@",__FUNCTION__,error);
[MobClick event:@"splash_display" label:@"splash_display_failed"];
[[CGUserManager shared] addLocCollection:@"splash_display" value:@"splash_display_failed"];
self.openScreenIndex += 1;
[self openScreenPrepareModel];
}
......@@ -256,7 +256,7 @@
//开屏展示
- (void)ksad_splashAdDidShow {
NSLog(@"----%@", NSStringFromSelector(_cmd));
[MobClick event:@"splash_display" label:@"splash_display_success"];
[[CGUserManager shared] addLocCollection:@"splash_display" value:@"splash_display_success"];
NSString * clkTracking = self.currentAdsModel.imp_tracking[0];
if (clkTracking.length > 0) {
[[CGNetworkTools shared] pureGetWithAdsTrackingAction:clkTracking success:^(id _Nonnull response) {
......@@ -273,7 +273,7 @@
//开屏⼴广告播放失败
- (void)ksad_splashAdVideoFailedToPlay:(NSError *)error {
NSLog(@"----%@, %@", NSStringFromSelector(_cmd), error);
[MobClick event:@"splash_display" label:@"splash_display_failed"];
[[CGUserManager shared] addLocCollection:@"splash_display" value:@"splash_display_failed"];
self.openScreenIndex += 1;
[self openScreenPrepareModel];
}
......
......@@ -71,7 +71,7 @@
[MBProgressHUD show];
self.rewardVideoAd = [[GDTRewardVideoAd alloc] initWithPlacementId:model.codeId];
self.rewardVideoAd.videoMuted = YES;
self.rewardVideoAd.videoMuted = NO;
self.rewardVideoAd.delegate = self;
[self.rewardVideoAd loadAd];
......@@ -127,7 +127,7 @@
if (!self.rewardVideoAd.adValid) {
// [self playVideo];
if (count > 2) {
[MobClick event:@"reward_display" label:@"reward_display_failed"];
[[CGUserManager shared] addLocCollection:@"reward_display" value:@"reward_display_failed"];
dispatch_source_cancel(self.GDTTimer);
self.videoIndex += 1;
[self videoPrepareModel];
......@@ -172,8 +172,7 @@
}
// [rewardedVideoAd showAdFromRootViewController:self.currentVC];
[MBProgressHUD hideHUD];
[MobClick event:@"reward_display" label:@"reward_display_success"];
[[CGUserManager shared] addLocCollection:@"reward_display" value:@"reward_display_success"];
NSString * clkTracking = self.currentAdsModel.imp_tracking[0];
if (clkTracking.length > 0) {
[[CGNetworkTools shared] pureGetWithAdsTrackingAction:clkTracking success:^(id _Nonnull response) {
......@@ -191,7 +190,7 @@ This method is called when video ad materia failed to load.
*/
- (void)nativeExpressRewardedVideoAd:(BUNativeExpressRewardedVideoAd *)rewardedVideoAd didFailWithError:(NSError *_Nullable)error{
[MBProgressHUD hideHUD];
[MobClick event:@"reward_display" label:@"reward_display_failed"];
[[CGUserManager shared] addLocCollection:@"reward_display" value:@"reward_display_failed"];
dispatch_source_cancel(self.CSJTimer);
self.videoIndex += 1;
[self videoPrepareModel];
......@@ -321,7 +320,7 @@ This method is called when another controller has been closed.
// [MBProgressHUD showWarningHudToKeyWindowWithText:text];
// [MBProgressHUD showWarningHudToKeyWindowWithText:NSStringFromSelector(_cmd)];
[MBProgressHUD hideHUD];
[MobClick event:@"reward_display" label:@"reward_display_failed"];
[[CGUserManager shared] addLocCollection:@"reward_display" value:@"reward_display_failed"];
self.videoIndex += 1;
[self videoPrepareModel];
[(AppDelegate*)[UIApplication sharedApplication].delegate unityVideo:true];
......@@ -335,7 +334,7 @@ This method is called when another controller has been closed.
NSInteger ecpm = rewardedVideoAd.ecpm;
NSLog(@"ecpm:%zd", (long)ecpm);
[MBProgressHUD hideHUD];
[MobClick event:@"reward_display" label:@"reward_display_success"];
[[CGUserManager shared] addLocCollection:@"reward_display" value:@"reward_display_success"];
NSString * clkTracking = self.currentAdsModel.imp_tracking[0];
if (clkTracking.length > 0) {
[[CGNetworkTools shared] pureGetWithAdsTrackingAction:clkTracking success:^(id _Nonnull response) {
......@@ -423,7 +422,7 @@ This method is called when another controller has been closed.
NSLog(@"videoDuration :%lf rewardAdType:%ld", rewardedVideoAd.videoDuration, rewardedVideoAd.rewardAdType);
[MBProgressHUD hideHUD];
[MobClick event:@"reward_display" label:@"reward_display_success"];
[[CGUserManager shared] addLocCollection:@"reward_display" value:@"reward_display_success"];
NSString * clkTracking = self.currentAdsModel.imp_tracking[0];
if (clkTracking.length > 0) {
[[CGNetworkTools shared] pureGetWithAdsTrackingAction:clkTracking success:^(id _Nonnull response) {
......@@ -515,7 +514,7 @@ This method is called when another controller has been closed.
NSLog(@"ERROR: %@", error);
[MBProgressHUD hideHUD];
[MobClick event:@"reward_display" label:@"reward_display_failed"];
[[CGUserManager shared] addLocCollection:@"reward_display" value:@"reward_display_failed"];
if (self.GDTTimer) {
dispatch_source_cancel(self.GDTTimer);
}
......@@ -534,6 +533,7 @@ This method is called when another controller has been closed.
{
NSLog(@"%s",__FUNCTION__);
NSLog(@"视频播放结束");
[(AppDelegate*)[UIApplication sharedApplication].delegate unityVideo:true];
// if () {
// [[AVAudioSession sharedInstance] setActive:NO withOptions:AVAudioSessionSetActiveOptionNotifyOthersOnDeactivation error:nil];
// }
......
......@@ -73,7 +73,7 @@ static GYAdsManager * manager;
- (void)openScreen{
[[CGNetworkTools shared] getWithAdsAction:getAdsInfo parameters: @{@"slotName": @"splash"} success:^(id _Nonnull response) {
if ([[response objectForKey:@"status"] intValue] == 200) {
[MobClick event:@"splash_request" label:@"splash_request_success"];
[[CGUserManager shared] addLocCollection:@"splash_request" value:@"splash_request_success"];
NSMutableArray * models = [NSMutableArray new];
NSArray * arr = response[@"result"][@"data"];
for (NSDictionary * dict in arr) {
......@@ -84,14 +84,14 @@ static GYAdsManager * manager;
[self openScreenForModels:models];
}else{
[MobClick event:@"splash_request" label:@"splash_request_failed"];
[[CGUserManager shared] addLocCollection:@"splash_request" value:@"splash_request_failed"];
if (self.adsFinishCallBack) {
self.adsFinishCallBack(false, nil);
}
}
} failure:^(NSError * _Nonnull error) {
[MobClick event:@"splash_request" label:@"splash_request_failed"];
[[CGUserManager shared] addLocCollection:@"splash_request" value:@"splash_request_failed"];
if (self.adsFinishCallBack) {
self.adsFinishCallBack(false, nil);
}
......@@ -125,7 +125,7 @@ static GYAdsManager * manager;
- (void)rewardedVideo{
[[CGNetworkTools shared] getWithAdsAction:getAdsInfo parameters: @{@"slotName": @"common_video"} success:^(id _Nonnull response) {
if ([[response objectForKey:@"status"] intValue] == 200) {
[MobClick event:@"reward_request" label:@"reward_request_success"];
[[CGUserManager shared] addLocCollection:@"reward_request" value:@"reward_request_success"];
NSMutableArray * models = [NSMutableArray new];
NSArray * arr = response[@"result"][@"data"];
for (NSDictionary * dict in arr) {
......@@ -135,14 +135,14 @@ static GYAdsManager * manager;
}
[self rewardedVideoForModels:models];
}else{
[MobClick event:@"reward_request" label:@"reward_request_failed"];
[[CGUserManager shared] addLocCollection:@"reward_request" value:@"reward_request_failed"];
if (self.adsFinishCallBack) {
self.adsFinishCallBack(false, nil);
}
}
} failure:^(NSError * _Nonnull error) {
[MobClick event:@"reward_request" label:@"reward_request_failed"];
[[CGUserManager shared] addLocCollection:@"reward_request" value:@"reward_request_failed"];
if (self.adsFinishCallBack) {
self.adsFinishCallBack(false, nil);
}
......
......@@ -200,14 +200,16 @@ static CGUserManager * manager;
}];
}
/// 数据埋点
/// @param action 动作
/// @param value 辅助参数
- (void)addLocCollection: (NSString *)action value: (NSString *)value{
// NSMutableDictionary *dict = @{@"event": @"guazinovel", @"action": action, @"value": value}.mutableCopy;
// [[CGNetworkTools shared] postWithLogCollection:logCollection parameters:dict success:^(id _Nullable __autoreleasing * _Nullable response) {
// } failure:^(NSError * _Nonnull error) {
// }];
//
// [MobClick event:action label: value];
NSMutableDictionary *dict = @{@"event": @"guazinovel", @"action": action, @"value": value}.mutableCopy;
[[CGNetworkTools shared] postWithLogCollection:logCollection parameters:dict success:^(id _Nullable __autoreleasing * _Nullable response) {
} failure:^(NSError * _Nonnull error) {
}];
[MobClick event:action label: value];
}
@end
......@@ -68,6 +68,7 @@
dispatch_async(dispatch_get_main_queue(), ^{
if (count < self.countDownMaxValue) {
[[CGUserManager shared] addLocCollection:@"play_adVideo_end_welfareTask" value:@""];
count++;
[self.roundProgressView updateProgressWithNumber:count-1 animation:YES];
}else{
......
......@@ -58,6 +58,13 @@
self.navigationItem.title = @"设置";
// UIButton *backButton = [UIButton buttonWithType:UIButtonTypeSystem];
// backButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
// backButton.frame = CGRectMake(0, 0, 50, 44);
// [backButton setImage:[UIImage imageNamed:@"back_black"] forState:UIControlStateNormal];
// [backButton addTarget:self action:@selector(goBackController) forControlEvents:UIControlEventTouchUpInside];
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"返回" style:UIBarButtonItemStyleDone target:self action:@selector(goBackController)];
_dataSourceArray = @[@"联系我们", @"检查更新", @"用户协议", @"隐私政策", @"关于我们"].mutableCopy;
self.view.backgroundColor = kColorWithRGB(249, 234, 195);
......@@ -84,6 +91,10 @@
[self getAdsDataSource];
}
- (void)goBackController{
[self.navigationController popViewControllerAnimated:YES];
}
- (IBAction)copyBtn:(UIButton *)sender{
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
pasteboard.string = [NSString stringWithFormat:@"%@", [CGUserManager shared].uid];
......@@ -113,7 +124,7 @@
cell.titleLab.text = _dataSourceArray[indexPath.row];
if (indexPath.row == 0) {
cell.detailsLab.text = [NSString stringWithFormat:@"官方@@:%@", [[CGUserManager shared].appSwitch objectForKey:@"qq"]];
cell.detailsLab.text = [NSString stringWithFormat:@"官方QQ:%@", [[CGUserManager shared].appSwitch objectForKey:@"qq"]];
}else if (indexPath.row == 1) {
cell.detailsLab.text = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
}
......
......@@ -20,6 +20,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, copy) NSString * details;
@property (nonatomic, strong) NSMutableDictionary * adsDict;
@property (nonatomic, copy) void(^dismissCallBack)(void);
@end
NS_ASSUME_NONNULL_END
......@@ -99,7 +99,7 @@
}
}
if (_details) {
if (self.countDown > 0) {
_countDownView = [[NSBundle mainBundle] loadNibNamed:NSStringFromClass([GYCountDownTimeView class]) owner:self options:nil].firstObject;;
_countDownView.frame = CGRectMake(KScreenWidth-260-24, SafeAreaTopHeight+36, 260, 64);
_countDownView.countDownMaxValue = self.countDown;
......@@ -158,7 +158,7 @@
if([[data Read] objectForKey:@"refresh_token"]){
[self WXLoginOauth:nil];
}else{
[MobClick event:@"click_login" label:nil];
[[CGUserManager shared] addLocCollection:@"click_login" value:@""];
// 构造SendAuthReq结构体
SendAuthReq* req = [[SendAuthReq alloc] init];
req.scope = @"snsapi_userinfo";
......@@ -166,7 +166,7 @@
//第三方向微信终端发送一个SendAuthReq消息结构
[WXApi sendAuthReq:req viewController:self.view.window.rootViewController delegate:self completion:^(BOOL success) {
if (!success){
[MobClick event:@"login_fail" label:@""];
[[CGUserManager shared] addLocCollection:@"login_fail" value:@""];
}
}];
}
......@@ -197,17 +197,17 @@
[self authWXLogin];
}else{
[MobClick event:@"login_fail" label:[NSString stringWithFormat:@"%@", [response objectForKey:@"errcode"]]];
[[CGUserManager shared] addLocCollection:@"login_fail" value:[NSString stringWithFormat:@"%@", [response objectForKey:@"errcode"]]];
}
} failure:^(NSError * _Nonnull error) {
[MobClick event:@"login_fail" label:@"netWork"];
[[CGUserManager shared] addLocCollection:@"login_fail" value:@"netWork"];
}];
}else{
[MobClick event:@"login_fail" label:[NSString stringWithFormat:@"%@", [response objectForKey:@"errcode"]]];
[[CGUserManager shared] addLocCollection:@"login_fail" value:[NSString stringWithFormat:@"%@", [response objectForKey:@"errcode"]]];
}
} failure:^(NSError * _Nonnull error) {
[MobClick event:@"login_fail" label:@"netWork"];
[[CGUserManager shared] addLocCollection:@"login_fail" value:@"netWork"];
}];
}
......@@ -312,12 +312,12 @@
}
}];
if ([[response objectForKey:@"status"] integerValue] == 200 && [[[[response objectForKey:@"result"] objectForKey:@"data"] objectForKey:@"status"] integerValue]== 1){
[MobClick event:@"withdraw_0.3" label:@"withdraw_0.3_success"];
[[CGUserManager shared] addLocCollection:@"show_withdraw_success_dialog" value:@""];
}else{
[MobClick event:@"withdraw_0.3" label:[NSString stringWithFormat:@"withdraw_0.3_failed_%@_%@", [response objectForKey:@"msg"], [[[response objectForKey:@"result"] objectForKey:@"data"] objectForKey:@"reason"]]];
[[CGUserManager shared] addLocCollection:@"show_withdraw_fail_dialog" value:[NSString stringWithFormat:@"withdraw_0.3_failed_%@_%@", [response objectForKey:@"msg"], [[[response objectForKey:@"result"] objectForKey:@"data"] objectForKey:@"reason"]]];
}
} failure:^(NSError * _Nonnull error) {
[MobClick event:@"withdraw_0.3" label:@"withdraw_0.3_failed"];
[[CGUserManager shared] addLocCollection:@"show_withdraw_fail_dialog" value:@"netWork"];
}];
}
......@@ -392,10 +392,18 @@
- (void)goBackController{
if ([_webView canGoBack]) {
[_webView goBack];
return;
if (self.countDown > 0) {
}else{
if ([_webView canGoBack]) {
[_webView goBack];
return;
}
}
if (_dismissCallBack) {
_dismissCallBack();
}
[self dismissViewControllerAnimated:YES completion:nil];
// [self.navigationController popViewControllerAnimated:YES];
}
......@@ -466,13 +474,13 @@
GYWheelSurfModel * model = [GYWheelSurfModel new];
// 1:水滴,2:金币,3:钻石
if ([dict[@"type"] isEqualToString:@"1"]) {
model.awardType = 1;
if ([dict[@"type"] integerValue] == 1) {
model.awardType = 7;
model.awardNum = dict[@"receiveCoins"];
}else if ([dict[@"type"] isEqualToString:@"2"]) {
model.awardType = 4;
}else if ([dict[@"type"] integerValue] == 2) {
model.awardType = 7;
model.awardNum = dict[@"receiveCoins"];
}else if ([dict[@"type"] isEqualToString:@"3"]) {
}else if ([dict[@"type"] integerValue] == 3) {
model.awardType = 7;
model.awardNum = dict[@"receiveCoins"];
}else{
......@@ -485,11 +493,16 @@
[self.view addSubview:gift];
[gift show:nil];
gift.closeCallBack = ^{
[self.webView reload];
};
}else if([message.name isEqualToString:@"jumpWebActivity"]){
NSString * bodyStr = message.body;
NSData * data = [bodyStr dataUsingEncoding: NSUTF8StringEncoding];
NSDictionary * dict = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:nil];
[[CGUserManager shared] addLocCollection:[NSString stringWithFormat:@"click_welfare_task_receive_%@", dict[@"title"]] value:@""];
GYWebViewController * web = [[GYWebViewController alloc] init];
web.url = dict[@"adurl"];
web.webTitle = dict[@"title"];
......
......@@ -82,10 +82,12 @@
- (IBAction)startBtn:(UIButton *)sender{
if (self.isVideo) {
[[CGUserManager shared] addLocCollection:@"play_adVideo_end_turntable" value:@""];
[[CGUserManager shared] addLocCollection:@"click_lucky_turntable_lottery_look_video" value:@""];
[[GYAdsManager shared] play];
return;
}
[[CGUserManager shared] addLocCollection:@"click_lucky_turntable_lottery" value:@""];
//奖励类型 1 水滴 2 果子 3 种子 4 金币 5 加速剂 6 现金红包
[[CGNetworkTools shared] postWithAction:WheelSurf parameters:@{} success:^(id _Nonnull response) {
......
......@@ -16,6 +16,7 @@ target 'GYDemo' do
pod 'WechatOpenSDK'
pod 'Bytedance-UnionAD'
pod 'KSAdSDK'
pod 'GDTMobSDK'
pod 'UMCCommon'
end
......@@ -15,6 +15,9 @@ PODS:
- AFNetworking/UIKit (4.0.1):
- AFNetworking/NSURLSession
- Bytedance-UnionAD (3.2.5.2)
- GDTMobSDK (4.11.12):
- GDTMobSDK/GDTMobSDK (= 4.11.12)
- GDTMobSDK/GDTMobSDK (4.11.12)
- KSAdSDK (3.3.3)
- Masonry (1.1.0)
- MBProgressHUD (1.2.0)
......@@ -25,6 +28,7 @@ PODS:
DEPENDENCIES:
- AFNetworking
- Bytedance-UnionAD
- GDTMobSDK
- KSAdSDK
- Masonry
- MBProgressHUD
......@@ -36,6 +40,7 @@ SPEC REPOS:
trunk:
- AFNetworking
- Bytedance-UnionAD
- GDTMobSDK
- KSAdSDK
- Masonry
- MBProgressHUD
......@@ -46,6 +51,7 @@ SPEC REPOS:
SPEC CHECKSUMS:
AFNetworking: 7864c38297c79aaca1500c33288e429c3451fdce
Bytedance-UnionAD: 097cb648f7ae8895f28d79edda6a2fac466b6028
GDTMobSDK: 16ef708ffcbbeca455d9df754694bc647401f454
KSAdSDK: b7914b4d3947f4a8ac89c83bab78dac87a151f6d
Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
MBProgressHUD: 3ee5efcc380f6a79a7cc9b363dd669c5e1ae7406
......@@ -53,6 +59,6 @@ SPEC CHECKSUMS:
UMCCommon: f455f92c125342e360d6ad9eafe484945351eeb5
WechatOpenSDK: 6a4d1436c15b3b5fe2a0bd383f3046010186da44
PODFILE CHECKSUM: 459fb90744b26976671376bb4b419221fe74c462
PODFILE CHECKSUM: 95a56d57ec0ab4862eec28a594293725bb68fc05
COCOAPODS: 1.9.3
......@@ -43,12 +43,12 @@ NS_ASSUME_NONNULL_BEGIN
- (void)gdt_NativeExpressProAdViewClosed:(GDTNativeExpressProAdView *)nativeExpressProAdView;
/**
* 点击原生模板2.0广告以后即将弹出全屏广告页
* 点击原生模板2.0广告点击以后即将弹出全屏广告页
*/
- (void)gdt_NativeExpressProAdViewWillPresentScreen:(GDTNativeExpressProAdView *)nativeExpressProAdView;
/**
* 点击原生模板2.0广告以后弹出全屏广告页
* 点击原生模板2.0广告点击以后弹出全屏广告页
*/
- (void)gdt_NativeExpressProAdViewDidPresentScreen:(GDTNativeExpressProAdView *)nativeExpressProAdView;
......@@ -72,6 +72,8 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (void)gdt_NativeExpressProAdView:(GDTNativeExpressProAdView *)nativeExpressProAdView playerStatusChanged:(GDTMediaPlayerStatus)status;
- (void)gdt_NativeExpressProAdViewVideoDidFinished:(GDTNativeExpressProAdView *)nativeExpressProAdView;
@end
@interface GDTNativeExpressProAdView : UIView
......
//
// GDTNativeExpressRewardVideoAd.h
// GDTMobApp
//
// Created by royqpwang on 2020/7/6.
// Copyright © 2020 Tencent. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@protocol GDTNativeExpressRewardedVideoAdDelegate;
@interface GDTNativeExpressRewardVideoAd : NSObject
@property (nonatomic, getter=isAdValid, readonly) BOOL adValid;
@property (nonatomic) BOOL videoMuted;
@property (nonatomic, assign, readonly) NSInteger expiredTimestamp;
@property (nonatomic, weak) id <GDTNativeExpressRewardedVideoAdDelegate> delegate;
@property (nonatomic, readonly) NSString *placementId;
/**
构造方法
@param placementId - 广告位 ID
@return GDTRewardVideoAd 实例
*/
- (instancetype)initWithPlacementId:(NSString *)placementId;
/**
加载广告方法 支持 iOS9 及以上系统
*/
- (void)loadAd;
/**
展示广告方法
@param rootViewController 用于 present 激励视频 VC
@return 是否展示成功
*/
- (BOOL)showAdFromRootViewController:(UIViewController *)rootViewController;
/**
返回广告的eCPM,单位:分
@return 成功返回一个大于等于0的值,-1表示无权限或后台出现异常
*/
- (NSInteger)eCPM;
/**
返回广告的eCPM等级
@return 成功返回一个包含数字的string,@""或nil表示无权限或后台异常
*/
- (NSString *)eCPMLevel;
/**
返回广告平台名称
@return 当使用激励视频聚合功能时,用于区分广告平台
*/
- (NSString *)adNetworkName;
/**
* 激励视频广告时长,单位 ms
*/
- (CGFloat)videoDuration;
@end
@protocol GDTNativeExpressRewardedVideoAdDelegate <NSObject>
@optional
/**
广告数据加载成功回调
@param rewardedVideoAd GDTRewardVideoAd 实例
*/
- (void)gdt_nativeExpressRewardVideoAdDidLoad:(GDTNativeExpressRewardVideoAd *)rewardedVideoAd;
/**
视频数据下载成功回调,已经下载过的视频会直接回调
@param rewardedVideoAd GDTRewardVideoAd 实例
*/
- (void)gdt_nativeExpressRewardVideoAdVideoDidLoad:(GDTNativeExpressRewardVideoAd *)rewardedVideoAd;
/**
视频播放页即将展示回调
@param rewardedVideoAd GDTRewardVideoAd 实例
*/
- (void)gdt_nativeExpressRewardVideoAdWillVisible:(GDTNativeExpressRewardVideoAd *)rewardedVideoAd;
/**
视频广告曝光回调
@param rewardedVideoAd GDTRewardVideoAd 实例
*/
- (void)gdt_nativeExpressRewardVideoAdDidExposed:(GDTNativeExpressRewardVideoAd *)rewardedVideoAd;
/**
视频播放页关闭回调
@param rewardedVideoAd GDTRewardVideoAd 实例
*/
- (void)gdt_nativeExpressRewardVideoAdDidClose:(GDTNativeExpressRewardVideoAd *)rewardedVideoAd;
/**
视频广告信息点击回调
@param rewardedVideoAd GDTRewardVideoAd 实例
*/
- (void)gdt_nativeExpressRewardVideoAdDidClicked:(GDTNativeExpressRewardVideoAd *)rewardedVideoAd;
/**
视频广告各种错误信息回调
@param rewardedVideoAd GDTRewardVideoAd 实例
@param error 具体错误信息
*/
- (void)gdt_nativeExpressRewardVideoAd:(GDTNativeExpressRewardVideoAd *)rewardedVideoAd didFailWithError:(NSError *)error;
/**
视频广告播放达到激励条件回调
@param rewardedVideoAd GDTRewardVideoAd 实例
*/
- (void)gdt_nativeExpressRewardVideoAdDidRewardEffective:(GDTNativeExpressRewardVideoAd *)rewardedVideoAd;
/**
视频广告视频播放完成
@param rewardedVideoAd GDTRewardVideoAd 实例
*/
- (void)gdt_nativeExpressRewardVideoAdDidPlayFinish:(GDTNativeExpressRewardVideoAd *)rewardedVideoAd;
@end
NS_ASSUME_NONNULL_END
......@@ -48,7 +48,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, assign) BOOL detailPageEnable;
/**
是否支持用户点击 MediaView 改变视频播放暂停状态,默认 NO
是否支持用户点击 MediaView 改变视频播放暂停状态,默认 YES
设为 YES 时,用户点击会切换播放器播放、暂停状态
*/
@property (nonatomic, assign) BOOL userControlEnable;
......
../../../GDTMobSDK/lib/GDTAdParams.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTAdTestSetting.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTBaseAdNetworkAdapterProtocol.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTHybridAd.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTLoadAdParams.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTLogoView.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTMediaView.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTNativeExpressAd.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTNativeExpressAdView.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTNativeExpressProAdManager.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTNativeExpressProAdView.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTNativeExpressRewardVideoAd.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTRewardVideoAd.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTRewardVideoAdNetworkAdapterProtocol.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTRewardVideoAdNetworkConnectorProtocol.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTSDKConfig.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTSDKDefines.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTSplashAd.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTUnifiedBannerView.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTUnifiedInterstitialAd.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTUnifiedNativeAd.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTUnifiedNativeAdDataObject.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTUnifiedNativeAdView.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTVideoConfig.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTAdParams.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTAdTestSetting.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTBaseAdNetworkAdapterProtocol.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTHybridAd.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTLoadAdParams.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTLogoView.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTMediaView.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTNativeExpressAd.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTNativeExpressAdView.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTNativeExpressProAdManager.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTNativeExpressProAdView.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTNativeExpressRewardVideoAd.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTRewardVideoAd.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTRewardVideoAdNetworkAdapterProtocol.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTRewardVideoAdNetworkConnectorProtocol.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTSDKConfig.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTSDKDefines.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTSplashAd.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTUnifiedBannerView.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTUnifiedInterstitialAd.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTUnifiedNativeAd.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTUnifiedNativeAdDataObject.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTUnifiedNativeAdView.h
\ No newline at end of file
../../../GDTMobSDK/lib/GDTVideoConfig.h
\ No newline at end of file
......@@ -15,6 +15,9 @@ PODS:
- AFNetworking/UIKit (4.0.1):
- AFNetworking/NSURLSession
- Bytedance-UnionAD (3.2.5.2)
- GDTMobSDK (4.11.12):
- GDTMobSDK/GDTMobSDK (= 4.11.12)
- GDTMobSDK/GDTMobSDK (4.11.12)
- KSAdSDK (3.3.3)
- Masonry (1.1.0)
- MBProgressHUD (1.2.0)
......@@ -25,6 +28,7 @@ PODS:
DEPENDENCIES:
- AFNetworking
- Bytedance-UnionAD
- GDTMobSDK
- KSAdSDK
- Masonry
- MBProgressHUD
......@@ -36,6 +40,7 @@ SPEC REPOS:
trunk:
- AFNetworking
- Bytedance-UnionAD
- GDTMobSDK
- KSAdSDK
- Masonry
- MBProgressHUD
......@@ -46,6 +51,7 @@ SPEC REPOS:
SPEC CHECKSUMS:
AFNetworking: 7864c38297c79aaca1500c33288e429c3451fdce
Bytedance-UnionAD: 097cb648f7ae8895f28d79edda6a2fac466b6028
GDTMobSDK: 16ef708ffcbbeca455d9df754694bc647401f454
KSAdSDK: b7914b4d3947f4a8ac89c83bab78dac87a151f6d
Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
MBProgressHUD: 3ee5efcc380f6a79a7cc9b363dd669c5e1ae7406
......@@ -53,6 +59,6 @@ SPEC CHECKSUMS:
UMCCommon: f455f92c125342e360d6ad9eafe484945351eeb5
WechatOpenSDK: 6a4d1436c15b3b5fe2a0bd383f3046010186da44
PODFILE CHECKSUM: 459fb90744b26976671376bb4b419221fe74c462
PODFILE CHECKSUM: 95a56d57ec0ab4862eec28a594293725bb68fc05
COCOAPODS: 1.9.3
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForAnalyzing = "YES"
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6F2BDBDBBAD8487EF4614E1D729C5DD0"
BuildableName = "GDTMobSDK"
BlueprintName = "GDTMobSDK"
ReferencedContainer = "container:Pods.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
buildConfiguration = "Debug"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
......@@ -9,63 +9,70 @@
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>0</integer>
<integer>2</integer>
</dict>
<key>Bytedance-UnionAD.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>1</integer>
<integer>3</integer>
</dict>
<key>GDTMobSDK.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>4</integer>
</dict>
<key>KSAdSDK.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>2</integer>
<integer>5</integer>
</dict>
<key>MBProgressHUD.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>4</integer>
<integer>7</integer>
</dict>
<key>Masonry.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>3</integer>
<integer>6</integer>
</dict>
<key>Pods-GYDemo.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>5</integer>
<integer>8</integer>
</dict>
<key>SwiftyStoreKit.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>6</integer>
<integer>9</integer>
</dict>
<key>UMCCommon.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>7</integer>
<integer>10</integer>
</dict>
<key>WechatOpenSDK.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
<key>orderHint</key>
<integer>8</integer>
<integer>11</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
......
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