Questions about FileSystem documentation and paths

2014-06-29 Thread Ray Camden
Hey folks - I originally raised this on the Google Group as I assumed it was 
just an issue w/ my code, but I believe this is a documentation issue so I'm 
raising it here. If wrong, let me know. :)

I'm working on a set of of demos related to the FileSystem feature to answer a 
series of FAQs risen on my blog. For my first sample app, I wanted to build 
something simple:

Check for a file on the device. 
If not there, fetch it.

Looking at the docs for the FileSystem important dirs, I assumed that 
cordova.file.applicationStorageDirectory made the most sense. The docs say it 
is: Root of app's private writable storage.

Note the words private and writable. In my mind that was: I can write to it 
and it is private, no other app can use it.

But in my testing when I tried to FileTransfer crap down to it, I always got 
this error:  Could not create target file

Not really sure what to do, I eventually tried cordova.file.dataDirectory. 
According to the docs for it, it is: Where to put app-specific data files. 
Since it didn't say Private, my understanding was: Ok, I can put crap here 
too, but it is public, so other apps can see it. 

Switching to this made my app work immediately. (Haven't tested Android yet.)

So my question is - did I simply misunderstand the documentation for 
applicationStorageDirectory? If so, if someone can help explain what I did 
wrong, I'll happily write it up in a PR to improve the doc.

If I didn't misunderstand it and there is a bug, I'll file a report. 

If you want to see the entire app (again, it is incredibly simple), you can see 
it here: 
https://github.com/cfjedimaster/Cordova-Examples/tree/master/checkanddownload/www

Re: Browserify JS is in

2014-06-29 Thread Ally Ogilvie
Anis that is really sweet.
If this hits CLI, plugin.xml will have sections for plugins to do web
actions?
TBH.. i've always wanted a cordova platform add web... but i'd be happy
enough with a prepare for browser only mode.

Seeing a lot of use cases (e.g. Facebook plugin etc.) where there are JS,
iOS  Android SDKs and a Cordova Plugin wants to support the same API on
all platforms.



On Sat, Jun 21, 2014 at 9:26 AM, Anis KADRI anis.ka...@gmail.com wrote:

 Ok cool. I can look at adding a --browserify option for run and prepare. I
 logged an issue for it [1]

 [1] https://issues.apache.org/jira/browse/CB-7001


 On Thu, Jun 19, 2014 at 5:57 PM, Andrew Grieve agri...@chromium.org
 wrote:

  Thanks Anis!
 
  Tougher for CLI since it's actually the prepare step that creates
  cordova_plugins.js, but longer term (medium term?) I don't see why we
  shouldn't just turn it on always anyways.
 
  So... Maybe cordova prepare --browserify?
  Build prepares first, so will also need: cordova run android --browserify
 
  I haven't looked at it yet. Google IO is next week and it's been
 consuming
  most of our time the last few weeks. Will definitely play with it next
 next
  week though!
 
 
 
  On Thu, Jun 19, 2014 at 6:28 PM, Anis KADRI anis.ka...@gmail.com
 wrote:
 
  Sorry. I forgot you asked the question. There was no issue but there is
  one now.
  https://issues.apache.org/jira/browse/CB-6990
 
  This feature is plugman only for now. How important is it to wire it
  to CLI ? Have  you guys had time to test it out yet ? How would it
  work with CLI ? Add another flag such as cordova plugin add
  --browserify ?
 
  On Thu, Jun 19, 2014 at 9:28 AM, Andrew Grieve agri...@chromium.org
  wrote:
   bump
  
  
   On Mon, Jun 16, 2014 at 12:51 PM, Andrew Grieve agri...@chromium.org
 
   wrote:
  
   Cool, yes! Thanks for the update!
  
   Is there a JIRA for this? Was asked in
   https://issues.apache.org/jira/browse/CB-5671.
  
  
  
  
   On Mon, Jun 16, 2014 at 10:21 AM, Michal Mocny mmo...@chromium.org
   wrote:
  
   Awesome Anis.
  
   Will gladly take a look at this later today.  Just wanted to send a
  quick
   thanks for landing this this way, and for the useful report.
  
   -Michal
  
  
   On Fri, Jun 13, 2014 at 7:55 PM, Anis KADRI anis.ka...@gmail.com
  wrote:
  
Yo,
   
Just wanted to let everyone know that I added browserify support
 to
plugman (behind a flag for now). CLI is not hooked to this yet.
 Here
is how it works:
   
plugman install --browserify --plugin [PLUGIN] --platform
 [PLATFORM]
--project [PROJECT_PATH]
   
will generate a browserify version of cordova.js. Plugins and
everything is bundled in. This version passes mobile-spec on iOS
 and
Android. I am not yet setup to test other platforms.
   
plugman install --plugin [PLUGIN] --platform [PLATFORM] --project
[PROJECT_PATH]
   
Will continue to generate cordova.js the way it used to.
   
Because some of you really care about benchmarks here is some
comparison for dependencies-plugin install:
   
No browserify:
   
real 0m9.546s
user 0m4.673s
sys 0m0.692s
   
Browserify:
real 0m9.861s
user 0m4.759s
sys 0m0.648s
   
All cordova-lib tests are passing so I am assuming this has
 minimal
impact but LET ME KNOW otherwise.
   
Anis
   
  
  
  
 
 
 




-- 
http://www.wizcorp.jp/Ally Ogilvie
Lead Developer - MobDev. | Wizcorp Inc. http://www.wizcorp.jp/
--
TECH . GAMING . OPEN-SOURCE WIZARDS+ 81 (0)3-4550-1448 | Website
http://www.wizcorp.jp/ | Twitter https://twitter.com/Wizcorp | Facebook
http://www.facebook.com/Wizcorp | LinkedIn
http://www.linkedin.com/company/wizcorp


[GitHub] cordova-app-hello-world pull request: update index.html and index....

2014-06-29 Thread marti1125
GitHub user marti1125 opened a pull request:

https://github.com/apache/cordova-app-hello-world/pull/8

update index.html and index.js

I removed this script of index.html
app.initialize();

https://issues.apache.org/jira/browse/CB-6949

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/marti1125/cordova-app-hello-world CB-6949

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-app-hello-world/pull/8.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #8


commit 58a493cddfe1a3fc0aa942c4a90ccd2108a55638
Author: Willy Aguirre marti1...@gmail.com
Date:   2014-06-30T02:47:53Z

update index.html and index.js




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cordova-app-hello-world pull request: update index.html and index....

2014-06-29 Thread marti1125
Github user marti1125 commented on the pull request:


https://github.com/apache/cordova-app-hello-world/pull/8#issuecomment-47493059
  
Hi! 
@rodms10, when I try to validated this app at marketplace, this value:
pkgName: io.cordova.hellocordova,
doesn't valid for manifest.webapp



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---