Results 1 to 9 of 9

Thread: iPad Home Screen App refreshes on every open

  1. #1
    Sencha User
    Join Date
    Apr 2011
    Posts
    4
    Vote Rating
    2
      2  

    Default iPad Home Screen App refreshes on every open

    I'm writing a web app for the iPad using HTML5 and SenchaTouch. The app uses cache manifest to function offline.

    Once it has been added in the home screen and opened without Safari, it will refresh itself every time it is opened, even if just navigating to the home screen and back.

    The desired behavior is to leave the app, do something else, and then come back to the app with everything untouched.


    An example of a similar app that displays the same (undesired) behavior can be found here: http://ignitedmediadesign.com/WebApp/index.html


    I've read that using a cache manifest should have solved this problem on iPhone ( http://www.stevesouders.com/blog/201...e-screen-apps/ ), but doesn't seem to have done the trick for either iPhone or iPad.


    Is there another way to fix this? Is there some secret to cache manifest files that stops this that I may have missed?


    FFR: Solutions may have been posted on Stack Overflow --
    http://stackoverflow.com/questions/6...-on-every-open

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,326
    Vote Rating
    1297
      -1  

    Default

    This is how iOS handles it.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Ext Premium Member
    Join Date
    Jan 2010
    Posts
    32
    Vote Rating
    0
      0  

    Default solution??

    And what is the solution??

  4. #4
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,326
    Vote Rating
    1297
      0  

    Default

    This is how iOS handles it, there is no control over this.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Ext Premium Member
    Join Date
    Jan 2010
    Posts
    32
    Vote Rating
    0
      0  

    Default Thank's

    Thank you for response, but when I add another website like (gmail ...) in my home screen, the app is launched in safari and I did not connect every time I open gmail.
    Why sencha (from home screen) is not opened in safari with navigation bar?

  6. #6
    Ext Premium Member
    Join Date
    Jan 2010
    Posts
    32
    Vote Rating
    0
      0  

    Default the same pb with sencha touch 2

    the same pb with sencha touch 2

  7. #7
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,326
    Vote Rating
    1297
      0  

    Default

    If you are within Safari and add the site to Homescreen and then open from the shortcut now on your Homescreen, it's not opening in Safari at all anymore
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  8. #8
    Ext Premium Member
    Join Date
    Jan 2010
    Posts
    32
    Vote Rating
    0
      0  

    Default Solution

    I found a solution for my case, for opening my App in Safari
    in applictaion launch function (in app.js file)
    Code:
    launch: function() {
            Ext.fly('appLoadingIndicator').destroy();
            //
            ...
            //
        	
        	var removeElementByName = function (elName) {
                var appleEls = document.getElementsByName (elName);
                var l = appleEls.length;
                for (i = 0; i < l; i++) {
                    var el = appleEls [0];
                    Ext.removeNode (el);
                }
            };
        	removeElementByName ('apple-mobile-web-app-capable');
        	removeElementByName ('apple-touch-fullscreen');
        },
    My app is opened in Safari, so I did not connect to my account each time I open my app...

  9. #9
    Ext JS Premium Member
    Join Date
    Nov 2009
    Location
    San Diego, CA
    Posts
    158
    Vote Rating
    0
      0  

    Default

    I'm not sure I follow how that's a solution if you're opening your app in Safari. What if you open your app off the homescreen? Also, where did you get the element ID for the Ext.fly argument?

    Since this is an issue iOS homescreen apps, it's causing a reauthentication event for me causing the user to have to log in everytime. In Safari, it doesn't do that.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •