Creating iOS Binding

1. Generate bindings from Cocoapods


Install Objective Sharpie: Objective Sharpie Installation

For more information about generating iOS bindings from CocoaPods: iOS Bindings Example


IndoorAtlas SDK

sharpie pod init ios IndoorAtlas
sharpie pod bind --namespace=IndoorAtlas.iOS


IndoorAtlas Wayfinding

sharpie pod init ios IndoorAtlasWayfinding

If this fails, open generated Podfile and add this line to the top of the file: source '[email protected]:IndoorAtlas/CocoaPods-Specs.git', then type pod install


sharpie pod bind --namespace=IndoorAtlasWayfinding.iOS

If this fails, open Info.plist in Pods/IndoorAtlasWayfinding/indooratlas-ios-wayfinding/IndoorAtlasWayfinding.framework/Info.plist, and change DTSDKName value to iphoneos11.3 (Xcode 9.3 required)


2. Create a binding library project

IndoorAtlas SDK

Open Visual Studio and choose New Solution -> iOS Bindings Library

Select the location of the new project and give it a descriptive name. Then click Create.


Copy-paste IndoorAtlas_ApiDefinitions.cs and IndoorAtlas_StructsAndEnums.cs from the previous step to this project's ApiDefinition.cs and Structs.cs

    - Check parts that are marked with [Verify] tag. If they are ok, remove these tags

    - ApiDefinition.cs: Change DidUpdateLocations NSObject to IALocation

    - Structs.cs: Change enum type nint to long, set CLLocationCoordinate2D to [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]



Add IndoorAtlas iOS framework to the project: 

    - Native References -> Add Native Refence -> Navigate to the same location as where IndoorAtlas_ApiDefinitions.cs and IndoorAtlas_StructsAndEnums.cs are located -> Choose IndoorAtlas.framework

Build the project: Project generates .dll to the output directory. This .dll can be added to any Xamarin project


Create new Xamarin iOS App

   Add previously generated .dll to the project: 

    - References -> Edit references -> .NET Assembly -> Browse -> Add generated .dll

IndoorAtlas Wayfinding

Open Visual Studio and choose New Solution -> iOS Bindings Library

Select the location of the new project and give it a descriptive name. Then click Create.

Copy-paste IndoorAtlasWayfinding_ApiDefinitions.cs from the previous step to this project's ApiDefinition.cs

    - Check parts that are marked with [Verify] tag. If they are ok, remove these tags

    - NSNumber should be changed to double

Add IndoorAtlasWayfinding iOS framework to the project: 

    - Native References -> Add Native Refence -> Navigate to the same location as where IndoorAtlasWayfinding_ApiDefinitions.cs is located -> Choose IndoorAtlasWayfinding.framework


Build the project

Project generates .dll to the output directory. This .dll can be added to any Xamarin project


Create new Xamarin iOS project and add the generated .dll: 

    - References -> Edit references -> .NET Assembly -> Browse -> Add generated .dll

Before trying to run the project with IndoorAtlasWayfinding:

    - Right-click on the project -> Options -> iOS Build -> Untick "Enable device-specific builds"