# iOS > Getting started

Source: https://help-display-sdk.equativ.com/ios/gettingstarted.html

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.

---

## 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](https://github.com/smartadserver/equativ-display-sdk-samples-ios) or in [Apple's official documentation](https://developer.apple.com/documentation/apptrackingtransparency).

> 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](https://help-display-sdk.equativ.com/privacy.html.md).

## 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](https://help-display-sdk.equativ.com/ios/appprivacydetails.html.md)

> 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)](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW33) 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:

``` xml
<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:

* [Swift Package Manager](https://www.swift.org/package-manager/)
* [Cocoapods](https://cocoapods.org)

### 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](https://help-display-sdk.equativ.com/ios/integration.html.md).

### Installation with Cocoapods

_CocoaPods_ is a dependency manager for _Xcode_ projects. You can read [_Cocoapods_ official documentation](https://guides.cocoapods.org/using/using-cocoapods) 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](https://help-display-sdk.equativ.com/ios/integration.html.md).

> _Cocoapods_ is deprecated and is going to be [only available as a read-only repository soon](https://blog.cocoapods.org/CocoaPods-Specs-Repo/).
>
> The **Equativ Display SDK** will be updated on _Cocoapods_ as long as possible, but **we advise you to switch to _Swift Package Manager_ as fast as possible** to continue receiving the latest version of the SDK in the future.

## 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.

``` swift
SASConfiguration.shared.automaticLocationDetectionAllowed = true
```

## Digital Service Act (DSA) integration

The **Digital Services Act (DSA)** is a European Union regulation that entered into force on February 17th, 2024. It applies to any intermediary services and platforms offered to a European Economic Area (EEA) audience,
which means that companies established outside of the EEA may also be subject to this regulation.

For more information about the Digital Service Act, please check this [dedicated article · ](https://help.smartadserver.com/s/article/Digital-Services-Act-DSA).

You can set up your **DSA** configuration by using the _SASConfiguration_ singleton, like in the example below:

``` swift
SASConfiguration.shared.digitalServiceActConfig = SASDigitalServiceActConfig(dsaRequired: .required,
                                                                             dataToPub: .optionalToSendTransparencyData,
                                                                             transparency: [SASDigitalServiceActConfigTransparency(domain: "https://yourdomain.com", dsaParams: [1, 2])])
```

For more information about the meaning of each parameters, please check the [official IAB specs · ](https://github.com/InteractiveAdvertisingBureau/openrtb/blob/main/extensions/community_extensions/dsa_transparency.md).
