Skip to main content

iOS SDK Installation

Get started with the DoorstepAI iOS SDK to add intelligent delivery tracking to your application.

Prerequisites

Before you begin, ensure you have:

  • Xcode 13 or later with an iOS 15+ deployment target
  • Valid API Key from DoorstepAI
  • Swift Package Manager (recommended) or manual framework integration
Development Environment

We recommend using the latest stable version of Xcode for the best development experience and access to the latest iOS features.

Installation Methods

Add the DoorstepAI iOS SDK using Swift Package Manager:

  1. In Xcode, go to FileAdd Package Dependencies
  2. Enter the repository URL: https://github.com/doorstep-ai/DoorstepDropoffSDKPackage
  3. Select version requirements and click Add Package
  4. Import the SDK in your Swift files:
import DoorstepDropoffSDK

Manual Integration

If you prefer manual integration, contact our support team for framework distribution.

Required Permissions

Update your app's Info.plist file with the following permissions:

Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string>This app requires access to your location for enhanced delivery intelligence</string>

<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>This app requires access to your location for enhanced delivery intelligence</string>

<key>NSMotionUsageDescription</key>
<string>This app requires access to motion data for enhanced delivery intelligence</string>

<key>NSBluetoothAlwaysUsageDescription</key>
<string>This app requires access to Bluetooth for enhanced delivery intelligence</string>

<key>UIBackgroundModes</key>
<array>
<string>location</string>
</array>
</dict>
</plist>

Permissions

PermissionRequired
NSLocationWhenInUseUsageDescriptionYes
NSLocationAlwaysAndWhenInUseUsageDescriptionYes
NSMotionUsageDescriptionYes
NSBluetoothAlwaysUsageDescriptionYes
UIBackgroundModes (location)Yes
Ask for permissions before the first delivery

Do not let iOS raise these prompts on its own: a system alert that appears the moment collection starts lands in the middle of a delivery, which is exactly the antipattern the SDK now defends against. Run the staged DoorstepAI.requestPermissions(...) flow from user-initiated "Start shift" or onboarding actions before the first delivery begins—see the staged permission flow.

Always authorization is required for locked-phone operation.

Verification

To verify the installation was successful:

  1. Build your project (Cmd + B)
  2. Check for import errors in files using import DoorstepDropoffSDK
  3. Verify permissions are properly configured in your Info.plist
  4. Confirm the keys are wired at runtime by calling DoorstepAI.checkPermissions() — it never prompts, and any bucket that comes back notDeclared means its Info.plist usage-description key is missing from your build

If you encounter any issues during installation, check our troubleshooting guide or contact our support team.

Next Steps

Now that you have the SDK installed and configured:

  1. 📚 Learn SDK Usage - Initialize and use the SDK
  2. 🔐 Review Permissions - Implement the staged authorization flow
  3. 💡 View Examples - See complete implementation examples