📱AdSter iOS-SDK Documentation
Overview
The AdSter iOS-SDK provides integration for multiple ad types, including Banner, Interstitial, Rewarded, RewardedInterstitial and Native Ads. To use the SDK, you need to configure ad requests, Initialise the SDK, and conform to the necessary protocols to handle ad events such as loading, impressions, and clicks.
SDK Initialisation
Before requesting any ads, you need to initialise the SDK. This is a one-time setup step that should be done at the start of your application.
Installation via CocoaPods
To integrate AdSter SDK into your Xcode project using CocoaPods, follow these steps:
Open your project's Podfile and add:
pod 'Adster', '~> 1.2.8'Run the following command in the terminal:
pod installAfter installation, close Xcode and open the .xcworkspace file instead of .xcodeproj.
Installation via SPM
In Xcode, install the AdSter SDK Swift Package by navigating to File > Add Package Dependencies.
In the prompt that appears, search for the below GitHub repository: https://github.com/adster-tech/orchestration-sdk-ios
Select the version of the AdSter SDK Swift Package you want to use. For new projects, we recommend using the Up to Next Major Version.
Initialising the SDK
AdSter.sharedInstance().start(completionHandler: { status in
print("Ad initialized \(status)")
})completionHandler: A callback to confirm whether the initialization was successful.
Ad Request
To request an ad, you need to initialize the AdSterAdLoader and configure it with the required parameters:
let loader = AdSterAdLoader()
loader.delegate = self
loader.loadAd(adRequestConfiguration: AdRequestConfiguration(
placement: key,
viewController: self,
publisherProvidedId: "Test",
customTargetingValues: ["test": "123"]
))Parameters:
placement: Unique key for the ad placement.viewController: ViewController where the ad will be presented.publisherProvidedId: Identifier for the ad unit.customTargetingValues: Optional custom targeting values to personalize the ad request.
Last updated