How f7 interacts with native(iOS,except cordova)

I am coding an application, this application is loaded by wkwebview, I want to implement F7 and native interaction (Except for cordova, I heard that its performance is very poor.) I tried Google but no results, (js is not me Work, but the team is me alone, so I took it)

My progress:

  1. In JS I use window.webkit.messageHandlers.callNative.postMessage(message) to call native (iOS), it works.
  2. in iOS I use evaluateJavaScript:"js code" to call JS, but it only works in index, when I write in other pages (such as product.f7.html), iOS call error, can not find this Method, I guess the reason for f7 (I just guess, I am not a professional js)
  3. I made progress with some answers How to get JS callBack in WKWebview?, but it must be initiated by js and then pass the callback function to iOS. Then called by iOS.

my question

  1. How to take the initiative to call js via iOS, don’t use cordova (if you recommend cordova, please tell me why)
  2. Is my method or direction correct? Recommend me to do this?
  3. I have never used f7 before (I have hardly written JavaScript), so where can I find files or projects that I can refer to? I looked at the official documentation for framework7, but it doesn’t seem to.If you can provide some examples or links to the reference, I appreciate you.

If I have a description that is unclear, you can ask me, I will upload my code.

Framework7 was designed to be used with Cordova or as a web app. It doesn’t have anything for interaction with native layer by default. So you will need to write it on your own. Why do you think Cordova is slow? It uses same WKWebView as you are trying to add manually.

For ready to use templates visit this page