This is a migrated thread and some comments may be shown as answers.

Developer Provisioned Built App on iOS fires deviceready twice

3 Answers 23 Views
Report a bug
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Matt Gmail
Top achievements
Rank 1
Matt Gmail asked on 28 Jun 2013, 10:08 PM
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.

3 Answers, 1 is accepted

Sort by
0
Yavor Georgiev
Telerik team
answered on 01 Jul 2013, 10:05 AM
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.
0
Matt Gmail
Top achievements
Rank 1
answered on 01 Jul 2013, 01:16 PM
Thank you so much for your reply.  I will test this today when I get a chance later.
0
Matt Gmail
Top achievements
Rank 1
answered on 01 Jul 2013, 09:50 PM
Tried it, that works for me.  Thanks for the temporary workaround.
Tags
Report a bug
Asked by
Matt Gmail
Top achievements
Rank 1
Answers by
Yavor Georgiev
Telerik team
Matt Gmail
Top achievements
Rank 1
Share this question
or