samcodes-chartboost 1.0.9

Unofficial Chartboost ads support for Android and iOS

Released 2017-02-05.

To install, run:

haxelib install samcodes-chartboost 1.0.9

See using Haxelib in Haxelib documentation for more information.

Maintainersamcodes
Websitehttp://samcodes.co.uk/code/
Current version1.0.9
StatisticsInstalled 190 times
LicenseMIT
Tags ads, android, chartboost, interstitials, ios

README.md

Haxe Chartboost

Unofficial Chartboost ads library support for OpenFL Android/iOS targets.

Features

Supports: Static and video interstitials. More apps panels. Rewarded videos. Caching and custom ad locations. * Customizable listener for reacting to all SDK events.

Doesn't support: Chartboost InPlay type ads. Chartboost Analytics. * Age gates.

If there is something you would like adding let me know. Pull requests welcomed too!

Install

haxelib install samcodes-chartboost

Example

See the demo app for a complete example using a custom listener: https://github.com/Tw1ddle/samcodes-ads-demo

Screenshot of demo app

Screenshot of demo app

Usage

Include the haxelib through Project.xml:

<haxelib name="samcodes-chartboost" />

For Android also set your app identifier and signature:

<setenv name="ChartboostAppId" value="your_app_id" />
<setenv name="ChartboostAppSignature" value="your_app_signature" />

For iOS pass the app identifier and signature via the init call:

Chartboost.init("your_app_id", "your_app_signature");
// Basic usage
Chartboost.setListener(new MyChartboostListener(listener)); // Attach your own extended ChartboostListener to handle/respond to SDK events like 'shouldDisplayInterstitial', 'didDismissInterstitial' etc.

Chartboost.cacheInterstitial("mylocation"); // Cache an interstitial at 'mylocation'. Locations are added to the Chartboost dashboard automatically.

Chartboost.showInterstitial("mylocation"); // Show an interstitial at 'mylocation'. Will display faster if previously cached (check Chartboost.hasInterstitial()).

// And so on...

Notes

If in doubt, refer to the official Chartboost documentation.

Use `#if (androidios)` conditionals around your imports and calls to this library for cross platform projects, as there is no stub/fallback implementation included in the haxelib.

For iOS you need to drag your `libChartboost.a` into the "link binaries with libraries" section under the "build phases" tab in Xcode.

If you need to rebuild the iOS or simulator ndlls navigate to `/project and run rebuild_ndlls.sh`.