LogoLogo
CMSGitHubSupportBook a demo
  • Documentation
  • Academy
  • Help Center
  • Welcome
  • SDKS & Frameworks
    • Web
      • Getting Started
        • Prerequisites
          • MapsIndoors
          • Map Engine Provider
            • Option 1: Get your Mapbox Access Token
            • Option 2: Get your Google Maps API Keys​
          • Map Engine Setup
        • Getting Started: MapsIndoors
      • Map Visualization
        • Highlight, Hover and Select
        • Remove Labels from Buildings and Venues
        • Change Building Outline
        • Managing Collisions Based on Zoom Level
        • 3D Maps
          • Managing your 3D Maps
        • Base Map Styling - Google Maps
        • Managing feature visibility for Mapbox
      • Wayfinding
        • Directions
        • Directions Service
          • Tailoring the directions to your specific needs
        • Directions Renderer
          • Customizing the Route Animation
        • Multi-stop navigation
          • Custom Icons
        • User's Location as Point of Origin
      • Search
        • Search Operations
        • Searching
        • Using External ID, Geospatial Joins
        • Utilizing MapsIndoors Web Components and Other Searches
      • Map Management
      • Data Visualization
        • Display Heatmap Overlay
      • Other guides
        • Authentication
          • Single Sign-On
            • SSO Configuration
            • SSO Authorisation
          • 2-Factor Authentication
          • Password Reset
        • Application User Roles
        • Custom Properties
        • Display Language
        • Language
        • User Positioning
          • Show User's Location aka. Blue Dot
          • Using Cisco DNA Spaces
        • Working with Events
        • Turn Off Collisions Based on Zoom Level
        • Remove Labels from Buildings and Venues for Web
        • Synchronizing data for a subset of venues
        • Custom Floor Selector
      • Display Rules in Practice
      • Offline Data
      • Managing map visibility
    • Android
      • Getting Started
        • Prerequisites
        • Create a New Project
        • Show a Map
        • Create a Search Experience
        • Getting Directions
        • Enable Live Data
        • Integrating MapsIndoors into your own App
        • Migrating from V3 to V4
          • Migrating to Mapbox V11
      • Directions
        • Directions Service
        • Directions Renderer
          • User's Location as Point of Origin
        • Wayfinding Instructions
          • See Route Element Details
        • Using multi-stop navigation
      • Searching
        • Searching on a Map
        • Creating a Search Experience
      • Switching Solutions
      • Caching & Offline Data
      • Display Language
      • Displaying Objects
        • Application User Roles
        • Getting a Polygon from a Location
        • Location Clustering
        • Location Data Sources
        • Location Details
        • Turn Off Collisions Based on Zoom Level
        • Enabling and Disabling features on the map
      • Change Building Outline Color
      • Event Logging
      • Configuring a menu with AppConfig
      • Display Heatmap Overlay
      • Custom Properties
      • Custom Floor Selector
      • External IDs
      • User Positioning
        • Show User's Location aka. Blue Dot
        • Using Cisco DNA Spaces
        • Using Google Fused Location Provider
        • Using Indoor Atlas
      • Authentication
        • Single Sign-On
          • SSO Configuration
          • SSO Authorisation
        • 2-Factor Authentication
        • Password Reset
      • Display Rules in Practice
        • Label styling through Display Rules
      • Highlight and Select
    • iOS
      • Getting Started
        • Prerequisites
        • Set Up Your Environment
        • Display a Map
        • Search
        • Getting Directions
        • Migrating from v3 to v4
      • Directions
        • Directions Renderer
          • User's Location as Point of Origin
        • Wayfinding Instructions
          • See Route Element Details
        • Directions Service
        • Using multi-stop navigation
      • Searching
        • Searching on a Map
        • Creating a Search Experience
      • Caching & Offline Data
      • Displaying Objects
        • Application User Roles
        • Getting a Polygon from a Location
        • Location Details
        • Turn Off Collisions Based on Zoom Level
        • Enabling and Disabling features on the map
      • Custom Floor Selector
      • Change Building Outline Color
      • Custom Map Padding
      • Custom Properties
      • Display Rules in Practice
        • Label styling through Display Rules
      • Switching Solutions
      • Show User's Location aka. Blue Dot
        • Using Indoor Atlas
        • Using Cisco DNA Spaces
      • Highlight and Select
      • Display Language
    • React Native
      • Getting Started
        • Prerequisites
        • Project Setup
        • Displaying a Map
        • Creating a Search Experience
        • Getting Directions
        • Enabling Live Data
      • Showing Blue Dot
    • Flutter
      • Getting Started
        • Prerequisites
        • Create a New Project
        • Show a Map
        • Create a Search Experience
        • Getting Directions
      • Migration Guide
    • Integration API
      • Integration API Access
        • Access with Swagger
        • Access with Postman
        • Access with Python
        • Client credentials flow
      • Data Description
      • Reverse Geocoding
      • Route Access
      • OpenAPI Specification
    • Built-In Map Edits
      • Getting started
      • Authentication
      • Release notes
      • Reference docs
  • Products
    • Product Overview
    • CMS
      • Interface Overview
      • Display Rules
      • Location Types
      • Categories
      • Media Library
        • 2D Models and Icons
        • 3D Models
      • Editing Data
      • Solution Settings
      • Settings
      • Data Concepts
      • User Roles
      • Route Network
        • Barrier Route Element
        • Door Route Element
      • Additional Location Details
    • Map Template
      • Getting Started
        • Web Component
        • React Component
      • Configuration
        • Query Parameters
        • Categories
      • Customization
      • Deploying Map Template to a cloud storage provider
      • 2D/3D Visibility Switch
      • External customization of the Map Template
      • Location Details configuration
      • Kiosk
        • QR code configuration
  • Other
    • Map Design
      • Map Design System
      • Using a Custom Mapbox MapStyle
      • 2D Models
    • Changelog
      • Web SDK
        • V4
        • V3
      • Android SDK
        • V4
        • V3
      • iOS SDK
        • V4
        • V3
      • React Native SDK
      • Flutter SDK
      • MI Components
      • Map Template
    • Glossary
  • Legacy Docs
    • Android SDK V3
      • Getting Started
        • Prerequisites
        • Create a New Project
        • Show a Map
        • Create a Search Experience
        • Getting Directions
        • Enable Live Data
        • Integrating MapsIndoors into your own App
    • iOS SDK V3
      • Getting Started
        • Prerequisites
        • Set Up Your Environment
        • Display a Map
        • Search
        • Directions
        • Live Data
        • Integrating MapsIndoors into your own App
      • Inspect Route Element for iOS v3
      • Using Cisco DNA Spaces
      • Using Indoor Atlas
      • Switching Solutions
      • Show User's Location aka. Blue Dot
      • Application User Roles
      • Getting a Polygon from a Location
      • Location Details
  • MapsIndoors SDK Firewall
  • Google Analytics & Logging
  • Reference Docs
    • Web SDK
    • Android SDK
    • iOS SDK
    • React Native SDK
    • Flutter SDK
