linking
La traduction de cette page manque ou n'est plus à jour : elle s'affiche en anglais. Lire en anglais
Open external websites or apps, and receive URLs that launched or returned to your app. Use typed routes for navigation between your own screens.
Open a URL and inspect incoming links
import { watch, linking } from 'kuito';
await linking.open('https://www.tvmaze.com');
if (await linking.canOpen('mailto:hi@example.com')) await linking.open('mailto:hi@example.com');
linking.url.value; // 'kuito://show/42', or null
watch(linking.url, (url) => console.log(url)); // in a componentBehavior and limits
canOpen checks whether the platform can handle a URL; its answer can depend on platform query declarations. open attempts the action and can reject. linking.url follows incoming URLs. Enable router linking explicitly and declare URL schemes or verified domains in config before expecting the OS to open your app. Verify associated-domain files on your server for universal/app links.
Continue
Read Navigation for the related workflow. The API reference lists every method, option, event and return type.
Référence
Exports 3
Méthodes, constantes et types exposés par cet espace de noms natif.
Généré depuis les déclarations TypeScript publiques : signatures, props et valeurs par défaut viennent de la source vérifiée, les descriptions de sa JSDoc. Aucune valeur par défaut n'est inventée.