Skip to content

ChartBoost/ios-sdk-example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Chartboost SDK for iOS

Version 8.1.0

The Chartboost iOS SDK is the cornerstone of the Chartboost network. It provides the functionality for showing interstitial, rewarded and banner ads.

Usage

  1. Before you begin:
  1. Link the Chartboost.framework to your project, or use CocoaPods to manage the framework dependency for you.

  2. Link the StoreKit and WebKit frameworks.

  3. Add value "-ObjC" in "Other Linker Flags" for both Debug and Release.

  4. Add the import header #import <Chartboost/Chartboost.h> to your AppDelegate.m file.

  5. Initialize Chartboost in your didFinishLaunchingWithOptions method.

(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    // Initialize the Chartboost library
    [Chartboost startWithAppId:@"YOUR_CHARTBOOST_APP_ID"
                  appSignature:@"YOUR_CHARTBOOST_APP_SIGNATURE"
                    completion:^(BOOL initialized) {
                        NSLog(@"Chartboost SDK initialization finished with success %i", initialized);
                    }];
    return YES;
}

Please note:

  • startWithAppId:appSignature:completion: must always be called on bootup, no matter what other actions your app takes.
  1. Add your app ID and app signature.

  2. Learn how to load and show ads with Chartboost SDK.

  • Check out our Example app (more info below).
  • Read the headers included in the Chartboost framework. They contain detailed explanations and code examples. See Chartboost.h, CHBInterstitial.h, CHBRewarded.h, CHBBanner.h and CHBAdDelegate.h.
  • Check our online documentation to learn more.
  1. Test your integration.

  2. Check the SDK icon in the Chartboost dashboard.

    • Go to your app's App Settings > Basic Settings in your dashboard.
    • When our servers successfully receive a bootup call from our SDK using your app ID, the SDK icon underneath your app’s icon will turn from gray to green.

Example App

Our example app showcases how to integrate the Chartboost SDK.

## Versions

The master branch includes the example app supporting the latest version of the Chartboost SDK.

For previous SDK versions check out the other branches.

## Targets

The ChartboostExample project includes two targets:

  • ChartboostExample: Manual dependency management.

It requires the Chartboost.framework, which is already in the root directory (where this readme is) and linked to the Xcode project. You can download the latest version of the Chartboost SDK here.

  • ChartboostExample-Pods: CocoaPods dependency management.

Just go into the project directory and run pod install.

About

iOS Chartboost SDK example app

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 6