incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shazron <>
Subject Re: Checking platform + version in cordova-js
Date Thu, 03 May 2012 18:27:27 GMT
@Jesse I don't like it wrt to maintenance - you'll have to think of
the Xcode templates. There's already trouble with dragging in the www
folder for users, this would make it a maintenance and user nightmare,
since the .js file will have to be part of the template now to be part
of the bundle.

I like that we have a www folder to contain everything, and everything
is clear where everything is, just like a website. "Packaging issue"
--> seems trivial, but no.

Ideally I would rather pair (for iOS at least) the .js and the
.framework and NOT include the .js in the www folder. For iOS, I have
the .js included in the .framework bundle, and we could inject the
javascript into the UIWebView at load time. Don't know if that will
improve or make things worse, since I haven't tested this approach.
This way if they include a .framework bundle, they automatically get
the paired .js inside it injected - without having to upgrade their
projects. So it is kinda like your method, but more automatic.

On Thu, May 3, 2012 at 11:08 AM, Jesse MacFadyen
<> wrote:
> Interesting. Good point in not depending on the bridge.
> Maybe slightly off topic, and a potential breaking change...
> Does it make sense to place the cordova.js file up one level? Ie
> src='../cordova-x.x.x.js'
> This would make it a packaging issue, and the www folder would be
> truly portable.
> Is this possible on other platforms? I know it would work for WP7 and iOS.
> Cheers,
>  Jesse
> Sent from my iPhone5
> On 2012-05-03, at 10:48 AM, Filip Maj <> wrote:
>> Wanted to solicit the list to get help on the issue. Just trying to
>> generate ideas.
>> The core problem: people not using the proper .js file on their platform,
>> I.e. Copying their entire www/ folder from their iOS app to their Android
>> app.
>> This issue proposes the idea of checking that the native platform the app
>> is running on matches the platform the .js file is built for.
>> The question is: how?
>> One idea: could do checking in the device module (the one that returns
>> device info) and compare against the platform id (from platform.js).
>> However, this relies on the web view <-> native bridge working, which
>> probably will not if the user is using the wrong .js file.

View raw message