iOS Privacy & App Store
The iOS SDK is built to pass App Store review and to collect only what you choose. This page covers what it collects and what to set before you ship.
Apple's tracking permission
The SDK identifies devices using Apple's advertising identifier, so it asks for tracking permission (App Tracking Transparency) the first time it starts.
- Allowed: the SDK starts and returns a Lucia ID.
- Declined: the SDK collects nothing and returns
permissionDenied. Nothing is sent to Lucia.
You must add NSUserTrackingUsageDescription to Info.plist (see the
Quickstart), or iOS won't show the prompt.
Every decision is saved on the device as a consent receipt: when it was made, the answer, the data tier, and the SDK and app versions. That gives you a record of consent if you're ever asked for one.
Choose how much to collect
Pass a tier when you start the SDK. Higher tiers collect more:
| Tier | Collects | Use it when |
|---|---|---|
.tier1Metrics (default) | Device identifier, device model, iOS version, app version | You only need device identity |
.tier2MetricsAndTouch | Tier 1 + taps and swipes | You want engagement data (most apps) |
.tier3Full | Tier 2 + IP address and extended device details | You have explicit consent and a signed data processing agreement with Lucia |
To leave out specific fields even when the tier allows them, pass overrides:
overrides: DataMinimizationOverrides(excludedFields: [
DataMinimizationOverrides.Field.ipAddress,
DataMinimizationOverrides.Field.timezone,
])
Regions
Some places have stricter privacy laws. The SDK checks the device's region and applies the
regionPolicy you choose:
| Policy | In the EU, UK, or California |
|---|---|
.disableInRestrictedRegions (default) | The SDK stays off and returns regionRestricted |
.clampToTier1InRestrictedRegions | Collects Tier 1 only (no touches, no IP) |
.allowAll | Uses the tier you asked for |
How the region is detected:
- EU / EEA / UK: the device's region setting is an EU or EEA country, or the UK.
- California: the region is the US and the time zone is
America/Los_Angeles. This also catches some users in Oregon, Washington, and Nevada, which errs on the cautious side.
If you have users in the EU or UK and a consent flow in place, use
.clampToTier1InRestrictedRegions. The SDK stays on there but collects the minimum.
App Store privacy details
The SDK includes Apple's privacy manifest (PrivacyInfo.xcprivacy), so Xcode adds its data
use to your app's privacy report automatically. It declares:
- Tracking: yes. Device ID is used for tracking.
- Data collected, linked to the user: device ID, user ID, coarse location, product interaction, performance data, and other diagnostic data.
- Purposes: analytics, app functionality, and product personalization.
Use this when you fill in App Privacy in App Store Connect.
Data on the device
- Touch events waiting to be sent are encrypted (AES-256) with a key kept in the device's Keychain. They're deleted after 7 days if they can't be sent.
- Consent receipts are kept for 2 years.
Change these with retentionPolicy:
retentionPolicy: RetentionPolicy(
touchEventTTL: 3 * 24 * 60 * 60, // 3 days
consentReceiptTTL: 365 * 24 * 60 * 60 // 1 year
)
Limits
To stop a bug in your app from flooding Lucia, the SDK caps events at 10,000 per session and
100,000 per day per device. Change them with rateLimitPolicy: RateLimitPolicy(maxEventsPerSession:maxEventsPerDay:).
Certificate pinning (optional)
For extra protection against intercepted traffic, list the SHA-256 hashes of Lucia's server
public keys in Info.plist under LuciaSDKPinnedCertHashes. With no hashes listed, pinning is
off and normal HTTPS checks apply. Contact Lucia support for the current hashes.
For the web side of privacy, see Privacy & Compliance.