Point SDK enables rapid development of location-aware apps. It delivers precise location awareness to the mobile application, without the battery drain that would typically occur. It requires no additional hardware, making it highly scalable.

Point SDK enables you to provide next-generation experiences on your location-based app.

Please follow the step by step instructions below to integrate Point SDK:

Step 1: Creating the Xcode project

Create the Xcode project:

Start a new Xcode project, using a template appropriate for your app. The following example uses ‘Single View Application‘ for simplicity:

Enter a Product Name and other required details.Device selection: Point SDK supports iOS devices with GPS capabilities, running iOS 10.0 or above. It includes most iPhones and cellular models of iPad. For the devices field, any of the ‘iPhone,’ ‘iPad’ or ‘Universal’ options are valid when developing a Point SDK integrated app.

Choose a folder to save the project (e.g. ‘Projects’) and select ‘Create’. Note that Xcode creates the project sub-folder for you. In this case, it will be named ‘BDHelloPointSDK’.

Create a Cartfile in your project direcotry, and add a ‘BluedotPoinmtSDK’ dependencygithub "Bluedot-Innovation/PointSDK-iOS"

Run $ carthage bootstrap in your project directory. This will fetch BDPointSDK into a Carthage/Checkouts folder and download a pre-compiled framework.

On your application targets’ General settings tab, in the Embedded Binaries section, drag and drop BDPointSDK from the Carthage/Build folder on disk.

On your application targets’ Build Phases settings tab, click the + icon and choose New Run Script Phase. Create a Run Script in which you specify your shell (ex: /bin/sh), add the following contents to the script area below the shell:

/usr/local/bin/carthage copy-frameworks

Add the path to the BDPointSDK under “Input Files”.

$(SRCROOT)/Carthage/Build/iOS/BDPointSDK.framework

Add the paths to the copied BDPointSDK to the “Output Files”.

$(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/BDPointSDK.framework

With output files specified alongside the input files, Xcode only needs to run the script when the input files have changed or the output files are missing. This means dirty builds will be faster when you haven’t rebuilt frameworks with Carthage.

This script works around an App Store submission bug triggered by universal binaries and ensures that necessary bitcode-related files and dSYMs are copied when archiving.

Option 3: Importing Point SDK as a dynamic framework

Point SDK is distributed as a dynamic framework.

A copy of the framework can be downloaded from the Downloads section of your Point Access Dashboard.

A link to this file is also provided in the confirmation email sent after account registration.

Step 3: Configure Xcode project

Add required iOS SDK frameworks.
Point SDK requires the usage of some iOS SDK frameworks. Add the following frameworks in the ‘Link Binary with Libraries’ section of your Target’s Build Phases.

CoreLocation

CoreMotion

System Configuration

MapKit

CoreGraphics

UIKit

Go to Build Settings, and set the “Always Embed Swift Standard Libraries” Option to “Yes”.
NOTE: If BitCode is set to YES, the resulting IPA file size will increase. However, when you submit the app, Apple will recompile it for each platform, and the resulting size installed by app user will be much smaller.

Skip steps 3 to 5 if you are integrating via Cocoapods or Carthage

In the Target’s Build Phases tab, Click the “+” button and select “New Run Script Phase”.Important: For your convenience, PointSDK is distributed as one Universal framework to work with both devices and simulators. However, this step is necessary to strip out the simulator slice before submitting to the App Store.

Step 4: Configure info.plist settings

To address differences in hardware capability of iOS devices, Apple has implemented a scheme of string-keys for apps to declare the hardware features it requires. These are stored in a file named info.plist. Running an app on an iOS device with insufficient hardware support may crash the app or result in a degraded experience. Declaring the required hardware features within info.plist allows iOS, and the AppStore, to identify in advance whether a given device should even attempt to download and execute the app.

Point SDK requires Location Services with GPS accuracy to operate as intended. This should be declared in the info.plist file of any integrating app.

To declare requirements:

Locate the app’s info.plist file in the Supporting Files folder.

Select it once to display the Key/Value pairs in the editor pane.

Find the existing entry titled ‘Required Device Capabilities’, or create one if it does not exist.

Select the (+) icon to add new Item lines containing the following values:

gps

location-services

accelerometer

2. Required background modes

Point SDK requires access to location updates regardless of whether the app is in the background.

As part of iOS 4.0, Apple introduced a number of managed background execution modes, including delivery of location updates while in the background.

To declare background execution mode:

Locate the app’s info.plist file in the Supporting Files folder of the Xcode project.

Select the file once to display the Key/Value pairs in the editor pane.

Find the entry titled ‘Required background modes‘ or create one if it does not exist.

Select the (+) icon and select from the drop-down list provided: App registers for location updates

3. Required background updates description

Usage description is required when utilizing Location services; this is also provided in info.plist. This message will be prompted to the user when location services are first requested.

Locate the app’s info.plist file in the Supporting Files folder of the Xcode project.

Select the file once to display the Key/Value pairs in the editor pane.

Select the top row ‘Information Property List‘ then click on the ‘+’ symbol to the right to create a new row in the property list.

Select Privacy – Location Always Usage Description as the key, and select the type of String.

Enter a usage description that denotes the use of location services by your app.

Example, Your location is used by the app to get you deals closer to you while in the background. As Point SDK supports devices running iOS 10.0 and above, this key is mandatory for backward compatibility.

Click on the ‘+’ symbol to create another new row.

Enter Privacy – Location Always and When In Use Usage Description as the key, and select the type of String.

Enter a usage description that denotes the use of location services by your app.

For example: Your location is used by the app to get you deals closer to you while in use or in the background. This key is mandatory to support devices running iOS 11 and above.

Click on the ‘+’ symbol to create another new row.

Enter Privacy – Location When In Use Usage Description as the key, and select the type of String.

Enter a usage description that denotes the use of Location Services by your app.

Example, Your location is used by the app to get you deals closer to you while in use. This key is mandatory to support devices running iOS 11 and above.

4. (Optional) Local Notification Permission Prompt

The Local Notification Permission Prompt is enabled by default to make sure the SDK delivers local notifications for the ‘Message Action’ and/ or ‘URL Action’ set on a Zone through Point Access User Interface.

Optional: To disable the notification permission prompt, the following key should be declared in the info.plist of any integrating app:

1. Locate the app’s info.plist file in the Supporting Files folder.
2. Select the (+) icon to add a new key. BDPointLocalNotificationEnabled, and set the value to Boolean Type.

set the value to YES to enable default notification prompt.

set the value to NO to disable default notification prompt.

Step 5: Integration Checklist

1. Xcode Project Configuration Checklist

The following is a checklist of project configurations that must be made for successful integration of Point SDK into an app.

The BDPointSDK.framework files are included in the Embedded Binaries section.

The Strip Symbols Run Script Phrase are included in the Build Phase section

Always Embed Swift Standard Libraries is set to Yes.

The necessary iOS SDK Frameworks are linked to the executable target. These are:

CoreLocation

CoreMotion

SystemConfiguration

MapKit

CoreGraphics

UIKit

The following keys are added to the UIRequiredDeviceCapabilities section of the info.plist: (skip this step if it is an already published app and these capabilities did not exist previously – refer to Apple guideline on this here)

gps

location-services

accelerometer

The following keys are added to the UIBackgroundModes section of the info.plist:

location

The following keys are added to the Information Property List in the info.plist: