Installing UIKit

Create a project

Go to Xcode and create a project for iOS.
    1.
    Enter a project name
    2.
    Select Swift as your language option

Using Dependency Manager

AmityUIKit supports installation via dependency managers.
    SwiftPM
    Cocoapods
    Carthage

SwiftPM Installation

    1.
    In Xcode, select File > Swift Packages > Add Package Dependency
    2.
    Specify the Repository
1
https://github.com/AmityCo/Amity-Social-Cloud-UIKit-iOS-SwiftPM
Copied!
3. Choose Up to Next Major, then click Next.
4. Select AmityUIKit, then click Finish

Carthage Installation

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate the Amity Social UIKit. First, add the following to your Cartfile.
1
binary "https://raw.githubusercontent.com/AmityCo/Amity-Social-Cloud-UIKit-iOS/main/AmityUIKit.json" ~> 2.0
Copied!
Now you can install Amity Social UIKit into your project by running the following command.
1
$ carthage update
Copied!

Cocoapods Installation

If you are using CocoaPods to integrate Amity Social UIKit into your Xcode project. First, open a terminal and run this command to create Podfile.
1
$ pod init
Copied!
Then, add the following lines to the Podfile
1
source "https://github.com/AmityCo/Amity-Social-Cloud-UIKit-iOS.git"
2
target 'SampleApp' do
3
use_frameworks!
4
pod 'AmityUIKit'
5
end
Copied!
Now you can install Amity Social UIKit into your project.
1
$ pod install
Copied!
If problems happen during pod install step. Please try clean Cocoapods cache before running pod install again.
To clear cache please go to ~/Library/Caches/Cocoapods and remove all folders.
If this doesn't work, please do visit the Cocoapods Github repo for further resolutions.

Usage

After finished installing SDK. You will be able to import AmityUIKit.
1
import AmityUIKit
Copied!
AmityUIKit already includes our SDK. Don’t install AmitySDK separately if you have already installed the UIKit.
Last modified 25d ago