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.
Molto curioso di sapere dove sia atterrato. Qualcuno è riuscito a incorporare Discourse nella propria app mobile tramite webview e sfruttare le notifiche?
Succede di tanto in tanto, manteniamo una manciata di app white-labeled per i clienti.
Sfortunatamente, il costo per intraprendere questa strada è enorme. Direi… prendi in considerazione questa strada se hai un budget di circa 20.000 USD all’anno per costruire/mantenere/debuggare.
@sam grazie per le parole di cautela, dato che sto per iniziare questo progetto.
Sono stato incoraggiato a vedere che il discourse hub sembra già fare questo - perché prevedi un costo così elevato? Immaginavo che fosse sufficiente far funzionare la webview e l’autenticazione, poi le notifiche sarebbero state un “nice to have”. Questa sarebbe una funzionalità fantastica da aggiungere alla mia app già esistente, il mio team ha già lavorato con le webview in passato.
C’è qualcosa che non sto prevedendo che causerà molto lavoro / aggiornamenti?
Storicamente ho visto quanto sforzo è stato dedicato alla banale web view discourse hub.
In superficie è “facile” ma poi devi preoccuparti di 1000 piccoli dettagli.
Riduci il pannello in basso
La curva sull’iPhone
Indicatori di caricamento
Aggiornamenti costanti della Webview
Controlli di sicurezza Apple e processo di approvazione dell’app
Debug complesso … cosa succede se qualcosa accade nella web view e non nel sito
Questo non è nemmeno un elenco esaustivo, sono sicuro che @pmusaraj e @kris.kotlarek possono tirarne fuori altri 20.
Le app sono molto difficili da realizzare e molto costose. Al giorno d’oggi, l’unica forte giustificazione per costruirne una è per iOS e non è un percorso facile.
Ho originariamente posto questa domanda perché volevo mantenere gli utenti nella mia app, poiché penso che Apple e Google mi invieranno traffico gratuito.
Questo compito è più facile (o più difficile?) in una “Chrome Custom Tab” per Android?
È plausibile che offriate una libreria per iOS che avvolga una WKWebView e risolva questo problema per noi? (Sembra che abbiate già gestito il 90%+ del lavoro implementando Discourse Hub.)
Direi che Android è difficile in modo “diverso”. Soprattutto perché il sistema operativo stesso non fornisce le primitive. È molto difficile giustificare lo sforzo lì quando la PWA è semplicemente così buona su Android.
Utilizziamo React Native e componenti per il wrapping di WKWebView. La complessità rimane, purtroppo. Anche gli aggiornamenti di React Native possono essere piuttosto dolorosi da affrontare in passato.
@sam la mia giustificazione per intraprendere questo è davvero incentrata sulle notifiche push, e anche perché ho un’app esistente che consentirebbe facilmente ai miei membri di fare più cose nello stesso posto (studiare per il loro esame, chattare nella community, fare acquisti, ecc.).
Ma, sembra che potrei far loro aggiungere l’app della community come PWA, e potrebbero ricevere notifiche push e aggiornamenti? La PWA avrebbe notifiche push? Aggiornamento: ho trovato la risposta qui, sembra che non supporti le notifiche push.
Sto approfondendo l’opzione PWA - forse potrei persino aggiungere un link a “Partecipa alla discussione della community” nella mia app nativa esistente, e quello sarebbe il link corretto per scaricare la PWA?