[Solved] [v2] Routes work, but fail once in iOS app

I have cordova based framework7 v2 app.

Routes work when:

  • in a browser (dev machine – win 10)
  • in a browser (dev machine – macOS HS)
  • in a browser, running on macOS simulator browser

Routes Fail:

  • iOS Compiled App

There are multiple Links on the index.html page, 3 's going to index.html, motd.html and search.html. None of them work in App. I have 3 other links, which open a popup and 2 popovers – they work. It doesn’t matter the location, navbar main body, sidebar etc.

Am I missing something in my config or a security thing?

I have a simple route:

routes = [
{
path: ‘/’,
url: ‘./index.html’,
},
{
path: ‘/search/’,
url: ‘./pages/search.html’,
},
{
path: ‘(.*)’,
url: ‘./pages/404.html’,
},
];

index.html
has:
document_text
Search
with popups and popovers tied to links as well.

app.js
has:
// Dom7
var $$ = Dom7;
// Framework7 App main instance
var MyApp = new Framework7({
root: ‘#app’, // App root element
id: ‘com.zzz.zzz’,
name: ‘zzzzzz’,
theme: ‘ios’,

// App routes
routes: routes
});
// Init/Create main view
var mainView = MyApp.views.create(’.view-main’, {
url: ‘/’
});

Installed platforms:
browser 5.0.3
ios 4.5.4

cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-crosswalk-webview 2.4.0 "Crosswalk WebView Engine"
cordova-plugin-device 2.0.1 "Device"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-globalization 1.0.9 "Globalization"
cordova-plugin-network-information 2.0.1 "Network Information"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-sqlite-2 1.0.4 "SQLitePlugin"
cordova-plugin-statusbar 2.4.1 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-plugin-wkwebview-engine 1.1.4 "Cordova WKWebView Engine"
ionic-plugin-keyboard 2.2.1 “Keyboard”

causes the problem, local xhr requests don’t work with it. Try this one instead https://github.com/ionic-team/cordova-plugin-ionic-webview

Awesome, that nailed it. Thanks!