# Despia Documentation ## Docs - [Attribution](https://setup.despia.com/analytics/appsflyer/attribution.md): Read where every user came from across TikTok, Meta, Google, affiliate, or organic using data injected by Despia on every page load. - [Campaigns](https://setup.despia.com/analytics/appsflyer/campaigns.md): Connect TikTok and Meta as integrated partners, create custom attribution links, and measure which campaigns drive the most valuable users. - [Deep Linking](https://setup.despia.com/analytics/appsflyer/deeplinking.md): Route users to specific pages inside the app from ad campaigns and creator affiliate links, even if the app was not installed at the time of the click. - [Events](https://setup.despia.com/analytics/appsflyer/events.md): Log standard and custom in-app events from your web layer. Standard af_ events automatically map to Meta and TikTok conversion events in their dashboards. - [Introduction](https://setup.despia.com/analytics/appsflyer/introduction.md): Track installs, attribution, and in-app events across TikTok, Meta, Google, and organic channels using the Despia AppsFlyer bridge. Currently available on iOS, with Android coming soon. - [Testing](https://setup.despia.com/analytics/appsflyer/testing.md): Confirm your AppsFlyer setup is working before you launch. No coding tools required. - [User Session](https://setup.despia.com/best-practices/backend/one-signal/user-session.md): This guide covers user identity management for push notifications using OneSignal in Despia apps. - [Cron Jobs](https://setup.despia.com/best-practices/backend/revenuecat/cron-jobs.md): Implement a self-healing subscription sync system using scheduled cron jobs as a backup to webhooks. This ensures your database stays synchronized with RevenueCat even when webhooks fail or are delayed. - [User Session](https://setup.despia.com/best-practices/backend/revenuecat/user-session.md): This guide covers user identity management for in-app purchases and subscriptions using RevenueCat in Despia apps. - [Webhooks](https://setup.despia.com/best-practices/backend/revenuecat/webhooks.md): Complete implementation guide for processing RevenueCat webhooks with authorization validation, event type handling, and entitlement management. - [User Session](https://setup.despia.com/best-practices/backend/user-session.md): This guide covers the general user identity management pattern for Despia apps. This system is the foundation that all SDK integrations (RevenueCat, OneSignal, Stripe, etc.) build upon. - [Animations](https://setup.despia.com/best-practices/frontend/animations.md): CSS animation first. Scroll-driven CSS for drawers, sheets, parallax, and page transitions. JS fallback only where CSS is not supported. - [Performance](https://setup.despia.com/best-practices/frontend/performance.md): Build applications optimized for 60fps performance that degrade gracefully under system constraints. This guide covers proven techniques for JavaScript execution, rendering optimization, memory management, and asset delivery. - [Structure](https://setup.despia.com/best-practices/frontend/structure.md): Essential patterns for building production-ready mobile applications with Despia. Learn how to structure root frames, handle device boundaries, implement scroll containers, and optimize touch interactions for native performance. - [Editor](https://setup.despia.com/best-practices/updates/editor.md): Changes made in the Despia editor affect the native binary. They require a rebuild and a new submission to the App Store and Google Play. - [Interface](https://setup.despia.com/best-practices/updates/interface.md): UI changes are the safest and most common use of OTA. They ship instantly, require no binary, and reach every user on the next app open. - [Logic](https://setup.despia.com/best-practices/updates/logic.md): Business rules, data handling, API integrations, state management, routing - all web layer. They ship via OTA, silently, with no review and no rebuild. - [Overview](https://setup.despia.com/best-practices/updates/overview.md): Getting OTA updates right means your app stays fast, your users stay unblocked, and you never give a reviewer a reason to push back. - [Changelog](https://setup.despia.com/changelog.md): New features, improvements, and fixes across the Despia platform. - [Automatic](https://setup.despia.com/deployment/apple-ios/automatic.md): Complete guide for building and publishing iOS applications using Despia - [Manual](https://setup.despia.com/deployment/apple-ios/manual.md): Complete guide for exporting and working with your Despia application as native Swift code. - [Automatic](https://setup.despia.com/deployment/google-android/automatic.md): Complete guide for building and publishing Android applications using Despia. - [Manual](https://setup.despia.com/deployment/google-android/manual.md): Complete guide for exporting and working with your Despia application as native Android code. - [Apple Health](https://setup.despia.com/health-data/apple-health.md): Read and write Apple HealthKit data including steps, heart rate, sleep, workouts, and more within your Despia app. - [Google Health](https://setup.despia.com/health-data/google-health.md): Google Health Connect integration for Android is coming soon to Despia. - [Introduction](https://setup.despia.com/introduction.md): Despia lets your web app call native device features and ship to iOS and Android - no Swift, no Java, no terminal. - [Introduction](https://setup.despia.com/local-cdn/introduction.md): Cache gigabytes of media on-device with O(1) memory usage and background downloads that continue after the app is closed. - [Reference](https://setup.despia.com/local-cdn/reference.md): Complete API reference for localcdn:// commands, the contentServerChange callback, and the HTTP upload API. - [Introduction](https://setup.despia.com/local-database/introduction.md): Native local SQLite database with optional real-time backend sync for Despia apps. - [Reference](https://setup.despia.com/local-database/reference.md): Full API reference for @despia/powersync, init, query, write, watch, sync, and migrate. - [Introduction](https://setup.despia.com/local-intelligence/Introduction.md): Run language models on-device in hybrid apps with one function call. Private by default, offline after first download, zero per-token cost. - [Reference](https://setup.despia.com/local-intelligence/reference.md): Complete API reference for despia-intelligence: run, models, runtime, events, and error codes. - [Introduction](https://setup.despia.com/local-server/introduction.md): Ship native iOS and Android apps that boot instantly and work completely offline by serving your web build from an on-device HTTP server. - [Reference](https://setup.despia.com/local-server/reference.md): Plugin installation, framework configuration, manifest schema, and troubleshooting for the Despia local server. - [MCP Server](https://setup.despia.com/mcp-server.md): Ship true native features for your web-native apps faster and with more precision using the Despia MCP. - [Action Sheet](https://setup.despia.com/native-features/action-sheet.md): Trigger a native iOS or Android action sheet from your web app and react to the user's selection. - [Interstitial Ads](https://setup.despia.com/native-features/admob/Iinterstitial.md): Display a full-screen native AdMob interstitial ad at a natural transition point using a single fire-and-forget SDK call. - [Inline Ads](https://setup.despia.com/native-features/admob/inline-ads.md): Render AdMob ads as real DOM elements inside your web UI by bridging the Google Mobile Ads SDK to the Despia WebView. No native overlays, no z-index fights, just AdSense, GPT, or IMA tags loading in place. - [Rewarded Ads](https://setup.despia.com/native-features/admob/rewarded-ads.md): Display a native AdMob rewarded video ad through Despia and grant in-app rewards only when the user completes the view. - [App Privacy](https://setup.despia.com/native-features/app-privacy.md): Read the user's tracking consent status synchronously through despia.trackingDisabled to gate analytics and ad-tracking behavior. - [App Settings](https://setup.despia.com/native-features/app-settings.md): Open your app's native settings page directly so users can re-grant push notification, location, or camera permissions they previously denied. - [Audio](https://setup.despia.com/native-features/audio-player.md): Stream audio with a real native player, lock-screen controls, and live config updates. - [Biometrics](https://setup.despia.com/native-features/biometrics.md): Trigger Face ID, Touch ID, or device passcode authentication through Despia and respond via three global callback functions. - [Camera Roll](https://setup.despia.com/native-features/camera-roll.md): Save remote-hosted images to the device photo gallery through Despia using a single fire-and-forget SDK call with a CDN-hosted URL. - [Clipboard](https://setup.despia.com/native-features/clipboard.md): Read the device clipboard contents through Despia and use them inside your app, useful for paste-style flows like coupon codes, share links, and attribution tokens. - [Contact Access](https://setup.despia.com/native-features/contact-access.md): Read the user's device contacts through Despia after requesting native permission, returned as a JSON object keyed by contact name. - [Deeplinking](https://setup.despia.com/native-features/deeplinking.md): Configure universal links on iOS and app links on Android so URLs from your domain open directly inside your Despia app instead of the mobile browser. - [Device Indexing](https://setup.despia.com/native-features/device-indexing.md): Read the device's unique identifier through despia.uuid to track installs, link sessions, and prevent account sharing across your mobile app. - [External Links](https://setup.despia.com/native-features/external-links.md): Control how your app routes external URLs, opening payment and OAuth flows in Safari for store compliance and everything else inside the in-app browser. - [File Sharing](https://setup.despia.com/native-features/file-sharing.md): Open the device's native share sheet with a file from a CDN URL, letting users send it to any installed app, contact, or cloud service. - [Focus Events](https://setup.despia.com/native-features/focus-events.md): Detect when your app enters the foreground or background using global window callbacks. - [GPS Location](https://setup.despia.com/native-features/gps-location.md): Track a user's real-time location with configurable time intervals, distance thresholds, live frontend callbacks, and optional server delivery. - [Gyroscope](https://setup.despia.com/native-features/gyroscope.md): Read live angular velocity from the device's gyroscope plus magnetic heading from the compass on a single channel, with a magnitude threshold for filtering low-motion noise. - [Haptic Feedback](https://setup.despia.com/native-features/haptic-feedback.md): Trigger native tactile feedback through Despia using five preset haptic patterns mapped to standard interaction types. - [Home Widgets](https://setup.despia.com/native-features/home-widgets.md): Render dynamic SVG content from your backend into iOS home screen widgets, refreshed in the background at the interval you specify. - [Light & Dark Mode](https://setup.despia.com/native-features/light-and-dark-mode.md): Implement automatic light and dark mode using CSS prefers-color-scheme and Despia's injected safe area variables, with no JavaScript or SDK calls required. - [NFC](https://setup.despia.com/native-features/nfc.md): Read from and write to NFC tags directly from your web app. - [Apple Auth](https://setup.despia.com/native-features/oauth/apple.md): Sign In with Apple, platform-aware. Native Face ID on iOS, Chrome Custom Tabs on Android, popup on web. - [Google Auth](https://setup.despia.com/native-features/oauth/google.md): Sign In with Google using the Despia OAuth bridge. Opens ASWebAuthenticationSession on iOS and Chrome Custom Tabs on Android, with a standard popup on web. - [Introduction](https://setup.despia.com/native-features/oauth/introduction.md): How OAuth authentication works in Despia apps. Provider-agnostic, the same flow works for Google, Apple, TikTok, GitHub, or any OAuth 2.0 provider. - [TikTok Auth](https://setup.despia.com/native-features/oauth/tiktok.md): Sign In with TikTok using the Despia OAuth bridge. Opens ASWebAuthenticationSession on iOS and Chrome Custom Tabs on Android, with a standard redirect on web. - [Offline Push](https://setup.despia.com/native-features/offline-push.md): Schedule a local notification on the device with a title, body, deep link, and delay in seconds, fully offline and triggered without a server round-trip. - [Introduction](https://setup.despia.com/native-features/onesignal/introduction.md): Send targeted remote push notifications to your users via OneSignal. Despia includes the native OneSignal SDK, no native code required. - [Reference](https://setup.despia.com/native-features/onesignal/reference.md): Complete reference for Despia OneSignal push notifications, schemes, parameters, backend API, and targeting. - [Prevent Autoscroll](https://setup.despia.com/native-features/prevent-autoscroll.md): Stop the native WebView from repositioning when the keyboard appears so your JavaScript keyboard handling stays in full control. - [Print Documents](https://setup.despia.com/native-features/print-documents.md): Open the native print dialog with a PDF or image from a CDN URL, letting users send the document to any connected printer through the system print interface. - [Quick Actions](https://setup.despia.com/native-features/quick-actions.md): Add native long-press shortcuts to your app icon that invoke a global JavaScript function when tapped, letting users jump straight into a specific workflow. - [Introduction](https://setup.despia.com/native-features/revenuecat/introduction.md): Native App Store and Google Play billing in your web app via the Despia SDK and RevenueCat. - [Reference](https://setup.despia.com/native-features/revenuecat/reference.md): Complete reference for all Despia in-app purchase schemes, parameters, callbacks, entitlement checks, and webhook handling. - [Safe Areas](https://setup.despia.com/native-features/safe-areas.md): Handle notches, status bars, home indicators, and gesture bars using CSS variables injected by the Despia runtime, paired with a defensive env() fallback. - [Screen Brightness](https://setup.despia.com/native-features/screen-brightness.md): Set screen brightness behavior for scanning workflows, with three modes for automatic, always-bright, and standard rendering. - [Screen Radius](https://setup.despia.com/native-features/screen-radius.md): Read the device's physical screen corner radius and use it to build inner UI elements with perfectly concentric rounded corners. - [Screenshot](https://setup.despia.com/native-features/screenshot.md): Capture the visible page and save it directly to the device photo gallery through a single fire-and-forget Despia SDK call. - [Share Dialog](https://setup.despia.com/native-features/share-dialog.md): Open the native share sheet pre-populated with a text message and URL, letting users send the combination to any app, contact, or service installed on their device. - [Share Extension](https://setup.despia.com/native-features/share-extension.md): Receive content shared into your app from other apps via the system share sheet, delivered through a single global callback that fires when your app launches with a shared payload. - [Simple Storage](https://setup.despia.com/native-features/simple-storage.md): Single-slot key-value storage on the device through the Despia SDK. Legacy feature, kept for apps already shipping with it. - [Siri Shortcuts](https://setup.despia.com/native-features/siri-shortcuts.md): Register a natural language phrase as a Siri shortcut that calls a globally-defined JavaScript function in your app when spoken. - [Storage Vault](https://setup.despia.com/native-features/storage-vault.md): Encrypted persistent storage backed by iCloud Key Value Store on iOS and Android Key/Value Backup on Android. Survives uninstall and reinstall. - [Store Location](https://setup.despia.com/native-features/store-location.md): Read the user's App Store or Play Store country code through despia.storeLocation to gate regional features and route payments correctly. - [User Agent](https://setup.despia.com/native-features/user-agent.md): Detect whether your app is running in the Despia native runtime and identify the platform to conditionally render features like in-app purchases or native modules. - [Despia for Base44](https://setup.despia.com/platform-support/base44.md): Ship your Base44 app to the App Store and Google Play with native billing, push notifications, attribution, and offline support built in. - [Despia for Claude Code](https://setup.despia.com/platform-support/claude-code.md): Ship your Claude Code web app to the App Store and Google Play with native billing, push notifications, attribution, and offline support built in. - [Despia for Cursor](https://setup.despia.com/platform-support/cursor.md): Ship your Cursor-built web app to the App Store and Google Play with native billing, push notifications, attribution, and offline support built in. - [Despia for Lovable](https://setup.despia.com/platform-support/lovable.md): Ship your Lovable app to the App Store and Google Play with native billing, push notifications, attribution, and offline support built in. - [Despia for Replit](https://setup.despia.com/platform-support/replit.md): Ship your Replit web app to the App Store and Google Play with native billing, push notifications, attribution, and offline support built in. - [HealthKit](https://setup.despia.com/roadblocks/deployment/apple-i-os/health-kit.md): Your build failed after enabling HealthKit in the Despia editor. Here's why and how to fix it. - [Missing Item](https://setup.despia.com/roadblocks/revenue-cat/missing-item.md): Your paywall is empty or checkout isn't working. Products aren't loading. Here's how to debug it. - [Empty Pages](https://setup.despia.com/roadblocks/runtime/empty-pages.md): Your app loads but shows a blank white screen. Here's how to fix it. - [Lost Auth Tokens](https://setup.despia.com/roadblocks/runtime/lost-auth-tokens.md): Your users close the app and when they reopen it, they're logged out. Here's how to fix it. - [No OTA Updates](https://setup.despia.com/roadblocks/runtime/no-ota-updates.md): Your users aren't receiving OTA updates. Changes deployed to production don't appear in the app. Here's how to fix it. - [OAuth Failures](https://setup.despia.com/roadblocks/runtime/o-auth-failures.md): OAuth not working in your Despia native app? This guide focuses on the key difference between web OAuth and Despia native OAuth. - [Slow Apps](https://setup.despia.com/roadblocks/runtime/slow-apps.md): Your Despia app feels sluggish. Here's how to fix it. - [Watermark Bug](https://setup.despia.com/roadblocks/runtime/watermark-bug.md): You upgraded to a commercial license but the Despia watermark is still visible in your app. Here is why and how to fix it. - [Wrong Framework](https://setup.despia.com/roadblocks/runtime/wrong-framework.md): Why Despia is its own native runtime, and how to configure AI tools to work with it correctly. - [AI Processing](https://setup.despia.com/store-rejections/common-rejection/ai-processing.md): Your app was rejected because it processes user data with AI without proper consent. Here's how to implement Apple's required AI consent flow. - [Blank Screen Redirects](https://setup.despia.com/store-rejections/common-rejection/blank-screen-redirects.md): Your app was rejected because it shows a blank or white screen during authentication. Here's how to fix it. - [Deceptive Paywalls](https://setup.despia.com/store-rejections/common-rejection/deceptive-paywalls.md): Your app was rejected because the paywall is misleading or uses dark patterns. Here's what reviewers flagged and how to fix it. - [In-App Purchases](https://setup.despia.com/store-rejections/common-rejection/in-app-purchases.md): Your app was rejected for issues with in-app purchases. Here's what went wrong and how to fix it. - [Minimum Functionality](https://setup.despia.com/store-rejections/common-rejection/minimum-functionality.md): Your app was rejected for not meeting minimum functionality requirements. Here's what that means and how to fix it. - [Non-Mobile Design](https://setup.despia.com/store-rejections/common-rejection/non-mobile-design.md): Your app was rejected because it looks like a website instead of a native mobile app. Here's how to fix it. - [Privacy Policy](https://setup.despia.com/store-rejections/common-rejection/privacy-policy.md): Your app was rejected because of a missing or inadequate privacy policy. Here's what's required and how to fix it. - [Social Login Options](https://setup.despia.com/store-rejections/common-rejection/social-login-options.md): Your app was rejected because it offers social login without including the platform's native option. Here's how to fix it. - [Spam and Copies](https://setup.despia.com/store-rejections/common-rejection/spam-and-copies.md): Your app was rejected because it's too similar to existing apps. Here's how to differentiate and get approved. - [Tracking Transparency](https://setup.despia.com/store-rejections/common-rejection/tracking-transparency.md): Your app was rejected for issues with Apple's App Tracking Transparency (ATT). Here's what went wrong and how to fix it. - [User-Specific Data](https://setup.despia.com/store-rejections/common-rejection/user-specific-data.md): Your app was rejected because it collects personal data that isn't necessary for its functionality. Here's how to fix it. - [Introduction](https://setup.despia.com/store-rejections/introduction.md): Your app got rejected. Take a breath. This is normal, fixable, and part of shipping apps. ## OpenAPI Specs - [openapi](https://setup.despia.com/api-reference/openapi.json)