iOS (UIKit)

This document explains how to install and activate the VIS.X® SDK in your native iOS app using UIKit. If you are using React Native for your app, make sure to check out our React Native module. Please also ensure to check out our Getting Started guide first, to familiarize yourself with the features and formats and start the integration process afterward.

After the installation is done, you may continue with Banner and/or Interstitial integration to display ads and complete the integration process.

  1. Steps for adding the SDK to your project
  2. App Transport Security
  3. Initializing the SDK with backend configuration
  4. Understanding Remote Configuration
Steps for adding the SDK to your project

The VIS.X® SDK for iOS can be installed via CocoaPods.

To use it in your project simply add the VisxSDK pod to your targets.

target 'MyApp' do
  pod 'VisxSDK'
end

Next, open a terminal window, navigate to the project folder and run the following command:

$ pod install --repo-update

In case you want to install the SDK manually, you can download the latest XCFramework from our github repository here. The latest release of the VIS.X® SDK is “4.1.3”.

App Transport Security

Introduced in IOS9, ATS (App Transport Security) will block every non-HTTPS connection in iOS applications by default to enforce secure connections.

While the majority of the ad industry has moved to full HTTPS support, there might be some media that is still hosted on non-secured servers. If you want to prevent these ads from being blocked by ATS, you can configure exceptions in your Info.plist.:

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
    <key>NSAllowsArbitraryLoadsForMedia</key>
    <true/>
    <key>NSAllowsArbitraryLoadsInWebContent</key>
    <true/>
</dict>
Initializing the SDK with backend configuration

The VisxSDKManager is a singleton class used for the initial SDK configuration and receiving configurational information from the YOC backend. While not mandatory, it’s highly recommended to set it up before performing any ad call. The initialization should be done in the AppDelegate class.

The required configuration id will be provided during the technical onboarding by our service team.

class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        let visxSdkManager = VisxSDKManager.sharedInstance()
        visxSdkManager.initializeSDK()
        visxSdkManager.setRemoteConfigSiteId(with: "yourConfigId")
    }
Understanding Remote Configuration

Remote Configuration was introduced by YOC to provide publishers with additional convenience in setting up, commissioning and maintaining the SDK in the published app without requiring another release for every change.

The YOC Service Team can also use Remote Configuration to create and provide additional diagnostic data to publishers when needed, as well as temporarily or permanently disable features for specific user groups.

The processing of personal data is in all cases carried out under the European General Data Protection Regulation and exclusively based on the user’s explicit consent via the TCF 2.0 framework.