> For the complete documentation index, see [llms.txt](https://doc.ozforensics.com/oz-knowledge-ru/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.ozforensics.com/oz-knowledge-ru/rukovodstva/rukovodstvo-razrabotchika/sdk/oz-mobile-sdk/ios/dobavlenie-sdk-v-prilozhenie.md).

# Добавление SDK в приложение

## CocoaPods

Для добавления OZLivenessSDK в ваше приложение через менеджер зависимостей CocoaPods и интеграции OZLivenessSDK в проект Xcode добавьте в Podfile:

```swift
pod 'OZLivenessSDK', :git => 'https://gitlab.com/oz-forensics/oz-liveness-ios', :tag => 'VERSION'
```

VERSION (опционально, по умолчанию устанавливается последняя версия) – версия, которую можно найти в [Журнале изменений](/oz-knowledge-ru/rukovodstva/rukovodstvo-razrabotchika/sdk/oz-mobile-sdk/ios/zhurnal-izmenenii.md).

Начиная с версии 8.1.0, можно использовать упрощенный код:

```swift
// для установки последней версии
pod ‘OZLivenessSDK’
// ИЛИ для установки конкретной версии
// pod ‘OZLivenessSDK’, ‘8.10.0’
```

По умолчанию устанавливается полная версия SDK (с режимами анализа на сервере и на устройстве). Если нужен только серверный анализ, код будет выглядеть так:

```swift
pod 'OZLivenessSDK/Core', :git => 'https://gitlab.com/oz-forensics/oz-liveness-ios.git',  :tag => 'VERSION'
```

Для версий 8.1.0 и выше:

```swift
pod ‘OZLivenessSDK/Core’
// ИЛИ
// pod ‘OZLivenessSDK/Core’, ‘8.1.0’
```

## SPM

Установка через SPM возможна для SDK версий 8.7.0 и новее.

Добавьте через SPM зависимости пакетов по ссылке: <https://gitlab.com/oz-forensics/oz-mobile-ios-sdk> ([здесь описано](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app), как добавить зависимости). Файл **OzLivenessSDK** обязателен для добавления, **OzLivenessSDKOnDevice** можно не добавлять, если вы не используете анализы на устройстве.

## Ручная установка

Вы также можете добавить файлы SDK в проект вручную.&#x20;

1. Скачайте [отсюда](https://gitlab.com/oz-forensics/oz-liveness-ios) следующие файлы и добавьте их в проект:

* **OZLivenessSDK.xcframework**,&#x20;
* **OZLivenessSDKResources.bundle**,
* **OZLivenessSDKOnDeviceResources.bundle** (если вы не используете анализы на устройстве, этот файл можно не скачивать).

2. Скачайте **TensorFlow** [здесь](https://github.com/tensorflow/tensorflow/releases): потребуется версия 2.11.
3. Убедитесь, что:

* оба файла **xcframework** отображаются в **Target-Build Phases -> Link Binary With Libraries** и **Target-General -> Frameworks, Libraries, and Embedded Context**;
* файл(ы) **bundle** отображаются в **Target-Build Phases -> Copy Bundle Resources**.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://doc.ozforensics.com/oz-knowledge-ru/rukovodstva/rukovodstvo-razrabotchika/sdk/oz-mobile-sdk/ios/dobavlenie-sdk-v-prilozhenie.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
