SDK Developer Guide
Add LogDrop to iOS, Android, React Native, Flutter and Web apps to collect crashes, logs, events and user data, send push notifications and trace requests.
Welcome to the LogDrop Developer Guide.
Here, you'll find step-by-step instructions for integrating LogDrop into your mobile and web applications across supported platforms.
Each SDK sends crashes, logs, network activity, events and user data from your app to the LogDrop project whose App ID you configure. You review that data in LogDrop Panel.
Currently supported platforms
| Platform | Language | Install with | Good to know |
|---|---|---|---|
| iOS | Swift | Swift Package Manager (recommended), or CocoaPods from the LogDrop-iOS git repository | Native SDK. Upload dSYM files for readable crash reports. |
| Android | Kotlin / Java | Gradle, from the LogDrop Maven repository | Native SDK. The LogDrop Gradle plugin uploads ProGuard/R8 mapping files. |
| React Native | JavaScript / TypeScript | @log-drop/react-native with npm or yarn | Built on the native iOS and Android SDKs, and also reports JavaScript errors. |
| Flutter | Dart | logdrop_flutter_sdk in pubspec.yaml | Built on the native iOS and Android SDKs. The App ID is set in the native projects. |
| Web | JavaScript / TypeScript | @log-drop/web with npm or yarn, or a script tag | Runs in the browser, on plain HTML pages or with React, Vue, Angular, Svelte and Next.js client components. |
Each platform section includes
The platform guides cover the same topics in the same order. Differences between platforms are noted under each topic below.
SDK installation
Add the SDK with your platform's package manager. iOS uses Swift Package Manager or CocoaPods. Android adds the LogDrop Maven repository and the SDK dependency in Gradle. React Native and Web install an npm package, and Flutter adds logdrop_flutter_sdk to pubspec.yaml.
Initialization
Initialize LogDrop once, as early as possible when the app or page starts, so that crashes and requests made during startup are captured. You need your project's App ID from Project Settings → App ID: iOS, Android, React Native and Flutter use the Mobile SDK App ID, and the Web SDK uses the Web App ID. Set a base URL only for a self-hosted LogDrop.
On Flutter, the App ID and base URL go into the native iOS and Android projects, because the Flutter SDK runs on the native SDKs.
Configuration (LogDropConfig)
LogDropConfig holds the App ID, SDK debug logging and the optional base URL. On mobile it also takes your push callbacks and deep-link handlers. Some behavior, such as crash tracking, is not set in code: it is switched on and off from the panel under Settings → App Config.
Crash tracking
After initialization, uncaught crashes are reported automatically. For readable stack traces, upload your symbol files:
- iOS: dSYM files, with a Run Script build phase. You can also upload missing dSYM files from the panel.
- Android: ProGuard/R8 mapping files, with the LogDrop Gradle plugin.
- React Native: native crashes come from the native SDKs, and JavaScript errors are reported as well. Upload React Native source maps together with the dSYM files on iOS; the LogDrop Gradle plugins upload them on Android.
- Flutter: Flutter framework errors and uncaught Dart errors are reported. Native crashes need the iOS and Android symbol uploads.
- Web: uncaught JavaScript errors and unhandled promise rejections are reported. You can also report an error your code already handled. Minified bundles show minified file names and positions.
Logging methods
Write logs at four levels: error (LogDrop.e), warning (LogDrop.w), info (LogDrop.i) and debug (LogDrop.d). Logs are kept on the device first and uploaded later:
- Mobile:
LogDrop.sendLogs()schedules an upload about 60 seconds later. Further calls do not add another upload while one is waiting or running. - Web: logs are uploaded every 60 seconds, or sooner when enough logs are waiting.
LogDrop.sendLogs()uploads right away, and logs left behind by a closed tab are sent on the next visit.
LogFlow
LogFlow groups the logs of one business flow or transaction, such as a checkout or a payment, under a name, an ID and optional custom attributes. Pass the flow to each log call, then filter and analyze those logs in the panel by flowName and flowId.
Fetch Logs integration
Fetch Logs in the panel asks devices to upload their logs now, for every device or for one Device UUID. The request reaches the app as a silent LogDrop push, so it works once push is integrated in the app and the push backends are configured in Settings → Push Backends.
Push notifications
LogDrop push supports alert, rich, in-app, deep-link, internal-browser and silent fetch-logs messages. Your app forwards LogDrop messages to the SDK:
- iOS: APNs. A Notification Service Extension, sharing an App Group with the app, lets LogDrop record alert pushes while the app is not running.
- Android: Firebase Cloud Messaging, and optionally Huawei Mobile Services.
- React Native: React Native Firebase on Android and APNs forwarding on iOS.
- Flutter: FlutterFire Messaging on Android, and APNs forwarding and a Notification Service Extension on iOS.
- Web: a service worker (
logdrop-sw.js) served over HTTPS from your own domain.
You send messages from Push Notification in the panel or from a Customer Journey.
Deep links
On mobile, deep links route the user from a LogDrop push or in-app message to the right screen. The iOS guide covers custom URL schemes, universal links and the SwiftUI app lifecycle. The Android guide covers a cold start and an app that is already open (singleTop / singleTask). You can also take over routing with your own deep-link handler.
User identification (UUID customization)
By default, data is tied to a device identifier, or a browser identifier on the Web. Pass a stable, unique ID, such as an email address or an internal customer ID, to LogDrop.updateUser (iOS and Web) or LogDrop.userUpdate (Android, React Native and Flutter), and later logs are associated with that user in the panel. You can then find the user by User UUID on the Devices page.
On the Web, the ID is remembered across page loads. Call LogDrop.updateUser(null) when the user signs out.
Custom events
Track actions specific to your app with a stable event name and optional JSON-compatible properties. No setup is needed in the panel: after the first valid event arrives, the Events page shows it with its properties and their types. You can use events in Event Analytics funnels and as the entry or wait events of Customer Journeys.
The SDK rejects invalid names, invalid properties and oversized payloads before sending, and logs the reason.
Custom user attributes
Attach stable profile information, such as a plan, a language or a phone number, to the current device. A device can have up to 30 attribute keys; an update that would go over the limit is rejected.
Use the attributes to target a segment in Send Push, and as the recipient and consent fields of SMS and WhatsApp steps in Customer Journeys.
Tracing (end-to-end, into your backend)
The mobile SDKs add a W3C traceparent header to the HTTP requests they track, so a backend traced by LogDrop continues the same trace. One request then shows up from the device through your services, databases and message brokers.
Tracing needs iOS SDK 2.1.11, Android SDK 2.1.11, React Native SDK 2.1.2 or Flutter SDK 3.0.7 or later, with HTTP Logging turned on and the app and backend sending to the same LogDrop project. On Android, also apply the LogDrop Gradle plugin. There is nothing else to configure in the app. See End-to-end Tracing.
Screen tracking and App Health (mobile)
The mobile SDKs record the screen the user is looking at as screen_view events, and send app start time, slow and frozen frames, freezes, memory, CPU, battery, network and HTTP timing metrics with each session for the panel's App Health page. The metrics need no code.
- iOS: view controllers are tracked automatically; name SwiftUI screens with
.logDropScreen(_:). - Android: Activities and AndroidX Fragments are tracked automatically; call
LogDrop.trackNavigation(navController)for Jetpack Navigation. - React Native and Flutter: native automatic tracking is off, because it only sees the host screen. Use
createLogDropNavigationTracker(React Navigation) orLogDropNavigatorObserver(Flutter Navigator). - On every platform,
LogDrop.trackScreen(name)sets the screen yourself.
This needs iOS SDK 2.1.16, Android SDK 2.1.16, React Native SDK 2.2.0 or Flutter SDK 3.1.0 or later.
These SDK versions send two new system events and add properties to existing ones. You can see them on a device's events, filter them, and use them in Customer Journeys and alert rules like other system events. Events are recorded only when event tracking is enabled for the project.
| Event | Properties | When it is sent |
|---|---|---|
screen_view | screen_name, screen_kind, previous_screen_name (not on the first screen), load_duration (ms, only for a newly created screen) | The user moves to a different screen. screen_kind says how the screen was found: activity, fragment, dialog or navigation on Android, view_controller on iOS, and manual for LogDrop.trackScreen (always manual in Flutter and React Native). |
app_hang | elapsed_duration (ms), hang_kind (hang or anr), screen_name | The app's main thread froze: a freeze, or a long freeze (anr; Android: 5 s or more, iOS: 2 s or more). |
app_open | start_duration (ms) | Existing event; now carries the cold start time. |
app_foregrounded | start_duration (ms) | Existing event; now carries the warm start time. |
app_backgrounded | screen_name | Existing event; now carries the screen the user left the app from. |
Web only: HTTP monitoring, sessions and risk signals
- HTTP monitoring: when HTTP logging is on,
fetchandXMLHttpRequestrequests are recorded with their method, URL, status, duration, headers and bodies. The App Config rules are applied in the browser, andAuthorization,Cookie,Set-CookieandX-Api-Keyheaders are always masked. - Sessions: a session lasts as long as the browser tab. A new tab, a new window or a different signed-in user starts a new session.
- Security and risk signals: when risk detection is on, the SDK reports signals such as automation tools, headless browsers and open DevTools, and applies the risk policies set in the panel. A policy can show a warning, block the page or block network requests.
Troubleshooting
Each guide ends with checks for the most common problems: the App ID and base URL, the symbol upload steps, custom events or attributes rejected by the SDK, and turning on verbose SDK logging during development.
Follow requests into your backend
The SDKs start a trace on the device that a backend traced by LogDrop continues, so one request shows up from the app into your services. See End-to-end Tracing and Backend Tracing.
Using an AI coding assistant?
Connect the read-only Docs MCP server so your assistant can search and read these guides. It cannot see your LogDrop projects; for that, use the LogDrop MCP server.
Platforms
iOS
Swift, with Swift Package Manager or CocoaPods. dSYM upload, APNs push, deep links and tracing.
Android
Kotlin and Java, with Gradle. Mapping upload, FCM and HMS push, deep links and tracing.
React Native
JavaScript and TypeScript on the native SDKs. JavaScript errors, push, deep links and tracing.
Flutter
Dart on the native SDKs. Flutter and Dart errors, push, deep links and tracing.
Web
JavaScript and TypeScript in the browser. HTTP monitoring, web push, sessions and risk signals.
.png)