# Installing UIKit (deprecated)

This section is about installing managed UIKit through the dependency manager. If you have already installed our Open Source UIKit, you can skip this section.

{% hint style="warning" %}
To provide greater customization options, we have open-sourced our UIKit and deprecated the packaged UIKit version previously available. For the best quality and access to the latest features, we strongly recommend integrating our UIKit with the open-source version. For more details, please refer to the [iOS UIKit Installation Guide](/social-plus-uikit/uikit-3/ios/ios-uikit-installation-guide.md) section.
{% endhint %}

## **Create a project**

Go to **Xcode** and create a project for iOS.

1. Enter a project name
2. Select **Swift** as your language option

<figure><img src="/files/yg5kgKTd42u44AmR4ydR" alt=""><figcaption></figcaption></figure>

## Using Dependency Manager

`social.plus UIKit` supports installation via dependency managers, we highly recommend SwiftPM installation as the best practice.

* SwiftPM
* Cocoapods
* Carthage

## SwiftPM Installation <a href="#carthage-installation" id="carthage-installation"></a>

To integrate social.plus UIKit into your project via SwiftPM, please follow the instructions below.

* [Add a Package Dependency](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app)

Enter the repository URL to search the package, and choose to install `social.plus UIKit`.

```
https://github.com/AmityCo/Amity-Social-Cloud-UIKit-iOS-SwiftPM
```

## Carthage Installation

[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate the social.plus UIKit. First, add the following to your `Cartfile`.

```swift
binary "https://raw.githubusercontent.com/AmityCo/Amity-Social-Cloud-UIKit-iOS/main/AmityUIKit.json" ~> 2.0
```

Now you can install **social.plus** **UIKit** into your project by running the following command.

```swift
$ carthage update
```

## Cocoapods Installation

If you are using [CocoaPods](https://cocoapods.org) to integrate social.plus UIKit into your Xcode project. First, open a terminal and run this command to create `Podfile`.

```
$ pod init
```

Then, add the following lines to the `Podfile`

```swift
source "https://github.com/AmityCo/Amity-Social-Cloud-UIKit-iOS.git"
target 'SampleApp' do
  use_frameworks!
  pod 'AmityUIKit'
end
```

Now you can install **social.plus** **UIKit** into your project.

```swift
$ pod install
```

If problems happen during `pod install` step. Please try cleaning Cocoapods cache before running `pod install` again.

To clear the cache please go to `~/Library/Caches/Cocoapods` and remove all folders.

If this doesn't work, please visit the Cocoapods [Github](https://github.com/CocoaPods/Specs) repo for further resolutions.

## Usage

After finished installing SDK. You will be able to import `AmityUIKit`.

```swift
import AmityUIKit
```

{% hint style="warning" %}
social.plus UIKit already includes our SDK. Don’t install social.plus SDK separately if you have already installed the UIKit.

From the version 3.x. please install the UIKit with the open source guideline here [iOS UIKit Installation Guide](/social-plus-uikit/uikit-3/ios/ios-uikit-installation-guide.md).
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://docs.social.plus/social-plus-uikit/uikit-3/ios/getting-started.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
