3

I am developing the iOS equivalent of an already running Android App. Both apps are basically a browser receiving data from a server. This includes javascript thar checks the server for changes and issues local notifications when needed. In Android this is easily done using Interfaces. Nevertheless, I cannot find an equivalent and straightforward solution for iOS (currently using Swift). Have you got any proposals on this regard? (methods or workarounds to properly do this).

Thanks in advance,

Jose

1 Answer 1

3

Have you looked into WebKit? WKWebView, WKScriptMessage and APIs like that may be what you're looking for.

Sign up to request clarification or add additional context in comments.

2 Comments

Right, this seems the way to go indeed!. Thanks a lot. Found this web with a simple example to send a notification to the App from Javascript. kinderas.com/technology/2014/6/15/…
has anyone ever found another way except the using postMessage(), calling Swift methods directly from Swift like iosListener.someMethod(), where some method for example returns a string, and iOSListener is name of userContentController, as we use it for postMessage() ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.