Talking with Javascript image

Hello everyone! Let’s start with a short background story: the task was to develop an open source library for presenting rich (HTML-based content) notifications inside iOS applications. Please feel free to take a look at current fork for the full story on GitHub. Challenging part this time was implementing communication with JavaScript embedded in a notification (banner). The actual idea is to implement two-way communication, meaning that iOS must be able to parse functions from JS, and JS must be able to ask for some info from iOS app. Fortunately – not very well documented, yet pretty cool and neat class JSContext, available since iOS 7.0, came to rescue. To not hold you any longer, let’s dig into the code! ...
Continue Reading