Respectlytics Respect lytics
Menu
Swift (iOS) No cross-app tracking

How Swift (iOS) analytics avoids cross-app tracking

Cross-app tracking — linking the same user across multiple apps via IDFA, AAID, deterministic identifiers, or device fingerprints — is the underlying mechanism Apple's ATT and Google's Privacy Sandbox were designed to constrain. Respectlytics's Swift (iOS) SDK has no cross-app linking surface at all: the rotating session_id is scoped to a single app install, and there is no persistent identifier that survives across apps on the same device. Below: what isn't possible, what stays available, and the FAQ.

Install the Swift (iOS) SDK

swift Respectlytics
// Package.swift
dependencies: [
    .package(url: "https://github.com/respectlytics/respectlytics-swift.git", from: "3.0.0")
]
// Or via Xcode → File → Add Packages → paste the URL above.

The SDK ships only via Swift Package Manager. CocoaPods and Carthage are not published — fewer integration paths means fewer surfaces to keep audited.

Initialize Respectlytics in Swift (iOS)

swift Respectlytics
import Respectlytics

@main
struct MyApp: App {
    init() {
        Respectlytics.configure(appKey: "<YOUR_APP_KEY>")
    }
    var body: some Scene { WindowGroup { ContentView() } }
}

Call configure once at app launch — typically in your App struct's init. No Info.plist keys are required: the SDK does not call ATTrackingManager and does not request the IDFA, so NSUserTrackingUsageDescription should NOT be added.

Privacy & implementation notes

Cross-app tracking is the mechanism Apple's App Tracking Transparency was designed to gate. Apps that don't track across apps are the apps that don't need ATT. Respectlytics's no-cross-app posture isn't a feature you configure — it's the architecture's default. The compliance question shifts from "how do we track across apps without falling foul of ATT?" to "do we need to at all?".

Multi-app suites that need cross-app insight typically resolve this in their account / authentication layer: a shared user account with a single user ID that the company controls, queried from their account system (not from analytics). That keeps the per-user data in the system that legitimately needs it; analytics stays product-engagement-only.

Apple rejected approximately 3% of apps in 2024 for incorrectly omitting NSUserTrackingUsageDescription when ATT was required by the SDKs they shipped. Respectlytics doesn't trigger ATT. The corollary is also true: do not add the key on Respectlytics's account — its presence implies you track across apps, even if your code never calls requestTrackingAuthorization.

Internally the Swift SDK uses Swift Concurrency: events are queued in an actor-isolated buffer (RAM-only), flushed on a 30-second timer and on UIApplication.willResignActiveNotification. Force-quit before flush drops queued events — by design. There is no UserDefaults or file backing.

How this compares to other analytics SDKs

Cross-app trackingFirebase AnalyticsMixpanelAppsFlyerRespectlytics
Same user, different apps, same vendorPossible (via IDFA/AAID)Yes (with shared distinct_id)Yes (via vendor account)No (sessions are per-app)
Same user, different vendors' appsPossible (with consent)NoYesNo
Lookalike audiences from your dataPossible (with consent)LimitedYesNo
First-party cross-app journeyYes (within Firebase project)YesYesNo
Per-app analytics independenceManageableManageableManageableDefault

Frequently asked questions

If we have multiple apps from the same company, can we still see how a user moves between them?

Not via Respectlytics. Each app you instrument is its own analytics scope, with its own session IDs and event streams. If you genuinely need to correlate user behaviour across multiple of your apps, that's a use case Respectlytics doesn't serve — it requires a persistent cross-app identifier, which is exactly what the architecture rejects.

What about deferred deep links from app A to app B?

That's an attribution / routing concern, not an analytics one. Apple Universal Links and Android App Links route URLs natively. If you need deferred install attribution between apps, that's a job for an attribution SDK — but those typically rebuild the cross-app tracking surface Respectlytics avoids. Trade-off: pick one.

Can we still measure same-user behaviour within a single app session?

Yes — within one session_id (max 2 hours, RAM-only) you can derive intent paths, funnel completion, time-on-task, etc. The constraint is only the cross-session and cross-app boundaries; within one session everything is joinable by session_id.

What does this mean for a multi-app suite (e.g., main app + companion app)?

Each app has its own analytics. Aggregate metrics — "how many sessions in the suite this week" — sum naturally. User journeys across apps — "how many users used both" — are not measurable via Respectlytics; that data lives in your account system if it lives anywhere.

Related guides

Track what matters. Collect nothing you don't.

Five-field event schema, RAM-only event queue, no IDFA, no AAID, no persistent user IDs. Helps developers avoid collecting personal data in the first place.