XMode SDK Cocoapod Integration for iOS11

November 3, 2017

Please email gabriel@xmodesocial.com with questions.

---

XMode SDK is a Cocoapod and requires iOS10+.

  1.  Add this line to your podfile:

     pod 'GJPG', '~> 1.0.28'

  1. In AppDelegate.m, add:

    #include <GJPG/GJPG.h>

    (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    [[GJPG sharedInstance] startWithApiKey:@"YOUR-API-KEY-HERE""];

    NOTE: This will trigger the location permissions dialogue, so you may want to put this call after you have requested permissions from within your app.

    The above will use Location Always On. If your app uses only Location While In Use, replace your call with

    [[GJPG sharedInstance] startWithApiKey:@"YOUR-API-KEY-HERE" isLocationInForegroundOnly:YES];     

  1. Pass the sdk the user's email. (OPTIONAL)

     [[GJPG sharedInstance] setEmailAddress: @"USER-EMAIL-HERE@DOMAIN.COM"];

 

  1. Add an entry in your info.plist

     
      <key>NSBluetoothPeripheralUsageDescription</key>
       <string>We use Bluetooth to enhance your location while in background</string>


    Note: this text will actually never be seen by the user because we use BlueTooth only for location, but Apple will reject your app without it.

  1. Add these to your info.plist. Replace the text with whatever you think will help your users understand why they should share location.

    <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
    <string>This allows us to use your location to provide you certain features like tracking movement more accurately, plus some other cool stuff.</string>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string>This allows us to use your location to provide you certain features like tracking movement more accurately, plus some other cool stuff.</string>

  1. In the Notes section of your app entry in itunesconnect, add this text so your app will be approved.

    We are using Beacons In Space as a beacon SDK. We are using both startMonitoringForRegion: and startRangingBeaconsInRegion: for our beacon use. Beacons are meant to enhance location in the app. There is no direct UI effect though, only better location. The app does NOT use Bluetooth or CoreBluetooth directly. iBeacon only uses CoreLocation for region monitoring.