The following sections describe the contents of the Navigine iOS SDK repository. Files in our public repository for iOS are:
- Sources of the Navigine Demo Application for iOS
- Navigine SDK for iOS - header files and resources
Navigine demo application for iOS enables you to test indoor navigation that you set up using Navigine CMS. The NavigineDemo subfolder in this repository contains source files that you can use for compiling the Demo application.
To get the Navigine demo application for iOS,
- Either find the Navigine application in the Apple Store using your iOS device
- Or compile the application yourself using source code, available at GitHub.
For complete guidelines on using the Demo, refer to the corresponding sections in the Navigine User Manual, or refer to the Help file incorporated into the application.
Below, you can see some screenshots of the Demo representing locations list, defined location levels, navigation bar, and debug process.
Navigine SDK for iOS applications enables you to develop your own indoor navigation apps using the well-developed methods, classes, and functions created by the Navigine team. The SDK file resides in the libs folder.
Find formal description of Navigine-SDK API including the list of classes and their public fields and methods at Navigine SDK wiki.
CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like Navigine in your projects. See the "Getting Started" guide for more information. You can install it with the following command:
$ gem install cocoapods
CocoaPods 0.39.0+ is required to build Navigine 2.0.0+.
To integrate Navigine into your Xcode project using CocoaPods, specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '12.0'
target 'TargetName' do
pod 'Navigine'
end
Then, run the following command:
$ pod install
To start using Navigation library in your project you should do the following steps.
Register on https://locations.navigine.com, create a location and get your personal security key in the profile (it has the form 16 hexadecimal digits: XXXX-XXXX-XXXX-XXXX
).
Download framework , unzip it and add it to the your project.
Set your user hash and server and get instance of Navigine SDK:
// Set user hash and server before getting the instance of [[NavigineSdk|class-NavigineSdk]]
var mNavigineSdk: NCNavigineSdk?
mNavigineSdk = NCNavigineSdk.getInstance()
mNavigineSdk?.setServer(serverUrl) // your user hash from the server
mNavigineSdk?.setUserHash(userHash) // your server url (by default `https://ips.navigine.com`)
Get instance of [[NCLocationManager|class-NCLocationManager]], set [[NCLocationListener|class-NCLocationListener]]and download a location archive from the server using the following (or similar) code:
var mLocationManager = mNavigineSdk?.getLocationManager()
mLocationManager.add(self)
mLocationManager.setLocation(/* your location id */)
...
extension YourControllerClass: NCLocationListener {
func onLocationLoaded(_ location: NCLocation?) {
// do smth with location
}
func onLocationUploaded(_ locationId: Int32) {
// do smth when location changes uploaded
}
func onLocationFailed(_ error: Error?) {
// do smth with error
}
}
If location archive was successfully loaded you can start navigation (see [[NCNavigationManager|Class-NCNavigationManager]] for details). You can set the [[NCLocationView|Class-NCLocationView]] and it will display your position, or you can use [[NCNavigationManager|Class-NCNavigationManager]] and get updates about your position through [[NCPositionListener|Class-NCPositionListener]].
var mNavigationManager = mNavigineSdk?.getNavigationManager()
mNavigationManager.add(self)
...
extension YourControllerClass: NCPositionListener {
func onPositionUpdated(_ position: NCPosition) {
// do smth with position
}
func onPositionError(_ error: Error?) {
// do smth with error
}
}
- SDK documentation
- Refer to the Navigine official documentation for complete list of downloads, useful materials, information about the company, and so on.
- Get started with Navigine to get full access to Navigation services, SDKs, and applications.
- Refer to the Navigine User Manual for complete product usage guidelines.
- Find company contact information at the official website under Contact tab.