Site icon Web Niraj

Cordova: Fixing jQuery Mobile Navigation Issues on iOS 9.x

iOS 9 changed the way JavaScript handles navigation history, and as a result, hybrid apps using jQuery Mobile can break (i.e. those build in Trigger.io and Cordova). Luckily, there is a easy fix that can resolve the issue. Please note that the Cordova Device Plugin is required.

In the onDeviceReady function, add the following code lines to fix the navigation issues:

See the gist on github.

The above code specifically looks for iOS version 9 or above, since the issue is limited to iOS devices using version 9. It’s important to preform this check, as adding these lines in an Android App will break the hardware back button.

You can easily test this code and your app on the iOS simulator before deploying your app to end-users.

Need further help? Post your comment below.

Exit mobile version