Re: Cordova Debug Mode

2013-11-28 Thread Andrew Grieve
Regarding a debug mode, I think it already exists to some extent. Platform
build scripts accept a --release flag, which sets the Release configuration
on iOS, and on android runs "ant release" instead of "ant debug".


On Tue, Nov 26, 2013 at 10:43 AM, Michal Mocny  wrote:

> On Tue, Nov 26, 2013 at 1:30 AM, Jan Becicka 
> wrote:
>
> > On 25 Nov 2013, at 19:48, Michal Mocny  wrote:
> >
> > > You have to explicitly enable remote debugging for kitkat chrome-based
> > > webview:
> > >
> >
> https://developers.google.com/chrome-developer-tools/docs/remote-debugging#debugging-webviews
> > >
> > > Existing cordova platforms do not do this.  I think it would be a good
> > > preference to add for the android platform for 3.3, but you can add it
> > > yourself following the above instructions.
> >
> > Sounds good. Is there an issue for this? Should I file it?
> >
>
> Filed: https://issues.apache.org/jira/browse/CB-5487
>
>
> >
> > Thanks,
> > Jan
> >
> >
> > >
> > > As far as I am aware there are no performance implication to leaving
> this
> > > flag on at all time (i.e. when releasing your app) -- but the flag
> > > implemented as an opt-in so that users cannot inspect your webview
> based
> > > application without your consent.  I think cordova should respect that
> > and
> > > leave the option off by default as well.
> > >
> > > -Michal
> > >
> > >
> > > On Mon, Nov 25, 2013 at 9:11 AM, Dick Van den Brink <
> > > d_vandenbr...@outlook.com> wrote:
> > >
> > >> @Jan
> > >> Remote debugging is possible with for example
> > https://www.jshybugger.com/
> > >>
> > >> On Android 4.4 It is possible to debug without a plugin.
> > >>
> > >> Sent from my Windows Phone
> > >> 
> > >> From: Jan Becicka<mailto:jan.beci...@oracle.com>
> > >> Sent: 11/25/2013 17:05
> > >> To: dev@cordova.apache.org<mailto:dev@cordova.apache.org>
> > >> Subject: Re: Cordova Debug Mode
> > >>
> > >>> * Enabling the remote debugger in Android 4.4+
> > >>
> > >> Btw does cordova support remote debugging on Android? Is there a way
> how
> > >> to enable it for cordova apps? I tried to google it, but I failed.
> > >> Thanks,
> > >> Jan
> > >>
> > >>
> > >>
> >
> >
>


Re: Cordova Debug Mode

2013-11-26 Thread Michal Mocny
On Tue, Nov 26, 2013 at 1:30 AM, Jan Becicka  wrote:

> On 25 Nov 2013, at 19:48, Michal Mocny  wrote:
>
> > You have to explicitly enable remote debugging for kitkat chrome-based
> > webview:
> >
> https://developers.google.com/chrome-developer-tools/docs/remote-debugging#debugging-webviews
> >
> > Existing cordova platforms do not do this.  I think it would be a good
> > preference to add for the android platform for 3.3, but you can add it
> > yourself following the above instructions.
>
> Sounds good. Is there an issue for this? Should I file it?
>

Filed: https://issues.apache.org/jira/browse/CB-5487


>
> Thanks,
> Jan
>
>
> >
> > As far as I am aware there are no performance implication to leaving this
> > flag on at all time (i.e. when releasing your app) -- but the flag
> > implemented as an opt-in so that users cannot inspect your webview based
> > application without your consent.  I think cordova should respect that
> and
> > leave the option off by default as well.
> >
> > -Michal
> >
> >
> > On Mon, Nov 25, 2013 at 9:11 AM, Dick Van den Brink <
> > d_vandenbr...@outlook.com> wrote:
> >
> >> @Jan
> >> Remote debugging is possible with for example
> https://www.jshybugger.com/
> >>
> >> On Android 4.4 It is possible to debug without a plugin.
> >>
> >> Sent from my Windows Phone
> >> 
> >> From: Jan Becicka<mailto:jan.beci...@oracle.com>
> >> Sent: 11/25/2013 17:05
> >> To: dev@cordova.apache.org<mailto:dev@cordova.apache.org>
> >> Subject: Re: Cordova Debug Mode
> >>
> >>> * Enabling the remote debugger in Android 4.4+
> >>
> >> Btw does cordova support remote debugging on Android? Is there a way how
> >> to enable it for cordova apps? I tried to google it, but I failed.
> >> Thanks,
> >> Jan
> >>
> >>
> >>
>
>


Re: Cordova Debug Mode

2013-11-26 Thread Jan Becicka
On 25 Nov 2013, at 19:48, Michal Mocny  wrote:

> You have to explicitly enable remote debugging for kitkat chrome-based
> webview:
> https://developers.google.com/chrome-developer-tools/docs/remote-debugging#debugging-webviews
> 
> Existing cordova platforms do not do this.  I think it would be a good
> preference to add for the android platform for 3.3, but you can add it
> yourself following the above instructions.

Sounds good. Is there an issue for this? Should I file it?

Thanks,
Jan


