Documentation

​
​

Development

User Acquisition

Monetization

Industry

LevelPlay SDK - iOS

Unity SDK

Android SDK

iOS SDK

Adobe AIR SDK

Flutter SDK

React Native SDK

LevelPlay SDK - iOS

Unity LevelPlay
​
​
iOS SDK
  • Get started
    • Get started with iOS
    • iOS SDK integration
      • Migrate to LevelPlay Init API
    • LevelPlay SDK integration with Swift
    • Integrate Ad Quality SDK
    • Custom adapters
    • LevelPlay SDK Changelog
    • Ad Quality SDK Changelog
  • Regulations and settings
  • Ad formats
  • Mediated networks
  • Test your integration
  1. Grow your game
  2. Unity LevelPlay
  3. LevelPlay SDK
  4. LevelPlay SDK for iOS developers

iOS SDK integration

Integrate the LevelPlay SDK into your iOS app by using CocoaPods or manual methods, and initialize it with your app key.
Read time 9 minutes
Last updated 2 months ago

The LevelPlay SDK supports CocoaPods, Swift Package Manager, and manual download mechanisms to integrate the SDK.

Prerequisites

iOS version support is defined per network. LevelPlay ads and LevelPlay mediation support iOS versions 12+, and Xcode versions 15.4+.
To be compatible with iOS 14, LevelPlay released SDK 7+ with support for SKAdNetwork attribution.

Add the SDK to your project

CocoaPods

CocoaPods is a dependency manager for Objective-C and Swift; it automates and simplifies the SDK integration process. For more information, refer to the CocoaPods documentation on Getting Started and Using CocoaPods.
To integrate the LevelPlay SDK with CocoaPods, enter the following line in your Podfile:
pod 'IronSourceSDK','9.5.0.0'
If you are not using Swift in your project, go to Project > Build Settings > Linking > Runpath Search Paths and add the following code:
// needs to be first on the list /usr/lib/swift
Note
Starting with version 8.9.0, Ad Quality is integrated into the LevelPlay SDK and is automatically initialized when LevelPlay is implemented. For more information, refer to Ad Quality overview.

Swift Package Manager

Note
To use Swift Package Manager, you must have the minimum supported LevelPlay SDK version 9.3.0 and the corresponding adapter version defined in the Minimum adapter and network SDK versions section.
To add a package dependency to your project, complete the following steps:
  1. In Xcode, go to File > Add Package Dependencies.
  2. In the prompt that displays, search for the following package URL:
    https://github.com/ironsource-mobile/LevelPlay-Swift-Package
  3. In the Dependency Rule, select Branch.
  4. In the text field, enter
    main
    .

Add mediation network adapter packages

Each mediation network has its own adapter Swift package, hosted in the ironSource Mobile GitHub organization. Adapter repositories use the naming format
LevelPlay-<Network>-Adapter-Swift-Package
. For example, the Unity Ads adapter is in the
LevelPlay-UnityAds-Adapter-Swift-Package
repository, and the AdMob adapter is in the
LevelPlay-AdMob-Adapter-Swift-Package
repository.
To add a mediation network adapter package to your project, complete the following steps:
  1. In the ironSource Mobile GitHub organization, find the adapter repository for the network you want to add.
  2. Copy the repository URL.
  3. In Xcode, go to File > Add Package Dependencies.
  4. In the prompt that displays, enter the adapter repository URL.
  5. In the Dependency Rule, select Exact Version.
  6. Enter a tagged adapter version that is compatible with the LevelPlay SDK version in your project.
To choose a compatible version, refer to the Minimum adapter and network SDK versions section and the relevant adapter changelog. Repeat these steps for each mediation network you want to add.

Minimum adapter and network SDK versions

Network name

Minimum adapter version

Minimum network SDK version

Unity Ads
5.8.1
4.16.5
AppLovin
5.7.1
13.6.2
BidMachine
5.7.1
3.6.1
Digital Turbine
5.8.1
8.4.6
Google AdMob
5.10.1
13.2.0
HyprMX
5.3.1
6.4.6
LY Ad Network
5.4.1
3.0.1
Meta
5.3.1
6.21.1
Mintegral
5.18.1
8.1.0
MobileFuse
5.2.0
1.11.0
MyTarget
5.11.1
5.41.0
Ogury
5.5.1
5.2.1
Pangle
5.28.1
7.9.1.1
Voodoo
5.2.1
3.15.1
Vungle
5.10.1
7.7.4
Yandex
5.9.1
8.1.0

Manual download

To manually add the LevelPlay SDK to your project, complete the following steps:
  1. Download iOS SDK version 9.5.0.
  2. Unzip the SDK and add
    IronSource.framework
    to your Xcode project.
  3. Add the following linker flag to the build settings at: Target > Build Settings > Linking > Other Linker Flags: -ObjC
  4. Import libraries - "z","sqlite3.0"
  5. Import frameworks - "JavaScriptCore","WebKit","AdSupport","SystemConfiguration"

LevelPlay mediation demo app

The Integration demo application demonstrates how to integrate the LevelPlay Mediation in your app.
Download iOS Demo Application

Update the property list file

SKAdNetwork support

To enable the display of ironSource network ads when using SDK 7+, ensure that you include the ironSource ad network ID in your app property list file (Info.plist). 
  1. In the Xcode Project navigator, select Info.plist.
  2. Select Add (+) next to a key in the property list editor and then select Return.
  3. Enter the key name SKAdNetworkItems.
  4. In the Type column, select Array.
  5. Create a dictionary item, and then create a single string item.
  6. Enter the key name SKAdNetworkIdentifier and the following key value:
    su67r6k2v3.skadnetwork
You can also add SKAdNetworkIdentifier to your Info.plist file by using this code: 
<key>SKAdNetworkItems</key><array> <dict> <key>SKAdNetworkIdentifier</key> <string>su67r6k2v3.skadnetwork</string> </dict></array>
For more information on editing the property list, refer to the Xcode documentation.

Universal SKAN reporting

To receive copies of winning install-validation postbacks from all of the demand sources for your advertised app, add the NSAdvertisingAttributionReportEndpoint key in your app’s Info.plist file.
  1. In the Xcode Project navigator, select Info.plist.
  2. Select Add (+) next to a key in the property list editor and then select Return.
  3. Enter the key name NSAdvertisingAttributionReportEndpoint.
  4. In the Type column, select String.
  5. Enter the following URL: 
    https://postbacks-is.com/
    .
For more information about Universal SKAN reporting, refer to Add SKAdNetwork IDs manually.

App transport security settings

To ensure uninterrupted support for LevelPlay ad delivery across all mediation networks, make the following changes in your Info.plist file:
  • Add the dictionary
    NSAppTransportSecurity
    by selecting the plus symbol. Ensure that you add this dictionary to the Top Level Key.
    • Inside this dictionary, add a Boolean called
      NSAllowsArbitraryLoads
      and set it to
      YES
      by selecting the tab.
  • Ensure that your Info.plist file does not contain any other exceptions aside from
    NSAllowsArbitraryLoads
    because this might create a conflict.
  • For more information about App transport security, refer to the Apple documentation.

Initialize the LevelPlay SDK

Import the necessary files

#import "IronSource/IronSource.h"

Init the SDK

To initialize the LevelPlay SDK, complete the following steps:
  1. Define the completion handler success and failure.
  2. Call the LevelPlay init API by using the appKey and user ID, if relevant.
Add the user ID as part of the initialization request builder if you’re using server-to-server callbacks (to reward your users) or using the Ad Quality user journey.
// Create a request builder with app key and ad formats. Add User ID if availableLPMInitRequestBuilder *requestBuilder = [[LPMInitRequestBuilder alloc] initWithAppKey:@"appKey"];[requestBuilder withUserId:@"UserId"];// Build the initial requestLPMInitRequest *initRequest = [requestBuilder build];// Initialize LevelPlay with the prepared request[LevelPlay initWithRequest:initRequest completion:^(LPMConfiguration *_Nullable config, NSError *_Nullable error){ if(error) { // There was an error on initialization. Take necessary actions or retry } else { // Initialization was successful. You can now create ad objects and load ads or perform other tasks }}];
// Create a request builder with app key and ad formats. Add User ID if availablelet requestBuilder = LPMInitRequestBuilder(appKey: "appKey") .withUserId("UserId")// Build the initial requestlet initRequest = requestBuilder.build()// Initialize LevelPlay with the prepared request LevelPlay.initWith(initRequest) { config, error inif let error = error { // There was an error on initialization. Take necessary actions or retry} else { // Initialization was successful. You can now create ad objects and load ads or perform other tasks}}

Initialization result

  • Success: Triggered when the initialization is completed successfully. After you receive this indication, you can create and load the ad.
  • Error: The configuration was not retrieved successfully and ads cannot be loaded. The recommended best practice is to try and initialize the LevelPlay SDK later when an internet connection is available or when the failure reason is resolved.

Verify your integration

Use the LevelPlay integration test suite to test your app’s integration, verify platform setup, and review ads related to your configured networks. 
To enable the test suite in your app, call the setMetaData API before setting the init:
[LevelPlay setMetaDataWithKey:@"is_test_suite" value:@"enable"];
LevelPlay.setMetaDataWithKey("is_test_suite", value: "enable")
After mediation init is complete, launch the test suite by calling the following method:
[LevelPlay launchTestSuite:self];
LevelPlay.launchTestSuite(self)

Next steps

  1. Refer to the following integration guides to implement ad formats:
    • Rewarded Video
    • Interstitial
    • Banner
    • Native Ads
  2. Integrate Rewarded Video, Interstitial or Banner Ads in your app. Refer to Mediation networks for iOS.

Copyright © 2026 Unity Technologies
LegalPrivacy PolicyCookiesDocumentation Terms of UseDo Not Sell or Share My Personal InformationYour Privacy Choices (Cookie Settings)

"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S and elsewhere (more info here). Other names or brands are trademarks of their respective owners.

Some pages are machine-translated for convenience, and may contain inaccuracies. In the event of conflicting information, the English version is authoritative.

  • On this page
    • Prerequisites

    • Add the SDK to your project

      • CocoaPods

      • Swift Package Manager

        • Add mediation network adapter packages

        • Minimum adapter and network SDK versions

      • Manual download

      • LevelPlay mediation demo app

    • Update the property list file

      • SKAdNetwork support

      • Universal SKAN reporting

      • App transport security settings

    • Initialize the LevelPlay SDK

      • Import the necessary files

      • Init the SDK

      • Initialization result

    • Verify your integration

    • Next steps


Report a problem with this page