Habit Analytics
  • What is the Habit Analytics Platform?
  • How to integrate devices with Habit Analytics
  • How to integrate an application with Habit Analytics
  • How to create a custom mobile app with Habit Analytics
  • Selfcare
    • What is Selfcare?
    • Projects
    • Integrations
  • SDK
    • Getting Started
    • iOS Quick Start
      • Installation
      • Xcode Project Configuration
      • Usage
        • SDK Initialization
        • Configuration
        • Tracking UX Events
        • Status Codes
Powered by GitBook
On this page
  • 1. Enable Background Modes
  • 2. Permissions

Was this helpful?

  1. SDK
  2. iOS Quick Start

Xcode Project Configuration

PreviousInstallationNextUsage

Last updated 4 years ago

Was this helpful?

1. Enable Background Modes

In the Signing & Capabilities tab of your project settings turn on Background Modes and enable: Location updates and Background fetch as seen in the image.

2. Permissions

As required by Apple, it's necessary to add the following permissions' descriptions to the project .plist file:

  • NSLocationAlwaysUsageDescription

  • NSLocationAlwaysAndWhenInUseUsageDescription

  • NSLocationWhenInUseUsageDescription

  • NSLocationUsageDescription

  • NSBluetoothPeripheralUsageDescription

  • NSBluetoothAlwaysUsageDescription

  • NSMotionUsageDescription

The best practice is to notify the user beforehand, providing an incentive to approve the permissions. Apple's Human Interface Guidelines provide useful tips about requesting permissions.

Warning: App submission will fail if these are not provided.