termit / zipfile Goto Github PK
View Code? Open in Web Editor NEWTitanium Mobile zip module
Home Page: http://generalarcade.com
License: Other
Titanium Mobile zip module
Home Page: http://generalarcade.com
License: Other
I was glad using zipfile module for my projects.
I updated my xcode and titanium, now, it seems to crash. The app doesnot extract the zip. Need the reply asap.
When I have installed zipfile-iphone-0.1.18.zip package with TitaniumModileSDK1.7.0,
I got an error ”Couldn't find module: zipfile. ”
I guess the reason is, zipfile-iphone-0.1.18.zip manifest file has 'com.generalarcade.ZipFile' as moduleid.
Please release zipfile-iphone-0.1.21.zip package.
Hi,
I tried to use the module but it looks like the module can't find the zip file. I get the following messages in the Titanium console, if I start the app in the iOS simulator:
[INFO] [object ZipfileModule] loaded
[DEBUG] loading: /Users/calibanatspace/Documents/Titanium Studio Workspace/UEGW 2011/Resources/zipfile.js, resource: Users/calibanatspace/Documents/Titanium Studio Workspace/UEGW 2011/Resources/zipfile_js
[DEBUG] Can't find zip file
[DEBUG] can't open zip
I've tried it with SDK 1.7.2 and 1.8.0.xxx.
I've tested with code if the zip file is readable:
function extractZipFile( filePath )
{
var LOG_TAG = 'extractZipFile( filePath )';
log( 'filePath: ' + filePath, LOG_TAG );
var testfile = Ti.Filesystem.getFile( filePath );
if( testfile.exists() )
{
log( 'nativePath: ' + testfile.nativePath, LOG_TAG );
log( 'length: ' + testfile.read().length, LOG_TAG );
}
var zipfile = require("zipfile");
zipfile.extract( filePath, Ti.Filesystem.applicationDataDirectory );
}
The output in the console:
[INFO] extractZipFile( filePath ): filePath: file://localhost/Users/calibanatspace/Library/Application%20Support/iPhone%20Simulator/4.3/Applications/916D28F8-266C-42F6-AF49-8F1419148794/UEGW%202011.app/data/program/sessions.xml.zip
[INFO] extractZipFile( filePath ): nativePath: file://localhost/Users/calibanatspace/Library/Application%20Support/iPhone%20Simulator/4.3/Applications/916D28F8-266C-42F6-AF49-8F1419148794/UEGW%202011.app/data/program/sessions.xml.zip
[INFO] extractZipFile( filePath ): length: 139433
[INFO] [object ZipfileModule] loaded
[DEBUG] loading: /Users/calibanatspace/Library/Application Support/iPhone Simulator/4.3/Applications/916D28F8-266C-42F6-AF49-8F1419148794/UEGW 2011.app/zipfile.js, resource: zipfile_js
[DEBUG] Can't find zip file
[DEBUG] can't open zip
Anyone could provide hints what is wrong?
Regards, Jochen
Are there precompiled binaries for v0.1.21 or newer? I only saw v0.1.18 on the Downloads page in GitHub. Is there somewhere else I can find newer binaries?
I tried pulling down the code and running it but I get this message:
** BUILD FAILED **
The following build commands failed:
CompileC build/ZipFile.build/Release-iphoneos/zipfile.build/Objects-normal/armv6/ZipfileModule.o Classes/ZipfileModule.m normal armv6 objective-c com.apple.compilers.gcc.4_2
(1 failure)
xcodebuild failed
I'm not a C developer so I'm not sure what the CompileC command is supposed to do.
On SDK1.7.0, Something changed? ZipFile doesn't work with TitaniumSDK1.7.0
When I run the code on 'Zip File Extraction Example' , I get
[DEBUG] Can't find zip file
[DEBUG] can't open zip
Here is a workaround:
var appDir =
Ti.Network.decodeURIComponent(Ti.Filesystem.applicationDataDirectory).replace('file://localhost','') ;
zipfile.extract(appDir+'/test.zip', Ti.Filesystem.applicationDataDirectory);
Hi,
While building the plugin using 1.8.0 works fine, using the actual plugin doesn't work.
This error is thrown upon calling zipfile.extract(file, Ti.Filesystem.applicationDataDirectory);
:
[INFO] <null>
2011-05-14 16:50:45.808 Minecrafter[20358:5d03] -[NSNull length]: unrecognized selector sent to instance 0x24445e8
[ERROR] The application has crashed with an unhandled exception. Stack trace:
0 CoreFoundation 0x023d758c __exceptionPreprocess + 156
1 libobjc.A.dylib 0x0252b313 objc_exception_throw + 44
2 CoreFoundation 0x023d90bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x02348966 ___forwarding___ + 966
4 CoreFoundation 0x02348522 _CF_forwarding_prep_0 + 50
5 Foundation 0x006ad586 -[NSFileManager fileExistsAtPath:] + 45
6 Minecrafter 0x00333e26 -[ZipfileModule extract:] + 125
7 CoreFoundation 0x02347c7d __invoking___ + 29
8 CoreFoundation 0x02347b51 -[NSInvocation invoke] + 145
9 Minecrafter 0x0004e3c8 -[KrollMethod call:] + 3096
10 Minecrafter 0x0004ce5e KrollCallAsFunction + 542
11 Minecrafter 0x002de6c9 _ZN2TI16TiCallbackObjectINS_8TiObjectEE4callEPNS_10TiExcStateEPS1_NS_7TiValueERKNS_7ArgListE + 391
12 Minecrafter 0x002bb98b cti_op_call_NotTiFunction + 299
13 ??? 0x0e23facb 0x0 + 237238987
14 Minecrafter 0x002785d5 _ZN2TI11Interpreter7executeEPNS_18FunctionExecutableEPNS_10TiExcStateEPNS_10TiFunctionEPNS_8TiObjectERKNS_7ArgListEPNS_14ScopeChainNodeEPNS_7TiValueE + 975
15 Minecrafter 0x002c9dbd _ZN2TI10TiFunction4callEPNS_10TiExcStateENS_7TiValueERKNS_7ArgListE + 129
16 Minecrafter 0x002414cb _ZN2TI4callEPNS_10TiExcStateENS_7TiValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE + 91
17 Minecrafter 0x002dc9e6 TiObjectCallAsFunction + 454
18 Minecrafter 0x000562e8 -[KrollObject invokeCallbackForKey:withObject:thisObject:] + 856
19 Minecrafter 0x000452a2 -[ExpandedInvocationOperation main] + 210
20 Foundation 0x006d1b76 -[__NSOperationInternal start] + 747
21 Minecrafter 0x00047fb6 -[KrollContext invoke:] + 150
22 Minecrafter 0x000467aa -[KrollContext main] + 4346
23 Foundation 0x006abcf4 -[NSThread main] + 81
24 Foundation 0x006abc80 __NSThread__main__ + 1387
25 libSystem.B.dylib 0x947917fd _pthread_start + 345
26 libSystem.B.dylib 0x94791682 thread_start + 34
2011-05-14 16:50:45.851 Minecrafter[20358:5d03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull length]: unrecognized selector sent to instance 0x24445e8'
*** Call stack at first throw:
(
0 CoreFoundation 0x023d75a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x0252b313 objc_exception_throw + 44
2 CoreFoundation 0x023d90bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x02348966 ___forwarding___ + 966
4 CoreFoundation 0x02348522 _CF_forwarding_prep_0 + 50
5 Foundation 0x006ad586 -[NSFileManager fileExistsAtPath:] + 45
6 Minecrafter 0x00333e26 -[ZipfileModule extract:] + 125
7 CoreFoundation 0x02347c7d __invoking___ + 29
8 CoreFoundation 0x02347b51 -[NSInvocation invoke] + 145
9 Minecrafter 0x0004e3c8 -[KrollMethod call:] + 3096
10 Minecrafter 0x0004ce5e KrollCallAsFunction + 542
11 Minecrafter 0x002de6c9 _ZN2TI16TiCallbackObjectINS_8TiObjectEE4callEPNS_10TiExcStateEPS1_NS_7TiValueERKNS_7ArgListE + 391
12 Minecrafter 0x002bb98b cti_op_call_NotTiFunction + 299
13 ??? 0x0e23facb 0x0 + 237238987
14 Minecrafter 0x002785d5 _ZN2TI11Interpreter7executeEPNS_18FunctionExecutableEPNS_10TiExcStateEPNS_10TiFunctionEPNS_8TiObjectERKNS_7ArgListEPNS_14ScopeChainNodeEPNS_7TiValueE + 975
15 Minecrafter 0x002c9dbd _ZN2TI10TiFunction4callEPNS_10TiExcStateENS_7TiValueERKNS_7ArgListE + 129
16 Minecrafter 0x002414cb _ZN2TI4callEPNS_10TiExcStateENS_7TiValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE + 91
17 Minecrafter 0x002dc9e6 TiObjectCallAsFunction + 454
18 Minecrafter 0x000562e8 -[KrollObject invokeCallbackForKey:withObject:thisObject:] + 856
19 Minecrafter 0x000452a2 -[ExpandedInvocationOperation main] + 210
20 Foundation 0x006d1b76 -[__NSOperationInternal start] + 747
21 Minecrafter 0x00047fb6 -[KrollContext invoke:] + 150
22 Minecrafter 0x000467aa -[KrollContext main] + 4346
23 Foundation 0x006abcf4 -[NSThread main] + 81
24 Foundation 0x006abc80 __NSThread__main__ + 1387
25 libSystem.B.dylib 0x947917fd _pthread_start + 345
26 libSystem.B.dylib 0x94791682 thread_start + 34
)
terminate called after throwing an instance of 'NSException'
I tried to use the ZipFile module a while ago with a 1.7 continuous build, but that resulted in the same error.
Hello. I recently upgraded my computer to Lion. Zipfile is loading fine, but files are no longer extracting files in my application. It acts as if the files extract, but the directory is empty.
To clarify, first I crate a directory inside the app dir, and then run an extract on that dir. the directory is created just fine. However, the dir is never populated with the files from the zip.
zipfile 0.1.21 osx lion, SDK 1.8.2, xcode 4.2
Hoping that we can get this resolved, willing to donate for solution :)
I have installed the module and am running the following code in Ti Mobile 1.8.2
var zipfile = require('zipfile');
var concordance = Ti.Filesystem.resourcesDirectory+'data/files/concordance/e/Concordance.zip';
zipfile.extract(concordance, Ti.Filesystem.applicationDataDirectory);
All directories and files exist. No errors are shown even when showing Debug errors. It looks like everything worked fine - but there are no extracted files.
I am using the 0.1.21.zip that was precompiled. I also can see that the module is loaded:
[INFO] [object ZipfileModule] loaded
Please help me get this working.
When trying to build the module, I receive the following error:
The following build commands failed:
CompileC build/ZipFile.build/Release-iphoneos/zipfile.build/Objects-normal/armv7/ZipfileModule.o Classes/ZipfileModule.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
xcodebuild failed
A clean installation of OSX Mountain Lion was installed, I did not upgrade from a previous OS.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.