Direct Answer
No, Framework7 does not provide a configuration flag or router option that automatically fires the deep-link event when the app is relaunched via a custom URL scheme (e.g., myapp://profile). The event is only emitted when the router processes an internal location change, which does not occur during a native scheme launch because the URL is intercepted by the native host before the WebView loads.
Why the Event Does Not Fire
Confirmed: The Framework7 router emits deep-link only when it handles a browser location change (hash, history, or programmatic router.navigate). There is no documented app or router parameter that enables automatic emission for native scheme launches.
Likely explanation: A custom scheme URL is delivered to the native application delegate (iOS) or Activity (Android) before the WebView is created or resumed. Framework7 runs entirely inside the WebView and has no built-in native bridge to receive that launch URL. Universal links and Android App Links work differently—they open the WebView with a standard https URL, so the router sees a normal navigation and fires the event.
Recommended Pattern for Manual Navigation
When no auto option exists, forward the captured scheme URL into the WebView and reuse your existing deep-link logic:
- Capture the URL in the native layer. In a Capacitor project, use the
App plugin's appUrlOpen event. In Cordova, handle handleOpenURL. In a plain WebView, override onNewIntent (Android) or application:openURL:options: (iOS). - Forward to JavaScript after Framework7 initializes. Wait for the
app.init promise or the view:init event on the main view, then call a global handler, e.g., window.handleSchemeLaunch(url). - Parse and navigate centrally. Implement one parsing function that extracts path, query, and fragment exactly as your deep-link handler does. Then call:
app.views.main.router.navigate(parsedPath, { query: parsedQuery });
This reuses the same route resolution, guards, and transitions as a native deep-link. - Guard against double navigation. If your universal-link handler also processes the same URL, add a deduplication flag (e.g., a sessionStorage key) so the manual call does not trigger a second navigation.
Platform Differences
iOS and Android differ in when and how the launch URL is exposed to the WebView. iOS may deliver the URL before the WebView loads; Android may deliver it via onNewIntent after resume. Framework7 does not normalize this. Behavior also varies between PWA, Capacitor, and Cordova wrappers. Test both cold start and resume scenarios on each platform.
Future Unification
Model knowledge does not confirm any roadmap item to unify iOS and Android deep-link behavior in upcoming Framework7 releases. Check the official changelog or GitHub issues for the version you are using.
Verification Steps
- Add a temporary
router.on('deep-link', ...) listener and confirm it is not called on scheme launch. - Log the URL received in the native bridge and the parsed result passed to
router.navigate. - Compare navigation outcome (route matched, guards run, scroll position) between a universal link open and your manual scheme handling.
One Diagnostic Detail
Which wrapper are you using—Capacitor, Cordova, or a plain WebView—and does the app cold-start or resume from background on scheme launch? The answer changes whether you listen for appUrlOpen (Capacitor) or implement native onNewIntent/openURL overrides.