Aller au contenu principal
Version: 5.x.x

Get Started

This documentation will guide you through the steps to integrate and initialize the BlueStack SDK into your application.

Prerequisites

  • Minimum iOS version: 12.2 or later
  • Minimum Xcode version: 13 or later

Configure your app

Using CocoaPods

Open your Podfile and add the BlueStack-SDK dependency.

pod "BlueStack-SDK"

Then run pod install command in your CLI.

pod install --repo-update

This will add the core BlueStack SDK into your application. BlueStack sdk also comes with mediation adapters. You can include them using the following subspecs.

  • Google-Mobile-Ads-SDK
  • Smart-Display-SDK
  • OguryAds
  • In-App-Bidding
pod "BlueStack-SDK",:subspecs => ["Google-Mobile-Ads-SDK","Smart-Display-SDK"]

Open .xcworkspace file using your Xcode.

Using Swift Package Manager

Follow the steps below to integrate BlueStack SDK using SPM:

  • Select the project (1).

  • Select Package Dependencies and click on + button (2) and (3).

SPM

  • Enter the following Url (4):
  https://github.com/azerion/BlueStackSDK
  • Add the package (5).

SPM

  • This will show a list of BlueStack mediation adapters

BlueStackSDK mediation adapter listBlueStackSDK mediation adapter list

  • Select the mediation adapters that need to be included and add it to the target

BlueStackSDK mediation adapter listBlueStackSDK mediation adapter list

  • Add -ObjC linker flag to the Other Linker Flags build settings of your project target.

SPM

Initialize the BlueStack SDK

Initialize the BlueStack SDK using BlueStack.sharedInstance with the appID at the earliest of your application's lifecycle. The initialization should be done before loading any ads. We recommend to do the initialization on your application did finish launching.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[[BlueStack sharedInstance] initializeWithAppID: @"YOUR_APP_ID_HERE" completion:^(InitializationStatus * _Nonnull initializationStatus) {

}];
return YES;
}