[Offline Apps] IOS - mobile data message

[Offline Apps] IOS - mobile data message

  
Forge Component
(25)
Published on 2015-11-19 by OutSystems Labs
25 votes
Published on 2015-11-19 by OutSystems Labs
This works a treat on Android phones
When I try this on an Apple device (IOS 8.1.3) - I get the "mobile data is turned off" message continually.
Is there a way around this at all?
Anbody have any thoughts at all?
Hi Martyn,

Unfortunately that message comes from iOS itself and I don't think there's a way to turn it off. It is constantly being fired because the Offline Apps component tries to ping the server every few seconds when it is offline.

A way around that would be to implement an "Offline Mode" in the application that makes use of this component (using DetectConnection.enableForceOffline()); that mode could be turned on to stop the pings and therefore stop the messages. I don't think DetectConnection.enableForceOffline(), at this moment, stops the pings, but it clearly should; I'll work on that and come back to this thread with the results.

Edit: Although my theory above would explain this behavior, I couldn't reproduce the said behavior on an iPhone 4, iPhone 5, iPhone 5S or iPad 2.
So, I tried to reproduce this behavior on several Apple devices (some with the exact iOS version mentioned), but the "mobile data is turned off" message would only be shown once, when I openned the application.

Could you please answer the questions below, in order to help me reproduce this issue?
  1. Is this happening in an app you built, or in the Offline_Sample app?
  2. What are your Mobile Data settings at the moment?
  3. Are you running the app on Safari, inside Outsystems Now, or in some other browser?
  4. What Apple device are you using?
Cheers,
João
1. Im using the offline sample app in my personal environment
2. Mobile data settings are: wifi off - mobile data off
3. Running it in safari
4. iPhone 6 and iPad (version before Air 1)

Aha - mainly seems to happen if you put safari into the background and open it again
Also - if i click on "add contact" within "edit groups" i get a page with the error message "Safari cannot open the page /grou_contactgroup_popupeditor.aspx... because your ipad is not connected to the internet
Indeed, the message appears after putting Safari in the background and opening it again. I don't think anything can be done about that, but it shouldn't annoy the user too much :)
Also - if i click on "add contact" within "edit groups" i get a page with the error message "Safari cannot open the page /grou_contactgroup_popupeditor.aspx... because your ipad is not connected to the internet
You probably didn't visit /Offline_Sample/grou_contactgroup_popupeditor.aspx (the add contact to group page) after publishing the app. Unfortunately the developer needs to visit every pag, in order for them to be added to the offline manifest. When we have popups it is easy to forget about visiting them. Not sure if it will help, but I'll add a reminder with the list of all the pages that need to be visited to the next version of the sample app.