Downloading file to "/public" directory

I’m building an iOS app similar to the app that allows you to download videos to your device for offline viewing.

I can’t seem to figure out how to download and access files from the public directory. I’m using org.cordova.apache.file and org.cordova.apache.file-transfer to download files to the device, but Meteor cannot access them. So I thought that maybe if I could get these files to download to the “/public” directory, I’d have more luck.

The problem I’m having specifically is that whenever I do

meteor run ios-device

The “version” property of this object


gets updated.

I need that property to append to the directory path I get when I console.log cordova.file.dataDirectory. The property however shows as undefined when I try to use it in a variable. I can clearly see it when I console.log but I can’t use it in a var.



A private/protected variable? How can I access it? If I can figure this out I’m seriously considering posting a video tutorial since a lot of people seem to want to know how to do this.