AltamobAdSDK 1.1.0

AltamobAdSDK 1.1.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Apr 2017

Maintained by Altamob.



  • By
  • AltamobiOS

AltamobSDKDemo

version 1.1.0

how to use ?

//register

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

    [[AMAltamobAdSDK shareInstance] resgistWithAppkey:@"your token"]; [AMAltamobAdSDK shareInstance].debugEable = YES;

    return YES; }

//load ad

AMNativeAdService *adService = [AMNativeAdService defaultService]; adService.delegate = self; [adService loadAdsWithPlacementId:@"your placementId" count:6];

//delegate

//load success

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

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

//load fail

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

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

//ad click

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

//ad show

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