You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Leif Wells <le...@gmail.com> on 2012/03/17 18:14:05 UTC

Warning for unsupported platforms?

All,

Just starting to get involved with supporting Cordova. This looks like a
lively project.

You know how Cordova shows an error message about the "www/index.html" file
being missing when you forget to add that folder to the project? (At least
it does that on Android and iOS)

Would it be a good idea to, perhaps, have a similar error message when
using Cordova on an unsupported platform (for dumb people like me who
fought with Cordova 1.5 on iOS for hours before finding out iOS isn't
supported)?

I realize that may require some mindfulness on someone's part to remove
some code in the platform detection code, but it might actually save
someone some hair.

Thoughts?

Leif

Re: Warning for unsupported platforms?

Posted by Filip Maj <fi...@adobe.com>.
Make sure you are using the latest native cordova-ios code from apache
master [1]. The JavaScript file + the native implementation rely on each
other and are coupled, so using a JS file or native framework for a
platform, with either out of sync, will give you lots of trouble.

Your best bet moving forward is:

1. Use the latest master from apache source for any platform supported.
See the list of incubator-cordova-* repositories on the Apache git server
[2].
2. Use the latest master from apache source for the unified JS project [3].
3. Build both from source (see the README in each repo).

Current platforms using the unified JS, based on the HEAD of the master
branches, are Android and iOS. Other platforms are in the works
(BlackBerry, PlayBook and WP7 coming  next I think).

Also please note that no matter how much progress we make in the future,
there will *always* be differences in the cordova.js file across
platforms. Each platform uses a different mechanism to communicate between
the WebView and the native implementation. We can bring the
implementations to be very close (say, 95% identical) but the core method
to send messages between the chromeless browser instance and the native
framework code will *always* be different across platforms.

[1] 
http://git-wip-us.apache.org/repos/asf?p=incubator-cordova-ios.git;a=summar
y
[2] http://git-wip-us.apache.org/repos/asf
[3] 
http://git-wip-us.apache.org/repos/asf?p=incubator-cordova-js.git;a=summary


On 3/18/12 5:30 PM, "Leif Wells" <le...@gmail.com> wrote:

>@Ryan:
>Using that file, but it doesn't look like deviceready is getting called no
>matter whether I call it directly or in the function called onLoad. This,
>of course, is occurring in the simulator.
>
>This doesn't mean I am not doing something terribly wrong (which I am
>banking on).
>
>I'll have more time to look at this again later.
>
>Leif
>
>
>
>On Sun, Mar 18, 2012 at 5:44 PM, Leif Wells <le...@gmail.com> wrote:
>
>> @Ryan f'in Stewart
>> Let me get through the UNC game and I'll run a test and let you know.
>>
>> Thanks.
>>
>> Leif
>>


Re: Warning for unsupported platforms?

Posted by Leif Wells <le...@gmail.com>.
@Ryan:
Using that file, but it doesn't look like deviceready is getting called no
matter whether I call it directly or in the function called onLoad. This,
of course, is occurring in the simulator.

This doesn't mean I am not doing something terribly wrong (which I am
banking on).

I'll have more time to look at this again later.

Leif



On Sun, Mar 18, 2012 at 5:44 PM, Leif Wells <le...@gmail.com> wrote:

> @Ryan f'in Stewart
> Let me get through the UNC game and I'll run a test and let you know.
>
> Thanks.
>
> Leif
>

Re: Warning for unsupported platforms?

Posted by Leif Wells <le...@gmail.com>.
@Ryan f'in Stewart
Let me get through the UNC game and I'll run a test and let you know.

Thanks.

Leif

Re: Warning for unsupported platforms?

Posted by Ryan Stewart <rs...@adobe.com>.
Is this what you're looking for Leif? Just the js file?

https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/javascript/cordova.ios.js

=Ryan

On Mar 18, 2012, at 2:29 PM, Leif Wells wrote:

@Joe
I was talking about the current cordova-1.5.0.js file, which is an
Android-only release, a fact which I completely missed.

@Shazron
Do we know when we can celebrate unification? ;-)

Also, can someone direct me to the currently working version of the Cordova
file which works with iOS? I hear it is available, but am not sure I am
using the latest.

Thanks to you all.

Leif


Re: Warning for unsupported platforms?

Posted by Leif Wells <le...@gmail.com>.
@Joe
I was talking about the current cordova-1.5.0.js file, which is an
Android-only release, a fact which I completely missed.

@Shazron
Do we know when we can celebrate unification? ;-)

Also, can someone direct me to the currently working version of the Cordova
file which works with iOS? I hear it is available, but am not sure I am
using the latest.

Thanks to you all.

Leif

Re: Warning for unsupported platforms?

Posted by Shazron <sh...@gmail.com>.
Leif, perhaps you are talking about the cordova.js file - then yes, it
is currently platform-specific, the Android one is different than the
iOS one - an unified .js is slated for the upcoming 1.6.0 release.

On Sat, Mar 17, 2012 at 10:30 AM, Joe Bowser <bo...@gmail.com> wrote:
> I'm not sure what you are referring to, but iOS should be supported. Can
> you please explain why you feel this isn't the case?
>
> Joe
>  On Mar 17, 2012 10:14 AM, "Leif Wells" <le...@gmail.com> wrote:
>
>> All,
>>
>> Just starting to get involved with supporting Cordova. This looks like a
>> lively project.
>>
>> You know how Cordova shows an error message about the "www/index.html" file
>> being missing when you forget to add that folder to the project? (At least
>> it does that on Android and iOS)
>>
>> Would it be a good idea to, perhaps, have a similar error message when
>> using Cordova on an unsupported platform (for dumb people like me who
>> fought with Cordova 1.5 on iOS for hours before finding out iOS isn't
>> supported)?
>>
>> I realize that may require some mindfulness on someone's part to remove
>> some code in the platform detection code, but it might actually save
>> someone some hair.
>>
>> Thoughts?
>>
>> Leif
>>

Re: Warning for unsupported platforms?

Posted by Joe Bowser <bo...@gmail.com>.
I'm not sure what you are referring to, but iOS should be supported. Can
you please explain why you feel this isn't the case?

Joe
 On Mar 17, 2012 10:14 AM, "Leif Wells" <le...@gmail.com> wrote:

> All,
>
> Just starting to get involved with supporting Cordova. This looks like a
> lively project.
>
> You know how Cordova shows an error message about the "www/index.html" file
> being missing when you forget to add that folder to the project? (At least
> it does that on Android and iOS)
>
> Would it be a good idea to, perhaps, have a similar error message when
> using Cordova on an unsupported platform (for dumb people like me who
> fought with Cordova 1.5 on iOS for hours before finding out iOS isn't
> supported)?
>
> I realize that may require some mindfulness on someone's part to remove
> some code in the platform detection code, but it might actually save
> someone some hair.
>
> Thoughts?
>
> Leif
>