Back button in iOS PWA


(Majed Alhrbi) #1

I have saved discourse on my iPhone as short cut app since discourse is PWA but I found one simple feature is missing. Which is going Back button. I tried to swipe left but not working.

Is there any hidden tip to do this?


Progressive Web Application (PWA)
(Rafael dos Santos Silva) #3

Unfortunately Apple PWA implementation leaves a lot to be desired. So much that some sites are resorting to user agent sniffing to be able to change the display_mode in the webmanifest only for iOS users.

I will run some tests on this and try a fix next week.


Creating a non address bar bookmark for iOS
(Rafael dos Santos Silva) #5

This should help:


(Rafael dos Santos Silva) #6

It used to be full screen, but I changed it a few weeks ago because people asked here: Back button in Responsive app


Progressive Web Application (PWA)
(Ralf Stockmann) #7

Yes, this is a problem. I just added the tag in one of my forums, and it worked - but the missing back-button is indeed a downer.
Maybe one could offer an (optional) additional back-button in the menu bar, left from the search and burger-icons?


(Rafael dos Santos Silva) #8

We just gave up on the Apple current PWA implementation and detect iOS devices and remove the full screen aspect. This was inspired by the Starbucks PWA that did the same:

If you want to propose (mockup, code, etc) a back button for the iOS PWA experience, please open a topic about it.


Creating a non address bar bookmark for iOS
(Ralf Stockmann) #9

I see. Thanks for clarification.


(Stephen) #10

Swipe to go back has been a thing in Safari for the longest time. Is it disabled in PWAs or something?


(Kane York) #11

Swipe to go back isn’t accessible or discoverable, especially when the platform standard is to either have a “back” button in the upper-left corner or not at all.


(Ralf Stockmann) #12

When? Where?I can’t recall a website that supports this…


(Jeff Atwood) #13

It is a built in mobile safari feature, I use it all the time.


(Ralf Stockmann) #14

Heavens. It works! You have to catch the outermost left side - in a “regular” iOS App you may grab anywhere on the screen to swipe.
Anyway: this seems to be disabled in PWA fullscreen mode:

https://forums.developer.apple.com/thread/99579

dammit.


(Jeff Atwood) #15

image


(Jai Haze) #16

ahhh this is the problem. I was trying to find it. Is there anyway to go back to the setting via json or some jquery to override it via customizing the html, no meta tags do it. So im assuming this was gone before its just that the old shortcut was saved prior to then


(Rafael dos Santos Silva) #17

How are users supposed to use the back button when full screen?


(Jai Haze) #18

I had no problem I would just click the old school icon in the upper right. We are talking about the old add to home screen like this right? If so, then I never really cared but there is a way for a bar to pop up isnt there, or use shortcuts like a left swipe? Invision power boards has it on their forums


(Rafael dos Santos Silva) #19

Left swipe to go back is disabled by Apple in this mode:

We didn’t design Discourse to be used without the browser back-button, so we disabled the feature for now, like Starbucks in the example above.

Android doesn’t have this problem because a back button is permanent in either the OS UI or in the form of a physical back button.

We are always happy to discuss and re-evaluate, but the situation is kinda messy in iOS.


Proposing a left-aligned slide out hamburger menu
(Jai Haze) #20

but if it was active before, why not give the option of a checkbox for certain tiers to enable it for their discourse? It worked great before a nd a lot of the people who used it loved it.


(Jeff Atwood) #21

Not on the latest Android Oreo though… they are looking at getting rid of those required buttons because a fullscreen “all screen” phone like the iPhone X/XS … is the future :wink:


(Rafael dos Santos Silva) #22

That is a manufacturer specific customization, only in OxygenOS (OnePlus family). It would not be the first time that Android adopts a manufacturer customization, but considering the time a new Android version takes to spread we are talking 3 years to have some adoption.

If they remove I just hope they don’t block it in the place where it’s so needed like Apple did :stuck_out_tongue_winking_eye: