Using a library you purchased on GitMart is extremely simple. All libraries hosted on GitMart will have the GitMart SDK as a dependency. Our SDK is lightweight and only has a handful of files. The main purpose of our SDK is to ensure you have the required permissions to use the SDK you are purchasing.

Step 1 - Copy your API key

In the GitMart dashboard, navigate to the API keys section.

copying-api-key.mov

Step 2 - Add your API key to your Info.plist

Add a new key to your Info.plist file in your Xcode project

  1. Key Name: GitMartAPIKey
  2. Key Value: Your-API-Key

adding api key to info plist.mov

Step 3 - Add a library via Swift Package Manager

For example, let’s install the ChatKit library that’s available here. Every GitMart library will have a GitHub repository where you can look through the code and see specific installation and usage instructions for that library.

For ChatKit, all we have to do is add it via Swift Package Manager.

  1. In the settings menu, navigating to File > Add Packages…

  2. In the search bar, enter the URL of the GitMart library you’d like to add - in this case, https://github.com/shakked/ChatKit

  3. Select Add Package in the bottom right of the window

  1. Tap Add Package

  2. Tap Add Package again, leaving the checked boxes

  3. Now, you will see a list of Package Dependencies in the file navigator for your project.

  1. Follow the instructions on the purchased library’s GitMart page and start using the library.