Getting Started
This guide covers the integration of Boldwin SDK for iOS applications.
Demo Application: For a complete working example, check out our iOS Demo Apps.
Requirements
- iOS 12.0 or higher
- Xcode 16.0 or later
- Swift 5.5 or later
- Swift Package Manager or CocoaPods
Installation
Swift Package Manager
- In Xcode, select File > Add Package Dependencies.
-
Enter the repository URL:
-
Select the version.
- Add
Boldwinto your target.
CocoaPods
To integrate the Boldwin SDK through CocoaPods:
-
Open your project's Podfile and add this line to your app's target build configuration:
-
In a terminal, run the following command:
Direct Download
Download the Boldwin SDK using the link below and embed it into your project:
Basic Setup
1. Update Info.plist
Add the following keys to your Info.plist:
<key>SKAdNetworkItems</key>
<array>
<!-- Boldwin's SKAdNetwork IDs -->
<dict>
<key>SKAdNetworkIdentifier</key>
<string>boldwin-network-id.skadnetwork</string>
</dict>
</array>
2. Initialize the SDK
Initialize the Boldwin SDK in your AppDelegate:
import UIKit
import Boldwin
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
// Initialize Boldwin SDK
BoldwinSDK.initialize(publisherID: "<YOUR_PUBLISHER_ID>")
return true
}
}
The SDK provides options for configuring advanced settings. It also supports defining custom targeting parameters to help maximize revenue. In addition, the SDK integrates with consent management providers in compliance with industry standards.
3. Request App Tracking Transparency (iOS 14.5+)
Starting with iOS 14.5, Apple requires apps to explicitly ask users for permission before tracking their activity across other companies’ apps and websites for advertising or data-sharing purposes. Consequently, the Identifier for Advertisers (IDFA) cannot be accessed unless the user provides explicit consent.
import AppTrackingTransparency
import AdSupport
func requestTrackingAuthorization() {
if #available(iOS 14.5, *) {
ATTrackingManager.requestTrackingAuthorization { status in
switch status {
case .authorized:
print("Tracking authorized")
case .denied:
print("Tracking denied")
case .notDetermined:
print("Tracking not determined")
case .restricted:
print("Tracking restricted")
@unknown default:
break
}
}
}
}
4. Implement Ad Format
To use Boldwin as a standalone ad SDK, see:
To use Boldwin through a mediation platform, see: