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 12 or later with iOS 14+ deployment target
- Valid API Key from DoorstepAI
- Swift Package Manager (recommended) or manual framework integration
We recommend using the latest stable version of Xcode for the best development experience and access to the latest iOS features.
Installation Methods
Swift Package Manager (Recommended)
Add the DoorstepAI iOS SDK using Swift Package Manager:
- In Xcode, go to
File
→Add Package Dependencies
- Enter the repository URL:
https://github.com/doorstep-ai/DoorstepDropoffSDKPackage
- Select version requirements and click
Add Package
- 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:
<?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>UIBackgroundModes</key>
<array>
<string>location</string>
</array>
</dict>
</plist>
Permission Descriptions
Permission | Purpose | Required |
---|---|---|
NSLocationWhenInUseUsageDescription | Location access during app usage | ✅ Required |
NSLocationAlwaysAndWhenInUseUsageDescription | Background location access | ✅ Required |
NSMotionUsageDescription | Motion and sensor data | ✅ Required |
UIBackgroundModes (location) | Background location processing | ✅ Required |
Runtime Permission Requirements
Permission | Purpose | Runtime Required | Notes |
---|---|---|---|
Location Services | Location access during app usage | ✅ Yes | System prompts automatically |
Location Services | Background location access | ✅ Yes | System prompts automatically |
Motion & Fitness | Motion and sensor data | ✅ Yes | System prompts automatically |
iOS handles permission requests automatically through system prompts. Users will be prompted for location and motion permissions when your app first attempts to access these features. Ensure your app's privacy policy clearly explains how location data is used.
Verification
To verify the installation was successful:
- Build your project (
Cmd + B
) - Check for import errors in files using
import DoorstepDropoffSDK
- Verify permissions are properly configured in your Info.plist
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:
- 📚 Learn SDK Usage - Initialize and use the SDK
- 💡 View Examples - See complete implementation examples
Ready to initialize the SDK? Head over to our Usage Guide to get started with SDK initialization and basic implementation.