Latest 1.2.0
Homepage https://github.com/AltamobiOS/AltamobAdFramework
License MIT
Platforms ios 7.0, requires ARC
Dependencies FBAudienceNetwork
Frameworks Foundation
Authors

facebook聚合版本 framework

version 1.2.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:count];

//delegate

//load success

  • (void)nativeAdService:(AMNativeAdService )nativeAdService didLoadedAds:(NSArray<AMNativeAd > )nativeAds withPlacementId:(NSString )placementId
    {
    self.dataArray = nativeAds;
    self.loadBtn.enabled = YES;
    self.title = [NSString stringWithFormat:@"加载成功(%zd条广告)", nativeAds.count];
    if (self.dataArray.count) {
    AMNativeAd *ad = self.dataArray[0];
    if (ad) {
    [self reloadDataWithNativeAd:ad];
    }
    }
    }

//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": "AltamobAdFramework",
    "platforms": {
        "ios": "7.0"
    },
    "version": "1.2.0",
    "license": "MIT",
    "summary": "native ad SDK.",
    "homepage": "https://github.com/AltamobiOS/AltamobAdFramework",
    "authors": {
        "AltamobiOS": "[email protected]"
    },
    "source": {
        "git": "https://github.com/AltamobiOS/AltamobAdFramework.git",
        "tag": "1.2.0",
        "submodules": true
    },
    "requires_arc": true,
    "vendored_frameworks": "framework/AltamobAdSDK.framework",
    "source_files": "framework/AltamobAdSDK.framework/Headers/*.h",
    "frameworks": "Foundation",
    "libraries": "sqlite3",
    "dependencies": {
        "FBAudienceNetwork": []
    }
}

Pin It on Pinterest

Share This