Get the latest SDK here.
Key Update Steps
- Delete the Chartboost folder (any/all of the following files) from your project:
- CBMoreAppsButton.h
- CBNewsfeed.h
- CBNewsfeedUI
- CBPostInstallAnalyticsTracker.h
- CBStory.h
- Chartboost.h
- libChartboost.a
- Drag and drop the Chartboost Framework into your project
import "Chartboost.h"
will become#import "Chartboost/Chartboost.h"
NOTE: All chartboost files are now nested inside a Chartboost framework, so now when importing any header files, each file will be prepended with “Chartboost/”- All references to
[Chartboost sharedChartboost]
are now changed toChartboost
: [[Chartboost sharedChartboost] showInterstitial:CBLocationHomeScreen];
is now[Chartboost showInterstitial:CBLocationHomeScreen];
- The method
hasCachedInterstitial
has been renamed tohasInterstitial
: [[Chartboost sharedChartboost] hasCachedInterstitial:@”Home Screen”];
is now[Chartboost hasInterstitial:CBLocationHomeScreen];
- The following delegate methods are no longer used by the SDK:
ShouldRequestInterstitialsInFirstSession
ShouldDisplayLoadingViewForMoreApps
ShouldPrefetchVideoContent
ShouldPauseClickForConfirmation
[Chartboost setShouldRequestInterstitialsInFirstSession:YES];
[Chartboost setShouldDisplayLoadingViewForMoreApps:YES];
[Chartboost setShouldPrefetchVideoContent:YES];
[Chartboost setShouldPauseClickForConfirmation:YES];
Showing/Caching Interstitials
[[Chartboost sharedChartboost] showInterstitial:CBLocationHomeScreen];
is now[Chartboost showInterstitial:CBLocationHomeScreen];
[[Chartboost sharedChartboost] cacheInterstitial:CBLocationHomeScreen];
is now[Chartboost cacheInterstitial:CBLocationHomeScreen];
Showing/Caching MoreApps Pages
[[Chartboost sharedChartboost] showMoreApps:CBLocationHomeScreen];
is now[Chartboost showMoreApps:CBLocationHomeScreen];
[[Chartboost sharedChartboost] cacheMoreApps:CBLocationHomeScreen];
is now[Chartboost cacheMoreApps:CBLocationHomeScreen];
RootView
If you’re setting Chartboost to your rootview to show an interstitial, we’ve made it easier to do so in our 6.x SDK! Now you can simply show an interstitial in the view that you are in, like so:
[Chartboost showInterstitial:{view Controller} location:CBLocationHomeScreen]; //When you don’t need to pass a specific view: [Chartboost showInterstitial:CBLocationHomeScreen];
Upgrading From Old SDKs (pre v4.4)
Old init method:
Chartboost *cb = [Chartboost sharedChartboost]; cb.appId = @"YOUR_CHARTBOOST_APP_ID"; cb.appSignature = @"YOUR_CHARTBOOST_APP_SIGNATURE"; cb.delegate = self; [cb startSession];
New init 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];
(All calls now require a location. CBLocation is a set of recommended location strings.
Last Updated on May 19, 2017