Amity iOS UIKit Migration Guide
To allow for more customization, we have now open sourced our UI Kits and deprecated the packaged UI Kit versions that was previously available (2.x.x and below).
With open-source, developers have more flexibility and greater customization options, allowing you to have complete control over the visual style. Open sourcing allows for more transparency and visibility and enables contributions from a greater developer community in terms of good design, implementation, code improvement, and fixes, translating into a better product and typical development.
To ensure that you continue to receive the latest features and updates, we encourage you to move off the managed UI Kit to the Open Source UI Kit. This guide will show you how to:
Please note that for the UIKit 4.0 stable version, we plan to release a packaged version soon, aimed at facilitating easier integration.
If you've never used UI Kit, you may skip this step and proceed to the next step.
If you're integrating the UI Kit with an existing project, you'll need to remove and unlink the managed UIKit from your project before proceeding with the integration.
There are several ways for you to migrate the open source iOS UI Kit into your projects, depending on your workflow. One way that we recommend is via Git Submodule. This instruction assumes that the app project is already set up with a Git repository.
Add git submodule of Amity UIKit open source into your git repository.
To simplify forking & contributing to the open source UIKit, we are moving away from using git-lfs in our git repository. We are migrating all development of Open Source UIKit to new repository https://github.com/AmityCo/ASC-UIKit-iOS-OpenSource starting release v3.12.0. The previous open source UIKit Repository https://github.com/AmityCo/Amity-Social-Cloud-UIKit-iOS-OpenSource would be supported until <xxxx-yyyy-zzzz> date. New repository will not contain any history before release v3.12.0.
For new users:
If you are just starting to use Open Source UIKit or already using latest version of Open Source UIKit (i.e v3.12.0) from old Repository, We suggest you to start pulling changes from new repository instead.
In this case,
If you have forked old open source UIKit repository, we suggest you to fork new repository and use that instead.
For Old Users:
If you are using older version (< 3.12.0) of open source UIKit, we suggest you to upgrade to latest version of UIKit as soon as possible. Once you are caught up to version 3.12.0, please migrate to use new repository instead.
Create an Xcode Workspace, and then add both MyApp.xcodeproj
and AmityUIKit.xcodeproj
together under the same workspace.
3.AmityUIKit
links with other dependencies such as AmitySDK
, Realm
etc through SharedFrameworks
which is a Swift Package.
Step 1: Reset Package Cache of your Application Target i.e YourApp.xcodeproj. [If you are installing AmityUIKit for the first time, you can skip this step]
Select App Target In Xcode Project -> Select File Menu for Xcode-> Packages -> Reset Package Cache
Step 2: Link SharedFrameworks
& AmityUIKit.framework
to YourApp.xcodeproj target as shown below.
4. On MyApp.xcodeproj
, let’s try importing AmityUIKit / AmitySDK and call some APIs. You should be able to compile and run the app.
You can modify the iOS open source UI Kit to customize behaviors to fit your needs. To modify the code, simply copy and paste it into your local machine.
We recommend that you first fork the repository before starting any customization work, so that it will be easier to merge the code with the next version update that we provide from the main repository.
References on forking: https://docs.github.com/en/get-started/quickstart/fork-a-repo
To update to the latest version of the UI Kit, you can pull the latest commit of the git submodule.
Amity Android UIKit Installation Guide
To allow for more customization, we have now open sourced our UI Kits and deprecated the packaged UI Kit versions that was previously available (2.x.x and below).
With open source, developers have more flexibility and greater customization options, allowing you to have complete control over the visual style. Open sourcing allows for more transparency and visibility, and enables contributions from a greater developer community in terms of good design, implementation, code improvement, and fixes, translating into a better product and development experience.
To ensure that you continue to receive the latest features and updates, we encourage you to migrate over to the open source version. This guide will help you:
Please note that for the UIKit 4.0 stable version, we plan to release a packaged version soon, aimed at facilitating easier integration.
If you've never used UI Kit from a gradle dependency before, you may skip this step and proceed to the next step. If you are migrating the UIKit with an existing gradle dependency, you will need to remove it from the gradle at the application level.
Clone or download source code from an open-source Github repository. https://github.com/AmityCo/Amity-Social-Cloud-UIKit-Android-OpenSource
Navigate to your current application in Android Studio, then at the top navigation bar go to File > New > Import Module...
Choose the source directory where you downloaded/cloned UI Kit source code.
Make sure that you import :chat
, :common
, :social
, and :amity-uikit
module as per the screenshot described. The :sample
module is optional and solely contains examples of UIKit Fragments and Activities.
Navigate to the root project's settings.gradle
file once the modules have been successfully imported. You may see that Android Studio generated a dependency path from the UI Kit source code directory you specified initially. However, there's a chance that Android Studio won't do so or may generate the incorrect path. Please double-check that the path is accurate.
Additionally, in the root project's settings.gradle
it's also mandatory to declare jitpack.io repository destination by adding maven { url https://jitpack.io }
to dependencyResolutionManagement > repositories.
Add the imported module to application's gradle file by adding:
Exclude these META-INF from the packaging options in application's gradle
Lastly, apply this in the project-level
build.gradle file. apply from: "../Amity-Social-Cloud-UIKit-Android/buildsystem/dependencies.gradle"
Also make sure that your settings android.nonTransitiveRClass=false
in gradle.properties
file
Woohoo! All set now you're ready to explore and modify our UI Kit in your application project.
You can modify the Android open source UI Kit to customize behaviors to fit your needs. To modify the code, simply copy and paste it into your local machine.
We recommend that you first fork the repository before starting any customization work, so that it will be easier to merge the code with the next version update that we provide from the main repository.
Reference on forking: https://docs.github.com/en/get-started/quickstart/fork-a-repo
To update to the latest version of the UI Kit, you can pull the latest commit of the git submodule.