Before going forward with the installation there are some best practices that we recommend developers to follow. Coda SDK contains several third-party SDKs that might already be present in your project. You might also have additional third-party SDKs that are not present in Coda SDK. To avoid duplications we suggest you follow these best practices.
Step 1: Back up your project
Make sure you are working with a version control system such as git and do the integration on a separate branch.
Step 2: Upgrade Unity
We support Unity 2019.4 LTS or 2020.4 LTS to use Coda SDK.
For a healthy installation please make sure you have both android and ios modules installed and also make sure you on android or ios platform before installing Coda SDK.
Coda SDK 2.0.1
You need to install latest LTS version that you are using.
Please use following patch versions or above to avoid potential issues;
- 2019.4.x (Latest LTS)
- 2020.4.x (Latest LTS)
Note that in the Unity versioning system, ".4" in the second partition means LTS(Long term support) version. It is best practice to use an LTS version of the Unity when releasing a game.
Step 3: Remove duplicate third-party SDKs and their usage from your code
Coda SDK contains a list of third-party SDKs. For each of these SDKs, it also contains several adapters that handle all the initialization procedures, configurations, and API calls in the background. The Coda SDK Installer will remove all the duplicate third-party SDKs from your project and it will include up to date versions of these SDKs along with their adapters. To avoid duplicate initialization or usage of these third-party SDKs please make sure to remove or comment out all procedures that are directly accessing the third-party APIs in your project.
Here is a list of all the third-party SDKs that are coming along with Coda SDK:
- Firebase / Crashlytics
- Facebook SDK
- Play Services Resolver
Step 4: Commit your changes
Please make sure your project compiles without any errors and all the preparation changes are committed in your integration branch.
Step 5: Validate you can build your project without any issues
Before going forward with the installation make sure you can successfully build&run your app on target mobile devices.
Coda SDK comes in a Unity package file which is an installer for Coda SDK. You simply need to import the package. Please do not change the path of the files in the project.
To Install Coda SDK in the menu bar please click "Coda SDK -> Install Coda SDK".
Remove the Duplicates!
If you haven't removed the duplicate thirds party SDKs from your project installer will automatically remove them from your project with your permission.
When the installation process is finished you will be asked to restart Unity. Please do so before going on with the next steps.
Step 1: Check overwritten files
Coda SDK Installation will override some of the files that might need attention. If you have these files prior to installation they will be overwritten by Coda SDK. Please check if you need to merge manifest files or Gradle dependencies.
Step 2: Reimport additional firebase libraries
If you are using additional Firebase Libraries such as Firebase Messaging these will be deleted by the installer. Please make sure to import their aligned version to keep using them.
Step 3: Fix compilation errors on updated SDKs.
Coda SDK installation might install a different version of the third-party SDKs that you are using. Some of these updates introduce deprecated API calls. If you haven't removed the usage of these SDKs prior to installation you might have to address these changes manually after the installation.
Step 4: Fix library duplications
A common problem that developers are experiencing when they are integrating a new SDK in Unity is duplicate libraries. Unity Package Manager feature aims to address these issues but for the time being one library might be included within one or more libraries. So if you have any other third-party SDKs they might contain the same libraries that Coda SDK contains. This will result in duplication and you will get a multidex error in Gradle. These duplicate libraries must be eliminated manually.
Step 5: Build&Run your project
Please make sure you can still build&run your app on the target device without any problem.
Didn't work for you?
Here are some suggestions to help you further
Updated 5 months ago
Please follow our guidelines to integrate Coda SDK into your project