Siguiendo a Delegated authentication for Discourse Mobile app, hemos estado trabajando en una nueva versión de la aplicación DiscourseHub para iOS. Esta nueva versión incluye varios cambios internos que solucionan algunos problemas de larga data de la aplicación para iOS. Puedes probar esta nueva versión ahora mismo, abriendo el enlace a continuación en tu dispositivo iOS e instalando la aplicación a través de TestFlight:
Hay dos cambios importantes en la nueva versión de la aplicación:
la aplicación utiliza Safari para la autenticación
SafariViewController ha sido reemplazado por un webview
El primer cambio significa que la autenticación en la aplicación es ahora más fácil y está mejor integrada con iOS. Los usuarios ahora podrán aprovechar las contraseñas guardadas, las sesiones SSO existentes o iniciar sesión mediante correo electrónico al autenticar un sitio en la aplicación. Pero este cambio también significa que los usuarios deberán iniciar sesión nuevamente en todos los sitios que ya han configurado en su aplicación. Este es un requisito único. (Si el usuario ya ha iniciado sesión en Safari, solo tendrá que autorizar el acceso de la API de la aplicación.)
El segundo cambio, el nuevo navegador webview, permite una experiencia de interfaz de usuario mejor y más rápida en la aplicación y soluciona variosproblemas que hemos tenido con SafariViewController.
Algunas otras mejoras incluidas en esta versión beta:
el manejo de notificaciones push se ha reforzado: los usuarios ahora verán insignias de notificación al recibir una notificación push mientras la aplicación está en primer plano
las sesiones de la aplicación ahora se identifican correctamente como tales en Discourse, en la sección “Dispositivos utilizados recientemente” del perfil del usuario
en el webview, hemos introducido una nueva barra de navegación. En los iPhones, esta barra está en la parte inferior y se oculta automáticamente (como la barra de navegación de Safari); en los iPads es estática y se coloca en la parte superior de la ventana gráfica. El estilo de la barra utilizará automáticamente el esquema de colores del tema activo.
la aplicación ahora verificará periódicamente los cambios en la versión de la API de un sitio y su logotipo, asegurando así que los cambios en la marca y las actualizaciones de la API de Discourse se reflejen en la aplicación (y también soluciona un problema con los logotipos que desaparecían)
Para probar estas nuevas funciones, tus sitios Discourse deben estar en la última rama tests-passed o en la última beta (v2.3.0.beta9). Cualquier sitio que no se haya actualizado recientemente volverá a la autenticación heredada y a SafariViewController en la aplicación.
One immediate thing I’ve noticed is that while the new app got straight into Meta after re-authorizing, a bunch of sites on b9+7 needed me to reauthenticate.
I think I see what you mean (but I’m not sure), the button to go back to TestFlight is halfway between the two background colors. In the app, we have added some logic to change the background color behind the status bar in the iOS app. It will follow the background of your Discourse header. For example, here is how the header would look on the Fakebook theme:
On your site you have a custom header above the Discourse header, with a different background color (blue). I will look to find a way to cover these cases as well, but it might be a tiny bit tricky, there are multiple ways to add a custom header above the Discourse header.
Credentials from SafariViewController can’t be preserved. SVC runs in an isolated context, the app has no access to any of the sessions/cookies in it. So, this one-time re-authentication is necessary for all users that have no sessions in Safari. I think in your case, you had a Safari session for meta, but not for the other sites in the app.
Not sure if this might be fixable or not, but I just tried this and mostly works great but the login / authentication was slightly roundabout for sites w/ SSO using WP Discourse. After logging in through the WordPress site I’m taken back to the forum, but not the authentication page for the app. So I click “cancel”, go back to the app home screen, then click back to the forum and (since I’m now logged in) hit the screen where I can authorize access. Not a big issue but perhaps there’s a way to save a step here.
Totally unrelated to my previous comment but I also just thought of an idea for a small UX enhancement:
I like the new bottom nav bar (much easier than reaching to the top on a large phone; thanks!) but notice it only appears on scroll up. This makes total sense for the main topic list view where it’s infinite scroll, but for individual topics (where there is an “end of page”) I would suggest also showing the nav bar upon scrolling to page bottom.
See the Pocket iOS app for a great example of this — also a bottom action/nav bar, hidden on scroll down; shows on scroll up or upon reaching the bottom of an article.
I think this makes a lot of sense for my typical Discourse mobile use flow as well; I’m on three forums regularly and (if multiple have updates) typically right after I finish catching up on the last new topic is when I want to close out of that forum view and switch to another.
We have implemented something like this, you need to scroll twice to the bottom of the page for the nav bar to show up again. It’s very similar to what Safari does upon hitting the bottom of a page.
If possible, could the icon circled in the screenshot match the icon conventionally used to launch the share sheet on iOS? It being a link is a little ambiguous until you click on it.
@justin I also find the link icon sub-optimal when it comes to sharing. I chose it because it’s the same icon we use when sharing a post in Discourse. FontAwesome doesn’t have a direct equivalent to the conventional iOS share icon, the closest icons to the conventional iOS icon are share-square and external-link-alt, both of which I’m not particularly fond of. That said, we don’t have to stick to FontAwesome, we could use iOS-style icons for all four of the bottom bar actions…
@Stephen we don’t currently have plans to add a refresh button or to support pull-to-refresh. In fact, pulling from the title bar downwards currently dismisses the webview, which is useful, sometimes.
I have seen this error on my dev instance (in your case, it’s likely related to an old auth token that hasn’t been removed properly). Have you tried removing the site from the app (swipe right-to-left and then delete) and trying again? Alternately, in your Discourse instance, you can go to your user preferences and “Revoke Access” for the apps you have listed.