Most clients these days are comfortable with the app requiring a network connection. But we also understand the desire for your app to work offline.

Previously, both Android and iOS platforms supported HTML5 Cache Manifest. However, this is now deprecated on iOS so it will only work on Android. 

Service Workers

Service Workers have emerged as the new standard on the web that supports offline functionality. Basically, you implement Service Workers on your website to support offline access, and the same will work in your GoNative apps with the following caveats. 

On Android, Service Workers should work out of the box with your GoNative app. For iOS, Service Worker support for WKWebView was only added in iOS 14, and only when using something called App Bound domains. 

Here are the details:

https://dev.to/ben/will-ios-14-support-service-workers-in-wkwebview-5gn

https://webkit.org/blog/10882/app-bound-domains/

This is not an officially supported feature, so it is not supported out of box. You may implement it in your iOS source code directly, or we can provide this support on iOS with custom development for a small fee. 

In addition to Service Workers, we do have a premium add-on called Download Manager that works well for downloading specific files to be available offline. Please see our pricing page for more info.

We also have a solution called Offline Sync that will work only if your app can work 100% offline without any network connectivity whatsoever, such as for a sales catelog, or an in-store kiosk display. The cost of OfflineSync starts at $12k per platform, or $18k for both Android and iOS together. Please email us if interested in OfflineSync. 

Disabling offline page on Android

On Android, you may disable the default "offline.html" page from showing by adding the following to Import/Export section when editing your app, or editing the appConfig.json file directly in source code. This new field must be added under the "navigation" section.

"navigation": {
"androidShowOfflinePage": false,
"androidPullToRefresh": false,
"iosPullToRefresh": true,
"androidShowRefreshButton": false,
...
}

 

We also have a setting for Android which changes how long the page must hang before being considered offline. The default is 10 seconds, but can be adjusted upwards eg. 30 seconds if needed. 

 "navigation": {
   "androidConnectionOfflineTime": 30,