Getting back gesture to work on iOS

Hi,

The back gesture works as expected (i.e. navigates to the previous page) when I run my Meteor Cordova app on Android, but it does nothing on iOS.

Can anyone advise on how to get it working on iOS?

Thanks!

Can you show how you’re enabling currently?

In the past, I used this:

if (Meteor.isCordova) {
  window.WkWebView.allowsBackForwardNavigationGestures(true);
}

Holy crap, that works! Thanks very much!

Man, I’ve known that back doesn’t work in my app on iOS for months and I never suspected the fix was this easy.

And I can’t believe I wasn’t able to find it by Google search either :see_no_evil:

Somehow it’s enabled for Android by default, I’m not doing anything to enable it.

Geez, surely this should be the default behaviour for Cordova?

I’m going to do a pull request for the Meteor Cordova page to include this, it would help so many people. I think these days people really expect back gestures to work in apps.

1 Like

Yes, as per :point_down: