The Nexverse SDK provides a powerful and flexible solution for monetizing your iOS application through various ad formats. This guide walks you through the integration process and demonstrates how to implement each ad type effectively.

Prerequisites to Integrate the SDK

Before integrating the SDK, ensure that following requirements are met:

  • Minimum iOS Version: 12.0
  • Minimum Swift Version: 5
  • Minimum Xcode Version: 16.4
  • Account ID: It is a mandatory parameter to initialise the Nexverse SDK. You can obtain the accountId from Nexverse dashboard
  • Config ID: A unique identifier based on the ad format and placement in your app. The SDK uses this ID to request and render appropriate ads for each placement. You can obtain the configId from Nexverse dashboard.

Refer to the SSP App Onboarding Guide for the end-to-end workflow to generate these identifiers.

Installation

Initialization

Before using any of the SDK’s features, you must initialize it with your account configuration. This one-time setup should be performed as early as possible in your app’s lifecycle, ideally right after launch.

Here’s how to initialize the SDK in your AppDelegate:

Additional Configuration

Subject to GDPR

Based on user’s region and CMP (Consent Management Platform), GDPR (General Data Protection Regulation) properties need to be set. It should be set while initialising the SDK or before requesting for any ad.

Subject to COPPA

Based on user’s region and age, COPPA (Children’s Online Privacy Protection Act) property needs to be set. It should be set while initialising the SDK or before requesting for any ad.

Location Permission

It is recommended to include location permission in your app to improve ad targeting and provide a better advertising experience. If your app is not requesting for location permission already then it is recommended to use the method provided by Nexverse SDK to request the permission.

First add the below mandatory key value pair in your Info.plist. Update the value to a proper reason why your app needs location permission. Example: Your app name will use the device location to serve better and targeted ads.

  <key>NSLocationWhenInUseUsageDescription</key>
<string>A simple text that describes why your app needs the location</string>
  

Once your Info.plist is updated with necessary details, invoke the method to request location permission from appropriate place in your app.

Once user allows the access to location services, SDK will start using it automatically to serve better and targeted ads. You can change this preference by setting below flag to appropriate value. Set to true if SDK should be allowed the access to location, otherwise set to false.


Ad Types

Nexverse provides all standard ad formats supported by market leaders. Each format is designed to maximize revenue while maintaining a great user experience.

  1. Banner,
  2. Interstitial,
  3. Rewarded,
  4. Native

Banner ads are a reliable way to monetize your app with minimal impact on user experience. The BannerView class handles the loading and display of banner ads, supporting various formats including image, video, and HTML (Rich Media).

The following table lists the standard banner sizes.

Size in dp (WxH) Description Availability Supported Type
300x50 Banner Phones and tablets Banner
320x50 Banner Phones and tablets Banner
320x100 Large banner. Phones and tablets Banner
300x250 IAB medium rectangle Phones and tablets Banner, Video
468x60 IAB full-size banner Tablets Banner
728x90 IAB leaderboard Tablets Banner

Create and Load

Here’s how to implement a banner ad:

Video Playback

For enhanced customisations, BannerView class provides methods to control playback and sound.

Delegate Events

Implement these delegate methods to handle banner ad events:


Interstitial Ads

Interstitial ads are full-screen advertisements that provide high-impact experiences at natural transition points in your app. The SDK supports both display and video formats through the InterstitialRenderingAdUnit class.

Create and Load

Here’s how to implement an interstitial ad:

Delegate Events

Handle interstitial ad events through these delegate methods:


Rewarded Ads

Rewarded ads offer users in-app rewards for watching video advertisements. This format typically shows high engagement rates and provides a positive user experience through value exchange.

Create and Load

Here’s how to implement rewarded ads:

Delegate Events

Handle rewarded ad events through these delegate methods:


Native Ads

Native ads offer the most customizable ad experience, allowing you to match your app’s look and feel perfectly. The SDK provides various classes to load and display native ads that integrate seamlessly with your UI.

Request Native Ad and Assets

Here’s a comprehensive implementation of native ads:

Delegate Events

Implement these methods to handle native ad events: