AltamobAdSDK 1.1.0

AltamobAdSDK 1.1.0

测试已测试
Lang语言 Obj-CObjective C
许可证 MIT
发布最后发布2017年4月

Altamob维护。



  • AltamobiOS

AltamobSDKDemo

版本 1.1.0

如何使用?

//注册

  • (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    [[AMAltamobAdSDK shareInstance] registerWithAppkey:@"your token"]; [AMAltamobAdSDK shareInstance].debugEnable = YES;

    return YES; }

//加载广告

AMNativeAdService *adService = [AMNativeAdService defaultService]; adService.delegate = self; [adService loadAdsWithPlacementId:@"你的放置ID" count:6];

//委托

//加载成功

  • (void)nativeAdService:(AMNativeAdService *)nativeAdService didLoadedAds:(NSArray *)nativeAds withPlacementId:(NSString *)placementId { self.dataArray = nativeAds;

    self.title = [NSString stringWithFormat:@"加载成功(%zd条广告)", nativeAds.count]; [self.tableView reloadData]; self.loadButton.enabled = YES; }

//加载失败

  • (void)nativeAdService:(AMNativeAdService *)nativeAdService loadFailed:(NSError *)error withPlacementId:(NSString *)placementId { NSLog(@"nativeAdLoadFailed");

    self.title = @"加载失败"; self.loadButton.enabled = YES; }

//广告点击

  • (void)nativeAdService:(AMNativeAdService *)nativeAdService didClick:(AMNativeAd *)ad withPlacementId:(NSString *)placementId { NSLog(@"click"); }

//广告显示

  • (void)nativeAdService:(AMNativeAdService *)nativeAdService didShow:(AMNativeAd *)ad withPlacementId:(NSString *)placementId { NSLog(@"show"); }