samcodes-chartboost

Unofficial Chartboost ads support for Android and iOS
http://samcodes.co.uk/code/

To install, run:

haxelib install samcodes-chartboost 1.0.9 

See using Haxelib in Haxelib documentation for more information.

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`.

Contributors
samcodes
Version
1.0.9
Published
1 year ago
License
MIT

All libraries are free

Every month, more than thousand developers use haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on Github!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on Github