> 
> As far as I am aware there are no performance implication to leaving this
> flag on at all time (i.e. when releasing your app) -- but the flag
> implemented as an opt-in so that users cannot inspect your webview based
> application without your consent.  I think cordova should respect that and
> leave the option off by default as well.
> 
> -Michal
> 
> 
> On Mon, Nov 25, 2013 at 9:11 AM, Dick Van den Brink <
> d_vandenbr...@outlook.com> wrote:
> 
>> @Jan
>> Remote debugging is possible with for example https://www.jshybugger.com/
>> 
>> On Android 4.4 It is possible to debug without a plugin.
>> 
>> Sent from my Windows Phone
>> 
>> From: Jan Becicka<mailto:jan.beci...@oracle.com>
>> Sent: 11/25/2013 17:05
>> To: dev@cordova.apache.org<mailto:dev@cordova.apache.org>
>> Subject: Re: Cordova Debug Mode
>> 
>>> * Enabling the remote debugger in Android 4.4+
>> 
>> Btw does cordova support remote debugging on Android? Is there a way how
>> to enable it for cordova apps? I tried to google it, but I failed.
>> Thanks,
>> Jan
>> 
>> 
>> 



Re: Cordova Debug Mode

2013-11-25 Thread Tommy-Carlos Williams
+1

On 26 Nov 2013, at 6:46 am, Brian LeRoux  wrote:

> Proposal:
> 
> 1. We open bugs to document how to create release software for all the
> platforms.
> 2. We review to see if there is anything common we can abstract
> 
> Cool?
> 
> 
> 
> 
> On Mon, Nov 25, 2013 at 11:36 AM, Michal Mocny  wrote:
> 
>> Lets distinguish between "CLI" as (a) one of two potential cordova
>> workflows vs (b) typing commands into a terminal using an easy & documented
>> & unsurprising syntax for users of the cordova tool.
>> 
>> So: How would you release from "the CLI"?
>> (a) The same ways you would using the platform workflow
>> (b) You cannot
>> 
>> My point is: its worth simplifying/documenting for (b) but its not like you
>> cannot ever ship an app using the "project workflow" aka "CLI".
>> 
>> -Michal
>> 
>> 
>> On Mon, Nov 25, 2013 at 11:29 AM, Tommy Williams 
>> wrote:
>> 
>>> How would you release from the CLI?
>>> 
>>> On what platforms?
>>> 
>>> In was not aware of any way in the CLI workflow to avoid going into Xcode
>>> (in the case of iOS), or typing 'ant release' (after setting up your
>>> release keys) in the case of Android.
>>> 
>>> BB10 does have flags... But the others? Have I missed something?
>>> On 23/11/2013 5:19 AM, "Michal Mocny"  wrote:
>>> 
 On Thu, Nov 21, 2013 at 1:00 PM, Ian Clelland  wrote:
 
> On Thu, Nov 21, 2013 at 2:56 PM, Joe Bowser 
>> wrote:
> 
>> On Thu, Nov 21, 2013 at 11:37 AM, Ian Clelland <
>>> iclell...@chromium.org
> 
>> wrote:
>>> 
>>> Would it make sense to have a build flag for this? "cordova build
>> --debug",
>>> "cordova build --release"; something like that (bikeshed colours
>> welcome).
>>> I don't think that config.xml is the place for it; it seems like
>> it
>> should
>>> be lower than that, but I'm not exactly sure how it should be
>> set.
>> 
>> Considering that we have to add Java code to get this to work, it
>> either has to be in the XML, or we're going to have to check the
>> AndroidManifest to see if we're in debug mode, like what we already
>>> do
>> for SSL errors.
>> 
> 
> If we could set that flag in the manifest from the CLI (as part of
 prepare,
> or as part of build) then that would probably do it.
> 
> 
>> 
>> There
>>> will probably need to be platform-specific implementations, but
>> it
> would
>> be
>>> good to have a cross-platform way of turning it on and off.
>>> 
>> 
>> The CLI doesn't have a way to actually release software, so I
>> assume
>> that ALL builds created by it are Debug Builds.
>> 
> 
> True. There should be a thread about that, too :)
> 
 
 What do we mean that the CLI doesn't have a way to release software?
>>> Maybe
 not using a single command, but you certainly can with the workflow.
 
>>> 
>> 



Re: Cordova Debug Mode

2013-11-25 Thread Tommy-Carlos Williams
Oh, don’t get me wrong. I *have* shipped an app that is otherwise completely 
dictated by the CLI workflow (and has been since the CLI was in beta… we drink 
the Kool-Aid).

We have just had to document internally how to do it.

But if releasing is possible from the terminal (at least on Android, iOS and 
BB10… excuse my WP8 ignorance), then why *can’t* the Cordova CLI help / handle 
it? A little documentation and a couple wrapper node scripts later and the 
process is better, surely.




On 26 Nov 2013, at 6:36 am, Michal Mocny  wrote:

