All iOS 14+ information is available on this page.
Starting with Chartboost iOS SDK version 8.3.1, iOS 10 is the minimum supported iOS version. Only earlier versions of the Chartboost iOS SDK retain support for older iOS versions.
Macs on M1: Publishers that use older SDK versions, or 8.5.0.2 without CocoaPods, won’t be able to run their apps on iOS simulator running on M1 Macs. To fix this they just need to go to their Xcode project “Build Settings” and add “Any iOS Simulator SDK” with value “arm64” inside “Excluded Architectures”.
Xcode 13.1 is the minimum requirement for publishers when integrating Chartboost Ads SDK 9.0 and above.
- Before you begin
- Linking frameworks
- Adding -ObjC value
- Add a new dictionary with Chartboost’s SKAdNetworkIdentifier
- Import the Chartboost SDK
- Initializing Chartboost
- Adding your app ID and app signature
- Showing a static or video interstitial ad
- Showing a rewarded video ad
- Showing a banner ad
- Testing your integration
- Checking the SDK icon in the dashboard
- More SDK features
![]() |
Before you begin: |
The Chartboost SDK runs only on devices with iOS version 10.0 or higher, iPhone 5 or later, iPod 6th generation or later, and iPad 4th generation or later.
- Have you signed up for a Chartboost account?
- Did you add an app to your dashboard?
- Did you download the latest SDK?
- Did you download Chartboost Sample App.
- Apps must be compiled with iOS base SDK higher than v10.0.
- As of June 1, 2016, Apple requires that all submitted apps support IPv6.
startWithAppId
must always be called during hard and soft bootups within the first few seconds of your app launching, regardless of any other actions or user interaction within your app.Publishers should call the
addDataUseConsent
API from the Chartboost SDK and pass in the appropriate consent value for GDPR and CCPA. Publishers are required as part of Terms of Service to obtain the consent from their users before Chartboost will process any personal data and pass it to the Chartboost SDK via the above method. This method should be called before startWithAppId
if possible.![]() |
Import the Chartboost framework
|
Option 1: CocoaPods
The easiest way to download and link the Chartboost SDK to your project is to use CocoaPods. You just need to open your project’s Podfile and add this line:pod 'ChartboostSDK'
pod install --repo-update
Option 2: Manual import
Download and drop ChartboostSDK.xcframework into your Xcode project. Mark it as Do Not Embed. If your project is pure Objective-C, you can add a Swift file or add the following settings to import the swift libraries.- Add Build Settings > Search Paths > Library search paths $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) $(SDKROOT)/usr/lib/swift
- Add Build Settings > Linking > Runpath search paths /usr/lib/swift
![]() |
Add value
|
![]() |
Add a new dictionary with Chartboost’s SKAdNetworkIdentifier |
This is a new required step for iOS 14 integrations.
Add a new dictionary with Chartboost’s SKAdNetworkIdentifier value
f38h382jlk.skadnetwork
as well as additional identifiers of other Chartboost Demand Partners to the SKAdNetworkItems
array in your Info.plist.PRO TIP: We recommend enabling warning level logs in order to have our most up-to-date SKAdNetwork ID list.
See our iOS 14 Preparation page to learn more.
![]() |
Import the Chartboost SDK |
![]() |
Initialize Chartboost in your
|
startWithAppId
must always be called during hard and soft bootups within the first few seconds of your app launching, regardless of any other actions or user interaction within your app.Publishers should call the
addDataUseConsent
API from the Chartboost SDK and pass in the appropriate value for whether consent exists, does not exist, or is unknown. Publishers are required as part of Terms of Service to obtain the consent from their users before Chartboost will process any personal data and pass it to the Chartboost SDK via the above method. This method should be called before startWithAppId
if possible.![]() |
Add your app ID and app signature. |
- Replace
YOUR_CHARTBOOST_APP_ID
andYOUR_CHARTBOOST_APP_SIGNATURE
with your app ID and app signature. - Where can I find my app ID and app signature?
Chartboost App ID is a unique App identifier in our systems, therefore it is required to use a different Chartboost App ID per each app.
![]() |
To show a static or video interstitial ad: |
Interstitial ads need to be cached before being displayed. Use the method
[interstitial cache];
to cache an interstitial ad.Once the interstitial ad is cached you can display it using the method
[interstitial showFromViewController:self];
.- If an interstitial is tried to be shown but it is not cached yet, the operation will fail and the delegate method
didShow:error:
will be called with aCHBShowErrorCodeNoCachedAd
error. - You can handle this error there or preemptively check the isCached property before showing the ad. This property indicates if an ad is ready to be shown.
-
Example:
To make the interstitial ad show, first create it (detailed here) then call the ad method.
Learn more about iOS Chartboost delegate methods here.
![]() |
To show a rewarded video ad: |
Rewarded ads need to be cached before being displayed. Use the method
[rewarded cache];
to cache a rewarded ad.Once the rewarded ad is cached you can display it using the method
[rewarded showFromViewController:self];
.- If a rewarded ad is tried to be shown but it is not cached yet, the operation will fail and the delegate method
didShow:error:
will be called with aCHBShowErrorCodeNoCachedAd
error. - You can handle this error there or preemptively check the isCached property before showing the ad. This property indicates if an ad is ready to be shown.
-
Example:
To make the rewarded ad show, first create it (detailed here) then call the ad method.
Learn more about iOS Chartboost delegate methods here.
![]() |
To show a banner ad: |
[banner cache];
to cache a banner ad.
[banner showFromViewController:self];
is the Chartboost delegate method to show banner ads.- Learn more about Chartboost banner ads.
To make the banner ad show, first create it (detailed here), and then call the ad method.
![]() |
Test your integration. |
- Build and run your project from Xcode on a device or Simulator.
- Use Test Mode to see if test ads show up.
- Why can’t I see ads in my game?
![]() |
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.

w00t! You just integrated the Chartboost SDK into your app!
Now you can start a campaign ▶
Check out more Chartboost SDK features
- Chartboost Video: Add beautiful, high-quality video ads to give players the best in-game experience.
- Named locations: Fine-tune your campaign targeting and ad frequency from the dashboard.
- Delegate methods: Gain more control over how your game behaves around ads.
- SDK configuration methods: Access Chartboost SDK functionality and settings.
- Mediation: Show your ads along a waterfall of other top-quality networks.
You might also like…
- Error codes: Common problems and their solutions when integrating the SDK for iOS.
▲ Back to top
Last Updated on August 11, 2022