Flash messages with turbo-ios and turbo-android

I’m using turbo-rails , turbo-ios , and turbo-android .

In the desktop, all of the flash notifications show up correctly. In my controllers I redirect upon success to a new page (most of the time) or render the same page with status: :unprocessable_entity upon failure.

I have my flash HTML in the layouts/application.html.erb file.

In the apps, flash notifications don’t show up at all on the redirect. Sometimes, in the Android app, they show up, but only flicker for of a second, instead of the 20 they should be sticking around for.

Anybody seen this before or know why this would happen, and what I can do to get flash notifications working across all platforms?

Thank you very much!

I am running into this issue as well.

On the web:

  • submit form
  • server responds with “Location” header
  • browser follows redirect
  • flash is in the response body

On iOS:

  • show /new page in modal
  • submit form
  • fetch with :turbo_stream content type gets executed (javascript initiated redirect follow)
  • previous step consumes the flash
  • modal gets closed by native callback code
  • screen behind modal does a Turbo.visit to the “Location”
  • flash is not contained in the response body (consumed in previous fetch request)

I don’t have a solution yet.