> Lets distinguish between "CLI" as (a) one of two potential cordova
> workflows vs (b) typing commands into a terminal using an easy & documented
> & unsurprising syntax for users of the cordova tool.
> 
> So: How would you release from "the CLI"?
> (a) The same ways you would using the platform workflow
> (b) You cannot
> 
> My point is: its worth simplifying/documenting for (b) but its not like you
> cannot ever ship an app using the "project workflow" aka "CLI".
> 
> -Michal
> 
> 
> On Mon, Nov 25, 2013 at 11:29 AM, Tommy Williams  wrote:
> 
>> How would you release from the CLI?
>> 
>> On what platforms?
>> 
>> In was not aware of any way in the CLI workflow to avoid going into Xcode
>> (in the case of iOS), or typing 'ant release' (after setting up your
>> release keys) in the case of Android.
>> 
>> BB10 does have flags... But the others? Have I missed something?
>> On 23/11/2013 5:19 AM, "Michal Mocny"  wrote:
>> 
>>> On Thu, Nov 21, 2013 at 1:00 PM, Ian Clelland >>> wrote:
>>> 
 On Thu, Nov 21, 2013 at 2:56 PM, Joe Bowser  wrote:
 
> On Thu, Nov 21, 2013 at 11:37 AM, Ian Clelland <
>> iclell...@chromium.org
 
> wrote:
>> 
>> Would it make sense to have a build flag for this? "cordova build
> --debug",
>> "cordova build --release"; something like that (bikeshed colours
> welcome).
>> I don't think that config.xml is the place for it; it seems like it
> should
>> be lower than that, but I'm not exactly sure how it should be set.
> 
> Considering that we have to add Java code to get this to work, it
> either has to be in the XML, or we're going to have to check the
> AndroidManifest to see if we're in debug mode, like what we already
>> do
> for SSL errors.
> 
 
 If we could set that flag in the manifest from the CLI (as part of
>>> prepare,
 or as part of build) then that would probably do it.
 
 
> 
> There
>> will probably need to be platform-specific implementations, but it
 would
> be
>> good to have a cross-platform way of turning it on and off.
>> 
> 
> The CLI doesn't have a way to actually release software, so I assume
> that ALL builds created by it are Debug Builds.
> 
 
 True. There should be a thread about that, too :)
 
>>> 
>>> What do we mean that the CLI doesn't have a way to release software?
>> Maybe
>>> not using a single command, but you certainly can with the workflow.
>>> 
>> 



Re: Cordova Debug Mode

2013-11-25 Thread Brian LeRoux
Proposal:

1. We open bugs to document how to create release software for all the
platforms.
2. We review to see if there is anything common we can abstract

Cool?




On Mon, Nov 25, 2013 at 11:36 AM, Michal Mocny  wrote:

> Lets distinguish between "CLI" as (a) one of two potential cordova
> workflows vs (b) typing commands into a terminal using an easy & documented
> & unsurprising syntax for users of the cordova tool.
>
> So: How would you release from "the CLI"?
> (a) The same ways you would using the platform workflow
> (b) You cannot
>
> My point is: its worth simplifying/documenting for (b) but its not like you
> cannot ever ship an app using the "project workflow" aka "CLI".
>
> -Michal
>
>
> On Mon, Nov 25, 2013 at 11:29 AM, Tommy Williams 
> wrote:
>
> > How would you release from the CLI?
> >
> > On what platforms?
> >
> > In was not aware of any way in the CLI workflow to avoid going into Xcode
> > (in the case of iOS), or typing 'ant release' (after setting up your
> > release keys) in the case of Android.
> >
> > BB10 does have flags... But the others? Have I missed something?
> > On 23/11/2013 5:19 AM, "Michal Mocny"  wrote:
> >
> > > On Thu, Nov 21, 2013 at 1:00 PM, Ian Clelland  > > >wrote:
> > >
> > > > On Thu, Nov 21, 2013 at 2:56 PM, Joe Bowser 
> wrote:
> > > >
> > > > > On Thu, Nov 21, 2013 at 11:37 AM, Ian Clelland <
> > iclell...@chromium.org
> > > >
> > > > > wrote:
> > > > > >
> > > > > > Would it make sense to have a build flag for this? "cordova build
> > > > > --debug",
> > > > > > "cordova build --release"; something like that (bikeshed colours
> > > > > welcome).
> > > > > > I don't think that config.xml is the place for it; it seems like
> it
> > > > > should
> > > > > > be lower than that, but I'm not exactly sure how it should be
> set.
> > > > >
> > > > > Considering that we have to add Java code to get this to work, it
> > > > > either has to be in the XML, or we're going to have to check the
> > > > > AndroidManifest to see if we're in debug mode, like what we already
> > do
> > > > > for SSL errors.
> > > > >
> > > >
> > > > If we could set that flag in the manifest from the CLI (as part of
> > > prepare,
> > > > or as part of build) then that would probably do it.
> > > >
> > > >
> > > > >
> > > > >  There
> > > > > > will probably need to be platform-specific implementations, but
> it
> > > > would
> > > > > be
> > > > > > good to have a cross-platform way of turning it on and off.
> > > > > >
> > > > >
> > > > > The CLI doesn't have a way to actually release software, so I
> assume
> > > > > that ALL builds created by it are Debug Builds.
> > > > >
> > > >
> > > > True. There should be a thread about that, too :)
> > > >
> > >
> > > What do we mean that the CLI doesn't have a way to release software?
> >  Maybe
> > > not using a single command, but you certainly can with the workflow.
> > >
> >
>


Re: Cordova Debug Mode

2013-11-25 Thread Joe Bowser
OK, we're straying way too far from the subject. That being said,
cordova build --debug and cordova build --release don't really make
sense since --release may not be possible on all platforms.  I think
we can get consensus on that currently.

What DOES make sense is if the platforms detected whether to do this
and to turn it on and off based on their particular setting.  Android
can and probably should do this, and it sounds like BB can already do
this.  What about iOS?

On Mon, Nov 25, 2013 at 11:36 AM, Michal Mocny  wrote:
> Lets distinguish between "CLI" as (a) one of two potential cordova
> workflows vs (b) typing commands into a terminal using an easy & documented
> & unsurprising syntax for users of the cordova tool.
>
> So: How would you release from "the CLI"?
> (a) The same ways you would using the platform workflow
> (b) You cannot
>
> My point is: its worth simplifying/documenting for (b) but its not like you
> cannot ever ship an app using the "project workflow" aka "CLI".
>
> -Michal
>
>
> On Mon, Nov 25, 2013 at 11:29 AM, Tommy Williams  wrote:
>
>> How would you release from the CLI?
>>
>> On what platforms?
>>
>> In was not aware of any way in the CLI workflow to avoid going into Xcode
>> (in the case of iOS), or typing 'ant release' (after setting up your
>> release keys) in the case of Android.
>>
>> BB10 does have flags... But the others? Have I missed something?
>> On 23/11/2013 5:19 AM, "Michal Mocny"  wrote:
>>
>> > On Thu, Nov 21, 2013 at 1:00 PM, Ian Clelland > > >wrote:
>> >
>> > > On Thu, Nov 21, 2013 at 2:56 PM, Joe Bowser  wrote:
>> > >
>> > > > On Thu, Nov 21, 2013 at 11:37 AM, Ian Clelland <
>> iclell...@chromium.org
>> > >
>> > > > wrote:
>> > > > >
>> > > > > Would it make sense to have a build flag for this? "cordova build
>> > > > --debug",
>> > > > > "cordova build --release"; something like that (bikeshed colours
>> > > > welcome).
>> > > > > I don't think that config.xml is the place for it; it seems like it
>> > > > should
>> > > > > be lower than that, but I'm not exactly sure how it should be set.
>> > > >
>> > > > Considering that we have to add Java code to get this to work, it
>> > > > either has to be in the XML, or we're going to have to check the
>> > > > AndroidManifest to see if we're in debug mode, like what we already
>> do
>> > > > for SSL errors.
>> > > >
>> > >
>> > > If we could set that flag in the manifest from the CLI (as part of
>> > prepare,
>> > > or as part of build) then that would probably do it.
>> > >
>> > >
>> > > >
>> > > >  There
>> > > > > will probably need to be platform-specific implementations, but it
>> > > would
>> > > > be
>> > > > > good to have a cross-platform way of turning it on and off.
>> > > > >
>> > > >
>> > > > The CLI doesn't have a way to actually release software, so I assume
>> > > > that ALL builds created by it are Debug Builds.
>> > > >
>> > >
>> > > True. There should be a thread about that, too :)
>> > >
>> >
>> > What do we mean that the CLI doesn't have a way to release software?
>>  Maybe
>> > not using a single command, but you certainly can with the workflow.
>> >
>>


Re: Cordova Debug Mode

2013-11-25 Thread Michal Mocny
Lets distinguish between "CLI" as (a) one of two potential cordova
workflows vs (b) typing commands into a terminal using an easy & documented
& unsurprising syntax for users of the cordova tool.

So: How would you release from "the CLI"?
(a) The same ways you would using the platform workflow
(b) You cannot

My point is: its worth simplifying/documenting for (b) but its not like you
cannot ever ship an app using the "project workflow" aka "CLI".

-Michal


On Mon, Nov 25, 2013 at 11:29 AM, Tommy Williams  wrote:

