This article is part of a talk done at the App Builders conference in Lugano that took place on the 30th of April 2019. Another part talking about code sharing between iOS and Android using C++ is available here.

Why sharing code?

At Ubique, we like to write native apps, in our opinion the best UX is achieved with fluid and native UI. If the presentation layer needs to be native, on the contrary the business logic can be shared. …


When creating iOS apps we find the need to have some buttons or UIControls opening a URL link.

This can be easily done by calling the open(_:options:completionHandler:) method of UIApplication. With the addition of the SFSafariViewController in iOS 9, this opened new possibilities to show links without the user leaving the app.

While the UIApplication open(_:options:completionHandler:) can be called from anywhere in your code, presenting a SFSafariViewController can happen only from a UIViewController.

A real-world use case that leads to this solution

I was recently working on an application that parsed and builds interactive documents from a JSON object. Among the multiple objects that constitute an interactive document, there…

Joseph El Mallah

Senior iOS engineer @ ubique.ch

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store