JavaScript to Swift communication

Hey guys,


Programming environemnt :

swift version : 4.0

xcode version : 9.2


My objective :

1- Open a web application in ios and

2 – Communicate with its elements using JavaScript – invoke a method in my native app


what I have done so far :

I can load my application using webkit view.


challenges :

I found few old instructions for invoking native code from web applications JS functions which sadly won’t work in newer versions of swift. due to swift upgrade.

function/methods like : NSBundle that are no longer available.

Main Question :

how can I invoke a method in native app from JavaScript

Thank you

Powered by WPeMatico


You may also like...

Comments are closed.