> How would you release from the CLI?
>
> On what platforms?
>
> In was not aware of any way in the CLI workflow to avoid going into Xcode
> (in the case of iOS), or typing 'ant release' (after setting up your
> release keys) in the case of Android.
>
> BB10 does have flags... But the others? Have I missed something?
> On 23/11/2013 5:19 AM, "Michal Mocny"  wrote:
>
> > On Thu, Nov 21, 2013 at 1:00 PM, Ian Clelland  > >wrote:
> >
> > > On Thu, Nov 21, 2013 at 2:56 PM, Joe Bowser  wrote:
> > >
> > > > On Thu, Nov 21, 2013 at 11:37 AM, Ian Clelland <
> iclell...@chromium.org
> > >
> > > > wrote:
> > > > >
> > > > > Would it make sense to have a build flag for this? "cordova build
> > > > --debug",
> > > > > "cordova build --release"; something like that (bikeshed colours
> > > > welcome).
> > > > > I don't think that config.xml is the place for it; it seems like it
> > > > should
> > > > > be lower than that, but I'm not exactly sure how it should be set.
> > > >
> > > > Considering that we have to add Java code to get this to work, it
> > > > either has to be in the XML, or we're going to have to check the
> > > > AndroidManifest to see if we're in debug mode, like what we already
> do
> > > > for SSL errors.
> > > >
> > >
> > > If we could set that flag in the manifest from the CLI (as part of
> > prepare,
> > > or as part of build) then that would probably do it.
> > >
> > >
> > > >
> > > >  There
> > > > > will probably need to be platform-specific implementations, but it
> > > would
> > > > be
> > > > > good to have a cross-platform way of turning it on and off.
> > > > >
> > > >
> > > > The CLI doesn't have a way to actually release software, so I assume
> > > > that ALL builds created by it are Debug Builds.
> > > >
> > >
> > > True. There should be a thread about that, too :)
> > >
> >
> > What do we mean that the CLI doesn't have a way to release software?
>  Maybe
> > not using a single command, but you certainly can with the workflow.
> >
>


Re: Cordova Debug Mode

2013-11-25 Thread Brian LeRoux
I tend to agree w/ Joe here. Abstracting ./release is a nice idea on the
surface but this should really live in our docs as the process is far more
manual and store specific than can be automated in a useful manner.


On Mon, Nov 25, 2013 at 11:26 AM, Joe Bowser  wrote:

> Accidentally didn't send this to the list:
>
>
> -- Forwarded message --
> From: Joe Bowser 
> Date: Mon, Nov 25, 2013 at 11:03 AM
> Subject: Re: Cordova Debug Mode
> To: Michal Mocny 
>
>
> On Fri, Nov 22, 2013 at 10:18 AM, Michal Mocny 
> wrote:
> >
> > What do we mean that the CLI doesn't have a way to release software?
>  Maybe
> > not using a single command, but you certainly can with the workflow.
> >
>
> OK, so, just for the sake of argument, I've gone through the full
> development process with the CLI and I'm looking to publish an app on
> Google Play? (I'm not even going to touch iOS, because that doesn't
> even work on my box) How does one do that with the CLI?  There's
> nothing in this doc here:
>
>
> http://docs.phonegap.com/en/3.1.0/guide_cli_index.md.html#The%20Command-line%20Interface
>
> Nor is there anything when you type cordova and read the directions.
> There's nothing here that helps the user get from done to published.
> They're going to have to deal with the platform reality now, which
> looks like this:
> cd platforms/android
> cordova/build --release
> cd bin
> jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore
> my-release-key.keystore
> my_application.apk alias_name
> zipalign -v 4 your_project_name-unaligned.apk your_project_name.apk
>
> This is assuming that you have a keystore setup, which I would say
> most of our users don't have.  Right now, the CLI doesn't do ANY of
> this and I don't know if the CLI should do any of this.  It might be
> OK for us to assume that all builds the CLI are responsible for are
> just debug mode versions.  However, to actually release a Cordova app,
> it actually has to make it to an App Store of some type, since that's
> where the people are and that's one of the main selling points of
> Cordova in the first place.
>


Re: Cordova Debug Mode

2013-11-25 Thread Tommy Williams
How would you release from the CLI?

On what platforms?

In was not aware of any way in the CLI workflow to avoid going into Xcode
(in the case of iOS), or typing 'ant release' (after setting up your
release keys) in the case of Android.

BB10 does have flags... But the others? Have I missed something?
On 23/11/2013 5:19 AM, "Michal Mocny"  wrote:

> On Thu, Nov 21, 2013 at 1:00 PM, Ian Clelland  >wrote:
>
> > On Thu, Nov 21, 2013 at 2:56 PM, Joe Bowser  wrote:
> >
> > > On Thu, Nov 21, 2013 at 11:37 AM, Ian Clelland  >
> > > wrote:
> > > >
> > > > Would it make sense to have a build flag for this? "cordova build
> > > --debug",
> > > > "cordova build --release"; something like that (bikeshed colours
> > > welcome).
> > > > I don't think that config.xml is the place for it; it seems like it
> > > should
> > > > be lower than that, but I'm not exactly sure how it should be set.
> > >
> > > Considering that we have to add Java code to get this to work, it
> > > either has to be in the XML, or we're going to have to check the
> > > AndroidManifest to see if we're in debug mode, like what we already do
> > > for SSL errors.
> > >
> >
> > If we could set that flag in the manifest from the CLI (as part of
> prepare,
> > or as part of build) then that would probably do it.
> >
> >
> > >
> > >  There
> > > > will probably need to be platform-specific implementations, but it
> > would
> > > be
> > > > good to have a cross-platform way of turning it on and off.
> > > >
> > >
> > > The CLI doesn't have a way to actually release software, so I assume
> > > that ALL builds created by it are Debug Builds.
> > >
> >
> > True. There should be a thread about that, too :)
> >
>
> What do we mean that the CLI doesn't have a way to release software?  Maybe
> not using a single command, but you certainly can with the workflow.
>


Re: Cordova Debug Mode

2013-11-25 Thread Michal Mocny
(..And my reply.)


