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).
- Enter the following Url (4):
https://github.com/azerion/BlueStackSDK
- Add the package (5).
- This will show a list of BlueStack mediation adapters
- Select the mediation adapters that need to be included and add it to the target
- Add
-ObjC
linker flag to theOther Linker Flags
build settings of your project target.
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.
- Objective C
- Swift
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[[BlueStack sharedInstance] initializeWithAppID: @"YOUR_APP_ID_HERE" completion:^(InitializationStatus * _Nonnull initializationStatus) {
}];
return YES;
}
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
BlueStack.sharedInstance().initialize(appID: "YOUR_APP_ID_HERE") { initializationStatus in
}
return true
}