iOS SDK - Installation
Requirements: iOS 13+ · Swift 5 · Xcode 26.3+
1. Add the SDK
The MDN11 framework is distributed via private Swift Package Manager packages or private CocoaPods. Use one of the two.
Info
Repository access is granted via a shared Personal Access Token (PAT). Aurion11 will provide you with a PAT with access to private SPM packages and private CocoaPods.
1.1 Swift Package Manager
Before adding the packages, store the PAT provided by Aurion11 for api.github.com in the macOS Keychain. Run this command once:
The command waits for input. Type the following, replacing <GITHUB_USERNAME> and <GITHUB_TOKEN>, and press Enter twice at the end:
Then add the adapter packages in step 2.1, which include the MDN11 SDK, and authenticate in the Xcode authentication dialog.
1.2 CocoaPods
CocoaPods needs the PAT provided by Aurion11 in two places. Replace <YOUR_PAT> in both commands and run them once:
# Store the specs repo credentials in macOS Keychain, used by pod install
git ls-remote https://a11-gh-dist:<YOUR_PAT>@github.com/Aurion11/dist-cocoapods-specs.git HEAD
# Set the token used to download the binary frameworks (use ~/.bash_profile for bash)
echo 'export A11_GITHUB_TOKEN=<YOUR_PAT>' >> ~/.zshrc
source ~/.zshrc
Add the CocoaPods trunk and the Aurion11 podspecs repository as sources in your Podfile, then add the MDN11 pod:
source 'https://cdn.cocoapods.org/'
source 'https://github.com/Aurion11/dist-cocoapods-specs'
pod 'A11Mediation', '= 3.2.9'
2. Declare ad network adapters
Declare an adapter for each mediation platform or ad network active on your MDN11 account. Aurion11 confirms which ones those are during integration. Use the same method you used to add the SDK.
2.1 Swift Package Manager
Add the adapter package for each network:
AdMob and Google Ad Manager use the same adapter. If you use both, add it once.
2.2 CocoaPods
Add the adapter pod for each network to your Podfile:
AdMob and Google Ad Manager use the same adapter. If you use both, add it once.
Then install the pods:
3. Set privacy signals
Set any privacy signals that may apply to your app before you initialize the SDK, so ad networks get the user's privacy status from the first ad request. If you use a consent management platform (CMP), we recommend waiting until it has established the user's consent status. See Privacy signals.
4. Initialize the SDK
Initialize the SDK as early as possible in your app's lifecycle, so it can fetch its configuration and start pre-caching ads, so they're ready by your first ad request. You need an app key and host URL from Aurion11.
If you request App Tracking Transparency (ATT) authorization, initialize MDN11 from the ATT completion handler so the SDK starts after the user responds. See Privacy signals.
Recommended
Don't initialize a mediated network's SDK outside MDN11. Most SDKs can only be initialized once and use the config of whichever caller is first, so MDN11 may not be able to apply its own config.
Caution
Set privacy signals before initializing MDN11 SDK. See Privacy signals.
import A11Mediation
func initializeA11() {
// Initialize - call once
A11.shared.initialize(appKey: "YOUR_APP_KEY", hostURLs: ["https://your-host-url.com"])
}