On Mon, Nov 25, 2013 at 11:16 AM, Michal Mocny  wrote:

> Okay, I agree with you, this is difficult and poorly documented.  This is
> something we in mobile-chrome-apps team are annoyed with right as we
> prepare to advocate cordova to chrome app devs more prominently.  We here
> haven't attempted publishing apps until recently so haven't felt the pain
> nor dedicated effort to improve the situation.
>
> What I meant with my comment was that you can publish while using the CLI
> *workflow*, even if not from the actual command line.  Ie, I can create a
> multi-platform application using the cordova tool, manage plugins, debug,
> etc, and only need to delve into platform details to release (or to dig
> deeper into debugging etc).  Right now, to make releases easier, we've
> advised using an IDE to help.  I know this is a bit of a philosophical
> difference, but the Google team does not mind mixing platform IDE's with
> the CLI workflow, since we consider the CLI workflow as a useful way to do
> "multi-platform" and needn't strictly be "hide-all-platform bits entirely
> away".
>
> Absolutely, the current process sucks.  Absolutely, we haven't worked
> enough on making it better since 3.0 shipped, and that should change.  Very
> likely someone from Google will attempt to simplify or at least document
> this some time between now and January and we would love others to help as
> well.  We would also love a way to do this in the cloud, and while we
> haven't played with phonegap-build I think it is a solution that a lot of
> us would love to leverage.
>
> -Michal
>
> (Joe, did you mean to private reply?)
>
>
> On Mon, Nov 25, 2013 at 11:03 AM, Joe Bowser  wrote:
>
>> On Fri, Nov 22, 2013 at 10:18 AM, Michal Mocny 
>> wrote:
>> >
>> > What do we mean that the CLI doesn't have a way to release software?
>>  Maybe
>> > not using a single command, but you certainly can with the workflow.
>> >
>>
>> OK, so, just for the sake of argument, I've gone through the full
>> development process with the CLI and I'm looking to publish an app on
>> Google Play? (I'm not even going to touch iOS, because that doesn't
>> even work on my box) How does one do that with the CLI?  There's
>> nothing in this doc here:
>>
>>
>> http://docs.phonegap.com/en/3.1.0/guide_cli_index.md.html#The%20Command-line%20Interface
>>
>> Nor is there anything when you type cordova and read the directions.
>> There's nothing here that helps the user get from done to published.
>> They're going to have to deal with the platform reality now, which
>> looks like this:
>> cd platforms/android
>> cordova/build --release
>> cd bin
>> jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore
>> my-release-key.keystore
>> my_application.apk alias_name
>> zipalign -v 4 your_project_name-unaligned.apk your_project_name.apk
>>
>> This is assuming that you have a keystore setup, which I would say
>> most of our users don't have.  Right now, the CLI doesn't do ANY of
>> this and I don't know if the CLI should do any of this.  It might be
>> OK for us to assume that all builds the CLI are responsible for are
>> just debug mode versions.  However, to actually release a Cordova app,
>> it actually has to make it to an App Store of some type, since that's
>> where the people are and that's one of the main selling points of
>> Cordova in the first place.
>>
>
>


Re: Cordova Debug Mode

2013-11-25 Thread Bryan Higgins
FWIW, BB10 does respect --debug (default) and --release flags passed into
build.

In debug mode, remote web inspector is enabled and the app is not signed.


On Mon, Nov 25, 2013 at 1:48 PM, Michal Mocny  wrote:

> You have to explicitly enable remote debugging for kitkat chrome-based
> webview:
>
> https://developers.google.com/chrome-developer-tools/docs/remote-debugging#debugging-webviews
>
> Existing cordova platforms do not do this.  I think it would be a good
> preference to add for the android platform for 3.3, but you can add it
> yourself following the above instructions.
>
> As far as I am aware there are no performance implication to leaving this
> flag on at all time (i.e. when releasing your app) -- but the flag
> implemented as an opt-in so that users cannot inspect your webview based
> application without your consent.  I think cordova should respect that and
> leave the option off by default as well.
>
> -Michal
>
>
> On Mon, Nov 25, 2013 at 9:11 AM, Dick Van den Brink <
> d_vandenbr...@outlook.com> wrote:
>
> > @Jan
> > Remote debugging is possible with for example
> https://www.jshybugger.com/
> >
> > On Android 4.4 It is possible to debug without a plugin.
> >
> > Sent from my Windows Phone
> > 
> > From: Jan Becicka<mailto:jan.beci...@oracle.com>
> > Sent: 11/25/2013 17:05
> > To: dev@cordova.apache.org<mailto:dev@cordova.apache.org>
> > Subject: Re: Cordova Debug Mode
> >
> > > * Enabling the remote debugger in Android 4.4+
> >
> > Btw does cordova support remote debugging on Android? Is there a way how
> > to enable it for cordova apps? I tried to google it, but I failed.
> > Thanks,
> > Jan
> >
> >
> >
>


Re: Cordova Debug Mode

2013-11-25 Thread Michal Mocny
You have to explicitly enable remote debugging for kitkat chrome-based
webview:
https://developers.google.com/chrome-developer-tools/docs/remote-debugging#debugging-webviews

