Commit b671edd519878fcd5e6485e2d82ce35205c3c065
Merge branch 'master' of bj.gitlab.cnlive.com:ios-team/VLionADSDKDemo
Conflicts: VLionADSDKDemo/VLionADSDKDemo.xcodeproj/project.pbxproj
Showing
5 changed files
with
34 additions
and
7 deletions
VLionADSDKDemo/VLionADSDKDemo/AppDelegate.m
| ... | ... | @@ -28,12 +28,14 @@ |
| 28 | 28 | configuration.skipButtonType = AdSkipButtonTypeTimeAndText; |
| 29 | 29 | configuration.frame = [UIScreen mainScreen].bounds; |
| 30 | 30 | |
| 31 | - UIImage *image = [UIImage imageNamed:@""]; | |
| 31 | + //开屏广告占位图建议与启动页LaunchImage相同 | |
| 32 | + UIImage *image = [UIImage imageNamed:@"placeholderImage"]; | |
| 32 | 33 | |
| 33 | 34 | [[VLionManager manager] vl_setupLaunchAdWithTagId:@"444" configuration:configuration keyWindow:[[UIApplication sharedApplication].delegate window] placeholderImage:image completeBlock:^(CGFloat w, CGFloat h, UIWindow * _Nonnull window) { |
| 34 | 35 | |
| 35 | 36 | NSLog(@"%f>>>>>%f>>>>>%@",w,h,window); |
| 36 | 37 | |
| 38 | + // 可以根据返回的物料数据重新设置开屏广告大小 | |
| 37 | 39 | // window.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.width*h/w); |
| 38 | 40 | |
| 39 | 41 | } successBlock:^{ | ... | ... |
VLionADSDKDemo/VLionADSDKDemo/Assets.xcassets/bg_launch_1242.imageset/bg_launch_1242.png deleted
100644 → 0
549 KB
VLionADSDKDemo/VLionADSDKDemo/Assets.xcassets/bg_launch_1242.imageset/Contents.json renamed to VLionADSDKDemo/VLionADSDKDemo/Assets.xcassets/placeholderImage.imageset/Contents.json
VLionADSDKDemo/VLionADSDKDemo/Assets.xcassets/placeholderImage.imageset/bg_launch 1242_2208.png
0 → 100644
342 KB
VLionADSDKDemo/VLionADSDKDemo/NativeAdListsController.m
| ... | ... | @@ -54,7 +54,12 @@ |
| 54 | 54 | [[VLionManager manager] vl_nativeAdNewsWithTagId:@"" handler:^(VLionNativeAdNewsModel * _Nullable adModel, NSDictionary * _Nullable errorDic) { |
| 55 | 55 | NSLog(@"model:%@",adModel); |
| 56 | 56 | if (errorDic) { |
| 57 | - [self toast:[NSString stringWithFormat:@"错误码:%@,%@",errorDic[@"errorCode"],errorDic[@"errorMessage"]]]; | |
| 57 | + NSString *tagid = [NSString stringWithFormat:@"%d",adModel.tagid]; | |
| 58 | + if(adModel.tagid == 0) | |
| 59 | + { | |
| 60 | + tagid = @"null"; | |
| 61 | + } | |
| 62 | + [self toast:[NSString stringWithFormat:@"错误码:%@,%@\n请求广告位id:%@",errorDic[@"errorCode"],errorDic[@"errorMessage"],tagid]]; | |
| 58 | 63 | }else |
| 59 | 64 | { |
| 60 | 65 | [self toast:[NSString stringWithFormat:@"model:%@",adModel]]; |
| ... | ... | @@ -65,7 +70,12 @@ |
| 65 | 70 | [[VLionManager manager] vl_nativeAdAppWallWithTagId:@"" handler:^(VLionNativeAdAppWallModel * _Nullable adModel, NSDictionary * _Nullable errorDic) { |
| 66 | 71 | NSLog(@"model:%@",adModel); |
| 67 | 72 | if (errorDic) { |
| 68 | - [self toast:[NSString stringWithFormat:@"错误码:%@,%@",errorDic[@"errorCode"],errorDic[@"errorMessage"]]]; | |
| 73 | + NSString *tagid = [NSString stringWithFormat:@"%d",adModel.tagid]; | |
| 74 | + if(adModel.tagid == 0) | |
| 75 | + { | |
| 76 | + tagid = @"null"; | |
| 77 | + } | |
| 78 | + [self toast:[NSString stringWithFormat:@"错误码:%@,%@\n请求广告位id:%@",errorDic[@"errorCode"],errorDic[@"errorMessage"],tagid]]; | |
| 69 | 79 | }else |
| 70 | 80 | { |
| 71 | 81 | [self toast:[NSString stringWithFormat:@"model:%@",adModel]]; |
| ... | ... | @@ -77,7 +87,12 @@ |
| 77 | 87 | [[VLionManager manager] vl_nativeAdShufflingWithTagId:@"339" handler:^(VLionNativeAdShufflingModel * _Nullable adModel, NSDictionary * _Nullable errorDic) { |
| 78 | 88 | NSLog(@"model:%@",adModel); |
| 79 | 89 | if (errorDic) { |
| 80 | - [self toast:[NSString stringWithFormat:@"错误码:%@,%@",errorDic[@"errorCode"],errorDic[@"errorMessage"]]]; | |
| 90 | + NSString *tagid = [NSString stringWithFormat:@"%d",adModel.tagid]; | |
| 91 | + if(adModel.tagid == 0) | |
| 92 | + { | |
| 93 | + tagid = @"null"; | |
| 94 | + } | |
| 95 | + [self toast:[NSString stringWithFormat:@"错误码:%@,%@\n请求广告位id:%@",errorDic[@"errorCode"],errorDic[@"errorMessage"],tagid]]; | |
| 81 | 96 | }else |
| 82 | 97 | { |
| 83 | 98 | NSString *string = @""; |
| ... | ... | @@ -118,7 +133,12 @@ |
| 118 | 133 | [[VLionManager manager] vl_nativeAdWaterfallWithTagId:@"" handler:^(VLionNativeAdWaterfallModel * _Nullable adModel, NSDictionary * _Nullable errorDic) { |
| 119 | 134 | NSLog(@"model:%@",adModel); |
| 120 | 135 | if (errorDic) { |
| 121 | - [self toast:[NSString stringWithFormat:@"错误码:%@,%@",errorDic[@"errorCode"],errorDic[@"errorMessage"]]]; | |
| 136 | + NSString *tagid = [NSString stringWithFormat:@"%d",adModel.tagid]; | |
| 137 | + if(adModel.tagid == 0) | |
| 138 | + { | |
| 139 | + tagid = @"null"; | |
| 140 | + } | |
| 141 | + [self toast:[NSString stringWithFormat:@"错误码:%@,%@\n请求广告位id:%@",errorDic[@"errorCode"],errorDic[@"errorMessage"],tagid]]; | |
| 122 | 142 | }else |
| 123 | 143 | { |
| 124 | 144 | [self toast:[NSString stringWithFormat:@"model:%@",adModel]]; |
| ... | ... | @@ -129,7 +149,12 @@ |
| 129 | 149 | case 10004: {//信息流 |
| 130 | 150 | [[VLionManager manager] vl_nativeAdInformationFlowWithTagId:@"425" handler:^(VLionNativeAdInformationFlowModel * _Nullable adModel, NSDictionary * _Nullable errorDic) { |
| 131 | 151 | if (errorDic) { |
| 132 | - [self toast:[NSString stringWithFormat:@"错误码:%@,%@",errorDic[@"errorCode"],errorDic[@"errorMessage"]]]; | |
| 152 | + NSString *tagid = [NSString stringWithFormat:@"%d",adModel.tagid]; | |
| 153 | + if(adModel.tagid == 0) | |
| 154 | + { | |
| 155 | + tagid = @"null"; | |
| 156 | + } | |
| 157 | + [self toast:[NSString stringWithFormat:@"错误码:%@,%@\n请求广告位id:%@",errorDic[@"errorCode"],errorDic[@"errorMessage"],tagid]]; | |
| 133 | 158 | }else |
| 134 | 159 | { |
| 135 | 160 | NSString *string = @""; | ... | ... |