Building an iOS app that embeds Discourse

I have and use the Discourse mobile app for iOS. Is the app in the github repo here: https://github.com/discourse/DiscourseMobile/tree/master/ios the source code for the publicly available iOS “DiscourseHub” app?

If so, it seems this app is just wrapping a Discourse site within a webview.
– am I wrong about this?

I would like to develop an iOS app which uses a few service SDKs (unrelated to Discourse) and to embed our Discourse site.

Has anyone successfully used either the Discourse native app code or API to provide a good, native user experience within a standalone iOS app?
– or is a Safari webkit view the best option? Discourse is excellent on all mobile browsers.

You stated the exact reason why we do webview. :wink:

We can share all the work we’ve done in our mobile view, and reuse it in “an app” by doing this. We’re still banking hard on the future of progressive web apps, so there is little to no benefit to rebuilding the Discourse UI in Yet Another App.

9 Likes

Thanks Jeff. Oh…kaaay… I’ve found tons of forum posts here about PWA. I think I’ll just go for it. My site has a manifest.json just like meta.discourse has. I have a name, icons, and start_url.

But what about a service worker? Is there a front-end setting for this or do I need to follow the tip here:

We’ve got one. This is how Android push notifications are working. Due to complications with Apple service worker implementations, it only registers for non-iOS. We’re adding features to the service workers slowly as they become supported.

4 Likes