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?
thomas.ander...@salvesolutions.com> wrote:
> 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 received this message because you are subscribed to the Google
> Groups "phonegap" group.
> To post to this group, send email to phonegap@googlegroups.com
> To unsubscribe from this group, send email to
> phonegap+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/phonegap?hl=en?hl=en
> For more info on PhoneGap or to download the code go to www.phonegap.com
> To compile in the cloud, check out build.phonegap.com
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.
On Mon, Jan 7, 2013 at 1:32 PM, Shazron <shaz...@gmail.com> wrote:
> what does this return?
> cordova.require('cordova/exec');
> On Mon, Jan 7, 2013 at 2:17 AM, Thomas Anderson <
> thomas.ander...@salvesolutions.com> wrote:
>> 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 received this message because you are subscribed to the Google
>> Groups "phonegap" group.
>> To post to this group, send email to phonegap@googlegroups.com
>> To unsubscribe from this group, send email to
>> phonegap+unsubscribe@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/phonegap?hl=en?hl=en
>> For more info on PhoneGap or to download the code go to www.phonegap.com
>> To compile in the cloud, check out build.phonegap.com
> --
> -- You received this message because you are subscribed to the Google
> Groups "phonegap" group.
> To post to this group, send email to phonegap@googlegroups.com
> To unsubscribe from this group, send email to
> phonegap+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/phonegap?hl=en?hl=en
> For more info on PhoneGap or to download the code go to www.phonegap.com
> To compile in the cloud, check out build.phonegap.com
thomas.ander...@salvesolutions.com> wrote:
> 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..
> On Mon, Jan 7, 2013 at 1:32 PM, Shazron <shaz...@gmail.com> wrote:
>> what does this return?
>> cordova.require('cordova/exec');
>> On Mon, Jan 7, 2013 at 2:17 AM, Thomas Anderson <
>> thomas.ander...@salvesolutions.com> wrote:
>>> 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 received this message because you are subscribed to the Google
>>> Groups "phonegap" group.
>>> To post to this group, send email to phonegap@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> phonegap+unsubscribe@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/phonegap?hl=en?hl=en
>>> For more info on PhoneGap or to download the code go to www.phonegap.com
>>> To compile in the cloud, check out build.phonegap.com
>> --
>> -- You received this message because you are subscribed to the Google
>> Groups "phonegap" group.
>> To post to this group, send email to phonegap@googlegroups.com
>> To unsubscribe from this group, send email to
>> phonegap+unsubscribe@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/phonegap?hl=en?hl=en
>> For more info on PhoneGap or to download the code go to www.phonegap.com
>> To compile in the cloud, check out build.phonegap.com
> --
> -- You received this message because you are subscribed to the Google
> Groups "phonegap" group.
> To post to this group, send email to phonegap@googlegroups.com
> To unsubscribe from this group, send email to
> phonegap+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/phonegap?hl=en?hl=en
> For more info on PhoneGap or to download the code go to www.phonegap.com
> To compile in the cloud, check out build.phonegap.com
> On Mon, Jan 7, 2013 at 5:33 PM, Thomas Anderson <
> thomas.ander...@salvesolutions.com> wrote:
>> 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..
>> On Mon, Jan 7, 2013 at 1:32 PM, Shazron <shaz...@gmail.com> wrote:
>>> what does this return?
>>> cordova.require('cordova/exec');
>>> On Mon, Jan 7, 2013 at 2:17 AM, Thomas Anderson <
>>> thomas.ander...@salvesolutions.com> wrote:
>>>> 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 received this message because you are subscribed to the Google
>>>> Groups "phonegap" group.
>>>> To post to this group, send email to phonegap@googlegroups.com
>>>> To unsubscribe from this group, send email to
>>>> phonegap+unsubscribe@googlegroups.com
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/phonegap?hl=en?hl=en
>>>> For more info on PhoneGap or to download the code go to
>>>> www.phonegap.com
>>>> To compile in the cloud, check out build.phonegap.com
>>> --
>>> -- You received this message because you are subscribed to the Google
>>> Groups "phonegap" group.
>>> To post to this group, send email to phonegap@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> phonegap+unsubscribe@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/phonegap?hl=en?hl=en
>>> For more info on PhoneGap or to download the code go to www.phonegap.com
>>> To compile in the cloud, check out build.phonegap.com
>> --
>> -- You received this message because you are subscribed to the Google
>> Groups "phonegap" group.
>> To post to this group, send email to phonegap@googlegroups.com
>> To unsubscribe from this group, send email to
>> phonegap+unsubscribe@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/phonegap?hl=en?hl=en
>> For more info on PhoneGap or to download the code go to www.phonegap.com
>> To compile in the cloud, check out build.phonegap.com
> --
> -- You received this message because you are subscribed to the Google
> Groups "phonegap" group.
> To post to this group, send email to phonegap@googlegroups.com
> To unsubscribe from this group, send email to
> phonegap+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/phonegap?hl=en?hl=en
> For more info on PhoneGap or to download the code go to www.phonegap.com
> To compile in the cloud, check out build.phonegap.com