CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects.
If you don’t already have CocoaPods installed install it by running following commands in the terminal. For details see: CocoaPods getting started.
sudo gem install cocoapods pod setup
use_frameworks! target 'project-target-name' do pod 'IndoorAtlas' end
use_frameworks!in your Podfile.
All non-beta releases are available in the CocoaPods trunk repository. If you want to use an older SDK version or an alpha/beta build, they can be used in CocoaPods by defining the IndoorAtlas repository.
Example Podfile for using SDK version 2.5.1:
target 'project-target-name' do source 'https://github.com/IndoorAtlas/CocoaPods-Specs.git' source 'https://github.com/CocoaPods/Specs.git' pod 'IndoorAtlas', '~> 2.5.1' end
SDK 2.3 and later supports beacons as part of the positioning. Beacons can shorten time to first fix and add robustness in areas that have challenging radio environment. Beacons are not required for the positioning to work, but enabling this feature is recommended for optimal performance. Note that the venue needs to be mapped with MapCreator 2.
If bluetooth is turned off, an alert “Turn On Bluetooth to Allow to Connect to accessories.” will be shown. It is possible to suppress this alert by setting the following app plist key:
If you suppress the pop up, remember to instruct users to turn on Bluetooth for better positioning performance.
IndoorAtlas.framework uses processor optimized assembly functions, so it is not possible to enable Bitcode. Go to Build Settings in your project and under Build Options set Enable Bitcode to No.
setApiKey:andSecret method to set credentials.
static NSString *kAPIKey = @"api-key-here"; static NSString *kAPISecret = @"api-secret-here"; // ... // Set IndoorAtlas ApiKey and Secret [locationManager setApiKey:kAPIKey andSecret:kAPISecret];