IOS app source path

I am currently developing an application using Phonegap / Jekyll / Backbone. However, I need a base path for my static content generation. For Android platforms I am using /android_asset/www/

which works fine. However, I cannot find it for iOS, does anyone know about this?

Thanks in advance.

+2


source to share


1 answer


You have to ask the iOS device asynchronously for the root path. In the deviceready function function:

window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onFS, null);

      

When ready, it will callback with a FileSystem object from which you can access the full root path.



function onFS(fs) {
    alert(fs.root.fullPath); 
}

      

More on PhoneGap / Cordova docs: http://docs.phonegap.com/en/edge/cordova_file_file.md.html#FileSystem

+3


source







All Articles