Existing cordova platforms do not do this.  I think it would be a good
preference to add for the android platform for 3.3, but you can add it
yourself following the above instructions.

As far as I am aware there are no performance implication to leaving this
flag on at all time (i.e. when releasing your app) -- but the flag
implemented as an opt-in so that users cannot inspect your webview based
application without your consent.  I think cordova should respect that and
leave the option off by default as well.

-Michal


On Mon, Nov 25, 2013 at 9:11 AM, Dick Van den Brink <
d_vandenbr...@outlook.com> wrote:

> @Jan
> Remote debugging is possible with for example https://www.jshybugger.com/
>
> On Android 4.4 It is possible to debug without a plugin.
>
> Sent from my Windows Phone
> 
> From: Jan Becicka<mailto:jan.beci...@oracle.com>
> Sent: 11/25/2013 17:05
> To: dev@cordova.apache.org<mailto:dev@cordova.apache.org>
> Subject: Re: Cordova Debug Mode
>
> > * Enabling the remote debugger in Android 4.4+
>
> Btw does cordova support remote debugging on Android? Is there a way how
> to enable it for cordova apps? I tried to google it, but I failed.
> Thanks,
> Jan
>
>
>


RE: Cordova Debug Mode

2013-11-25 Thread Dick Van den Brink
@Jan
Remote debugging is possible with for example https://www.jshybugger.com/

On Android 4.4 It is possible to debug without a plugin.

Sent from my Windows Phone

From: Jan Becicka<mailto:jan.beci...@oracle.com>
Sent: ‎11/‎25/‎2013 17:05
To: dev@cordova.apache.org<mailto:dev@cordova.apache.org>
Subject: Re: Cordova Debug Mode

> * Enabling the remote debugger in Android 4.4+

Btw does cordova support remote debugging on Android? Is there a way how to 
enable it for cordova apps? I tried to google it, but I failed.
Thanks,
Jan




Re: Cordova Debug Mode

2013-11-25 Thread Jan Becicka
> * Enabling the remote debugger in Android 4.4+

Btw does cordova support remote debugging on Android? Is there a way how to 
enable it for cordova apps? I tried to google it, but I failed.
Thanks,
Jan




Re: Cordova Debug Mode

2013-11-22 Thread Michal Mocny
On Thu, Nov 21, 2013 at 1:00 PM, Ian Clelland wrote:

> On Thu, Nov 21, 2013 at 2:56 PM, Joe Bowser  wrote:
>
> > On Thu, Nov 21, 2013 at 11:37 AM, Ian Clelland 
> > wrote:
> > >
> > > Would it make sense to have a build flag for this? "cordova build
> > --debug",
> > > "cordova build --release"; something like that (bikeshed colours
> > welcome).
> > > I don't think that config.xml is the place for it; it seems like it
> > should
> > > be lower than that, but I'm not exactly sure how it should be set.
> >
> > Considering that we have to add Java code to get this to work, it
> > either has to be in the XML, or we're going to have to check the
> > AndroidManifest to see if we're in debug mode, like what we already do
> > for SSL errors.
> >
>
> If we could set that flag in the manifest from the CLI (as part of prepare,
> or as part of build) then that would probably do it.
>
>
> >
> >  There
> > > will probably need to be platform-specific implementations, but it
> would
> > be
> > > good to have a cross-platform way of turning it on and off.
> > >
> >
> > The CLI doesn't have a way to actually release software, so I assume
> > that ALL builds created by it are Debug Builds.
> >
>
> True. There should be a thread about that, too :)
>

What do we mean that the CLI doesn't have a way to release software?  Maybe
not using a single command, but you certainly can with the workflow.


Re: Cordova Debug Mode

2013-11-22 Thread Marcel Kinard
On Nov 21, 2013, at 2:37 PM, Ian Clelland  wrote:

> * All of our Console / ADB / NSLog Logging

For that one, I'll play devil's advocate for a moment. Even internal logging 
can be helpful for diagnosing problems in the field with production apps, 
especially when struggling to recreate it in the lab in debug mode. 

Most of the other items in your list make sense.



Re: Cordova Debug Mode

2013-11-21 Thread Lindsey Simon
On Thu, Nov 21, 2013 at 12:58 PM, Ian Clelland wrote:

> On Thu, Nov 21, 2013 at 3:22 PM, Lindsey Simon 
> wrote:
>
> > On Thu, Nov 21, 2013 at 11:37 AM, Ian Clelland  > >wrote:
> >
> > > David and I were talking about this this morning, and since Joe brought
> > it
> > > up as well, we should probably get the list involved.
> > >
> > > I think that there is some value in having "Debug" and "Release" builds
> > of
> > > Cordova projects. I don't know if the platforms have any way to do this
> > > already, but it seems like there are a lot of behaviours that are
> > > incredibly useful for testing and development, which shouldn't ever be
> > > enabled in released applications.
> > >
> > > Off the top of my head:
> > >
> > > * All of our Console / ADB / NSLog Logging
> > >
> >
> > If you disable logging by default, make it a preference somewhere.
> Because
> > I always wanted console/Java logging in production Android apps to
> capture
> > wtf was going on for my users all the time.
>
>
> Do you mean console.log() statements from application code? Those should
> definitely be allowed, and if you have the console plugin installed, then
> they can go to the device's log. I meant that we could shut up all of the
> logging that goes on inside Cordova and inside our plugins. If *those*
> messages are still useful in production apps, then we should clean them up
> a bit :)
>

