Getting Started with Wemap SDKs

The Wemap SDKs provide comprehensive location tracking, routing, and navigation capabilities for mobile applications. This guide will help you get started with the SDKs, focusing on the positioning package.

Overview

The Wemap SDKs are organized into several frameworks:

Requirements

Different Wemap SDKs have different requirements, but these are the common requirements applied to all of them.

  • iOS 13 or newer
  • Xcode 16.0 or newer
  • Swift 5.9 or newer

Installation

Before you start developing your application with WemapSDKs, you need to configure your credentials and add the SDK as a dependency.

Configure credentials

Wemap provides WemapSDKs via CocoaPods, and you will need to obtain secret and access keys along with the region to access them. For additional information, please contact Wemap team.

Adding the Dependency

To add WemapSDKs to your app:

  1. Add dependencies in the Podfile

    Add the required WemapSDK pods to your app:

    use_frameworks!
    
    target 'TargetNameOfYourApp' do
        # to use Wemap custom interactive maps
        pod 'WemapMapSDK', '<version>'
    
        # to use Wemap GeoAR for navigation
        pod 'WemapGeoARSDK', '<version>'
    
        # to use Wemap positioning system 
        pod 'WemapPositioningSDK/VPSARKit', '<version>' # Wemap VPS ARKit Location Source (best for indoor)
        pod 'WemapPositioningSDK/GPS', '<version>' # GPS Location Source (best for outdoor)
        pod 'WemapPositioningSDK/Polestar', '<version>' # Polestar Location Source
    end
    
  2. Ensure minimum iOS version

    Your project must target iOS 13.0 or later:

    platform :ios, '13.0'
    
  3. Install dependencies and open the project

    Run the following command to install the pods:

    AWS_ACCESS_KEY_ID=*** \
    AWS_SECRET_ACCESS_KEY=*** \
    AWS_REGION=*** \
    bundle exec pod install --repo-update
    

    Then, open your project in Xcode:

    open your-project.xcworkspace
    

Fetching MapData

MapData is a configuration object crucial for any WemapSDK initialization.

You must have a mapID and token to request this object. For more details, please contact the Wemap team.

Below there are examples of how to fetch MapData object using different SDKs.

WemapPositioningSDK or WemapCoreSDK

ServiceFactory
    .getMapService()
    .map(byID: 19158, token: "GUHTU6TYAWWQHUSR5Z5JZNMXX") // Specify your mapID and token here
    .observe(on: MainScheduler.asyncInstance)
    .subscribe(onSuccess: { mapData in
        // now you have MapData and can use it to continue with any WemapSDK
    }, onFailure: {
        debugPrint("Failed to get map data with error - \($0)")
    })
    .disposed(by: disposeBag)

WemapMapSDK

WemapMap.shared
    .getMapData(mapID: 19158, token: "GUHTU6TYAWWQHUSR5Z5JZNMXX") // Specify your mapID and token here
    .subscribe(onSuccess: { mapData in
        // now you have MapData and can use it to continue with any WemapSDK
    }, onFailure: {
        debugPrint("Failed to get map data with error - \($0)")
    })
    .disposed(by: disposeBag)

Examples

For additional examples and sample implementations of WemapSDKs, visit the official GitHub repository.

Clone the repository and follow the README instructions to run the sample application.