Developer Provisioned Built App on iOS fires deviceready twice

4 posts, 1 answers
  1. Answer
    Matt Gmail
    Matt Gmail avatar
    13 posts
    Member since:
    Mar 2013

    Posted 28 Jun 2013 Link to this post

    With 1.6 release (perhaps before, but I have no way of knowing), when I build for developer with ad-hoc provisioning, and install the new app, when run initially or any time after "killing it" off, I get the function OnDeviceReady() (set by the following line) called twice.

         document.addEventListener("deviceready", onDeviceReady, false);

    This with happening with my app, so I created a new jQuery project, using "New" and "Cross-Platform Device Application (jQuery Mobile)"  with my only edit from the sample code you give us to console.log("entered onDeviceReady");  This line shows up in the log twice when I initially start the app, or if I restart it after "killing it" off.

    This is causing me a number of problems. It appears as if the app is being started, then restarted!  As my home page on my real app, which I modify a version number display upon start up replacing the text "(version goes here)" with a version number, shows first as (version goes here), then is replaced by 0.9.2.1705, but then shows again as "(version goes here)" and then is replaced with 0.9.2.1705 again.

    I'd like to think I could somehow look past this for now, but I'm getting some strange behavior where my button presses don't cause anything to happen until I switch apps and then switch back.  I figure I'll start with the thing getting called twice fixed, then hope the other goes away, as my app works fine in the simulator and on ION.

    Thank you for looking into it.
  2. Yavor Georgiev
    Admin
    Yavor Georgiev avatar
    982 posts

    Posted 01 Jul 2013 Link to this post

    Hello Matt,

     This is a known issue with iOS LiveSync, which we have fixed in Ion, but couldn't fix in provisioned apps because of a tight deadline. What you can do is build your app with LiveSync disabled by right-clicking on the topmost solution node in Project Navigator, choose Build Settings and then from the dialog window select the Release configuration.

    Regards,
    Yavor Georgiev
    Telerik

    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Missed our first webinar, watch it here.
    Share feedback and vote for features on our Feedback Portal.
  3. Matt Gmail
    Matt Gmail avatar
    13 posts
    Member since:
    Mar 2013

    Posted 01 Jul 2013 Link to this post

    Thank you so much for your reply.  I will test this today when I get a chance later.
  4. Matt Gmail
    Matt Gmail avatar
    13 posts
    Member since:
    Mar 2013

    Posted 01 Jul 2013 Link to this post

    Tried it, that works for me.  Thanks for the temporary workaround.
Back to Top