facebook

Map not working in offline mode – HTML5 APPCACHE CONF ISSUE

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #340969 Reply

    GuenterBecker
    Participant

    edited by wayne; changed the title to more accurately reflect the issue as an html5 appcache config issue

    Dear Sirs,

    I developed an Web App with mobi one. Testing the App in the Test Center or with Safari Desktop or Crome Desktop works fine.

    After publishing the App to the mobi-cloud I tried to install it on my iphone with latest ios.

    Installation is Ok but if I try to open the page with map I always get the answer “Network connection is required for map initialization”. Do’nt know why I get this Error Message?
    Wether the phone is connected by Wifi or via 3G always the same Error message. Checking it with other Apps, for example Google Maps, not problem. Maps are shown with 3G connection or with Wifi connection.

    Now after checking phone and software and working around for over 7 days I give up. I am not able to find the failure. Could you please help me.

    If you like to look into the App please find it in your cloud with code goo.gl/q9Y8T. The page with the map has the name (m1-efamobKarte). The used code is from an example published in this board (adress.zip).

    #340970 Reply

    GuenterBecker
    Participant

    Attachment
    Sorry, I forgott to explain. I’ working with an iphone 5 ios 6.1.4

    #340976 Reply

    Hi hgbecker,

    This sounds odd. Can you also share your mobione version please?

    #340979 Reply

    GuenterBecker
    Participant

    Hello Octavio,

    my used m1 Version ist 2.3.2 hotfix-1,20130425.

    In the meantime I had the chance to test it also on an iphone 4 with the same ios as on my iphone 5, same result is also the same the map is not working.

    #340982 Reply

    support-michael
    Keymaster

    hi Guenter,

    Thanks for sharing the hosted project url. I was able to test it and replicate the error msg you reported in the new MobiOne 2.5M1 simulator. The issue is that your webapp is configured to run offline. The MobiOne Design Center auto-creates and configures an HTML5 appcache (see cache.manifest file in www folder) to cache all of the files it generates. In this configuration the browser will download and cache all files listed in the appcache’s first section on its 1st startup. Thereafter it will look to the appcache (see file cache.manifest) and load locally cached files listed in it unless the file is explicitly configured in the NETWORK section to load remotely. The google maps api and data are dynamically loaded and the app must be online to function.

    So how do you get the browser to load the map api and data dynamically? I found a hack – I call it a hack because I have not found google’s approval for this solution. You need to add the google servers to the appcache NETWORK: section as defined here: http://pastebin.com/8wSegac3. I confirmed that by adding the list of google servers to the NETWORK: section of your project’s cache.manifest file that it should bypass the cache and load the maps api and data from the google servers.

    Good appcache facts: http://appcachefacts.info/

    #340983 Reply

    Unknown Author
    Participant

    Googlemaps is working fine in my native iOS app.
    -1TC

    #340988 Reply

    GuenterBecker
    Participant

    Thank you wayne. I added the Server Infos under the Network section in the manifest file and now it works.
    Great!

    Again I have to point out that I am very satisfied by the quick response of you and your collegues. You are doing your support job very well. Thank you.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Map not working in offline mode – HTML5 APPCACHE CONF ISSUE

You must be logged in to post in the forum log in