Use A Local HTML Folder If The User Is Offline, And Use The Remote URL If The User Is Online (iOS WebView Apps) ๐ŸŽฏ

  • Home
  • App Development in iOS
  • Use A Local HTML Folder If The User Is Offline, And Use The Remote URL If The User Is Online (iOS WebView Apps) ๐ŸŽฏ
Internet connection during flight

The WebViewGold iOS App Template is quite smart when it comes to different ways to handle the offline/online status of app users. Three modes are available:

 

Option 1: Use a URL for accessing your web application (= store files online)

Option 2: Use a local HTML folder for accessing your web application (= store files within the app)

Option 3: Use an HTML folder if the user is offline, and use a remote URL if the user is online (= store files online + store backup/fallback files within the app)

 

Get the WebViewGold iOS App Template for Xcodeย here.ย In order to activate the fallback mode (option 3), just import your HTML/CSS/JavaScript files within Xcode, set uselocalhtmlfolderย to falseย and set offlinelocalhtmlswitchย to true.