Powered by GitBook
On this page
  • Create an Xcode Project​
  • Installing the MapsIndoors SDK​
  • Adding API Credentials​

Was this helpful?

Export as PDF
  1. Legacy Docs
  2. iOS SDK V3
  3. Getting Started

Set Up Your Environment

Last updated 1 year ago

Was this helpful?

Now that you have taken care of all the preliminary issues, we can start building the app. Throughout this guide, you will continously modify this project to extend its functionality to cover a number of basic features.

KNOWN IOS ISSUES

  1. Developing on the new Arm-based Apple Silicon (M1) Macs requires building and running on a physical iOS device or using an iOS simulator running iOS 13.7, e.g. iPhone 11. This is a temporary limitation in Google Maps SDK for iOS, and as such also a limitation in MapsIndoors, due to the dependency to Google Maps.

  2. Due to it is necessary to include the post_install hook in your Podfile described in the wiki.

Create an Xcode Project

We recommend using for following along, for this guide we will be using Xcode 13.0. Note that an iOS mobile device is not required, as Xcode allows the use of a simulator. Furthermore, in accordance with the known issues with Google Maps and Arm-based Apple Silicon (M1) Macs, we will be using an iPhone 11 (iOS 13.7) simulator throughout.

We start off by creating an Xcode project using the App template,

