Integrating the SDK (v2.1.x – 2.2.x)


ADDING THE SDK TO THE PROJECT

You can add the SDK to your project either using Swift Package Manager or manually.

Swift Package Manager

To obtain the package repository URL for Swift Package Manager check out the SDK chart.

Manually

To obtain the latest SDK build check out the SDK chart. Once the SDK package is downloaded, unarchive it and find NavmiiSDK.framework. To add NavmiiSDK.framework to you project perform the following steps:

  1. Drag the NavmiiSDK.framework to the project, select Copy items if needed when prompted.
  2. Select your target in the project, go to the General settings tab and ensure the framework is added to the Frameworks, Libraries, and Embedded Content list. Also ensure that the value in the Embed column against the framework is set to either Embed & Sign or Embed Without Signing.


PRELIMINARY SETTINGS

Add key with name NavmiiAPIKey to your project's .plist file and set its value to the key that you've received from Navmii.


To use Navmii SDK in Swift code you need to add the following line to the Objective-C Bridging Header file:

#import <NavmiiSDK/NavmiiSDK.h>

If there's no Objective-C Bridging Header file in the project, you need to create one:

  1. Add .h file named <project_name>-Bridging-Header.h to the project.
  2. Open the target build settings, find Objective-C Bridging Header setting and specify the path to the file added on the previous step. Normally the path should look like $(PROJECT_DIR)/$(PROJECT_NAME)/$(PROJECT_NAME)-Bridging-Header.h