Framework7 v6 mainView.router.navigate('/there/') not working

The following script is working fine on android studio without problem. However, the router is not working on xcode on mac osx.

Framework7 @6.0.22
Cordova [email protected]


var mainView = app.views.create('.view-main', {
  url: '/',

$$(document).on('deviceready', function() {


var routes = [
    path '/',
    url: './index.html',
    path: '(.*)',
    url: './pages/404.html',


<!DOCTYPE html>
  <meta charset="utf-8">
  Customize this policy to fit your own app's needs. For more guidance, see:
  Some notes:
    * is required only on Android and is needed for TalkBack to function properly
    * Disables use of inline scripts in order to mitigate risk of XSS vulnerabilities. To change this:
      * Enable inline JS: add 'unsafe-inline' to default-src
  <meta http-equiv="Content-Security-Policy" content="default-src * 'self' 'unsafe-inline' 'unsafe-eval' data: gap: content:">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, viewport-fit=cover">

  <meta name="theme-color" content="#007aff">
  <meta name="format-detection" content="telephone=no">
  <meta name="msapplication-tap-highlight" content="no">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  <link rel="apple-touch-icon" href="assets/icons/apple-touch-icon.png">
  <link rel="icon" href="assets/icons/favicon.png">
  <link rel="stylesheet" href="framework7/framework7-bundle.min.css">
  <link rel="stylesheet" href="css/icons.css">
  <link rel="stylesheet" href="css/app.css">
  <div id="app">
    <!-- Your main view, should have "view-main" class -->
    <div class="view view-main view-init safe-areas">
      <div class="page" data-name="home">
        <!-- Top Navbar -->
        <div class="navbar navbar-large">
          <div class="navbar-bg"></div>
          <div class="navbar-inner sliding">
            <div class="title">ForeERP</div>
            <div class="title-large">
              <div class="title-large-text">ForeERP</div>
        <!-- Toolbar-->
        <div class="toolbar toolbar-bottom">
          <div class="toolbar-inner">
            <a href="#" class="link">Left Link</a>
            <a href="#" class="link">Right Link</a>
        <!-- Scrollable page content-->
        <div class="page-content">
          <div class="block block-strong">
            <p>Here is your blank Framework7 app. Let's see what we have here.</p>


  <!-- Cordova library -->
  <script src="cordova.js"></script>

  <!-- Framework7 library -->
  <script src="framework7/framework7-bundle.min.js"></script>
  <!-- App routes -->
  <script src="js/routes.js"></script>
  <!-- App store -->
  <script src="js/store.js"></script>
  <!-- App scripts -->
  <script src="js/app.js"></script>


<?xml version='1.0' encoding='utf-8'?>
<widget id="" version="1.0.0" xmlns="" xmlns:cdv="">
        A sample Apache Cordova application that responds to the deviceready event.
    <author email="[email protected]" href="">
        Apache Cordova Team
    <content src="index.html" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />

   <platform name="android">
        <allow-intent href="market:*" />

    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
        <preference name="FadeSplashScreen" value="false" />
        <preference name="FadeSplashScreenDuration" value="0" />
        <preference name="AutoHideSplashScreen" value="true" />
        <preference name="AllowNewWindows" value="true" />

The above screenshot, left side is android studio normally redirect to “Not found” page. But right side is xcode cannot redirect to “Not found” page.

Here are additional information of problem. It is working fine on Android Studio but failed on xcode.

I found the solution. The problem is caused by webview. Install the plugin cordova-plugin-wkwebview-file-xhr can solve the problem.