Unable to extract zip file. (TermiT Zipfile)
The app contacts the webservice to get a json object which has the following properties: Value,Message,StoreFile.
The StoreFile property contains compressed base 64 encoded string. Here are the steps I'm following to extract the file but it is not working.
var f= Titanium.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory, 'test.zip');
f.write(Titanium.Utils.base64decode(Obj.StoreFile.toString()));
Ti.ZipFile.extract(Titanium.Filesystem.resourcesDirectory + '/test.zip',Titanium.Filesystem.resourcesDirectory);
Please help.