Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
window.cordova not initializing in PhoneGap 2.2
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Thomas Anderson  
View profile  
 More options Jan 7, 5:17 am
From: Thomas Anderson <thomas.ander...@salvesolutions.com>
Date: Mon, 7 Jan 2013 02:17:32 -0800 (PST)
Local: Mon, Jan 7 2013 5:17 am
Subject: window.cordova not initializing in PhoneGap 2.2

I've recently upgraded to PhoneGap 2.2, and have upgraded from every
version of PhoneGap since 1.4. Each time I basically download PhoneGap,
install a new XCode project from scratch from the terminal, copy my files
into www, tweak cordova.plist a little, copy cordova.ios.js into my scripts
directory and point to it from my index file. No big deal, right?

This time around, however, I'm having problems. I am certain that
cordova.ios.js is being included from my tag because I put an alert on line
1 and the alert fires when my app inits. If I then do the following,
however:

alert(typeof window.cordova.exec);

.. I would expect to see "function". This time I'm getting an undefined
error. Also, all calls to any PhoneGap specific functionality is failing.
(Camera access, etc)

Is there anything special about Cordova/PhoneGap 2.2 compared to 2.1 that I
am overlooking?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Shazron  
View profile  
 More options Jan 7, 2:32 pm
From: Shazron <shaz...@gmail.com>
Date: Mon, 7 Jan 2013 11:32:46 -0800
Local: Mon, Jan 7 2013 2:32 pm
Subject: Re: [PhoneGap] window.cordova not initializing in PhoneGap 2.2

what does this return?

cordova.require('cordova/exec');

On Mon, Jan 7, 2013 at 2:17 AM, Thomas Anderson <


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas Anderson  
View profile  
 More options Jan 7, 8:33 pm
From: Thomas Anderson <thomas.ander...@salvesolutions.com>
Date: Mon, 7 Jan 2013 19:33:55 -0600
Local: Mon, Jan 7 2013 8:33 pm
Subject: Re: [PhoneGap] window.cordova not initializing in PhoneGap 2.2

Hi Shazron,

I did three things per your hinting:

1)  I wrapped cordova.ios.js in a try/catch block and places alerts at both
ends of the try.  Both alerts fired, letting me know the file is being
included and isn't crashing.

2)  After in inclusion of cordova, I run  $(function() {
document.addEventListener("deviceready", phonegapDeviceReady, false); }  I
then put an alert in function phonegapDeviceReady().  It is never fired.

3)  I did "alert(cordova.require('cordova/exec'));" in my main app, wrapped
it a try/catch block.  Nothing happens.

So overall it feels like deviceready is never firing.  The only difference
I see between my  index.html file and the sample one included in Phonegap
2.2 is: In the sample index.html, it doesn't listen for deviceready until
after <body onload=""> has fired.  In my code, I attach the listener
immediately after including the javascript.  Just for giggles I commented
it out and moved it to the top of my body's onload function, but it didn't
make a difference.

Open for more hints..


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Shazron  
View profile  
 More options Jan 8, 6:18 pm
From: Shazron <shaz...@gmail.com>
Date: Tue, 8 Jan 2013 15:18:33 -0800
Local: Tues, Jan 8 2013 6:18 pm
Subject: Re: [PhoneGap] window.cordova not initializing in PhoneGap 2.2

See https://issues.apache.org/jira/browse/CB-2166 and related issues.

On Mon, Jan 7, 2013 at 5:33 PM, Thomas Anderson <


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas Anderson  
View profile  
 More options Jan 8, 6:38 pm
From: Thomas Anderson <thomas.ander...@salvesolutions.com>
Date: Tue, 8 Jan 2013 17:38:41 -0600
Local: Tues, Jan 8 2013 6:38 pm
Subject: Re: [PhoneGap] window.cordova not initializing in PhoneGap 2.2

Great, thanks for the link!  I'll monitor that issue.  Glad I'm not going
nuts..


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »