Our company has native apps for iOS and Android. One of our goals is to bring people back to our apps frequently, and to spend a lot of time in our apps. (The app stores seem to prioritize apps that get a lot of usage.)
We have a pretty solid Discourse forum, but currently we just link out to the forum’s website from the app. iOS users who want to receive forum push notifications then have to download the Discourse app separately. (Android users can receive push notifications directly from the website, which is great, but in that case, they’re still using the website, and not our app.)
We’d like to make the Discourse forum a part of our existing iOS and Android apps, and especially to allow users to receive forum push notifications in our apps, without forcing people to download a separate app or to leave our app to use the forum. (I’m imagining that the implementation would be a web view, much like the Discourse iOS app.)
Is there a way to do something like this today? (I’m guessing not?)
On Android the story is quite simple, spinning up a Chrome Custom Tab is super easy and it shares authentication with Chrome. Only big downside and reason our Android team members avoid using the Android app (and that we are considering killing the Android app) is cause opening a Chrome Tab is slow compared to PWA, so people prefer the PWA.
Being Android though you could possibly automate creating the PWA link and all that Jazz from your app which may be interesting.
On iOS the story is more complex due to Apple bugs.
I read somewhere that Chrome 72 now support Trusted web activities , which means you can now distribute PWAs in the Google play store. If it works well I think you will have more reason to kill the Android app.
Let me give one good reason not to: some people do not have a Google account and won’t have one. If the app would be distributed over F-Droid, it would be fine, but forcing people into Google is not a friendly move.
This happens from time to time, we maintain a handful of white labeled apps for customers.
Unfortunately the cost though of going down this path is enormous. I would say… consider going down this path if you have say a 20k USD a year budget to build/maintain/debug.
@sam thanks for the words of caution here, as I am just about to embark on this project.
I was encouraged to see the discourse hub seems to already do this - why do you anticipate such a high cost? I was imagining you just need to get the webview and authentication working, then notifications is a nice to have. This would be an awesome feature to add into my already existing app, my team has done webviews previously.
Is there something I am not anticipating that will cause a lot of work / updates?
I originally asked this question because I wanted to retain users in my app, because I think Apple and Google will send free traffic my way.
Is this task any easier (or harder?) in a “Chrome Custom Tab” for Android?
Is it plausible that y’all would offer a library for iOS that wraps a WKWebView and solve this problem for us? (It seems like you’ve already handled 90%+ of the work by implementing Discourse Hub.)
I would say Android is “different” hard. Especially since the OS itself is not providing the primitives. Very hard to justify effort there when the PWA is just so good on Android.
We use React Native and components for wrapping WKWebView. The complexity remains sadly. React native updates can also be quite painful to work through from history.
@sam my justification for embarking on this is really around push notifications, and also because I have an existing app that would easily allow my members to do multiple things in the same place (study for their exam, chat in the community, shop, etc.).
But, it sounds like I could have them add the community app as a PWA, and they could get push notifications and updates? Would the PWA have push notifications? Update: found answer here, looks like does not support push notifications.
I’m looking into the PWA option further - perhaps I could even add a link to “Join the Community discussion” into my existing native app, and that would be the correct link to download the PWA?