Mobile SDKs
Datafly Signal provides native and cross-platform mobile SDKs that bring the same server-side tag management capabilities to your mobile apps. Instead of embedding multiple vendor SDKs (Meta, GA4, TikTok, etc.) directly into your app, the Datafly SDK captures events on-device and delivers them server-to-server through your Signal pipeline.
Why use the Datafly mobile SDK?
Traditional mobile analytics requires embedding each vendor’s SDK directly into your app. Each SDK adds binary size, runtime overhead, and privacy complexity:
- App bloat — each vendor SDK adds 1—10 MB to your app binary
- Privacy risk — vendor SDKs access device data and transmit to third-party servers
- Maintenance burden — SDK version conflicts, breaking changes, and deprecations
- Data silos — each vendor sees only their own events with no unified identity
Datafly replaces all of these with a single lightweight SDK.
How it works
Mobile App Your Server Vendors
┌──────────────────┐ ┌──────────────────┐ ┌──────────┐
│ Datafly SDK │── batch ──>│ Ingestion Gateway │──batch──>│ GA4 API │
│ (~50 KB) │ first-party│ │ │ Meta API │
│ │ │ Event Processor │ │ TikTok │
│ .track() │ │ Delivery Workers │ │ Pinterest│
│ .screen() │ │ │ │ Snapchat │
│ .identify() │ └──────────────────┘ └──────────┘
└──────────────────┘
│
└── Offline queue (SQLite)
Retry with backoff
Network-aware- The Datafly SDK initialises with your pipeline key and endpoint
- Events are captured and queued in a local SQLite database
- Events are batched and sent to your Ingestion Gateway when connectivity is available
- The server processes events through your configured pipelines
- Delivery Workers send data server-to-server to each vendor’s API
Size comparison
| Approach | Binary size added | Network requests | Data control |
|---|---|---|---|
| Meta SDK + GA4 SDK + TikTok SDK + Pinterest SDK | 15—40 MB | Multiple per event | Third-party |
| Datafly SDK | ~50 KB | 1 per batch | First-party |
Available SDKs
Native
| Platform | Language | Package | Min version |
|---|---|---|---|
| iOS | Swift | DataflySignal (SPM) | iOS 15+ |
| Android | Kotlin | com.datafly:signal (Gradle) | API 21+ (Lollipop) |
Cross-platform
| Framework | Language | Package |
|---|---|---|
| React Native | TypeScript | @datafly/react-native |
| Flutter | Dart | datafly_signal |
| .NET MAUI / Xamarin | C# | DataflySignal.Maui |
| Cordova | JavaScript | cordova-plugin-datafly-signal |
| Capacitor (Ionic) | TypeScript | @datafly/capacitor |
All cross-platform SDKs are thin wrappers around the native iOS and Android SDKs. They provide the same functionality and use platform channels / native modules to call through to the native implementation. This means you get native performance and reliability regardless of your framework choice.
Unified API
All SDKs share the same API surface:
initialize(config) // Set up the SDK with pipeline key and endpoint
track(event, properties) // Record a custom event
screen(name, properties) // Record a screen view
identify(userId, traits) // Link anonymous visitor to known user
group(groupId, traits) // Associate user with a company or organisation
setConsent(categories) // Set consent categories
handleDeepLink(url) // Extract UTM params and click IDs from deep links
setAdvertisingId(id) // Set IDFA (iOS) or AAID (Android)
flush() // Force immediate upload of queued events
reset() // Generate new anonymous ID (logout)Key features
- Zero external dependencies — native SDKs use only platform framework APIs
- Offline-first — events are persisted to SQLite and sent when connectivity is available
- Automatic batching — configurable flush interval (default 30s) and threshold (default 20 events)
- Exponential backoff retry — failed uploads retry with jitter (1s, 2s, 4s, 8s, 16s, 32s)
- Network-aware — pauses uploads when offline, resumes automatically on reconnect
- Session tracking — 30-minute inactivity timeout with session numbering
- App lifecycle events — automatic tracking of install, update, open, and background
- Vendor ID generation — self-generates GA4
client_id, Metafbp, TikTokttp, Pinterest_pin_unauth - Click ID capture — extracts 13+ vendor click IDs from deep links (gclid, fbclid, ttclid, etc.)
- Device identity — IDFV (iOS) and Android ID collected automatically; IDFA/AAID opt-in
- Consent management — category-based consent with local persistence
- Identity resolution — server-side anonymous-to-known stitching via canonical identity graph
Next steps
- iOS Installation — add the SDK to your Swift project
- Android Installation — add the SDK to your Kotlin/Java project
- Identity & Device IDs — understand how identity works on mobile
- Offline & Batching — how events are queued and delivered