ChartboostSDK 9.8.0

ChartboostSDK 9.8.0

TestsTested
LangLanguage Obj-CObjective C
License Commercial
ReleasedLast Release Oct 2024

Maintained by Gonzalo Alsina, Geoff Heeren, Arnau Marti, Jose Padilla, Daniel Barros, Javier Serrano, Helium Service, Ivan Bella.



  • By
  • Chartboost

Chartboost for iOS

Version 7.0.2

The Chartboost iOS SDK is the cornerstone of the Chartboost network. It
provides the functionality for showing interstitials, More-Apps pages, and
tracking in-app purchase revenue.

Usage

  1. Before you begin:
  1. Drop Chartboost.framework into your Xcode project.

PRO TIP: Checkmark the Copy items if needed option. This creates a local copy of the framework for your project, which keeps your project organized.

  1. Link the StoreKit, Foundation, CoreGraphics, WebKitand UIKit frameworks.

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

  3. 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"
                      delegate:self];
    return YES;
}
**Please note:**

- `startWithAppId:appSignature:delegate:` must always be called during hard and soft bootups, no matter what other actions your app is taking.
- You might receive a warning when passing an object as a delegate into the `startWithAppID:appSignature:delegate:` method. You can usually ignore this warning, but you can also resolve it by ensuring that the object you're passing conforms to the ChartboostDelegate protocol.
  1. Add your app ID and app signature.

  2. To show a static or video interstitial ad:

    • [Chartboost showInterstitial:CBLocationHomeScreen]; shows the interstitial at location HomeScreen. See Chartboost.h for available location options.
    • For customized control over how ads behave in your game, the Chartboost SDK also offers more features such as caching, delegate methods, and named locations.
    • [Learn more about Chartboost video ads.] (https://answers.chartboost.com/hc/en-us/articles/201220275)
    • Important: Chartboost calls should always be made from a main – not background – thread, or these calls may time out!
  3. To show a rewarded video ad:

    • [Chartboost showRewardedVideo:CBLocationMainMenu]; shows the rewarded video pre-roll message and video ad at location MainMenu. See Chartboost.h for available location options.
    • For customized control over how ads behave in your game, the Chartboost SDK also offers more features such as caching, delegate methods, and named locations.
    • Learn more about Chartboost video ads.
    • Important: Chartboost calls should always be made from a main – not background – thread, or these calls may time out!
  4. Test your integration.

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

Dive deeper

For more common use cases, visit our online documentation.

Check out our header file Chartboost.h for the full API specification.

If you encounter any issues, do not hesitate to contact our happy support team at [email protected].