Latest 1.1.0
Homepage https://github.com/AltamobiOS/AltamobSDKDemo
License MIT
Platforms ios 7.0, requires ARC
Authors

AltamobSDKDemo

version 1.1.1(FAN聚合版)

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");
    }

Latest podspec

{
    "name": "AltamobAdSDK",
    "platforms": {
        "ios": "7.0"
    },
    "version": "1.1.0",
    "license": "MIT",
    "summary": "native ad SDK.",
    "homepage": "https://github.com/AltamobiOS/AltamobSDKDemo",
    "authors": {
        "AltamobiOS": "[email protected]"
    },
    "source": {
        "git": "https://github.com/AltamobiOS/AltamobSDKDemo.git",
        "tag": "1.1.0",
        "submodules": true
    },
    "requires_arc": true,
    "resources": "SDK/AltamobAdSDK.framework"
}

Pin It on Pinterest

Share This