For the project settings, you can call it anything you like, however ensure the following settings are set to follow along easier,

  • Interface: Storyboard

  • Language: Swift

You should now have a project folder with the following files,

For the sake of simplicity we will only be operating on these pre-generated files throughout the guide.

  1. Create an empty text file named Podfile in your project directory (same folder as your .xcodeproj).

  2. Add your dependencies to the Podfile as followed (replace YOUR_APPLICATION_TARGET_NAME_HERE with your project name),

    source 'https://github.com/CocoaPods/Specs.git'
    
    platform :ios, '15.0' # Replace 15.0 with you iOS Minimum Deployment Target
    
    target 'YOUR_APPLICATION_TARGET_NAME_HERE' do
      use_frameworks!
    
      pod 'MapsIndoors', '~>3.50'
    end
  3. Save the Podfile and close Xcode.

  4. Open a terminal in the directory of the project. cd \<path-to-project>

  5. Run pod install in the terminal.

  6. From this time onwards, use the .xcworkspace file to open the project.

  • Copy the following frameworks to the folder of your app project (in Finder, not in Xcode)

    • GoogleMaps-4.2.0/Base/Frameworks/GoogleMapsBase.framework

    • GoogleMaps-4.2.0/Maps/Frameworks/GoogleMaps.framework

    • GoogleMaps-4.2.0/Maps/Frameworks/GoogleMapsCore.framework

  • Drag the GoogleMaps.bundle from the GoogleMaps.framework/Resources folder into the top level directory of your Xcode project. When prompted, ensure Copy items into destination group's folder is not selected.

  • Drag and drop the MapsInbdoors XCFramework into your XCode project. In the dialog that pops up, choose “Copy items if needed” and make sure the XCFramework is added to the correct target

  • In Xcode, go to "General" and expand "Frameworks, Libraries, and Embedded Content" and make sure the MapsIndoors.xcframework is marked as "Embed & Sign"

  • In Xcode, go to "Build Settings" for your target and make sure the following entries are present in the FRAMEWORK_SEARCH_PATHS

    • $(inherited)

    • $(PROJECT_DIR)/**

This "Getting Started" guide is created using a specific version of the SDK. When moving beyond the "Getting Started" guide, please be sure to use the latest version of the SDK.

Open back up the project and navigate to the file AppDelegate.swift.

  1. Add the following import statements to the top of the file,

    import GoogleMaps  
    import MapsIndoors
  2. Insert the following into the application(_:didFinishLaunchingWithOptions:) method,

GMSServices.provideAPIKey("YOUR_GOOGLE_API_KEY")  
MapsIndoors.provideAPIKey("YOUR_MAPSINDOORS_API_KEY",  
            googleAPIKey:"YOUR_GOOGLE_API_KEY")

Finally, remember to replace YOUR_GOOGLE_API_KEY with your Google API key and YOUR_MAPSINDOORS_API_KEY with your MapsIndoors API demo key d876ff0e60bb430b8fabb145.

Installing the MapsIndoors SDK

MapsIndoors can either be installed using CocoaPods () or through a manual installation.

Installing MapsIndoors Using CocoaPods

From MapsIndoors SDK version 3.32.0 and up, in order for CocoaPods to fetch the SDK properly it is necessary to install git-lfs ().

Add the to the end of the Podfile. (In the line containing pod 'MapsIndoors', '~>3.50', where it currently says 3.50, be sure to replace this number with whatever the latest version of the iOS SDK is.)

Install MapsIndoors Manually

Download the

Download and unzip the latest

Adding API Credentials

​
Getting Started with CocoaPods
​
Install Guide
post_install
​
Google Maps iOS SDK 4.2.0
v3 MapsIndoors.xcframework
​
a bug in CocoaPods
PodFile post_install
​
Xcode