Ah, no worries then - you mean internal logging ;) Carry on.


Re: Cordova Debug Mode

2013-11-21 Thread Ian Clelland
On Thu, Nov 21, 2013 at 2:56 PM, Joe Bowser  wrote:

> On Thu, Nov 21, 2013 at 11:37 AM, Ian Clelland 
> wrote:
> >
> > Would it make sense to have a build flag for this? "cordova build
> --debug",
> > "cordova build --release"; something like that (bikeshed colours
> welcome).
> > I don't think that config.xml is the place for it; it seems like it
> should
> > be lower than that, but I'm not exactly sure how it should be set.
>
> Considering that we have to add Java code to get this to work, it
> either has to be in the XML, or we're going to have to check the
> AndroidManifest to see if we're in debug mode, like what we already do
> for SSL errors.
>

If we could set that flag in the manifest from the CLI (as part of prepare,
or as part of build) then that would probably do it.


>
>  There
> > will probably need to be platform-specific implementations, but it would
> be
> > good to have a cross-platform way of turning it on and off.
> >
>
> The CLI doesn't have a way to actually release software, so I assume
> that ALL builds created by it are Debug Builds.
>

True. There should be a thread about that, too :)


Re: Cordova Debug Mode

2013-11-21 Thread Ian Clelland
On Thu, Nov 21, 2013 at 3:22 PM, Lindsey Simon  wrote:

> On Thu, Nov 21, 2013 at 11:37 AM, Ian Clelland  >wrote:
>
> > David and I were talking about this this morning, and since Joe brought
> it
> > up as well, we should probably get the list involved.
> >
> > I think that there is some value in having "Debug" and "Release" builds
> of
> > Cordova projects. I don't know if the platforms have any way to do this
> > already, but it seems like there are a lot of behaviours that are
> > incredibly useful for testing and development, which shouldn't ever be
> > enabled in released applications.
> >
> > Off the top of my head:
> >
> > * All of our Console / ADB / NSLog Logging
> >
>
> If you disable logging by default, make it a preference somewhere. Because
> I always wanted console/Java logging in production Android apps to capture
> wtf was going on for my users all the time.


Do you mean console.log() statements from application code? Those should
definitely be allowed, and if you have the console plugin installed, then
they can go to the device's log. I meant that we could shut up all of the
logging that goes on inside Cordova and inside our plugins. If *those*
messages are still useful in production apps, then we should clean them up
a bit :)


Re: Cordova Debug Mode

2013-11-21 Thread Lindsey Simon
On Thu, Nov 21, 2013 at 11:37 AM, Ian Clelland wrote:

> David and I were talking about this this morning, and since Joe brought it
> up as well, we should probably get the list involved.
>
> I think that there is some value in having "Debug" and "Release" builds of
> Cordova projects. I don't know if the platforms have any way to do this
> already, but it seems like there are a lot of behaviours that are
> incredibly useful for testing and development, which shouldn't ever be
> enabled in released applications.
>
> Off the top of my head:
>
> * All of our Console / ADB / NSLog Logging
>

If you disable logging by default, make it a preference somewhere. Because
I always wanted console/Java logging in production Android apps to capture
wtf was going on for my users all the time.


> * Enabling the remote debugger in Android 4.4+
> * (maybe) disabling the network whitelist
>
> I'm sure there are others -- we have a plugin for chrome.alarm that is
> *supposed* to have a 1-minute minimum timeout, but I'd love to be able to
> make that 1/4s in debug mode only.
>
> Would it make sense to have a build flag for this? "cordova build --debug",
> "cordova build --release"; something like that (bikeshed colours welcome).
> I don't think that config.xml is the place for it; it seems like it should
> be lower than that, but I'm not exactly sure how it should be set. There
> will probably need to be platform-specific implementations, but it would be
> good to have a cross-platform way of turning it on and off.
>
> Thoughts?
>
> Ian
>


Re: Cordova Debug Mode

2013-11-21 Thread Joe Bowser
On Thu, Nov 21, 2013 at 11:37 AM, Ian Clelland  wrote:
>
> Would it make sense to have a build flag for this? "cordova build --debug",
> "cordova build --release"; something like that (bikeshed colours welcome).
> I don't think that config.xml is the place for it; it seems like it should
> be lower than that, but I'm not exactly sure how it should be set.

Considering that we have to add Java code to get this to work, it
either has to be in the XML, or we're going to have to check the
AndroidManifest to see if we're in debug mode, like what we already do
for SSL errors.

 There
> will probably need to be platform-specific implementations, but it would be
> good to have a cross-platform way of turning it on and off.
>

The CLI doesn't have a way to actually release software, so I assume
that ALL builds created by it are Debug Builds.