Lovable Prompt
Add native link handling to control whether links open in Safari, in-app browser tabs, or navigate within your app using the Despia SDK from: https://www.npmjs.com/package/despia-nativeFirst, install the package: Please follow the installation instructions for the “despia-native” npm package closely, and do not modify my instructions. Implementation as mentioned is critical.
npm install despia-nativeThen import it: import despia from 'despia-native'Simply use window.open(url, '_blank') to open links in the in-app browser, or configure domains in Despia settings to force Safari opening for payment compliance.This feature requires native capabilities which will be fully provided by the “despia-native” npm package, no additional native libraries are needed!
window.open(url, '_blank'), the Despia runtime automatically handles opening links in the in-app browser by default. You can configure specific domains in your Despia project settings to force them to open in Safari instead (required for payment compliance).
Installation
Install the Despia package from NPM:Usage
1. Import the SDK
2. Open Links in In-App Browser
Implement regular_blank link targets to open the in-app browser:
Resources
- NPM Package
- View full NPM documentation for additional configuration options