Getting started on iOS

This page explains how to install the Equativ Display SDK into an iOS application. This is the first step to complete before delivering ads in your application.

Table of contents

  1. Prerequisites
  2. App Tracking Transparency & IDFA
  3. App Privacy details
  4. App Transport Security
  5. Installation
    1. Installation with Cocoapods
    2. Installation with Swift Package Manager
  6. Location

Prerequisites

There are some prerequisites prior to integrating the Equativ Display SDK in your application

  • You must use Xcode 15.0 or higher.
  • Your app must target iOS 13.0 or higher.

App Tracking Transparency & IDFA

Starting with iOS 14, your application will have to ask for consent before tracking the user. This request for consent can be made through the use of the App Tracking Transparency framework.

The Equativ Display SDK makes use of the device IDFA during ad calls and will retrieve it automatically if your app have requested tracking consent (and if the user has accepted).

To keep access to the IDFA on iOS 14 devices, you must implement the App Tracking Transparency framework in your app. You can find more information about this integration in our samples or in Apple’s official documentation.

Note that requesting user consent using the App Tracking Transparency framework does not guarantee that your app is compliant with local privacy laws (including GDPR, CCPA, …).

Check the relevant documentation page for more info.

App Privacy details

Apple now requires you to disclose user data that your app is collecting, and the purpose of this collection. You will need to provide these information when submitting a new app or and app update starting December 8th, 2020.

Since the Equativ Display SDK collects some user data, you MUST declare in addition to the data collected by your app!

You can find more information about the data collected by the Equativ Display SDK and how to answer Apple’s questions on dedicated page:

App Privacy details configuration

The data collected and processed can change from a SDK release to another, remember to check this page every time your update the Equativ Display SDK.

App Transport Security

App Transport Security (ATS) is a feature to protect user’s privacy introduced in iOS 9. ATS will block every non HTTPS connections. It is enabled by default for iOS applications and enforces secure connections.

Eventhough the ad industry tends to move toward full HTTPS support, it happens that some medias are not hosted on secured servers. To prevent your ads from being blocked by ATS you should configure exceptions in your app’s Info.plist file.

Under App Transport Security Settings of your Info.plist, make sure you enable the exceptions for:

  • Allow Arbitrary Loads
  • Allow Arbitrary Loads for Media
  • Allow Arbitrary Loads in Web Content

Your Info.plist should contains these keys:

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
    <key>NSAllowsArbitraryLoadsForMedia</key>
    <true/>
    <key>NSAllowsArbitraryLoadsInWebContent</key>
    <true/>
</dict>

Installation

There is two official ways to install the Equativ Display SDK in your application’s project:

Installation with Cocoapods

CocoaPods is a dependency manager for Xcode projects. You can read Cocoapods official documentation for information on how to setup Podfiles.

  1. In your project’s Podfile add the following line to your app’s target:

    pod 'Equativ-Display-SDK', '~> 8.0'

  2. Open a terminal window and cd to your project’s directory. Then run the command:

    $ pod install --repo-update

    This will install all the dependencies and frameworks required for the Equativ Display SDK to work.

  3. You can now proceed with the integration of your ads directly within your project’s workspace by following our integration guides.

Installation with Swift Package Manager

Swift Package Manager is a dependency manager included by default into Xcode. It can be used to integrate third-party libraries from a Git repository.

  1. Choose File > Add Packages in Xcode menu bar to open the Swift Package Manager window.
  2. In the Swift Package Manager window, enter the following URL: https://github.com/smartadserver/swift-package-manager-display-sdk.git.
  3. Choose the SDK version you want to use.
    We recommend Range of versions: 8.0.0 < 9.0.0 as Dependency rules.
  4. Click on the Add Package button.

You can now proceed with the integration of your ads directly within your project’s workspace by following our integration guides.

Location

For ad targeting purposes, the Equativ Display SDK can automatically send the latest known user location, if already made available to the application (the SDK will never actively try to retrieve user location).

This automatic location retrieval is disabled by default, and you can enable as follows, provided that one of the location permissions is granted to the application, and that the user consent was properly collected for ad targeting purpose regarding his location.

SASConfiguration.shared.automaticLocationDetectionAllowed = true

Back to top

Copyright Equativ © 2024. All right reserved.

Page last modified: Nov 13 2024.