نسخة تجريبية من تطبيق iOS المحمول الجديد متاحة للاختبار

استكمالًا لـ https://meta.discourse.org/t/delegated-authentication-for-discourse-mobile-app/110414، كنا نعمل على إصدار جديد من تطبيق DiscourseHub لنظام iOS. يتضمن هذا الإصدار الجديد عدة تغييرات جوهرية تحت الغطاء تُصلح بعض المشكلات المستمرة في تطبيق iOS. يمكنك تجربة هذا الإصدار الجديد الآن بفتح الرابط أدناه على جهازك الذي يعمل بنظام iOS وتثبيت التطبيق عبر TestFlight:

https://testflight.apple.com/join/NkdBQgmg

ملاحظات الإصدار الجديد

يوجد تغييران رئيسيان في الإصدار الجديد من التطبيق:

  1. يستخدم التطبيق Safari للمصادقة.
  2. تم استبدال SafariViewController الآن بـ webview.

يعني التغيير الأول أن المصادقة في التطبيق أصبحت الآن أسهل وأكثر تكاملاً مع نظام iOS. سيتمكن المستخدمون الآن من الاستفادة من كلمات المرور المحفوظة أو جلسات SSO الحالية أو تسجيل الدخول عبر البريد الإلكتروني عند مصادقة موقع في التطبيق. لكن هذا التغيير يعني أيضًا أن المستخدمين سيحتاجون إلى تسجيل الدخول مرة أخرى إلى جميع المواقع التي قاموا بتكوينها بالفعل في تطبيقهم. هذا شرط لمرة واحدة فقط. (إذا كان المستخدم مسجل الدخول بالفعل في Safari، فسيحتاج فقط إلى تفويض وصول التطبيق إلى واجهة برمجة التطبيقات.)

أما التغيير الثاني، وهو متصفح webview الجديد، فيتيح تجربة واجهة مستخدم أفضل وأسرع في التطبيق ويُصلح عدة مشكلات واجهناها مع SafariViewController.

تشمل بعض التحسينات الأخرى المضمنة في هذا الإصدار التجريبي ما يلي:

  • تم تعزيز معالجة إشعارات الدفع: سيرى المستخدمون الآن شارات الإشعارات عند استلام إشعار دفع بينما يكون التطبيق في المقدمة.
  • يتم الآن تحديد جلسات التطبيق بشكل صحيح في Discourse ضمن قسم “الأجهزة المستخدمة مؤخرًا” في ملف المستخدم الشخصي.
  • في webview، قمنا بإدراج شريط تنقل جديد. على هواتف iPhone، يقع هذا الشريط في الأسفل ويتم إخفاؤه تلقائيًا (مثل شريط تنقل Safari)، بينما يكون ثابتًا وموضعًا في أعلى نافذة العرض على أجهزة iPad. سيستخدم تنسيق الشريط تلقائيًا مخطط ألوان السمة النشطة.
  • سيتحقق التطبيق الآن بانتظام من التغييرات في إصدار واجهة برمجة التطبيقات للموقع وشعاره، مما يضمن انعكاس التغييرات في الهوية البصرية وتحديثات واجهة برمجة التطبيقات الخاصة بـ Discourse في التطبيق (كما يُصلح أيضًا مشكلة اختفاء الشعارات).

لاختبار هذه الميزات الجديدة، يجب أن تكون مواقع Discourse الخاصة بك على أحدث فرع تم اختباره بنجاح أو على أحدث إصدار تجريبي (v2.3.0.beta9). أي مواقع لم يتم تحديثها مؤخرًا ستعود إلى المصادقة التقليدية وSafariViewController في التطبيق.

26 إعجابًا

Awesome work on this @pmusaraj and @sam, major improvements! :tada:

11 إعجابًا

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.

إعجاب واحد (1)

Odd display issue on xsmax.

The app “back” rendering is cutoff on left side of notch.

إعجابَين (2)

Can you paste a screenshot?

إعجاب واحد (1)

It’s minor, and no issue when displaying normal layout, only when previous app link is displayed

إعجاب واحد (1)

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.

12 إعجابًا

Is there another caveat for preserving credentials beyond beta 9?

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.

I’ll look into why this is, it should redirect back to the authorization screen. Thanks for the report.

إعجاب واحد (1)

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.

إعجابَين (2)

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.

3 إعجابات

Ah cool I see that now! Did not occur to me to try that, good to know :slight_smile:

3 إعجابات

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.

Current icon:

Conventional iOS share sheet icon:
image

5 إعجابات

I’ve just realised we’ve lost the old refresh button which was previously top-right.

Appreciate that it shouldn’t be necessary, but it’s definitely useful on occasion. Is there any plan to implement pull-to-refresh?

3 إعجابات

@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.

6 إعجابات

The app works fine with Meta, but not with my own Discourse instance.
This is what I see in the error log:

Message

Failed to handle exception in exception app middleware : PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "index_user_api_keys_on_client_id"
DETAIL:  Key (client_id)=(42c39dc...) already exists.
: INSERT INTO "user_api_keys" ("user_id", "client_id", "key", "application_name", "push_url", "created_at", "updated_at", "scopes") VALUES (4, '42c39dc...', '19eaf98...', 'Discourse - iPhone', 'https://api.discourse.org/api/publish_ios', '2019-04-30 15:05:35.056396', '2019-04-30 15:05:35.056396', '{notifications,session_info,one_time_password}') RETURNING "id"

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.

إعجابَين (2)

I’ve tried both ways unsuccessfully. Although,

I couldn’t find this exact preference. What I did find is Recently Used Devices on my account preferences, where I could log out on my iPhone.

إعجاب واحد (1)