# Installation

> Add the Qartvelo Ads iOS SDK and the optional AdMob adapter with Swift Package Manager or CocoaPods.

Source: https://developers.qartvelo.com/ios/installation

| Module | Contents | Required |
|---|---|---|
| `QartveloAds` | API client, config cache, rendering, event delivery, banner view | Yes |
| `QartveloAdsAdMob` | Fallback adapter for Google Mobile Ads (`Google-Mobile-Ads-SDK` 12.x) | Optional |

## Requirements

- iOS 13 or later, Xcode 16 or later, Swift 5.9
- `QartveloAds` has no third-party dependencies. Only `QartveloAdsAdMob` depends on Google Mobile Ads, as a normal dependency, so you control its exact version.

## Add the package

**Swift Package Manager is the recommended installation method.** Xcode downloads the SDK,
resolves its dependencies and manages version updates automatically.

<Tabs>
<TabItem label="Swift Package Manager">

1. In Xcode, choose **File > Add Package Dependencies**.
2. Paste this repository URL:

```
https://github.com/Qartvelo-com/ads
```

3. Choose **Up to Next Minor Version**, starting from **0.6.1** (`0.6.1..<0.7.0`).
4. Click **Add Package**, select **QartveloAds**, and choose your app target.
5. Also select **QartveloAdsAdMob** if you want the AdMob fallback.

You can now use `import QartveloAds`. For later updates, choose **File > Packages > Update to Latest
Package Versions**. The version rule keeps updates within the 0.6 series.

In a `Package.swift`:

```swift title="Package.swift"
dependencies: [
    .package(url: "https://github.com/Qartvelo-com/ads", .upToNextMinor(from: "0.6.1")),
],
targets: [
    .target(name: "MyApp", dependencies: [
        .product(name: "QartveloAds", package: "ads"),
        .product(name: "QartveloAdsAdMob", package: "ads"), // optional
    ]),
]
```

</TabItem>
<TabItem label="CocoaPods">

Install directly from the published Git tag. The native pods are not currently published to
CocoaPods trunk, so use the Git source below rather than a trunk-only version declaration.

```ruby title="Podfile"
platform :ios, '13.0'
use_frameworks! :linkage => :static

target 'MyApp' do
  pod 'QartveloAds', :git => 'https://github.com/Qartvelo-com/ads.git', :tag => '0.6.1'
  pod 'QartveloAdsAdMob', :git => 'https://github.com/Qartvelo-com/ads.git', :tag => '0.6.1' # optional
end
```

Run `pod install`, then open the generated `.xcworkspace` in Xcode.

</TabItem>
</Tabs>

For SDK development from a checkout, use **Add Local** and select its `ios` folder. The repository
root manifest exposes the same products for installation by URL.

## Register the AdMob adapter

With `QartveloAdsAdMob`, register the adapter once, before `initialize`:

```swift
import QartveloAds
import QartveloAdsAdMob

QartveloAds.registerFallbackAdapter(QartveloAdMobFallbackAdapter())
```

Without the adapter the SDK works normally and reports `qartveloAdNoAdAvailable` when Qartvelo Ads has no ad.

<Aside>
The adapter can also be found automatically when the app links with `-ObjC` (CocoaPods adds it), but registering it explicitly always works, also with Swift Package Manager.
</Aside>

## Info.plist

Qartvelo Ads needs nothing in `Info.plist`, and it never uses the advertising identifier (IDFA), so there is no App Tracking Transparency prompt for Qartvelo Ads.

If you include the AdMob adapter, Google requires **your own** AdMob app ID, or the Google Mobile Ads SDK stops the app at start-up:

```xml title="Info.plist"
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-XXXXXXXXXXXXXXXX~YYYYYYYYYY</string>
```

For development you can use Google's sample app ID `ca-app-pub-3940256099942544~1458002511`. Google also asks for its `SKAdNetworkItems` list; see Google's iOS quick start.

## Privacy manifest

`QartveloAds` ships a `PrivacyInfo.xcprivacy`: no tracking, no tracking domains, "advertising data" (the ads shown and tapped) not linked to the user, and the required-reason APIs it uses (`UserDefaults` for the cached configuration, system uptime for timeouts, file timestamps for the creative cache). Xcode merges it into your app's privacy report.

## Register the app

In the publisher dashboard, add the app with platform **iOS** and its **bundle ID** (for example `ge.example.Game`). If your Android app uses the same ID as its `applicationId`, choose **Android and iOS** instead: both apps then share one app key and one set of placements. An app key only works for the platforms and the ID it was registered with, so an Android app with a different ID is a separate app in the dashboard.

## Local backend (optional)

If you run your own Qartvelo Ads backend for development, the iOS Simulator reaches your Mac at `http://localhost:8000/`. Set `options.baseURL` and allow plain HTTP for that host in **debug builds only** (`NSAppTransportSecurity` > `NSExceptionDomains` > `localhost` > `NSExceptionAllowsInsecureHTTPLoads`). Production always uses HTTPS (`https://ads.qartvelo.com/`, the default).

Next: [Initialization](/ios/initialization/).
