├── PodFile
├── Podfile.lock
├── Pods
├── Headers
│ ├── Build
│ │ └── ZipArchive
│ │ │ ├── ZipArchive.h
│ │ │ ├── crypt.h
│ │ │ ├── ioapi.h
│ │ │ ├── mztools.h
│ │ │ ├── unzip.h
│ │ │ └── zip.h
│ └── Public
│ │ └── ZipArchive
│ │ └── ZipArchive.h
├── Manifest.lock
├── Pods.xcodeproj
│ ├── project.pbxproj
│ └── xcuserdata
│ │ └── Peter.xcuserdatad
│ │ └── xcschemes
│ │ ├── Pods-ZipArchive.xcscheme
│ │ ├── Pods.xcscheme
│ │ └── xcschememanagement.plist
├── Target Support Files
│ ├── Pods-ZipArchive
│ │ ├── Pods-ZipArchive-Private.xcconfig
│ │ ├── Pods-ZipArchive-dummy.m
│ │ ├── Pods-ZipArchive-prefix.pch
│ │ └── Pods-ZipArchive.xcconfig
│ └── Pods
│ │ ├── Pods-acknowledgements.markdown
│ │ ├── Pods-acknowledgements.plist
│ │ ├── Pods-dummy.m
│ │ ├── Pods-environment.h
│ │ ├── Pods-resources.sh
│ │ ├── Pods.debug.xcconfig
│ │ └── Pods.release.xcconfig
└── ZipArchive
│ ├── LICENSE
│ ├── README.md
│ ├── ZipArchive.h
│ ├── ZipArchive.m
│ └── minizip
│ ├── crypt.h
│ ├── ioapi.c
│ ├── ioapi.h
│ ├── mztools.c
│ ├── mztools.h
│ ├── unzip.c
│ ├── unzip.h
│ ├── zip.c
│ └── zip.h
├── README.md
├── XBServerFramework.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ └── contents.xcworkspacedata
└── xcuserdata
│ └── Peter.xcuserdatad
│ ├── xcdebugger
│ └── Breakpoints_v2.xcbkptlist
│ └── xcschemes
│ ├── XBServerFramework.xcscheme
│ └── xcschememanagement.plist
├── XBServerFramework.xcworkspace
├── contents.xcworkspacedata
├── xcshareddata
│ └── XBServerFramework.xccheckout
└── xcuserdata
│ └── Peter.xcuserdatad
│ └── xcdebugger
│ └── Breakpoints_v2.xcbkptlist
├── XBServerFramework
├── AppDelegate.h
├── AppDelegate.m
├── Base.lproj
│ ├── LaunchScreen.xib
│ └── Main.storyboard
├── Images.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Info.plist
├── ViewController.h
├── ViewController.m
└── main.m
└── XBServerFrameworkTests
├── Info.plist
└── XBServerFrameworkTests.m
/PodFile:
--------------------------------------------------------------------------------
1 | platform :ios, "6.0"
2 | pod 'ZipArchive'
--------------------------------------------------------------------------------
/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - ZipArchive (1.4.0)
3 |
4 | DEPENDENCIES:
5 | - ZipArchive
6 |
7 | SPEC CHECKSUMS:
8 | ZipArchive: e25a4373192673e3229ac8d6e9f64a3e5713c966
9 |
10 | COCOAPODS: 0.35.0
11 |
--------------------------------------------------------------------------------
/Pods/Headers/Build/ZipArchive/ZipArchive.h:
--------------------------------------------------------------------------------
1 | ../../../ZipArchive/ZipArchive.h
--------------------------------------------------------------------------------
/Pods/Headers/Build/ZipArchive/crypt.h:
--------------------------------------------------------------------------------
1 | ../../../ZipArchive/minizip/crypt.h
--------------------------------------------------------------------------------
/Pods/Headers/Build/ZipArchive/ioapi.h:
--------------------------------------------------------------------------------
1 | ../../../ZipArchive/minizip/ioapi.h
--------------------------------------------------------------------------------
/Pods/Headers/Build/ZipArchive/mztools.h:
--------------------------------------------------------------------------------
1 | ../../../ZipArchive/minizip/mztools.h
--------------------------------------------------------------------------------
/Pods/Headers/Build/ZipArchive/unzip.h:
--------------------------------------------------------------------------------
1 | ../../../ZipArchive/minizip/unzip.h
--------------------------------------------------------------------------------
/Pods/Headers/Build/ZipArchive/zip.h:
--------------------------------------------------------------------------------
1 | ../../../ZipArchive/minizip/zip.h
--------------------------------------------------------------------------------
/Pods/Headers/Public/ZipArchive/ZipArchive.h:
--------------------------------------------------------------------------------
1 | ../../../ZipArchive/ZipArchive.h
--------------------------------------------------------------------------------
/Pods/Manifest.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - ZipArchive (1.4.0)
3 |
4 | DEPENDENCIES:
5 | - ZipArchive
6 |
7 | SPEC CHECKSUMS:
8 | ZipArchive: e25a4373192673e3229ac8d6e9f64a3e5713c966
9 |
10 | COCOAPODS: 0.35.0
11 |
--------------------------------------------------------------------------------
/Pods/Pods.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | archiveVersion
6 | 1
7 | classes
8 |
9 | objectVersion
10 | 46
11 | objects
12 |
13 | 00DD19325CD38A2E6C6C3850
14 |
15 | buildActionMask
16 | 2147483647
17 | files
18 |
19 | B4834338C84F780ADB0ADDAA
20 |
21 | isa
22 | PBXFrameworksBuildPhase
23 | runOnlyForDeploymentPostprocessing
24 | 0
25 |
26 | 03CDDD2587BCEAE267BB4FEE
27 |
28 | isa
29 | PBXTargetDependency
30 | name
31 | Pods-ZipArchive
32 | target
33 | 7B0C9BEA29D5FDC02D29FBBD
34 | targetProxy
35 | 6A9657D8AC01D98BC064B141
36 |
37 | 04E755D32A0A2784B942A9AE
38 |
39 | isa
40 | PBXFileReference
41 | lastKnownFileType
42 | wrapper.framework
43 | name
44 | Foundation.framework
45 | path
46 | Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk/System/Library/Frameworks/Foundation.framework
47 | sourceTree
48 | DEVELOPER_DIR
49 |
50 | 070C1C7D9419268A3E3908C8
51 |
52 | includeInIndex
53 | 1
54 | isa
55 | PBXFileReference
56 | lastKnownFileType
57 | sourcecode.c.h
58 | name
59 | unzip.h
60 | path
61 | minizip/unzip.h
62 | sourceTree
63 | <group>
64 |
65 | 07308007A9A0F37A3822A8CF
66 |
67 | includeInIndex
68 | 1
69 | isa
70 | PBXFileReference
71 | name
72 | zip.c
73 | path
74 | minizip/zip.c
75 | sourceTree
76 | <group>
77 |
78 | 0A918D977E929C58DA5CD0A4
79 |
80 | children
81 |
82 | 04E755D32A0A2784B942A9AE
83 |
84 | isa
85 | PBXGroup
86 | name
87 | iOS
88 | sourceTree
89 | <group>
90 |
91 | 0AFC7815881BAA1FEC9B517A
92 |
93 | fileRef
94 | 070C1C7D9419268A3E3908C8
95 | isa
96 | PBXBuildFile
97 |
98 | 1418BB4DBDCBE216ECC97203
99 |
100 | children
101 |
102 | 7516D7A3C4629CB3949D3B52
103 | 331C9B66ACCECF1B7F80B5D0
104 | 886F36D1063A6E9580758BC0
105 | B4573285DD71576BB6DA6799
106 | 48E686A738A0D6D72A3FFB8B
107 |
108 | isa
109 | PBXGroup
110 | sourceTree
111 | <group>
112 |
113 | 15E21DD4250A2D5242462F48
114 |
115 | children
116 |
117 | 2A8CC2597665A133FDCE4B08
118 | D061507E8D0617CDE99E4FCF
119 | DBB03C90CD0DDEC61B88C82F
120 | A143750C8CE0F7AB72910B44
121 | CF156AF8FB6B2321F5E4F2CA
122 | C517BEC2DE7D3CE8CDC97C40
123 | 93E65B05734B0B2DBDCA390F
124 | 92F8407A661AF50A01D01E77
125 | 070C1C7D9419268A3E3908C8
126 | 07308007A9A0F37A3822A8CF
127 | 8203304DD6003916B67EBA50
128 | 1FB9A3E791BD8325FD0D7C36
129 |
130 | isa
131 | PBXGroup
132 | name
133 | ZipArchive
134 | path
135 | ZipArchive
136 | sourceTree
137 | <group>
138 |
139 | 1BBDCAAA1F1E67ED80C36D50
140 |
141 | explicitFileType
142 | archive.ar
143 | includeInIndex
144 | 0
145 | isa
146 | PBXFileReference
147 | path
148 | libPods.a
149 | sourceTree
150 | BUILT_PRODUCTS_DIR
151 |
152 | 1FB9A3E791BD8325FD0D7C36
153 |
154 | children
155 |
156 | EC2136C0A5A4C3C196849C49
157 | 382B38D6644E232BAC6D7E3D
158 | ED776FB492D50C0BBF2D8F10
159 | 59BA7B589F35C86408F34CDD
160 |
161 | isa
162 | PBXGroup
163 | name
164 | Support Files
165 | path
166 | ../Target Support Files/Pods-ZipArchive
167 | sourceTree
168 | <group>
169 |
170 | 2A8CC2597665A133FDCE4B08
171 |
172 | includeInIndex
173 | 1
174 | isa
175 | PBXFileReference
176 | lastKnownFileType
177 | sourcecode.c.h
178 | path
179 | ZipArchive.h
180 | sourceTree
181 | <group>
182 |
183 | 2D52D6AA9B2B0D78D67C7021
184 |
185 | children
186 |
187 | 7CF3434FC22568AC605EA1C8
188 | D5DF92E77019F3264BC65F96
189 | 526C527F4D7C4A2E9E596A39
190 | B7D8FCDB683145EB39F86D5A
191 | CEA0FC3F3FAC8F25CCD45598
192 | 727C09E65319ACD494BB0E81
193 | E47B8F1DEA978B674D373268
194 |
195 | isa
196 | PBXGroup
197 | name
198 | Pods
199 | path
200 | Target Support Files/Pods
201 | sourceTree
202 | <group>
203 |
204 | 331C9B66ACCECF1B7F80B5D0
205 |
206 | children
207 |
208 | 0A918D977E929C58DA5CD0A4
209 |
210 | isa
211 | PBXGroup
212 | name
213 | Frameworks
214 | sourceTree
215 | <group>
216 |
217 | 382B38D6644E232BAC6D7E3D
218 |
219 | includeInIndex
220 | 1
221 | isa
222 | PBXFileReference
223 | lastKnownFileType
224 | text.xcconfig
225 | path
226 | Pods-ZipArchive-Private.xcconfig
227 | sourceTree
228 | <group>
229 |
230 | 3AA1ABD846F404D9927A23FA
231 |
232 | fileRef
233 | 2A8CC2597665A133FDCE4B08
234 | isa
235 | PBXBuildFile
236 |
237 | 431D953BE1FBC0D9E8A0024E
238 |
239 | fileRef
240 | 92F8407A661AF50A01D01E77
241 | isa
242 | PBXBuildFile
243 | settings
244 |
245 | COMPILER_FLAGS
246 | -Dunix -fno-objc-arc
247 |
248 |
249 | 476E19595AAA9B7B192AA1E4
250 |
251 | explicitFileType
252 | archive.ar
253 | includeInIndex
254 | 0
255 | isa
256 | PBXFileReference
257 | path
258 | libPods-ZipArchive.a
259 | sourceTree
260 | BUILT_PRODUCTS_DIR
261 |
262 | 48E686A738A0D6D72A3FFB8B
263 |
264 | children
265 |
266 | 2D52D6AA9B2B0D78D67C7021
267 |
268 | isa
269 | PBXGroup
270 | name
271 | Targets Support Files
272 | sourceTree
273 | <group>
274 |
275 | 526C527F4D7C4A2E9E596A39
276 |
277 | includeInIndex
278 | 1
279 | isa
280 | PBXFileReference
281 | lastKnownFileType
282 | sourcecode.c.objc
283 | path
284 | Pods-dummy.m
285 | sourceTree
286 | <group>
287 |
288 | 5309AE92D2AE226A535EE160
289 |
290 | baseConfigurationReference
291 | 382B38D6644E232BAC6D7E3D
292 | buildSettings
293 |
294 | ALWAYS_SEARCH_USER_PATHS
295 | NO
296 | COPY_PHASE_STRIP
297 | NO
298 | DSTROOT
299 | /tmp/xcodeproj.dst
300 | GCC_DYNAMIC_NO_PIC
301 | NO
302 | GCC_OPTIMIZATION_LEVEL
303 | 0
304 | GCC_PRECOMPILE_PREFIX_HEADER
305 | YES
306 | GCC_PREFIX_HEADER
307 | Target Support Files/Pods-ZipArchive/Pods-ZipArchive-prefix.pch
308 | GCC_PREPROCESSOR_DEFINITIONS
309 |
310 | DEBUG=1
311 | $(inherited)
312 |
313 | GCC_SYMBOLS_PRIVATE_EXTERN
314 | NO
315 | INSTALL_PATH
316 | $(BUILT_PRODUCTS_DIR)
317 | IPHONEOS_DEPLOYMENT_TARGET
318 | 6.0
319 | OTHER_LDFLAGS
320 |
321 | OTHER_LIBTOOLFLAGS
322 |
323 | PRODUCT_NAME
324 | $(TARGET_NAME)
325 | PUBLIC_HEADERS_FOLDER_PATH
326 | $(TARGET_NAME)
327 | SDKROOT
328 | iphoneos
329 | SKIP_INSTALL
330 | YES
331 |
332 | isa
333 | XCBuildConfiguration
334 | name
335 | Debug
336 |
337 | 550952202685528727AE47DB
338 |
339 | buildSettings
340 |
341 | ALWAYS_SEARCH_USER_PATHS
342 | NO
343 | CLANG_CXX_LANGUAGE_STANDARD
344 | gnu++0x
345 | CLANG_CXX_LIBRARY
346 | libc++
347 | CLANG_ENABLE_MODULES
348 | YES
349 | CLANG_ENABLE_OBJC_ARC
350 | YES
351 | CLANG_WARN_BOOL_CONVERSION
352 | YES
353 | CLANG_WARN_CONSTANT_CONVERSION
354 | YES
355 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE
356 | YES
357 | CLANG_WARN_EMPTY_BODY
358 | YES
359 | CLANG_WARN_ENUM_CONVERSION
360 | YES
361 | CLANG_WARN_INT_CONVERSION
362 | YES
363 | CLANG_WARN_OBJC_ROOT_CLASS
364 | YES
365 | COPY_PHASE_STRIP
366 | YES
367 | GCC_C_LANGUAGE_STANDARD
368 | gnu99
369 | GCC_DYNAMIC_NO_PIC
370 | NO
371 | GCC_OPTIMIZATION_LEVEL
372 | 0
373 | GCC_PREPROCESSOR_DEFINITIONS
374 |
375 | DEBUG=1
376 | $(inherited)
377 |
378 | GCC_SYMBOLS_PRIVATE_EXTERN
379 | NO
380 | GCC_WARN_64_TO_32_BIT_CONVERSION
381 | YES
382 | GCC_WARN_ABOUT_RETURN_TYPE
383 | YES
384 | GCC_WARN_UNDECLARED_SELECTOR
385 | YES
386 | GCC_WARN_UNINITIALIZED_AUTOS
387 | YES
388 | GCC_WARN_UNUSED_FUNCTION
389 | YES
390 | GCC_WARN_UNUSED_VARIABLE
391 | YES
392 | IPHONEOS_DEPLOYMENT_TARGET
393 | 6.0
394 | ONLY_ACTIVE_ARCH
395 | YES
396 | STRIP_INSTALLED_PRODUCT
397 | NO
398 |
399 | isa
400 | XCBuildConfiguration
401 | name
402 | Debug
403 |
404 | 59BA7B589F35C86408F34CDD
405 |
406 | includeInIndex
407 | 1
408 | isa
409 | PBXFileReference
410 | lastKnownFileType
411 | sourcecode.c.h
412 | path
413 | Pods-ZipArchive-prefix.pch
414 | sourceTree
415 | <group>
416 |
417 | 606193B4E48090467D2AAA24
418 |
419 | fileRef
420 | A143750C8CE0F7AB72910B44
421 | isa
422 | PBXBuildFile
423 | settings
424 |
425 | COMPILER_FLAGS
426 | -Dunix -fno-objc-arc
427 |
428 |
429 | 614A5C7403ACBA7CCFFF6CB1
430 |
431 | buildConfigurationList
432 | 82933269743057E874DB5A6A
433 | buildPhases
434 |
435 | ED22BA1B043371156F8BE10E
436 | 8518D700A308F8880C0EAA9E
437 |
438 | buildRules
439 |
440 | dependencies
441 |
442 | 03CDDD2587BCEAE267BB4FEE
443 |
444 | isa
445 | PBXNativeTarget
446 | name
447 | Pods
448 | productName
449 | Pods
450 | productReference
451 | 1BBDCAAA1F1E67ED80C36D50
452 | productType
453 | com.apple.product-type.library.static
454 |
455 | 64E51A5B2300110990EB8816
456 |
457 | fileRef
458 | ED776FB492D50C0BBF2D8F10
459 | isa
460 | PBXBuildFile
461 |
462 | 696AE5CDC6A965A3E62D3528
463 |
464 | buildConfigurations
465 |
466 | 550952202685528727AE47DB
467 | 98039A62BD2A0F584EF6C6BC
468 |
469 | defaultConfigurationIsVisible
470 | 0
471 | defaultConfigurationName
472 | Release
473 | isa
474 | XCConfigurationList
475 |
476 | 6A9657D8AC01D98BC064B141
477 |
478 | containerPortal
479 | A32F2296B8483C83527A2529
480 | isa
481 | PBXContainerItemProxy
482 | proxyType
483 | 1
484 | remoteGlobalIDString
485 | 7B0C9BEA29D5FDC02D29FBBD
486 | remoteInfo
487 | Pods-ZipArchive
488 |
489 | 71EE64025618F85DA314347D
490 |
491 | fileRef
492 | 07308007A9A0F37A3822A8CF
493 | isa
494 | PBXBuildFile
495 | settings
496 |
497 | COMPILER_FLAGS
498 | -Dunix -fno-objc-arc
499 |
500 |
501 | 727C09E65319ACD494BB0E81
502 |
503 | includeInIndex
504 | 1
505 | isa
506 | PBXFileReference
507 | lastKnownFileType
508 | text.xcconfig
509 | path
510 | Pods.debug.xcconfig
511 | sourceTree
512 | <group>
513 |
514 | 7516D7A3C4629CB3949D3B52
515 |
516 | includeInIndex
517 | 1
518 | isa
519 | PBXFileReference
520 | lastKnownFileType
521 | text
522 | name
523 | Podfile
524 | path
525 | ../Podfile
526 | sourceTree
527 | SOURCE_ROOT
528 | xcLanguageSpecificationIdentifier
529 | xcode.lang.ruby
530 |
531 | 7B0C9BEA29D5FDC02D29FBBD
532 |
533 | buildConfigurationList
534 | E3DDBD7BA64706E296B04F36
535 | buildPhases
536 |
537 | AEFEDA429BB358C58AC0F990
538 | 00DD19325CD38A2E6C6C3850
539 | FB3DF2BF6F36D96C2313D59F
540 |
541 | buildRules
542 |
543 | dependencies
544 |
545 | isa
546 | PBXNativeTarget
547 | name
548 | Pods-ZipArchive
549 | productName
550 | Pods-ZipArchive
551 | productReference
552 | 476E19595AAA9B7B192AA1E4
553 | productType
554 | com.apple.product-type.library.static
555 |
556 | 7CF3434FC22568AC605EA1C8
557 |
558 | includeInIndex
559 | 1
560 | isa
561 | PBXFileReference
562 | lastKnownFileType
563 | text
564 | path
565 | Pods-acknowledgements.markdown
566 | sourceTree
567 | <group>
568 |
569 | 7F11054439E75FE820EC3AD9
570 |
571 | fileRef
572 | C517BEC2DE7D3CE8CDC97C40
573 | isa
574 | PBXBuildFile
575 | settings
576 |
577 | COMPILER_FLAGS
578 | -Dunix -fno-objc-arc
579 |
580 |
581 | 8203304DD6003916B67EBA50
582 |
583 | includeInIndex
584 | 1
585 | isa
586 | PBXFileReference
587 | lastKnownFileType
588 | sourcecode.c.h
589 | name
590 | zip.h
591 | path
592 | minizip/zip.h
593 | sourceTree
594 | <group>
595 |
596 | 82933269743057E874DB5A6A
597 |
598 | buildConfigurations
599 |
600 | C5E7673586F9A16A5C7C3E4C
601 | F3DECD6B5528E7FD7D6AD4D0
602 |
603 | defaultConfigurationIsVisible
604 | 0
605 | defaultConfigurationName
606 | Release
607 | isa
608 | XCConfigurationList
609 |
610 | 83BA8BD7743CD0FD69664BE6
611 |
612 | fileRef
613 | 04E755D32A0A2784B942A9AE
614 | isa
615 | PBXBuildFile
616 |
617 | 8518D700A308F8880C0EAA9E
618 |
619 | buildActionMask
620 | 2147483647
621 | files
622 |
623 | 83BA8BD7743CD0FD69664BE6
624 |
625 | isa
626 | PBXFrameworksBuildPhase
627 | runOnlyForDeploymentPostprocessing
628 | 0
629 |
630 | 855C09064F3490E68E4D92BE
631 |
632 | fileRef
633 | 8203304DD6003916B67EBA50
634 | isa
635 | PBXBuildFile
636 |
637 | 886F36D1063A6E9580758BC0
638 |
639 | children
640 |
641 | 15E21DD4250A2D5242462F48
642 |
643 | isa
644 | PBXGroup
645 | name
646 | Pods
647 | sourceTree
648 | <group>
649 |
650 | 8C5A0F2967F38806245F2792
651 |
652 | fileRef
653 | D061507E8D0617CDE99E4FCF
654 | isa
655 | PBXBuildFile
656 | settings
657 |
658 | COMPILER_FLAGS
659 | -Dunix -fno-objc-arc
660 |
661 |
662 | 92F8407A661AF50A01D01E77
663 |
664 | includeInIndex
665 | 1
666 | isa
667 | PBXFileReference
668 | name
669 | unzip.c
670 | path
671 | minizip/unzip.c
672 | sourceTree
673 | <group>
674 |
675 | 93E65B05734B0B2DBDCA390F
676 |
677 | includeInIndex
678 | 1
679 | isa
680 | PBXFileReference
681 | lastKnownFileType
682 | sourcecode.c.h
683 | name
684 | mztools.h
685 | path
686 | minizip/mztools.h
687 | sourceTree
688 | <group>
689 |
690 | 98039A62BD2A0F584EF6C6BC
691 |
692 | buildSettings
693 |
694 | ALWAYS_SEARCH_USER_PATHS
695 | NO
696 | CLANG_CXX_LANGUAGE_STANDARD
697 | gnu++0x
698 | CLANG_CXX_LIBRARY
699 | libc++
700 | CLANG_ENABLE_MODULES
701 | YES
702 | CLANG_ENABLE_OBJC_ARC
703 | YES
704 | CLANG_WARN_BOOL_CONVERSION
705 | YES
706 | CLANG_WARN_CONSTANT_CONVERSION
707 | YES
708 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE
709 | YES
710 | CLANG_WARN_EMPTY_BODY
711 | YES
712 | CLANG_WARN_ENUM_CONVERSION
713 | YES
714 | CLANG_WARN_INT_CONVERSION
715 | YES
716 | CLANG_WARN_OBJC_ROOT_CLASS
717 | YES
718 | COPY_PHASE_STRIP
719 | NO
720 | ENABLE_NS_ASSERTIONS
721 | NO
722 | GCC_C_LANGUAGE_STANDARD
723 | gnu99
724 | GCC_PREPROCESSOR_DEFINITIONS
725 |
726 | RELEASE=1
727 |
728 | GCC_WARN_64_TO_32_BIT_CONVERSION
729 | YES
730 | GCC_WARN_ABOUT_RETURN_TYPE
731 | YES
732 | GCC_WARN_UNDECLARED_SELECTOR
733 | YES
734 | GCC_WARN_UNINITIALIZED_AUTOS
735 | YES
736 | GCC_WARN_UNUSED_FUNCTION
737 | YES
738 | GCC_WARN_UNUSED_VARIABLE
739 | YES
740 | IPHONEOS_DEPLOYMENT_TARGET
741 | 6.0
742 | STRIP_INSTALLED_PRODUCT
743 | NO
744 | VALIDATE_PRODUCT
745 | YES
746 |
747 | isa
748 | XCBuildConfiguration
749 | name
750 | Release
751 |
752 | A143750C8CE0F7AB72910B44
753 |
754 | includeInIndex
755 | 1
756 | isa
757 | PBXFileReference
758 | name
759 | ioapi.c
760 | path
761 | minizip/ioapi.c
762 | sourceTree
763 | <group>
764 |
765 | A32F2296B8483C83527A2529
766 |
767 | attributes
768 |
769 | LastUpgradeCheck
770 | 0510
771 |
772 | buildConfigurationList
773 | 696AE5CDC6A965A3E62D3528
774 | compatibilityVersion
775 | Xcode 3.2
776 | developmentRegion
777 | English
778 | hasScannedForEncodings
779 | 0
780 | isa
781 | PBXProject
782 | knownRegions
783 |
784 | en
785 |
786 | mainGroup
787 | 1418BB4DBDCBE216ECC97203
788 | productRefGroup
789 | B4573285DD71576BB6DA6799
790 | projectDirPath
791 |
792 | projectReferences
793 |
794 | projectRoot
795 |
796 | targets
797 |
798 | 614A5C7403ACBA7CCFFF6CB1
799 | 7B0C9BEA29D5FDC02D29FBBD
800 |
801 |
802 | AEFEDA429BB358C58AC0F990
803 |
804 | buildActionMask
805 | 2147483647
806 | files
807 |
808 | 64E51A5B2300110990EB8816
809 | 8C5A0F2967F38806245F2792
810 | 606193B4E48090467D2AAA24
811 | 7F11054439E75FE820EC3AD9
812 | 431D953BE1FBC0D9E8A0024E
813 | 71EE64025618F85DA314347D
814 |
815 | isa
816 | PBXSourcesBuildPhase
817 | runOnlyForDeploymentPostprocessing
818 | 0
819 |
820 | B4573285DD71576BB6DA6799
821 |
822 | children
823 |
824 | 1BBDCAAA1F1E67ED80C36D50
825 | 476E19595AAA9B7B192AA1E4
826 |
827 | isa
828 | PBXGroup
829 | name
830 | Products
831 | sourceTree
832 | <group>
833 |
834 | B4834338C84F780ADB0ADDAA
835 |
836 | fileRef
837 | 04E755D32A0A2784B942A9AE
838 | isa
839 | PBXBuildFile
840 |
841 | B7D8FCDB683145EB39F86D5A
842 |
843 | includeInIndex
844 | 1
845 | isa
846 | PBXFileReference
847 | lastKnownFileType
848 | sourcecode.c.h
849 | path
850 | Pods-environment.h
851 | sourceTree
852 | <group>
853 |
854 | B92383B3E05170F1D1E5D4BB
855 |
856 | fileRef
857 | 526C527F4D7C4A2E9E596A39
858 | isa
859 | PBXBuildFile
860 |
861 | BA3EE50EDC15C0C2972D1C92
862 |
863 | fileRef
864 | 93E65B05734B0B2DBDCA390F
865 | isa
866 | PBXBuildFile
867 |
868 | C517BEC2DE7D3CE8CDC97C40
869 |
870 | includeInIndex
871 | 1
872 | isa
873 | PBXFileReference
874 | name
875 | mztools.c
876 | path
877 | minizip/mztools.c
878 | sourceTree
879 | <group>
880 |
881 | C5D46C998AC3B5333E85A71D
882 |
883 | fileRef
884 | CF156AF8FB6B2321F5E4F2CA
885 | isa
886 | PBXBuildFile
887 |
888 | C5E7673586F9A16A5C7C3E4C
889 |
890 | baseConfigurationReference
891 | 727C09E65319ACD494BB0E81
892 | buildSettings
893 |
894 | ALWAYS_SEARCH_USER_PATHS
895 | NO
896 | COPY_PHASE_STRIP
897 | NO
898 | DSTROOT
899 | /tmp/xcodeproj.dst
900 | GCC_DYNAMIC_NO_PIC
901 | NO
902 | GCC_OPTIMIZATION_LEVEL
903 | 0
904 | GCC_PRECOMPILE_PREFIX_HEADER
905 | YES
906 | GCC_PREPROCESSOR_DEFINITIONS
907 |
908 | DEBUG=1
909 | $(inherited)
910 |
911 | GCC_SYMBOLS_PRIVATE_EXTERN
912 | NO
913 | INSTALL_PATH
914 | $(BUILT_PRODUCTS_DIR)
915 | IPHONEOS_DEPLOYMENT_TARGET
916 | 6.0
917 | OTHER_LDFLAGS
918 |
919 | OTHER_LIBTOOLFLAGS
920 |
921 | PRODUCT_NAME
922 | $(TARGET_NAME)
923 | PUBLIC_HEADERS_FOLDER_PATH
924 | $(TARGET_NAME)
925 | SDKROOT
926 | iphoneos
927 | SKIP_INSTALL
928 | YES
929 |
930 | isa
931 | XCBuildConfiguration
932 | name
933 | Debug
934 |
935 | CEA0FC3F3FAC8F25CCD45598
936 |
937 | includeInIndex
938 | 1
939 | isa
940 | PBXFileReference
941 | lastKnownFileType
942 | text.script.sh
943 | path
944 | Pods-resources.sh
945 | sourceTree
946 | <group>
947 |
948 | CF156AF8FB6B2321F5E4F2CA
949 |
950 | includeInIndex
951 | 1
952 | isa
953 | PBXFileReference
954 | lastKnownFileType
955 | sourcecode.c.h
956 | name
957 | ioapi.h
958 | path
959 | minizip/ioapi.h
960 | sourceTree
961 | <group>
962 |
963 | D061507E8D0617CDE99E4FCF
964 |
965 | includeInIndex
966 | 1
967 | isa
968 | PBXFileReference
969 | lastKnownFileType
970 | sourcecode.c.objc
971 | path
972 | ZipArchive.m
973 | sourceTree
974 | <group>
975 |
976 | D5DF92E77019F3264BC65F96
977 |
978 | includeInIndex
979 | 1
980 | isa
981 | PBXFileReference
982 | lastKnownFileType
983 | text.plist.xml
984 | path
985 | Pods-acknowledgements.plist
986 | sourceTree
987 | <group>
988 |
989 | DBB03C90CD0DDEC61B88C82F
990 |
991 | includeInIndex
992 | 1
993 | isa
994 | PBXFileReference
995 | lastKnownFileType
996 | sourcecode.c.h
997 | name
998 | crypt.h
999 | path
1000 | minizip/crypt.h
1001 | sourceTree
1002 | <group>
1003 |
1004 | E3DDBD7BA64706E296B04F36
1005 |
1006 | buildConfigurations
1007 |
1008 | 5309AE92D2AE226A535EE160
1009 | FDE3C5F214250732B6E1493B
1010 |
1011 | defaultConfigurationIsVisible
1012 | 0
1013 | defaultConfigurationName
1014 | Release
1015 | isa
1016 | XCConfigurationList
1017 |
1018 | E47B8F1DEA978B674D373268
1019 |
1020 | includeInIndex
1021 | 1
1022 | isa
1023 | PBXFileReference
1024 | lastKnownFileType
1025 | text.xcconfig
1026 | path
1027 | Pods.release.xcconfig
1028 | sourceTree
1029 | <group>
1030 |
1031 | EC2136C0A5A4C3C196849C49
1032 |
1033 | includeInIndex
1034 | 1
1035 | isa
1036 | PBXFileReference
1037 | lastKnownFileType
1038 | text.xcconfig
1039 | path
1040 | Pods-ZipArchive.xcconfig
1041 | sourceTree
1042 | <group>
1043 |
1044 | ED22BA1B043371156F8BE10E
1045 |
1046 | buildActionMask
1047 | 2147483647
1048 | files
1049 |
1050 | B92383B3E05170F1D1E5D4BB
1051 |
1052 | isa
1053 | PBXSourcesBuildPhase
1054 | runOnlyForDeploymentPostprocessing
1055 | 0
1056 |
1057 | ED776FB492D50C0BBF2D8F10
1058 |
1059 | includeInIndex
1060 | 1
1061 | isa
1062 | PBXFileReference
1063 | lastKnownFileType
1064 | sourcecode.c.objc
1065 | path
1066 | Pods-ZipArchive-dummy.m
1067 | sourceTree
1068 | <group>
1069 |
1070 | F0635041B08224AB2C5937D8
1071 |
1072 | fileRef
1073 | DBB03C90CD0DDEC61B88C82F
1074 | isa
1075 | PBXBuildFile
1076 |
1077 | F3DECD6B5528E7FD7D6AD4D0
1078 |
1079 | baseConfigurationReference
1080 | E47B8F1DEA978B674D373268
1081 | buildSettings
1082 |
1083 | ALWAYS_SEARCH_USER_PATHS
1084 | NO
1085 | COPY_PHASE_STRIP
1086 | YES
1087 | DSTROOT
1088 | /tmp/xcodeproj.dst
1089 | GCC_PRECOMPILE_PREFIX_HEADER
1090 | YES
1091 | INSTALL_PATH
1092 | $(BUILT_PRODUCTS_DIR)
1093 | IPHONEOS_DEPLOYMENT_TARGET
1094 | 6.0
1095 | OTHER_CFLAGS
1096 |
1097 | -DNS_BLOCK_ASSERTIONS=1
1098 | $(inherited)
1099 |
1100 | OTHER_CPLUSPLUSFLAGS
1101 |
1102 | -DNS_BLOCK_ASSERTIONS=1
1103 | $(inherited)
1104 |
1105 | OTHER_LDFLAGS
1106 |
1107 | OTHER_LIBTOOLFLAGS
1108 |
1109 | PRODUCT_NAME
1110 | $(TARGET_NAME)
1111 | PUBLIC_HEADERS_FOLDER_PATH
1112 | $(TARGET_NAME)
1113 | SDKROOT
1114 | iphoneos
1115 | SKIP_INSTALL
1116 | YES
1117 | VALIDATE_PRODUCT
1118 | YES
1119 |
1120 | isa
1121 | XCBuildConfiguration
1122 | name
1123 | Release
1124 |
1125 | FB3DF2BF6F36D96C2313D59F
1126 |
1127 | buildActionMask
1128 | 2147483647
1129 | files
1130 |
1131 | 3AA1ABD846F404D9927A23FA
1132 | F0635041B08224AB2C5937D8
1133 | C5D46C998AC3B5333E85A71D
1134 | BA3EE50EDC15C0C2972D1C92
1135 | 0AFC7815881BAA1FEC9B517A
1136 | 855C09064F3490E68E4D92BE
1137 |
1138 | isa
1139 | PBXHeadersBuildPhase
1140 | runOnlyForDeploymentPostprocessing
1141 | 0
1142 |
1143 | FDE3C5F214250732B6E1493B
1144 |
1145 | baseConfigurationReference
1146 | 382B38D6644E232BAC6D7E3D
1147 | buildSettings
1148 |
1149 | ALWAYS_SEARCH_USER_PATHS
1150 | NO
1151 | COPY_PHASE_STRIP
1152 | YES
1153 | DSTROOT
1154 | /tmp/xcodeproj.dst
1155 | GCC_PRECOMPILE_PREFIX_HEADER
1156 | YES
1157 | GCC_PREFIX_HEADER
1158 | Target Support Files/Pods-ZipArchive/Pods-ZipArchive-prefix.pch
1159 | INSTALL_PATH
1160 | $(BUILT_PRODUCTS_DIR)
1161 | IPHONEOS_DEPLOYMENT_TARGET
1162 | 6.0
1163 | OTHER_CFLAGS
1164 |
1165 | -DNS_BLOCK_ASSERTIONS=1
1166 | $(inherited)
1167 |
1168 | OTHER_CPLUSPLUSFLAGS
1169 |
1170 | -DNS_BLOCK_ASSERTIONS=1
1171 | $(inherited)
1172 |
1173 | OTHER_LDFLAGS
1174 |
1175 | OTHER_LIBTOOLFLAGS
1176 |
1177 | PRODUCT_NAME
1178 | $(TARGET_NAME)
1179 | PUBLIC_HEADERS_FOLDER_PATH
1180 | $(TARGET_NAME)
1181 | SDKROOT
1182 | iphoneos
1183 | SKIP_INSTALL
1184 | YES
1185 | VALIDATE_PRODUCT
1186 | YES
1187 |
1188 | isa
1189 | XCBuildConfiguration
1190 | name
1191 | Release
1192 |
1193 |
1194 | rootObject
1195 | A32F2296B8483C83527A2529
1196 |
1197 |
1198 |
--------------------------------------------------------------------------------
/Pods/Pods.xcodeproj/xcuserdata/Peter.xcuserdatad/xcschemes/Pods-ZipArchive.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
42 |
43 |
44 |
45 |
51 |
52 |
54 |
55 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/Pods/Pods.xcodeproj/xcuserdata/Peter.xcuserdatad/xcschemes/Pods.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
42 |
43 |
44 |
45 |
51 |
52 |
54 |
55 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/Pods/Pods.xcodeproj/xcuserdata/Peter.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Pods-ZipArchive.xcscheme
8 |
9 | isShown
10 |
11 |
12 | Pods.xcscheme
13 |
14 | isShown
15 |
16 |
17 |
18 | SuppressBuildableAutocreation
19 |
20 | 614A5C7403ACBA7CCFFF6CB1
21 |
22 | primary
23 |
24 |
25 | 7B0C9BEA29D5FDC02D29FBBD
26 |
27 | primary
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-ZipArchive/Pods-ZipArchive-Private.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods-ZipArchive.xcconfig"
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Build" "${PODS_ROOT}/Headers/Build/ZipArchive" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/ZipArchive"
4 | OTHER_LDFLAGS = ${PODS_ZIPARCHIVE_OTHER_LDFLAGS} -ObjC
5 | PODS_ROOT = ${SRCROOT}
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-ZipArchive/Pods-ZipArchive-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_ZipArchive : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_ZipArchive
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-ZipArchive/Pods-ZipArchive-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #endif
4 |
5 | #import "Pods-environment.h"
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods-ZipArchive/Pods-ZipArchive.xcconfig:
--------------------------------------------------------------------------------
1 | PODS_ZIPARCHIVE_OTHER_LDFLAGS = -l"z"
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown:
--------------------------------------------------------------------------------
1 | # Acknowledgements
2 | This application makes use of the following third party libraries:
3 |
4 | ## ZipArchive
5 |
6 |
7 | Copyright (C) 2010-2012 Matt Connolly, Edward Patel, et al
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 |
15 |
16 | Generated by CocoaPods - http://cocoapods.org
17 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods/Pods-acknowledgements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreferenceSpecifiers
6 |
7 |
8 | FooterText
9 | This application makes use of the following third party libraries:
10 | Title
11 | Acknowledgements
12 | Type
13 | PSGroupSpecifier
14 |
15 |
16 | FooterText
17 |
18 | Copyright (C) 2010-2012 Matt Connolly, Edward Patel, et al
19 |
20 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
21 |
22 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
23 |
24 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 |
26 |
27 | Title
28 | ZipArchive
29 | Type
30 | PSGroupSpecifier
31 |
32 |
33 | FooterText
34 | Generated by CocoaPods - http://cocoapods.org
35 | Title
36 |
37 | Type
38 | PSGroupSpecifier
39 |
40 |
41 | StringsTable
42 | Acknowledgements
43 | Title
44 | Acknowledgements
45 |
46 |
47 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods/Pods-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods : NSObject
3 | @end
4 | @implementation PodsDummy_Pods
5 | @end
6 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods/Pods-environment.h:
--------------------------------------------------------------------------------
1 |
2 | // To check if a library is compiled with CocoaPods you
3 | // can use the `COCOAPODS` macro definition which is
4 | // defined in the xcconfigs so it is available in
5 | // headers also when they are imported in the client
6 | // project.
7 |
8 |
9 | // ZipArchive
10 | #define COCOAPODS_POD_AVAILABLE_ZipArchive
11 | #define COCOAPODS_VERSION_MAJOR_ZipArchive 1
12 | #define COCOAPODS_VERSION_MINOR_ZipArchive 4
13 | #define COCOAPODS_VERSION_PATCH_ZipArchive 0
14 |
15 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods/Pods-resources.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 |
4 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
5 |
6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
7 | > "$RESOURCES_TO_COPY"
8 |
9 | install_resource()
10 | {
11 | case $1 in
12 | *.storyboard)
13 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}"
14 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}"
15 | ;;
16 | *.xib)
17 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}"
18 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}"
19 | ;;
20 | *.framework)
21 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
22 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
23 | echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
24 | rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
25 | ;;
26 | *.xcdatamodel)
27 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\""
28 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom"
29 | ;;
30 | *.xcdatamodeld)
31 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\""
32 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd"
33 | ;;
34 | *.xcmappingmodel)
35 | echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\""
36 | xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm"
37 | ;;
38 | *.xcassets)
39 | ;;
40 | /*)
41 | echo "$1"
42 | echo "$1" >> "$RESOURCES_TO_COPY"
43 | ;;
44 | *)
45 | echo "${PODS_ROOT}/$1"
46 | echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY"
47 | ;;
48 | esac
49 | }
50 |
51 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
52 | if [[ "${ACTION}" == "install" ]]; then
53 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
54 | fi
55 | rm -f "$RESOURCES_TO_COPY"
56 |
57 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ `find . -name '*.xcassets' | wc -l` -ne 0 ]
58 | then
59 | case "${TARGETED_DEVICE_FAMILY}" in
60 | 1,2)
61 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
62 | ;;
63 | 1)
64 | TARGET_DEVICE_ARGS="--target-device iphone"
65 | ;;
66 | 2)
67 | TARGET_DEVICE_ARGS="--target-device ipad"
68 | ;;
69 | *)
70 | TARGET_DEVICE_ARGS="--target-device mac"
71 | ;;
72 | esac
73 | find "${PWD}" -name "*.xcassets" -print0 | xargs -0 actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
74 | fi
75 |
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods/Pods.debug.xcconfig:
--------------------------------------------------------------------------------
1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/ZipArchive"
3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/ZipArchive"
4 | OTHER_LDFLAGS = -ObjC -l"Pods-ZipArchive" -l"z"
5 | OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS)
6 | PODS_ROOT = ${SRCROOT}/Pods
--------------------------------------------------------------------------------
/Pods/Target Support Files/Pods/Pods.release.xcconfig:
--------------------------------------------------------------------------------
1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
2 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/ZipArchive"
3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/ZipArchive"
4 | OTHER_LDFLAGS = -ObjC -l"Pods-ZipArchive" -l"z"
5 | OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS)
6 | PODS_ROOT = ${SRCROOT}/Pods
--------------------------------------------------------------------------------
/Pods/ZipArchive/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | Copyright (C) 2010-2012 Matt Connolly, Edward Patel, et al
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 |
6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 |
8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9 |
10 |
--------------------------------------------------------------------------------
/Pods/ZipArchive/README.md:
--------------------------------------------------------------------------------
1 | ZipArchive
2 | ==========
3 |
4 | ZipArchive lets Mac OS X / iOS apps read and write to ZIP archive files.
5 |
6 |
7 | Contributors
8 | ------------
9 |
10 | Thanks to the following contributors to the Objective-C ZipArchive library:
11 |
12 | * acsolu
13 | * Matt Connolly (@mattconnolly)
14 | * Edward Patel (@epatel)
15 | * kajinka13
16 | * David Keegan (@kgn)
17 | * Yuri (@Wert1go)
18 | * Hyunwoo Nam (@namenu)
19 | * OpenFibers
20 | * Wiley Kestner (@wileykestner)
21 | * turenus
22 | * David Feshbach
23 |
24 | Special Thanks to the minizip authors:
25 |
26 | * Gilles Vollant - Original MiniZip author
27 | * Even Rouault - ZIP64 unzip Support
28 | * Daniel Borca - BZip Compression method support in unzip
29 | * Mathias Svensson - ZIP64 zip support
30 | * Mathias Svensson - BZip Compression method support in zip
31 |
32 | License
33 | -------
34 |
35 | Portions of ZipArchive are licensed under the original minizip license. See the minizip headers for details. All other parts of this project are licensed under the MIT license, see LICENSE.
36 |
--------------------------------------------------------------------------------
/Pods/ZipArchive/ZipArchive.h:
--------------------------------------------------------------------------------
1 | /**
2 | // @header ZipArchive.h
3 | //
4 | // An objective C wrapper for minizip and libz for creating and exanding ZIP files.
5 | //
6 | // @author Created by aish on 08-9-11.
7 | // acsolu@gmail.com
8 | // @copyright Copyright 2008 Inc. All rights reserved.
9 | //
10 | */
11 |
12 |
13 | typedef NS_ENUM(NSInteger, ZipArchiveCompression) {
14 | ZipArchiveCompressionDefault = -1,
15 | ZipArchiveCompressionNone = 0,
16 | ZipArchiveCompressionSpeed = 1,
17 | ZipArchiveCompressionBest = 9,
18 | };
19 |
20 |
21 | /**
22 | a block that is called from UnzipFileTo:overwrite:withProgressBlock: where the percentage of
23 | files processed (as an integer from 0 to 100), the number of files processed so far and the
24 | total number of files in the archive is called after each file is processed.
25 | */
26 | typedef void(^ZipArchiveProgressUpdateBlock)(int percentage, int filesProcessed, unsigned long numFiles);
27 |
28 | /**
29 | @protocol
30 | @discussion methods for a delegate to receive error notifications and control overwriting of files
31 | */
32 |
33 | @protocol ZipArchiveDelegate
34 | @optional
35 |
36 | /**
37 | @brief Delegate method to be notified of errors
38 |
39 | ZipArchive calls this selector on the delegate when errors are encountered.
40 |
41 | @param msg a string describing the error.
42 | @result void
43 | */
44 |
45 | -(void) ErrorMessage:(NSString*) msg;
46 |
47 | /**
48 | @brief Delegate method to determine if a file should be replaced
49 |
50 | When an zip file is being expanded and a file is about to be replaced, this selector
51 | is called on the delegate to notify that file is about to be replaced. The delegate method
52 | should return YES to overwrite the file, or NO to skip it.
53 |
54 | @param file - path to the file to be overwritten.
55 | @result a BOOL - YES to replace, NO to skip
56 | */
57 |
58 | -(BOOL) OverWriteOperation:(NSString*) file;
59 |
60 | @end
61 |
62 | /**
63 | @class
64 | @brief An object that can create zip files and expand existing ones.
65 | This class provides methods to create a zip file (optionally with a password) and
66 | add files to that zip archive.
67 |
68 | It also provides methods to expand an existing archive file (optionally with a password),
69 | and extract the files.
70 | */
71 |
72 | @interface ZipArchive : NSObject {
73 | @private
74 | void* _zipFile;
75 | void* _unzFile;
76 |
77 | unsigned long _numFiles;
78 | NSString* _password;
79 | id _delegate;
80 | ZipArchiveProgressUpdateBlock _progressBlock;
81 |
82 | NSArray* _unzippedFiles;
83 |
84 | NSFileManager* _fileManager;
85 | NSStringEncoding _stringEncoding;
86 | }
87 |
88 | /** a delegate object conforming to ZipArchiveDelegate protocol */
89 | @property (nonatomic, retain) id delegate;
90 | @property (nonatomic, readonly) unsigned long numFiles;
91 | @property (nonatomic, copy) ZipArchiveProgressUpdateBlock progressBlock;
92 |
93 | @property (nonatomic, assign) ZipArchiveCompression compression;
94 |
95 | /**
96 | @brief String encoding to be used when interpreting file names in the zip file.
97 | */
98 | @property (nonatomic, assign) NSStringEncoding stringEncoding;
99 |
100 | /** an array of files that were successfully expanded. Available after calling UnzipFileTo:overWrite: */
101 | @property (nonatomic, readonly) NSArray* unzippedFiles;
102 |
103 | -(id) initWithFileManager:(NSFileManager*) fileManager;
104 |
105 | -(BOOL) CreateZipFile2:(NSString*) zipFile;
106 | -(BOOL) CreateZipFile2:(NSString*) zipFile append:(BOOL)isAppend;
107 | -(BOOL) CreateZipFile2:(NSString*) zipFile Password:(NSString*) password;
108 | -(BOOL) CreateZipFile2:(NSString*) zipFile Password:(NSString*) password append:(BOOL)isAppend;
109 | -(BOOL) addFileToZip:(NSString*) file newname:(NSString*) newname;
110 | -(BOOL) addDataToZip:(NSData*) data fileAttributes:(NSDictionary *)attr newname:(NSString*) newname;
111 | -(BOOL) CloseZipFile2;
112 |
113 | -(BOOL) UnzipOpenFile:(NSString*) zipFile;
114 | -(BOOL) UnzipOpenFile:(NSString*) zipFile Password:(NSString*) password;
115 | -(BOOL) UnzipFileTo:(NSString*) path overWrite:(BOOL) overwrite;
116 | -(NSDictionary *)UnzipFileToMemory;//To avoid memory issue, only use this method for small zip files.
117 | -(BOOL) UnzipCloseFile;
118 |
119 | // List the contents of the zip archive. must be called after UnzipOpenFile.
120 | // If zip file was appended with `CreateZipFile2:append:` or ``CreateZipFile2:Password:append:`,
121 | // `getZipFileContents` result won't be updated until re-unzip-open after close write handle (`CloseZipFile2` then `UnzipCloseFile` then (`UnzipOpenFile:` or `UnzipOpenFile:Password`) get called).
122 | -(NSArray*) getZipFileContents;
123 |
124 | @end
125 |
--------------------------------------------------------------------------------
/Pods/ZipArchive/ZipArchive.m:
--------------------------------------------------------------------------------
1 | /**
2 | // ZipArchive.m
3 | //
4 | //
5 | // Created by aish on 08-9-11.
6 | // acsolu@gmail.com
7 | // Copyright 2008 Inc. All rights reserved.
8 | //
9 | */
10 |
11 | #import "ZipArchive.h"
12 | #import "zlib.h"
13 | #import "zconf.h"
14 | #include "minizip/zip.h"
15 | #include "minizip/unzip.h"
16 |
17 |
18 | @interface NSFileManager(ZipArchive)
19 | - (NSDictionary *)_attributesOfItemAtPath:(NSString *)path followingSymLinks:(BOOL)followingSymLinks error:(NSError **)error;
20 | @end
21 |
22 | @interface ZipArchive ()
23 |
24 | -(void) OutputErrorMessage:(NSString*) msg;
25 | -(BOOL) OverWrite:(NSString*) file;
26 | -(NSDate*) Date1980;
27 |
28 | @property (nonatomic,copy) NSString* password;
29 | @end
30 |
31 |
32 |
33 | @implementation ZipArchive
34 | @synthesize delegate = _delegate;
35 | @synthesize numFiles = _numFiles;
36 | @synthesize password = _password;
37 | @synthesize unzippedFiles = _unzippedFiles;
38 | @synthesize progressBlock = _progressBlock;
39 | @synthesize stringEncoding = _stringEncoding;
40 |
41 | -(id) init
42 | {
43 | return [self initWithFileManager:[NSFileManager defaultManager]];
44 | }
45 |
46 | -(id) initWithFileManager:(NSFileManager*) fileManager
47 | {
48 | if( self=[super init] )
49 | {
50 | _zipFile = NULL;
51 | _fileManager = fileManager;
52 | self.stringEncoding = NSUTF8StringEncoding;
53 | self.compression = ZipArchiveCompressionDefault;
54 | }
55 | return self;
56 | }
57 |
58 | -(void) dealloc
59 | {
60 | // close any open file operations
61 | [self CloseZipFile2];
62 | [self UnzipCloseFile];
63 |
64 | // release retained/copied properties.
65 | [_password release];
66 | [_delegate release];
67 | [_unzippedFiles release];
68 |
69 | [super dealloc];
70 | }
71 |
72 | /**
73 | * Create a new zip file at the specified path, ready for new files to be added.
74 | *
75 | * @param zipFile the path of the zip file to create
76 | * @returns BOOL YES on success
77 | */
78 |
79 | -(BOOL) CreateZipFile2:(NSString*) zipFile
80 | {
81 | return [self CreateZipFile2:zipFile append:NO];
82 | }
83 |
84 | -(BOOL) CreateZipFile2:(NSString*) zipFile append:(BOOL)isAppend
85 | {
86 | _zipFile = zipOpen( (const char*)[zipFile UTF8String], (isAppend ? APPEND_STATUS_ADDINZIP : APPEND_STATUS_CREATE) );
87 | if( !_zipFile )
88 | return NO;
89 | return YES;
90 | }
91 |
92 | /**
93 | * Create a new zip file at the specified path, ready for new files to be added.
94 | *
95 | * @param zipFile the path of the zip file to create
96 | * @param password a password used to encrypt the zip file
97 | * @returns BOOL YES on success
98 | */
99 |
100 | -(BOOL) CreateZipFile2:(NSString*) zipFile Password:(NSString*) password
101 | {
102 | self.password = password;
103 | return [self CreateZipFile2:zipFile];
104 | }
105 |
106 | -(BOOL) CreateZipFile2:(NSString*) zipFile Password:(NSString*) password append:(BOOL)isAppend
107 | {
108 | self.password = password;
109 | return [self CreateZipFile2:zipFile append:isAppend];
110 | }
111 |
112 | /**
113 | * add an existing file on disk to the zip archive, compressing it.
114 | *
115 | * @param file the path to the file to compress
116 | * @param newname the name of the file in the zip archive, ie: path relative to the zip archive root.
117 | * @returns BOOL YES on success
118 | */
119 |
120 | -(BOOL) addFileToZip:(NSString*) file newname:(NSString*) newname;
121 | {
122 | NSData *data = [NSData dataWithContentsOfFile:file];
123 | NSError* error = nil;
124 | NSDictionary* attr = [_fileManager _attributesOfItemAtPath:file followingSymLinks:YES error:&error];
125 | BOOL result = [self addDataToZip:data fileAttributes:attr newname:newname];
126 | return result;
127 | }
128 |
129 | /**
130 | * add an existing file on disk to the zip archive, compressing it.
131 | *
132 | * @param data the data to compress
133 | * @param attr the file attribute for data to add as file
134 | * @param newname the name of the file in the zip archive, ie: path relative to the zip archive root.
135 | * @returns BOOL YES on success
136 | */
137 |
138 | -(BOOL) addDataToZip:(NSData*) data fileAttributes:(NSDictionary *)attr newname:(NSString*) newname
139 | {
140 | if (!data)
141 | {
142 | return NO;
143 | }
144 | if( !_zipFile )
145 | return NO;
146 | // tm_zip filetime;
147 |
148 | zip_fileinfo zipInfo = {{0}};
149 |
150 | NSDate* fileDate = nil;
151 |
152 | if( attr )
153 | fileDate = (NSDate*)[attr objectForKey:NSFileModificationDate];
154 |
155 | if( fileDate == nil )
156 | fileDate = [NSDate date];
157 |
158 |
159 | NSCalendar *gregorianCalendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
160 | NSDateComponents* components = [gregorianCalendar components:NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitDay |
161 | NSCalendarUnitHour | NSCalendarUnitMinute | NSCalendarUnitSecond fromDate:fileDate];
162 | [gregorianCalendar release];
163 |
164 | zipInfo.tmz_date.tm_sec = (uInt)components.second;
165 | zipInfo.tmz_date.tm_min = (uInt)components.minute;
166 | zipInfo.tmz_date.tm_hour = (uInt)components.hour;
167 | zipInfo.tmz_date.tm_mday = (uInt)components.day;
168 | zipInfo.tmz_date.tm_mon = (uInt)components.month;
169 | zipInfo.tmz_date.tm_year = (uInt)components.year;
170 |
171 |
172 | int ret ;
173 | if( [_password length] == 0 )
174 | {
175 | ret = zipOpenNewFileInZip( _zipFile,
176 | (const char*) [newname cStringUsingEncoding:self.stringEncoding],
177 | &zipInfo,
178 | NULL,0,
179 | NULL,0,
180 | NULL,//comment
181 | Z_DEFLATED,
182 | self.compression );
183 | }
184 | else
185 | {
186 | uLong crcValue = crc32( 0L,NULL, 0L );
187 | crcValue = crc32( crcValue, (const Bytef*)[data bytes], (unsigned int)[data length] );
188 | ret = zipOpenNewFileInZip3( _zipFile,
189 | (const char*) [newname cStringUsingEncoding:self.stringEncoding],
190 | &zipInfo,
191 | NULL,0,
192 | NULL,0,
193 | NULL,//comment
194 | Z_DEFLATED,
195 | self.compression,
196 | 0,
197 | 15,
198 | 8,
199 | Z_DEFAULT_STRATEGY,
200 | [_password cStringUsingEncoding:NSASCIIStringEncoding],
201 | crcValue );
202 | }
203 | if( ret!=Z_OK )
204 | {
205 | return NO;
206 | }
207 | unsigned int dataLen = (unsigned int)[data length];
208 | ret = zipWriteInFileInZip( _zipFile, (const void*)[data bytes], dataLen);
209 | if( ret!=Z_OK )
210 | {
211 | return NO;
212 | }
213 | ret = zipCloseFileInZip( _zipFile );
214 | if( ret!=Z_OK )
215 | return NO;
216 | return YES;
217 | }
218 |
219 | /**
220 | * Close a zip file after creating and added files to it.
221 | *
222 | * @returns BOOL YES on success
223 | */
224 |
225 | -(BOOL) CloseZipFile2
226 | {
227 | self.password = nil;
228 | if( _zipFile==NULL )
229 | return NO;
230 | BOOL ret = zipClose( _zipFile,NULL )==Z_OK?YES:NO;
231 | _zipFile = NULL;
232 | return ret;
233 | }
234 |
235 | /**
236 | * open an existing zip file ready for expanding.
237 | *
238 | * @param zipFile the path to a zip file to be opened.
239 | * @returns BOOL YES on success
240 | */
241 |
242 | -(BOOL) UnzipOpenFile:(NSString*) zipFile
243 | {
244 | // create an array to receive the list of unzipped files.
245 | if (_unzippedFiles) [_unzippedFiles release];
246 | _unzippedFiles = [[NSMutableArray alloc] initWithCapacity:1];
247 |
248 | _unzFile = unzOpen( (const char*)[zipFile UTF8String] );
249 | if( _unzFile )
250 | {
251 | unz_global_info globalInfo = {0};
252 | if( unzGetGlobalInfo(_unzFile, &globalInfo )==UNZ_OK )
253 | {
254 | _numFiles = globalInfo.number_entry;
255 | NSLog(@"%lu entries in the zip file", globalInfo.number_entry);
256 | }
257 | }
258 | return _unzFile!=NULL;
259 | }
260 |
261 | /**
262 | * open an existing zip file with a password ready for expanding.
263 | *
264 | * @param zipFile the path to a zip file to be opened.
265 | * @param password the password to use decrpyting the file.
266 | * @returns BOOL YES on success
267 | */
268 |
269 | -(BOOL) UnzipOpenFile:(NSString*) zipFile Password:(NSString*) password
270 | {
271 | self.password = password;
272 | return [self UnzipOpenFile:zipFile];
273 | }
274 |
275 | /**
276 | * Expand all files in the zip archive into the specified directory.
277 | *
278 | * If a delegate has been set and responds to OverWriteOperation: it can
279 | * return YES to overwrite a file, or NO to skip that file.
280 | *
281 | * On completion, the property `unzippedFiles` will be an array populated
282 | * with the full paths of each file that was successfully expanded.
283 | *
284 | * @param path the directory where expanded files will be created
285 | * @param overwrite should existing files be overwritten
286 | * @returns BOOL YES on success
287 | */
288 |
289 | -(BOOL) UnzipFileTo:(NSString*) path overWrite:(BOOL) overwrite
290 | {
291 | BOOL success = YES;
292 | int index = 0;
293 | int progress = -1;
294 | int ret = unzGoToFirstFile( _unzFile );
295 | unsigned char buffer[4096] = {0};
296 | if( ret!=UNZ_OK )
297 | {
298 | [self OutputErrorMessage:@"Failed"];
299 | }
300 |
301 | const char* password = [_password cStringUsingEncoding:NSASCIIStringEncoding];
302 |
303 | do{
304 | @autoreleasepool {
305 | if( [_password length]==0 )
306 | ret = unzOpenCurrentFile( _unzFile );
307 | else
308 | ret = unzOpenCurrentFilePassword( _unzFile, password );
309 | if( ret!=UNZ_OK )
310 | {
311 | [self OutputErrorMessage:@"Error occurs"];
312 | success = NO;
313 | break;
314 | }
315 | // reading data and write to file
316 | int read ;
317 | unz_file_info fileInfo ={0};
318 | ret = unzGetCurrentFileInfo(_unzFile, &fileInfo, NULL, 0, NULL, 0, NULL, 0);
319 | if( ret!=UNZ_OK )
320 | {
321 | [self OutputErrorMessage:@"Error occurs while getting file info"];
322 | success = NO;
323 | unzCloseCurrentFile( _unzFile );
324 | break;
325 | }
326 | char* filename = (char*) malloc( fileInfo.size_filename +1 );
327 | unzGetCurrentFileInfo(_unzFile, &fileInfo, filename, fileInfo.size_filename + 1, NULL, 0, NULL, 0);
328 | filename[fileInfo.size_filename] = '\0';
329 |
330 | // check if it contains directory
331 | NSString * strPath = [NSString stringWithCString:filename encoding:self.stringEncoding];
332 | BOOL isDirectory = NO;
333 | if( filename[fileInfo.size_filename-1]=='/' || filename[fileInfo.size_filename-1]=='\\')
334 | isDirectory = YES;
335 | free( filename );
336 | if( [strPath rangeOfCharacterFromSet:[NSCharacterSet characterSetWithCharactersInString:@"/\\"]].location!=NSNotFound )
337 | {// contains a path
338 | strPath = [strPath stringByReplacingOccurrencesOfString:@"\\" withString:@"/"];
339 | }
340 | NSString* fullPath = [path stringByAppendingPathComponent:strPath];
341 |
342 | if( isDirectory )
343 | [_fileManager createDirectoryAtPath:fullPath withIntermediateDirectories:YES attributes:nil error:nil];
344 | else
345 | [_fileManager createDirectoryAtPath:[fullPath stringByDeletingLastPathComponent] withIntermediateDirectories:YES attributes:nil error:nil];
346 |
347 | FILE* fp = NULL;
348 | do
349 | {
350 | read = unzReadCurrentFile(_unzFile, buffer, 4096);
351 | if (read >= 0)
352 | {
353 | if (fp == NULL) {
354 | if( [_fileManager fileExistsAtPath:fullPath] && !isDirectory && !overwrite )
355 | {
356 | if( ![self OverWrite:fullPath] )
357 | {
358 | // don't process any more of the file, but continue
359 | break;
360 | }
361 | }
362 | if (!isDirectory) {
363 | fp = fopen( (const char*)[fullPath UTF8String], "wb");
364 | if (fp == NULL) {
365 | [self OutputErrorMessage:@"Failed to open output file for writing"];
366 | break;
367 | }
368 | }
369 | }
370 | fwrite(buffer, read, 1, fp );
371 | }
372 | else // if (read < 0)
373 | {
374 | ret = read; // result will be an error code
375 | success = NO;
376 | [self OutputErrorMessage:@"Failed to read zip file"];
377 | }
378 | } while (read > 0);
379 |
380 | if (fp)
381 | {
382 | fclose( fp );
383 |
384 | // add the full path of this file to the output array
385 | [(NSMutableArray*)_unzippedFiles addObject:fullPath];
386 |
387 | // set the orignal datetime property
388 | if( fileInfo.tmu_date.tm_year!=0 )
389 | {
390 | NSDateComponents* components = [[NSDateComponents alloc] init];
391 | components.second = fileInfo.tmu_date.tm_sec;
392 | components.minute = fileInfo.tmu_date.tm_min;
393 | components.hour = fileInfo.tmu_date.tm_hour;
394 | components.day = fileInfo.tmu_date.tm_mday;
395 | components.month = fileInfo.tmu_date.tm_mon + 1;
396 | components.year = fileInfo.tmu_date.tm_year;
397 |
398 | NSCalendar *gregorianCalendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
399 | NSDate* orgDate = [[gregorianCalendar dateFromComponents:components] retain];
400 | [components release];
401 | [gregorianCalendar release];
402 |
403 | NSDictionary* attr = [NSDictionary dictionaryWithObject:orgDate forKey:NSFileModificationDate]; //[_fileManager fileAttributesAtPath:fullPath traverseLink:YES];
404 | if( attr )
405 | {
406 | // [attr setValue:orgDate forKey:NSFileCreationDate];
407 | if( ![_fileManager setAttributes:attr ofItemAtPath:fullPath error:nil] )
408 | {
409 | // cann't set attributes
410 | NSLog(@"Failed to set attributes");
411 | }
412 |
413 | }
414 | [orgDate release];
415 | orgDate = nil;
416 | }
417 |
418 | }
419 |
420 | if (ret == UNZ_OK) {
421 | ret = unzCloseCurrentFile( _unzFile );
422 | if (ret != UNZ_OK) {
423 | [self OutputErrorMessage:@"file was unzipped but failed crc check"];
424 | success = NO;
425 | }
426 | }
427 |
428 | if (ret == UNZ_OK) {
429 | ret = unzGoToNextFile( _unzFile );
430 | }
431 |
432 | if (_progressBlock && _numFiles) {
433 | index++;
434 | int p = index*100/_numFiles;
435 | progress = p;
436 | _progressBlock(progress, index, _numFiles);
437 | }
438 | }
439 | } while (ret==UNZ_OK && ret!=UNZ_END_OF_LIST_OF_FILE);
440 | return success;
441 | }
442 |
443 | -(NSDictionary *)UnzipFileToMemory
444 | {
445 | NSMutableDictionary *fileDictionary = [NSMutableDictionary dictionary];
446 |
447 | BOOL success = YES;
448 | int index = 0;
449 | int progress = -1;
450 | int ret = unzGoToFirstFile( _unzFile );
451 | unsigned char buffer[4096] = {0};
452 | if( ret!=UNZ_OK )
453 | {
454 | [self OutputErrorMessage:@"Failed"];
455 | }
456 |
457 | const char* password = [_password cStringUsingEncoding:NSASCIIStringEncoding];
458 |
459 | do{
460 | @autoreleasepool {
461 | if( [_password length]==0 )
462 | ret = unzOpenCurrentFile( _unzFile );
463 | else
464 | ret = unzOpenCurrentFilePassword( _unzFile, password );
465 | if( ret!=UNZ_OK )
466 | {
467 | [self OutputErrorMessage:@"Error occurs"];
468 | success = NO;
469 | break;
470 | }
471 | // reading data and write to file
472 | int read ;
473 | unz_file_info fileInfo ={0};
474 | ret = unzGetCurrentFileInfo(_unzFile, &fileInfo, NULL, 0, NULL, 0, NULL, 0);
475 | if( ret!=UNZ_OK )
476 | {
477 | [self OutputErrorMessage:@"Error occurs while getting file info"];
478 | success = NO;
479 | unzCloseCurrentFile( _unzFile );
480 | break;
481 | }
482 | char* filename = (char*) malloc( fileInfo.size_filename +1 );
483 | unzGetCurrentFileInfo(_unzFile, &fileInfo, filename, fileInfo.size_filename + 1, NULL, 0, NULL, 0);
484 | filename[fileInfo.size_filename] = '\0';
485 |
486 | // check if it contains directory
487 | NSString * strPath = [NSString stringWithCString:filename encoding:self.stringEncoding];
488 | free( filename );
489 | if( [strPath rangeOfCharacterFromSet:[NSCharacterSet characterSetWithCharactersInString:@"/\\"]].location!=NSNotFound )
490 | {// contains a path
491 | strPath = [strPath stringByReplacingOccurrencesOfString:@"\\" withString:@"/"];
492 | }
493 |
494 | NSMutableData *fileMutableData = [NSMutableData data];
495 | do
496 | {
497 | read = unzReadCurrentFile(_unzFile, buffer, 4096);
498 | if (read >= 0)
499 | {
500 | if (read != 0)
501 | {
502 | [fileMutableData appendBytes:buffer length:read];
503 | }
504 | }
505 | else // if (read < 0)
506 | {
507 | ret = read; // result will be an error code
508 | success = NO;
509 | [self OutputErrorMessage:@"Failed to read zip file"];
510 | }
511 | } while (read > 0);
512 |
513 |
514 | if (fileMutableData.length > 0)
515 | {
516 | NSData *fileData = [NSData dataWithData:fileMutableData];
517 | [fileDictionary setObject:fileData forKey:strPath];
518 | }
519 |
520 | if (ret == UNZ_OK) {
521 | ret = unzCloseCurrentFile( _unzFile );
522 | if (ret != UNZ_OK) {
523 | [self OutputErrorMessage:@"file was unzipped but failed crc check"];
524 | success = NO;
525 | }
526 | }
527 |
528 | if (ret == UNZ_OK) {
529 | ret = unzGoToNextFile( _unzFile );
530 | }
531 |
532 | if (_progressBlock && _numFiles) {
533 | index++;
534 | int p = index*100/_numFiles;
535 | progress = p;
536 | _progressBlock(progress, index, _numFiles);
537 | }
538 | }
539 | } while (ret==UNZ_OK && ret!=UNZ_END_OF_LIST_OF_FILE);
540 |
541 | NSDictionary *resultDictionary = [NSDictionary dictionaryWithDictionary:fileDictionary];
542 | return resultDictionary;
543 | }
544 |
545 | /**
546 | * Close the zip file.
547 | *
548 | * @returns BOOL YES on success
549 | */
550 |
551 | -(BOOL) UnzipCloseFile
552 | {
553 | self.password = nil;
554 | if( _unzFile ) {
555 | int err = unzClose( _unzFile );
556 | _unzFile = nil;
557 | return err ==UNZ_OK;
558 | }
559 | return YES;
560 | }
561 |
562 |
563 | /**
564 | * Return a list of filenames that are in the zip archive.
565 | * No path information is available as this can be called before the zip is expanded.
566 | *
567 | * @returns NSArray list of filenames in the zip archive.
568 | */
569 |
570 | -(NSArray*) getZipFileContents // list the contents of the zip archive. must be called after UnzipOpenFile
571 | {
572 | int ret = unzGoToFirstFile( _unzFile );
573 | NSMutableArray * allFilenames = [NSMutableArray arrayWithCapacity:40];
574 |
575 | if( ret!=UNZ_OK )
576 | {
577 | [self OutputErrorMessage:@"Failed"];
578 | }
579 |
580 | const char* password = [_password cStringUsingEncoding:NSASCIIStringEncoding];
581 |
582 | do{
583 | if( [_password length]==0 )
584 | ret = unzOpenCurrentFile( _unzFile );
585 | else
586 | ret = unzOpenCurrentFilePassword( _unzFile, password );
587 | if( ret!=UNZ_OK )
588 | {
589 | [self OutputErrorMessage:@"Error occured"];
590 | break;
591 | }
592 |
593 | // reading data and write to file
594 | unz_file_info fileInfo ={0};
595 | ret = unzGetCurrentFileInfo(_unzFile, &fileInfo, NULL, 0, NULL, 0, NULL, 0);
596 | if( ret!=UNZ_OK )
597 | {
598 | [self OutputErrorMessage:@"Error occurs while getting file info"];
599 | unzCloseCurrentFile( _unzFile );
600 | break;
601 | }
602 | char* filename = (char*) malloc( fileInfo.size_filename +1 );
603 | unzGetCurrentFileInfo(_unzFile, &fileInfo, filename, fileInfo.size_filename + 1, NULL, 0, NULL, 0);
604 | filename[fileInfo.size_filename] = '\0';
605 |
606 | // check if it contains directory
607 | NSString * strPath = [NSString stringWithCString:filename encoding:NSASCIIStringEncoding];
608 | free( filename );
609 | if( [strPath rangeOfCharacterFromSet:[NSCharacterSet characterSetWithCharactersInString:@"/\\"]].location!=NSNotFound )
610 | {// contains a path
611 | strPath = [strPath stringByReplacingOccurrencesOfString:@"\\" withString:@"/"];
612 | }
613 |
614 | // Copy name to array
615 | [allFilenames addObject:strPath];
616 |
617 | unzCloseCurrentFile( _unzFile );
618 | ret = unzGoToNextFile( _unzFile );
619 | } while( ret==UNZ_OK && UNZ_OK!=UNZ_END_OF_LIST_OF_FILE );
620 |
621 | // return an immutable array.
622 | return [NSArray arrayWithArray:allFilenames];
623 | }
624 |
625 |
626 | #pragma mark wrapper for delegate
627 |
628 | /**
629 | * send the ErrorMessage: to the delegate if it responds to it.
630 | */
631 | -(void) OutputErrorMessage:(NSString*) msg
632 | {
633 | if( _delegate && [_delegate respondsToSelector:@selector(ErrorMessage:)] )
634 | [_delegate ErrorMessage:msg];
635 | }
636 |
637 | /**
638 | * send the OverWriteOperation: selector to the delegate if it responds to it,
639 | * returning the result, or YES by default.
640 | */
641 |
642 | -(BOOL) OverWrite:(NSString*) file
643 | {
644 | if( _delegate && [_delegate respondsToSelector:@selector(OverWriteOperation:)] )
645 | return [_delegate OverWriteOperation:file];
646 | return YES;
647 | }
648 |
649 | #pragma mark get NSDate object for 1980-01-01
650 | -(NSDate*) Date1980
651 | {
652 | NSDateComponents *comps = [[NSDateComponents alloc] init];
653 | [comps setDay:1];
654 | [comps setMonth:1];
655 | [comps setYear:1980];
656 | NSCalendar *gregorian = [[NSCalendar alloc]
657 | initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
658 | NSDate *date = [gregorian dateFromComponents:comps];
659 |
660 | [comps release];
661 | [gregorian release];
662 | return date;
663 | }
664 |
665 |
666 | @end
667 |
668 |
669 | @implementation NSFileManager(ZipArchive)
670 |
671 | - (NSDictionary *)_attributesOfItemAtPath:(NSString *)path followingSymLinks:(BOOL)followingSymLinks error:(NSError **)error
672 | {
673 | // call file manager default action, which is to not follow symlinks
674 | NSDictionary* results = [self attributesOfItemAtPath:path error:error];
675 | if (followingSymLinks && results && (error ? *error == nil : YES)) {
676 | if ([[results fileType] isEqualToString:NSFileTypeSymbolicLink]) {
677 | // follow the symlink
678 | NSString* realPath = [self destinationOfSymbolicLinkAtPath:path error:error];
679 | if (realPath && (error ? *error == nil : YES)) {
680 | return [self _attributesOfItemAtPath:realPath followingSymLinks:followingSymLinks error:error];
681 | } else {
682 | // failure to resolve symlink should be an error returning nil and error will already be set.
683 | return nil;
684 | }
685 | }
686 | }
687 | return results;
688 | }
689 |
690 | @end
691 |
692 |
--------------------------------------------------------------------------------
/Pods/ZipArchive/minizip/crypt.h:
--------------------------------------------------------------------------------
1 | /* crypt.h -- base code for crypt/uncrypt ZIPfile
2 |
3 |
4 | Version 1.01e, February 12th, 2005
5 |
6 | Copyright (C) 1998-2005 Gilles Vollant
7 |
8 | This code is a modified version of crypting code in Infozip distribution
9 |
10 | The encryption/decryption parts of this source code (as opposed to the
11 | non-echoing password parts) were originally written in Europe. The
12 | whole source package can be freely distributed, including from the USA.
13 | (Prior to January 2000, re-export from the US was a violation of US law.)
14 |
15 | This encryption code is a direct transcription of the algorithm from
16 | Roger Schlafly, described by Phil Katz in the file appnote.txt. This
17 | file (appnote.txt) is distributed with the PKZIP program (even in the
18 | version without encryption capabilities).
19 |
20 | If you don't need crypting in your application, just define symbols
21 | NOCRYPT and NOUNCRYPT.
22 |
23 | This code support the "Traditional PKWARE Encryption".
24 |
25 | The new AES encryption added on Zip format by Winzip (see the page
26 | http://www.winzip.com/aes_info.htm ) and PKWare PKZip 5.x Strong
27 | Encryption is not supported.
28 | */
29 |
30 | #define CRC32(c, b) ((*(pcrc_32_tab+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8))
31 |
32 | /***********************************************************************
33 | * Return the next byte in the pseudo-random sequence
34 | */
35 | static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab)
36 | {
37 | unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an
38 | * unpredictable manner on 16-bit systems; not a problem
39 | * with any known compiler so far, though */
40 |
41 | temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2;
42 | return (int)(((temp * (temp ^ 1)) >> 8) & 0xff);
43 | }
44 |
45 | /***********************************************************************
46 | * Update the encryption keys with the next byte of plain text
47 | */
48 | static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int c)
49 | {
50 | (*(pkeys+0)) = CRC32((*(pkeys+0)), c);
51 | (*(pkeys+1)) += (*(pkeys+0)) & 0xff;
52 | (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1;
53 | {
54 | register int keyshift = (int)((*(pkeys+1)) >> 24);
55 | (*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift);
56 | }
57 | return c;
58 | }
59 |
60 |
61 | /***********************************************************************
62 | * Initialize the encryption keys and the random header according to
63 | * the given password.
64 | */
65 | static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned long* pcrc_32_tab)
66 | {
67 | *(pkeys+0) = 305419896L;
68 | *(pkeys+1) = 591751049L;
69 | *(pkeys+2) = 878082192L;
70 | while (*passwd != '\0') {
71 | update_keys(pkeys,pcrc_32_tab,(int)*passwd);
72 | passwd++;
73 | }
74 | }
75 |
76 | #define zdecode(pkeys,pcrc_32_tab,c) \
77 | (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab)))
78 |
79 | #define zencode(pkeys,pcrc_32_tab,c,t) \
80 | (t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), t^(c))
81 |
82 | #ifdef INCLUDECRYPTINGCODE_IFCRYPTALLOWED
83 |
84 | #define RAND_HEAD_LEN 12
85 | /* "last resort" source for second part of crypt seed pattern */
86 | # ifndef ZCR_SEED2
87 | # define ZCR_SEED2 3141592654UL /* use PI as default pattern */
88 | # endif
89 |
90 | static int crypthead(const char* passwd, /* password string */
91 | unsigned char* buf, /* where to write header */
92 | int bufSize,
93 | unsigned long* pkeys,
94 | const unsigned long* pcrc_32_tab,
95 | unsigned long crcForCrypting)
96 | {
97 | int n; /* index in random header */
98 | int t; /* temporary */
99 | int c; /* random byte */
100 | unsigned char header[RAND_HEAD_LEN-2]; /* random header */
101 | static unsigned calls = 0; /* ensure different random header each time */
102 |
103 | if (bufSize> 7) & 0xff;
118 | header[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, c, t);
119 | }
120 | /* Encrypt random header (last two bytes is high word of crc) */
121 | init_keys(passwd, pkeys, pcrc_32_tab);
122 | for (n = 0; n < RAND_HEAD_LEN-2; n++)
123 | {
124 | buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t);
125 | }
126 | buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t);
127 | buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t);
128 | return n;
129 | }
130 |
131 | #endif
132 |
--------------------------------------------------------------------------------
/Pods/ZipArchive/minizip/ioapi.c:
--------------------------------------------------------------------------------
1 | /* ioapi.h -- IO base function header for compress/uncompress .zip
2 | part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
3 |
4 | Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
5 |
6 | Modifications for Zip64 support
7 | Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
8 |
9 | For more info read MiniZip_info.txt
10 |
11 | */
12 |
13 | #if (defined(_WIN32))
14 | #define _CRT_SECURE_NO_WARNINGS
15 | #endif
16 |
17 | #include "ioapi.h"
18 |
19 | voidpf call_zopen64 (const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode)
20 | {
21 | if (pfilefunc->zfile_func64.zopen64_file != NULL)
22 | return (*(pfilefunc->zfile_func64.zopen64_file)) (pfilefunc->zfile_func64.opaque,filename,mode);
23 | else
24 | {
25 | return (*(pfilefunc->zopen32_file))(pfilefunc->zfile_func64.opaque,(const char*)filename,mode);
26 | }
27 | }
28 |
29 | long call_zseek64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin)
30 | {
31 | if (pfilefunc->zfile_func64.zseek64_file != NULL)
32 | return (*(pfilefunc->zfile_func64.zseek64_file)) (pfilefunc->zfile_func64.opaque,filestream,offset,origin);
33 | else
34 | {
35 | uLong offsetTruncated = (uLong)offset;
36 | if (offsetTruncated != offset)
37 | return -1;
38 | else
39 | return (*(pfilefunc->zseek32_file))(pfilefunc->zfile_func64.opaque,filestream,offsetTruncated,origin);
40 | }
41 | }
42 |
43 | ZPOS64_T call_ztell64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream)
44 | {
45 | if (pfilefunc->zfile_func64.zseek64_file != NULL)
46 | return (*(pfilefunc->zfile_func64.ztell64_file)) (pfilefunc->zfile_func64.opaque,filestream);
47 | else
48 | {
49 | uLong tell_uLong = (*(pfilefunc->ztell32_file))(pfilefunc->zfile_func64.opaque,filestream);
50 | if ((tell_uLong) == ((uLong)-1))
51 | return (ZPOS64_T)-1;
52 | else
53 | return tell_uLong;
54 | }
55 | }
56 |
57 | void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32)
58 | {
59 | p_filefunc64_32->zfile_func64.zopen64_file = NULL;
60 | p_filefunc64_32->zopen32_file = p_filefunc32->zopen_file;
61 | p_filefunc64_32->zfile_func64.zerror_file = p_filefunc32->zerror_file;
62 | p_filefunc64_32->zfile_func64.zread_file = p_filefunc32->zread_file;
63 | p_filefunc64_32->zfile_func64.zwrite_file = p_filefunc32->zwrite_file;
64 | p_filefunc64_32->zfile_func64.ztell64_file = NULL;
65 | p_filefunc64_32->zfile_func64.zseek64_file = NULL;
66 | p_filefunc64_32->zfile_func64.zclose_file = p_filefunc32->zclose_file;
67 | p_filefunc64_32->zfile_func64.zerror_file = p_filefunc32->zerror_file;
68 | p_filefunc64_32->zfile_func64.opaque = p_filefunc32->opaque;
69 | p_filefunc64_32->zseek32_file = p_filefunc32->zseek_file;
70 | p_filefunc64_32->ztell32_file = p_filefunc32->ztell_file;
71 | }
72 |
73 |
74 |
75 | static voidpf ZCALLBACK fopen_file_func OF((voidpf opaque, const char* filename, int mode));
76 | static uLong ZCALLBACK fread_file_func OF((voidpf opaque, voidpf stream, void* buf, uLong size));
77 | static uLong ZCALLBACK fwrite_file_func OF((voidpf opaque, voidpf stream, const void* buf,uLong size));
78 | static ZPOS64_T ZCALLBACK ftell64_file_func OF((voidpf opaque, voidpf stream));
79 | static long ZCALLBACK fseek64_file_func OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin));
80 | static int ZCALLBACK fclose_file_func OF((voidpf opaque, voidpf stream));
81 | static int ZCALLBACK ferror_file_func OF((voidpf opaque, voidpf stream));
82 |
83 | static voidpf ZCALLBACK fopen_file_func (voidpf opaque, const char* filename, int mode)
84 | {
85 | FILE* file = NULL;
86 | const char* mode_fopen = NULL;
87 | if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
88 | mode_fopen = "rb";
89 | else
90 | if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
91 | mode_fopen = "r+b";
92 | else
93 | if (mode & ZLIB_FILEFUNC_MODE_CREATE)
94 | mode_fopen = "wb";
95 |
96 | if ((filename!=NULL) && (mode_fopen != NULL))
97 | file = fopen(filename, mode_fopen);
98 | return file;
99 | }
100 |
101 | static voidpf ZCALLBACK fopen64_file_func (voidpf opaque, const void* filename, int mode)
102 | {
103 | FILE* file = NULL;
104 | const char* mode_fopen = NULL;
105 | if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
106 | mode_fopen = "rb";
107 | else
108 | if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
109 | mode_fopen = "r+b";
110 | else
111 | if (mode & ZLIB_FILEFUNC_MODE_CREATE)
112 | mode_fopen = "wb";
113 |
114 | if ((filename!=NULL) && (mode_fopen != NULL))
115 | file = fopen((const char*)filename, mode_fopen);
116 | return file;
117 | }
118 |
119 |
120 | static uLong ZCALLBACK fread_file_func (voidpf opaque, voidpf stream, void* buf, uLong size)
121 | {
122 | uLong ret;
123 | ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream);
124 | return ret;
125 | }
126 |
127 | static uLong ZCALLBACK fwrite_file_func (voidpf opaque, voidpf stream, const void* buf, uLong size)
128 | {
129 | uLong ret;
130 | ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream);
131 | return ret;
132 | }
133 |
134 | static long ZCALLBACK ftell_file_func (voidpf opaque, voidpf stream)
135 | {
136 | long ret;
137 | ret = ftell((FILE *)stream);
138 | return ret;
139 | }
140 |
141 |
142 | static ZPOS64_T ZCALLBACK ftell64_file_func (voidpf opaque, voidpf stream)
143 | {
144 | ZPOS64_T ret;
145 | ret = ftello((FILE *)stream);
146 | return ret;
147 | }
148 |
149 | static long ZCALLBACK fseek_file_func (voidpf opaque, voidpf stream, uLong offset, int origin)
150 | {
151 | int fseek_origin=0;
152 | long ret;
153 | switch (origin)
154 | {
155 | case ZLIB_FILEFUNC_SEEK_CUR :
156 | fseek_origin = SEEK_CUR;
157 | break;
158 | case ZLIB_FILEFUNC_SEEK_END :
159 | fseek_origin = SEEK_END;
160 | break;
161 | case ZLIB_FILEFUNC_SEEK_SET :
162 | fseek_origin = SEEK_SET;
163 | break;
164 | default: return -1;
165 | }
166 | ret = 0;
167 | if (fseek((FILE *)stream, offset, fseek_origin) != 0)
168 | ret = -1;
169 | return ret;
170 | }
171 |
172 | static long ZCALLBACK fseek64_file_func (voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)
173 | {
174 | int fseek_origin=0;
175 | long ret;
176 | switch (origin)
177 | {
178 | case ZLIB_FILEFUNC_SEEK_CUR :
179 | fseek_origin = SEEK_CUR;
180 | break;
181 | case ZLIB_FILEFUNC_SEEK_END :
182 | fseek_origin = SEEK_END;
183 | break;
184 | case ZLIB_FILEFUNC_SEEK_SET :
185 | fseek_origin = SEEK_SET;
186 | break;
187 | default: return -1;
188 | }
189 | ret = 0;
190 |
191 | if(fseeko((FILE *)stream, offset, fseek_origin) != 0)
192 | ret = -1;
193 |
194 | return ret;
195 | }
196 |
197 |
198 | static int ZCALLBACK fclose_file_func (voidpf opaque, voidpf stream)
199 | {
200 | int ret;
201 | ret = fclose((FILE *)stream);
202 | return ret;
203 | }
204 |
205 | static int ZCALLBACK ferror_file_func (voidpf opaque, voidpf stream)
206 | {
207 | int ret;
208 | ret = ferror((FILE *)stream);
209 | return ret;
210 | }
211 |
212 | void fill_fopen_filefunc (pzlib_filefunc_def)
213 | zlib_filefunc_def* pzlib_filefunc_def;
214 | {
215 | pzlib_filefunc_def->zopen_file = fopen_file_func;
216 | pzlib_filefunc_def->zread_file = fread_file_func;
217 | pzlib_filefunc_def->zwrite_file = fwrite_file_func;
218 | pzlib_filefunc_def->ztell_file = ftell_file_func;
219 | pzlib_filefunc_def->zseek_file = fseek_file_func;
220 | pzlib_filefunc_def->zclose_file = fclose_file_func;
221 | pzlib_filefunc_def->zerror_file = ferror_file_func;
222 | pzlib_filefunc_def->opaque = NULL;
223 | }
224 |
225 | void fill_fopen64_filefunc (zlib_filefunc64_def* pzlib_filefunc_def)
226 | {
227 | pzlib_filefunc_def->zopen64_file = fopen64_file_func;
228 | pzlib_filefunc_def->zread_file = fread_file_func;
229 | pzlib_filefunc_def->zwrite_file = fwrite_file_func;
230 | pzlib_filefunc_def->ztell64_file = ftell64_file_func;
231 | pzlib_filefunc_def->zseek64_file = fseek64_file_func;
232 | pzlib_filefunc_def->zclose_file = fclose_file_func;
233 | pzlib_filefunc_def->zerror_file = ferror_file_func;
234 | pzlib_filefunc_def->opaque = NULL;
235 | }
236 |
--------------------------------------------------------------------------------
/Pods/ZipArchive/minizip/ioapi.h:
--------------------------------------------------------------------------------
1 | /* ioapi.h -- IO base function header for compress/uncompress .zip
2 | part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
3 |
4 | Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
5 |
6 | Modifications for Zip64 support
7 | Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
8 |
9 | For more info read MiniZip_info.txt
10 |
11 | Changes
12 |
13 | Oct-2009 - Defined ZPOS64_T to fpos_t on windows and u_int64_t on linux. (might need to find a better why for this)
14 | Oct-2009 - Change to fseeko64, ftello64 and fopen64 so large files would work on linux.
15 | More if/def section may be needed to support other platforms
16 | Oct-2009 - Defined fxxxx64 calls to normal fopen/ftell/fseek so they would compile on windows.
17 | (but you should use iowin32.c for windows instead)
18 |
19 | */
20 |
21 | #ifndef _ZLIBIOAPI64_H
22 | #define _ZLIBIOAPI64_H
23 |
24 | #if (!defined(_WIN32)) && (!defined(WIN32))
25 |
26 | // Linux needs this to support file operation on files larger then 4+GB
27 | // But might need better if/def to select just the platforms that needs them.
28 |
29 | #ifndef __USE_FILE_OFFSET64
30 | #define __USE_FILE_OFFSET64
31 | #endif
32 | #ifndef __USE_LARGEFILE64
33 | #define __USE_LARGEFILE64
34 | #endif
35 | #ifndef _LARGEFILE64_SOURCE
36 | #define _LARGEFILE64_SOURCE
37 | #endif
38 | #ifndef _FILE_OFFSET_BIT
39 | #define _FILE_OFFSET_BIT 64
40 | #endif
41 | #endif
42 |
43 | #include
44 | #include
45 | #include "zlib.h"
46 |
47 | #if defined(USE_FILE32API)
48 | #define fopen64 fopen
49 | #define ftello64 ftell
50 | #define fseeko64 fseek
51 | #else
52 | #ifdef _MSC_VER
53 | #define fopen64 fopen
54 | #if (_MSC_VER >= 1400) && (!(defined(NO_MSCVER_FILE64_FUNC)))
55 | #define ftello64 _ftelli64
56 | #define fseeko64 _fseeki64
57 | #else // old MSC
58 | #define ftello64 ftell
59 | #define fseeko64 fseek
60 | #endif
61 | #endif
62 | #endif
63 |
64 | /*
65 | #ifndef ZPOS64_T
66 | #ifdef _WIN32
67 | #define ZPOS64_T fpos_t
68 | #else
69 | #include
70 | #define ZPOS64_T uint64_t
71 | #endif
72 | #endif
73 | */
74 |
75 | #ifdef HAVE_MINIZIP64_CONF_H
76 | #include "mz64conf.h"
77 | #endif
78 |
79 | /* a type choosen by DEFINE */
80 | #ifdef HAVE_64BIT_INT_CUSTOM
81 | typedef 64BIT_INT_CUSTOM_TYPE ZPOS64_T;
82 | #else
83 | #ifdef HAS_STDINT_H
84 | #include "stdint.h"
85 | typedef uint64_t ZPOS64_T;
86 | #else
87 |
88 |
89 | #if defined(_MSC_VER) || defined(__BORLANDC__)
90 | typedef unsigned __int64 ZPOS64_T;
91 | #else
92 | typedef unsigned long long int ZPOS64_T;
93 | #endif
94 | #endif
95 | #endif
96 |
97 |
98 |
99 | #ifdef __cplusplus
100 | extern "C" {
101 | #endif
102 |
103 |
104 | #define ZLIB_FILEFUNC_SEEK_CUR (1)
105 | #define ZLIB_FILEFUNC_SEEK_END (2)
106 | #define ZLIB_FILEFUNC_SEEK_SET (0)
107 |
108 | #define ZLIB_FILEFUNC_MODE_READ (1)
109 | #define ZLIB_FILEFUNC_MODE_WRITE (2)
110 | #define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3)
111 |
112 | #define ZLIB_FILEFUNC_MODE_EXISTING (4)
113 | #define ZLIB_FILEFUNC_MODE_CREATE (8)
114 |
115 |
116 | #ifndef ZCALLBACK
117 | #if (defined(WIN32) || defined(_WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK)
118 | #define ZCALLBACK CALLBACK
119 | #else
120 | #define ZCALLBACK
121 | #endif
122 | #endif
123 |
124 |
125 |
126 |
127 | typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode));
128 | typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size));
129 | typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
130 | typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream));
131 | typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream));
132 |
133 | typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream));
134 | typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin));
135 |
136 |
137 | /* here is the "old" 32 bits structure structure */
138 | typedef struct zlib_filefunc_def_s
139 | {
140 | open_file_func zopen_file;
141 | read_file_func zread_file;
142 | write_file_func zwrite_file;
143 | tell_file_func ztell_file;
144 | seek_file_func zseek_file;
145 | close_file_func zclose_file;
146 | testerror_file_func zerror_file;
147 | voidpf opaque;
148 | } zlib_filefunc_def;
149 |
150 | typedef ZPOS64_T (ZCALLBACK *tell64_file_func) OF((voidpf opaque, voidpf stream));
151 | typedef long (ZCALLBACK *seek64_file_func) OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin));
152 | typedef voidpf (ZCALLBACK *open64_file_func) OF((voidpf opaque, const void* filename, int mode));
153 |
154 | typedef struct zlib_filefunc64_def_s
155 | {
156 | open64_file_func zopen64_file;
157 | read_file_func zread_file;
158 | write_file_func zwrite_file;
159 | tell64_file_func ztell64_file;
160 | seek64_file_func zseek64_file;
161 | close_file_func zclose_file;
162 | testerror_file_func zerror_file;
163 | voidpf opaque;
164 | } zlib_filefunc64_def;
165 |
166 | void fill_fopen64_filefunc OF((zlib_filefunc64_def* pzlib_filefunc_def));
167 | void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
168 |
169 | /* now internal definition, only for zip.c and unzip.h */
170 | typedef struct zlib_filefunc64_32_def_s
171 | {
172 | zlib_filefunc64_def zfile_func64;
173 | open_file_func zopen32_file;
174 | tell_file_func ztell32_file;
175 | seek_file_func zseek32_file;
176 | } zlib_filefunc64_32_def;
177 |
178 |
179 | #define ZREAD64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zread_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size))
180 | #define ZWRITE64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zwrite_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size))
181 | //#define ZTELL64(filefunc,filestream) ((*((filefunc).ztell64_file)) ((filefunc).opaque,filestream))
182 | //#define ZSEEK64(filefunc,filestream,pos,mode) ((*((filefunc).zseek64_file)) ((filefunc).opaque,filestream,pos,mode))
183 | #define ZCLOSE64(filefunc,filestream) ((*((filefunc).zfile_func64.zclose_file)) ((filefunc).zfile_func64.opaque,filestream))
184 | #define ZERROR64(filefunc,filestream) ((*((filefunc).zfile_func64.zerror_file)) ((filefunc).zfile_func64.opaque,filestream))
185 |
186 | voidpf call_zopen64 OF((const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode));
187 | long call_zseek64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin));
188 | ZPOS64_T call_ztell64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream));
189 |
190 | void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32);
191 |
192 | #define ZOPEN64(filefunc,filename,mode) (call_zopen64((&(filefunc)),(filename),(mode)))
193 | #define ZTELL64(filefunc,filestream) (call_ztell64((&(filefunc)),(filestream)))
194 | #define ZSEEK64(filefunc,filestream,pos,mode) (call_zseek64((&(filefunc)),(filestream),(pos),(mode)))
195 |
196 | #ifdef __cplusplus
197 | }
198 | #endif
199 |
200 | #endif
201 |
--------------------------------------------------------------------------------
/Pods/ZipArchive/minizip/mztools.c:
--------------------------------------------------------------------------------
1 | /*
2 | Additional tools for Minizip
3 | Code: Xavier Roche '2004
4 | License: Same as ZLIB (www.gzip.org)
5 | */
6 |
7 | /* Code */
8 | #include
9 | #include
10 | #include
11 | #include "zlib.h"
12 | #include "unzip.h"
13 |
14 | #define READ_8(adr) ((unsigned char)*(adr))
15 | #define READ_16(adr) ( READ_8(adr) | (READ_8(adr+1) << 8) )
16 | #define READ_32(adr) ( READ_16(adr) | (READ_16((adr)+2) << 16) )
17 |
18 | #define WRITE_8(buff, n) do { \
19 | *((unsigned char*)(buff)) = (unsigned char) ((n) & 0xff); \
20 | } while(0)
21 | #define WRITE_16(buff, n) do { \
22 | WRITE_8((unsigned char*)(buff), n); \
23 | WRITE_8(((unsigned char*)(buff)) + 1, (n) >> 8); \
24 | } while(0)
25 | #define WRITE_32(buff, n) do { \
26 | WRITE_16((unsigned char*)(buff), (n) & 0xffff); \
27 | WRITE_16((unsigned char*)(buff) + 2, (n) >> 16); \
28 | } while(0)
29 |
30 | extern int ZEXPORT unzRepair(file, fileOut, fileOutTmp, nRecovered, bytesRecovered)
31 | const char* file;
32 | const char* fileOut;
33 | const char* fileOutTmp;
34 | uLong* nRecovered;
35 | uLong* bytesRecovered;
36 | {
37 | int err = Z_OK;
38 | FILE* fpZip = fopen(file, "rb");
39 | FILE* fpOut = fopen(fileOut, "wb");
40 | FILE* fpOutCD = fopen(fileOutTmp, "wb");
41 | if (fpZip != NULL && fpOut != NULL) {
42 | int entries = 0;
43 | uLong totalBytes = 0;
44 | char header[30];
45 | char filename[256];
46 | char extra[1024];
47 | int offset = 0;
48 | int offsetCD = 0;
49 | while ( fread(header, 1, 30, fpZip) == 30 ) {
50 | int currentOffset = offset;
51 |
52 | /* File entry */
53 | if (READ_32(header) == 0x04034b50) {
54 | unsigned int version = READ_16(header + 4);
55 | unsigned int gpflag = READ_16(header + 6);
56 | unsigned int method = READ_16(header + 8);
57 | unsigned int filetime = READ_16(header + 10);
58 | unsigned int filedate = READ_16(header + 12);
59 | unsigned int crc = READ_32(header + 14); /* crc */
60 | unsigned int cpsize = READ_32(header + 18); /* compressed size */
61 | unsigned int uncpsize = READ_32(header + 22); /* uncompressed sz */
62 | unsigned int fnsize = READ_16(header + 26); /* file name length */
63 | unsigned int extsize = READ_16(header + 28); /* extra field length */
64 | filename[0] = extra[0] = '\0';
65 |
66 | /* Header */
67 | if (fwrite(header, 1, 30, fpOut) == 30) {
68 | offset += 30;
69 | } else {
70 | err = Z_ERRNO;
71 | break;
72 | }
73 |
74 | /* Filename */
75 | if (fnsize > 0) {
76 | if (fread(filename, 1, fnsize, fpZip) == fnsize) {
77 | if (fwrite(filename, 1, fnsize, fpOut) == fnsize) {
78 | offset += fnsize;
79 | } else {
80 | err = Z_ERRNO;
81 | break;
82 | }
83 | } else {
84 | err = Z_ERRNO;
85 | break;
86 | }
87 | } else {
88 | err = Z_STREAM_ERROR;
89 | break;
90 | }
91 |
92 | /* Extra field */
93 | if (extsize > 0) {
94 | if (fread(extra, 1, extsize, fpZip) == extsize) {
95 | if (fwrite(extra, 1, extsize, fpOut) == extsize) {
96 | offset += extsize;
97 | } else {
98 | err = Z_ERRNO;
99 | break;
100 | }
101 | } else {
102 | err = Z_ERRNO;
103 | break;
104 | }
105 | }
106 |
107 | /* Data */
108 | {
109 | int dataSize = cpsize;
110 | if (dataSize == 0) {
111 | dataSize = uncpsize;
112 | }
113 | if (dataSize > 0) {
114 | char* data = malloc(dataSize);
115 | if (data != NULL) {
116 | if ((int)fread(data, 1, dataSize, fpZip) == dataSize) {
117 | if ((int)fwrite(data, 1, dataSize, fpOut) == dataSize) {
118 | offset += dataSize;
119 | totalBytes += dataSize;
120 | } else {
121 | err = Z_ERRNO;
122 | }
123 | } else {
124 | err = Z_ERRNO;
125 | }
126 | free(data);
127 | if (err != Z_OK) {
128 | break;
129 | }
130 | } else {
131 | err = Z_MEM_ERROR;
132 | break;
133 | }
134 | }
135 | }
136 |
137 | /* Central directory entry */
138 | {
139 | char header[46];
140 | char* comment = "";
141 | int comsize = (int) strlen(comment);
142 | WRITE_32(header, 0x02014b50);
143 | WRITE_16(header + 4, version);
144 | WRITE_16(header + 6, version);
145 | WRITE_16(header + 8, gpflag);
146 | WRITE_16(header + 10, method);
147 | WRITE_16(header + 12, filetime);
148 | WRITE_16(header + 14, filedate);
149 | WRITE_32(header + 16, crc);
150 | WRITE_32(header + 20, cpsize);
151 | WRITE_32(header + 24, uncpsize);
152 | WRITE_16(header + 28, fnsize);
153 | WRITE_16(header + 30, extsize);
154 | WRITE_16(header + 32, comsize);
155 | WRITE_16(header + 34, 0); /* disk # */
156 | WRITE_16(header + 36, 0); /* int attrb */
157 | WRITE_32(header + 38, 0); /* ext attrb */
158 | WRITE_32(header + 42, currentOffset);
159 | /* Header */
160 | if (fwrite(header, 1, 46, fpOutCD) == 46) {
161 | offsetCD += 46;
162 |
163 | /* Filename */
164 | if (fnsize > 0) {
165 | if (fwrite(filename, 1, fnsize, fpOutCD) == fnsize) {
166 | offsetCD += fnsize;
167 | } else {
168 | err = Z_ERRNO;
169 | break;
170 | }
171 | } else {
172 | err = Z_STREAM_ERROR;
173 | break;
174 | }
175 |
176 | /* Extra field */
177 | if (extsize > 0) {
178 | if (fwrite(extra, 1, extsize, fpOutCD) == extsize) {
179 | offsetCD += extsize;
180 | } else {
181 | err = Z_ERRNO;
182 | break;
183 | }
184 | }
185 |
186 | /* Comment field */
187 | if (comsize > 0) {
188 | if ((int)fwrite(comment, 1, comsize, fpOutCD) == comsize) {
189 | offsetCD += comsize;
190 | } else {
191 | err = Z_ERRNO;
192 | break;
193 | }
194 | }
195 |
196 |
197 | } else {
198 | err = Z_ERRNO;
199 | break;
200 | }
201 | }
202 |
203 | /* Success */
204 | entries++;
205 |
206 | } else {
207 | break;
208 | }
209 | }
210 |
211 | /* Final central directory */
212 | {
213 | int entriesZip = entries;
214 | char header[22];
215 | char* comment = ""; // "ZIP File recovered by zlib/minizip/mztools";
216 | int comsize = (int) strlen(comment);
217 | if (entriesZip > 0xffff) {
218 | entriesZip = 0xffff;
219 | }
220 | WRITE_32(header, 0x06054b50);
221 | WRITE_16(header + 4, 0); /* disk # */
222 | WRITE_16(header + 6, 0); /* disk # */
223 | WRITE_16(header + 8, entriesZip); /* hack */
224 | WRITE_16(header + 10, entriesZip); /* hack */
225 | WRITE_32(header + 12, offsetCD); /* size of CD */
226 | WRITE_32(header + 16, offset); /* offset to CD */
227 | WRITE_16(header + 20, comsize); /* comment */
228 |
229 | /* Header */
230 | if (fwrite(header, 1, 22, fpOutCD) == 22) {
231 |
232 | /* Comment field */
233 | if (comsize > 0) {
234 | if ((int)fwrite(comment, 1, comsize, fpOutCD) != comsize) {
235 | err = Z_ERRNO;
236 | }
237 | }
238 |
239 | } else {
240 | err = Z_ERRNO;
241 | }
242 | }
243 |
244 | /* Final merge (file + central directory) */
245 | fclose(fpOutCD);
246 | if (err == Z_OK) {
247 | fpOutCD = fopen(fileOutTmp, "rb");
248 | if (fpOutCD != NULL) {
249 | int nRead;
250 | char buffer[8192];
251 | while ( (nRead = (int)fread(buffer, 1, sizeof(buffer), fpOutCD)) > 0) {
252 | if ((int)fwrite(buffer, 1, nRead, fpOut) != nRead) {
253 | err = Z_ERRNO;
254 | break;
255 | }
256 | }
257 | fclose(fpOutCD);
258 | }
259 | }
260 |
261 | /* Close */
262 | fclose(fpZip);
263 | fclose(fpOut);
264 |
265 | /* Wipe temporary file */
266 | (void)remove(fileOutTmp);
267 |
268 | /* Number of recovered entries */
269 | if (err == Z_OK) {
270 | if (nRecovered != NULL) {
271 | *nRecovered = entries;
272 | }
273 | if (bytesRecovered != NULL) {
274 | *bytesRecovered = totalBytes;
275 | }
276 | }
277 | } else {
278 | err = Z_STREAM_ERROR;
279 | }
280 | return err;
281 | }
282 |
--------------------------------------------------------------------------------
/Pods/ZipArchive/minizip/mztools.h:
--------------------------------------------------------------------------------
1 | /*
2 | Additional tools for Minizip
3 | Code: Xavier Roche '2004
4 | License: Same as ZLIB (www.gzip.org)
5 | */
6 |
7 | #ifndef _zip_tools_H
8 | #define _zip_tools_H
9 |
10 | #ifdef __cplusplus
11 | extern "C" {
12 | #endif
13 |
14 | #ifndef _ZLIB_H
15 | #include "zlib.h"
16 | #endif
17 |
18 | #include "unzip.h"
19 |
20 | /* Repair a ZIP file (missing central directory)
21 | file: file to recover
22 | fileOut: output file after recovery
23 | fileOutTmp: temporary file name used for recovery
24 | */
25 | extern int ZEXPORT unzRepair(const char* file,
26 | const char* fileOut,
27 | const char* fileOutTmp,
28 | uLong* nRecovered,
29 | uLong* bytesRecovered);
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/Pods/ZipArchive/minizip/unzip.h:
--------------------------------------------------------------------------------
1 | /* unzip.h -- IO for uncompress .zip files using zlib
2 | Version 1.1, February 14h, 2010
3 | part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
4 |
5 | Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
6 |
7 | Modifications of Unzip for Zip64
8 | Copyright (C) 2007-2008 Even Rouault
9 |
10 | Modifications for Zip64 support on both zip and unzip
11 | Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
12 |
13 | For more info read MiniZip_info.txt
14 |
15 | ---------------------------------------------------------------------------------
16 |
17 | Condition of use and distribution are the same than zlib :
18 |
19 | This software is provided 'as-is', without any express or implied
20 | warranty. In no event will the authors be held liable for any damages
21 | arising from the use of this software.
22 |
23 | Permission is granted to anyone to use this software for any purpose,
24 | including commercial applications, and to alter it and redistribute it
25 | freely, subject to the following restrictions:
26 |
27 | 1. The origin of this software must not be misrepresented; you must not
28 | claim that you wrote the original software. If you use this software
29 | in a product, an acknowledgment in the product documentation would be
30 | appreciated but is not required.
31 | 2. Altered source versions must be plainly marked as such, and must not be
32 | misrepresented as being the original software.
33 | 3. This notice may not be removed or altered from any source distribution.
34 |
35 | ---------------------------------------------------------------------------------
36 |
37 | Changes
38 |
39 | See header of unzip64.c
40 |
41 | */
42 |
43 | #ifndef _unz64_H
44 | #define _unz64_H
45 |
46 | #ifdef __cplusplus
47 | extern "C" {
48 | #endif
49 |
50 | #ifndef _ZLIB_H
51 | #include "zlib.h"
52 | #endif
53 |
54 | #ifndef _ZLIBIOAPI_H
55 | #include "ioapi.h"
56 | #endif
57 |
58 | #ifdef HAVE_BZIP2
59 | #include "bzlib.h"
60 | #endif
61 |
62 | #define Z_BZIP2ED 12
63 |
64 | #if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP)
65 | /* like the STRICT of WIN32, we define a pointer that cannot be converted
66 | from (void*) without cast */
67 | typedef struct TagunzFile__ { int unused; } unzFile__;
68 | typedef unzFile__ *unzFile;
69 | #else
70 | typedef voidp unzFile;
71 | #endif
72 |
73 |
74 | #define UNZ_OK (0)
75 | #define UNZ_END_OF_LIST_OF_FILE (-100)
76 | #define UNZ_ERRNO (Z_ERRNO)
77 | #define UNZ_EOF (0)
78 | #define UNZ_PARAMERROR (-102)
79 | #define UNZ_BADZIPFILE (-103)
80 | #define UNZ_INTERNALERROR (-104)
81 | #define UNZ_CRCERROR (-105)
82 |
83 | /* tm_unz contain date/time info */
84 | typedef struct tm_unz_s
85 | {
86 | uInt tm_sec; /* seconds after the minute - [0,59] */
87 | uInt tm_min; /* minutes after the hour - [0,59] */
88 | uInt tm_hour; /* hours since midnight - [0,23] */
89 | uInt tm_mday; /* day of the month - [1,31] */
90 | uInt tm_mon; /* months since January - [0,11] */
91 | uInt tm_year; /* years - [1980..2044] */
92 | } tm_unz;
93 |
94 | /* unz_global_info structure contain global data about the ZIPfile
95 | These data comes from the end of central dir */
96 | typedef struct unz_global_info64_s
97 | {
98 | ZPOS64_T number_entry; /* total number of entries in
99 | the central dir on this disk */
100 | uLong size_comment; /* size of the global comment of the zipfile */
101 | } unz_global_info64;
102 |
103 | typedef struct unz_global_info_s
104 | {
105 | uLong number_entry; /* total number of entries in
106 | the central dir on this disk */
107 | uLong size_comment; /* size of the global comment of the zipfile */
108 | } unz_global_info;
109 |
110 | /* unz_file_info contain information about a file in the zipfile */
111 | typedef struct unz_file_info64_s
112 | {
113 | uLong version; /* version made by 2 bytes */
114 | uLong version_needed; /* version needed to extract 2 bytes */
115 | uLong flag; /* general purpose bit flag 2 bytes */
116 | uLong compression_method; /* compression method 2 bytes */
117 | uLong dosDate; /* last mod file date in Dos fmt 4 bytes */
118 | uLong crc; /* crc-32 4 bytes */
119 | ZPOS64_T compressed_size; /* compressed size 8 bytes */
120 | ZPOS64_T uncompressed_size; /* uncompressed size 8 bytes */
121 | uLong size_filename; /* filename length 2 bytes */
122 | uLong size_file_extra; /* extra field length 2 bytes */
123 | uLong size_file_comment; /* file comment length 2 bytes */
124 |
125 | uLong disk_num_start; /* disk number start 2 bytes */
126 | uLong internal_fa; /* internal file attributes 2 bytes */
127 | uLong external_fa; /* external file attributes 4 bytes */
128 |
129 | tm_unz tmu_date;
130 | } unz_file_info64;
131 |
132 | typedef struct unz_file_info_s
133 | {
134 | uLong version; /* version made by 2 bytes */
135 | uLong version_needed; /* version needed to extract 2 bytes */
136 | uLong flag; /* general purpose bit flag 2 bytes */
137 | uLong compression_method; /* compression method 2 bytes */
138 | uLong dosDate; /* last mod file date in Dos fmt 4 bytes */
139 | uLong crc; /* crc-32 4 bytes */
140 | uLong compressed_size; /* compressed size 4 bytes */
141 | uLong uncompressed_size; /* uncompressed size 4 bytes */
142 | uLong size_filename; /* filename length 2 bytes */
143 | uLong size_file_extra; /* extra field length 2 bytes */
144 | uLong size_file_comment; /* file comment length 2 bytes */
145 |
146 | uLong disk_num_start; /* disk number start 2 bytes */
147 | uLong internal_fa; /* internal file attributes 2 bytes */
148 | uLong external_fa; /* external file attributes 4 bytes */
149 |
150 | tm_unz tmu_date;
151 | } unz_file_info;
152 |
153 | extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1,
154 | const char* fileName2,
155 | int iCaseSensitivity));
156 | /*
157 | Compare two filename (fileName1,fileName2).
158 | If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
159 | If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
160 | or strcasecmp)
161 | If iCaseSenisivity = 0, case sensitivity is defaut of your operating system
162 | (like 1 on Unix, 2 on Windows)
163 | */
164 |
165 |
166 | extern unzFile ZEXPORT unzOpen OF((const char *path));
167 | extern unzFile ZEXPORT unzOpen64 OF((const void *path));
168 | /*
169 | Open a Zip file. path contain the full pathname (by example,
170 | on a Windows XP computer "c:\\zlib\\zlib113.zip" or on an Unix computer
171 | "zlib/zlib113.zip".
172 | If the zipfile cannot be opened (file don't exist or in not valid), the
173 | return value is NULL.
174 | Else, the return value is a unzFile Handle, usable with other function
175 | of this unzip package.
176 | the "64" function take a const void* pointer, because the path is just the
177 | value passed to the open64_file_func callback.
178 | Under Windows, if UNICODE is defined, using fill_fopen64_filefunc, the path
179 | is a pointer to a wide unicode string (LPCTSTR is LPCWSTR), so const char*
180 | does not describe the reality
181 | */
182 |
183 |
184 | extern unzFile ZEXPORT unzOpen2 OF((const char *path,
185 | zlib_filefunc_def* pzlib_filefunc_def));
186 | /*
187 | Open a Zip file, like unzOpen, but provide a set of file low level API
188 | for read/write the zip file (see ioapi.h)
189 | */
190 |
191 | extern unzFile ZEXPORT unzOpen2_64 OF((const void *path,
192 | zlib_filefunc64_def* pzlib_filefunc_def));
193 | /*
194 | Open a Zip file, like unz64Open, but provide a set of file low level API
195 | for read/write the zip file (see ioapi.h)
196 | */
197 |
198 | extern int ZEXPORT unzClose OF((unzFile file));
199 | /*
200 | Close a ZipFile opened with unzipOpen.
201 | If there is files inside the .Zip opened with unzOpenCurrentFile (see later),
202 | these files MUST be closed with unzipCloseCurrentFile before call unzipClose.
203 | return UNZ_OK if there is no problem. */
204 |
205 | extern int ZEXPORT unzGetGlobalInfo OF((unzFile file,
206 | unz_global_info *pglobal_info));
207 |
208 | extern int ZEXPORT unzGetGlobalInfo64 OF((unzFile file,
209 | unz_global_info64 *pglobal_info));
210 | /*
211 | Write info about the ZipFile in the *pglobal_info structure.
212 | No preparation of the structure is needed
213 | return UNZ_OK if there is no problem. */
214 |
215 |
216 | extern int ZEXPORT unzGetGlobalComment OF((unzFile file,
217 | char *szComment,
218 | uLong uSizeBuf));
219 | /*
220 | Get the global comment string of the ZipFile, in the szComment buffer.
221 | uSizeBuf is the size of the szComment buffer.
222 | return the number of byte copied or an error code <0
223 | */
224 |
225 |
226 | /***************************************************************************/
227 | /* Unzip package allow you browse the directory of the zipfile */
228 |
229 | extern int ZEXPORT unzGoToFirstFile OF((unzFile file));
230 | /*
231 | Set the current file of the zipfile to the first file.
232 | return UNZ_OK if there is no problem
233 | */
234 |
235 | extern int ZEXPORT unzGoToNextFile OF((unzFile file));
236 | /*
237 | Set the current file of the zipfile to the next file.
238 | return UNZ_OK if there is no problem
239 | return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
240 | */
241 |
242 | extern int ZEXPORT unzLocateFile OF((unzFile file,
243 | const char *szFileName,
244 | int iCaseSensitivity));
245 | /*
246 | Try locate the file szFileName in the zipfile.
247 | For the iCaseSensitivity signification, see unzStringFileNameCompare
248 |
249 | return value :
250 | UNZ_OK if the file is found. It becomes the current file.
251 | UNZ_END_OF_LIST_OF_FILE if the file is not found
252 | */
253 |
254 |
255 | /* ****************************************** */
256 | /* Ryan supplied functions */
257 | /* unz_file_info contain information about a file in the zipfile */
258 | typedef struct unz_file_pos_s
259 | {
260 | uLong pos_in_zip_directory; /* offset in zip file directory */
261 | uLong num_of_file; /* # of file */
262 | } unz_file_pos;
263 |
264 | extern int ZEXPORT unzGetFilePos(
265 | unzFile file,
266 | unz_file_pos* file_pos);
267 |
268 | extern int ZEXPORT unzGoToFilePos(
269 | unzFile file,
270 | unz_file_pos* file_pos);
271 |
272 | typedef struct unz64_file_pos_s
273 | {
274 | ZPOS64_T pos_in_zip_directory; /* offset in zip file directory */
275 | ZPOS64_T num_of_file; /* # of file */
276 | } unz64_file_pos;
277 |
278 | extern int ZEXPORT unzGetFilePos64(
279 | unzFile file,
280 | unz64_file_pos* file_pos);
281 |
282 | extern int ZEXPORT unzGoToFilePos64(
283 | unzFile file,
284 | const unz64_file_pos* file_pos);
285 |
286 | /* ****************************************** */
287 |
288 | extern int ZEXPORT unzGetCurrentFileInfo64 OF((unzFile file,
289 | unz_file_info64 *pfile_info,
290 | char *szFileName,
291 | uLong fileNameBufferSize,
292 | void *extraField,
293 | uLong extraFieldBufferSize,
294 | char *szComment,
295 | uLong commentBufferSize));
296 |
297 | extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file,
298 | unz_file_info *pfile_info,
299 | char *szFileName,
300 | uLong fileNameBufferSize,
301 | void *extraField,
302 | uLong extraFieldBufferSize,
303 | char *szComment,
304 | uLong commentBufferSize));
305 | /*
306 | Get Info about the current file
307 | if pfile_info!=NULL, the *pfile_info structure will contain somes info about
308 | the current file
309 | if szFileName!=NULL, the filemane string will be copied in szFileName
310 | (fileNameBufferSize is the size of the buffer)
311 | if extraField!=NULL, the extra field information will be copied in extraField
312 | (extraFieldBufferSize is the size of the buffer).
313 | This is the Central-header version of the extra field
314 | if szComment!=NULL, the comment string of the file will be copied in szComment
315 | (commentBufferSize is the size of the buffer)
316 | */
317 |
318 |
319 | /** Addition for GDAL : START */
320 |
321 | extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64 OF((unzFile file));
322 |
323 | /** Addition for GDAL : END */
324 |
325 |
326 | /***************************************************************************/
327 | /* for reading the content of the current zipfile, you can open it, read data
328 | from it, and close it (you can close it before reading all the file)
329 | */
330 |
331 | extern int ZEXPORT unzOpenCurrentFile OF((unzFile file));
332 | /*
333 | Open for reading data the current file in the zipfile.
334 | If there is no error, the return value is UNZ_OK.
335 | */
336 |
337 | extern int ZEXPORT unzOpenCurrentFilePassword OF((unzFile file,
338 | const char* password));
339 | /*
340 | Open for reading data the current file in the zipfile.
341 | password is a crypting password
342 | If there is no error, the return value is UNZ_OK.
343 | */
344 |
345 | extern int ZEXPORT unzOpenCurrentFile2 OF((unzFile file,
346 | int* method,
347 | int* level,
348 | int raw));
349 | /*
350 | Same than unzOpenCurrentFile, but open for read raw the file (not uncompress)
351 | if raw==1
352 | *method will receive method of compression, *level will receive level of
353 | compression
354 | note : you can set level parameter as NULL (if you did not want known level,
355 | but you CANNOT set method parameter as NULL
356 | */
357 |
358 | extern int ZEXPORT unzOpenCurrentFile3 OF((unzFile file,
359 | int* method,
360 | int* level,
361 | int raw,
362 | const char* password));
363 | /*
364 | Same than unzOpenCurrentFile, but open for read raw the file (not uncompress)
365 | if raw==1
366 | *method will receive method of compression, *level will receive level of
367 | compression
368 | note : you can set level parameter as NULL (if you did not want known level,
369 | but you CANNOT set method parameter as NULL
370 | */
371 |
372 |
373 | extern int ZEXPORT unzCloseCurrentFile OF((unzFile file));
374 | /*
375 | Close the file in zip opened with unzOpenCurrentFile
376 | Return UNZ_CRCERROR if all the file was read but the CRC is not good
377 | */
378 |
379 | extern int ZEXPORT unzReadCurrentFile OF((unzFile file,
380 | voidp buf,
381 | unsigned len));
382 | /*
383 | Read bytes from the current file (opened by unzOpenCurrentFile)
384 | buf contain buffer where data must be copied
385 | len the size of buf.
386 |
387 | return the number of byte copied if somes bytes are copied
388 | return 0 if the end of file was reached
389 | return <0 with error code if there is an error
390 | (UNZ_ERRNO for IO error, or zLib error for uncompress error)
391 | */
392 |
393 | extern z_off_t ZEXPORT unztell OF((unzFile file));
394 |
395 | extern ZPOS64_T ZEXPORT unztell64 OF((unzFile file));
396 | /*
397 | Give the current position in uncompressed data
398 | */
399 |
400 | extern int ZEXPORT unzeof OF((unzFile file));
401 | /*
402 | return 1 if the end of file was reached, 0 elsewhere
403 | */
404 |
405 | extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file,
406 | voidp buf,
407 | unsigned len));
408 | /*
409 | Read extra field from the current file (opened by unzOpenCurrentFile)
410 | This is the local-header version of the extra field (sometimes, there is
411 | more info in the local-header version than in the central-header)
412 |
413 | if buf==NULL, it return the size of the local extra field
414 |
415 | if buf!=NULL, len is the size of the buffer, the extra header is copied in
416 | buf.
417 | the return value is the number of bytes copied in buf, or (if <0)
418 | the error code
419 | */
420 |
421 | /***************************************************************************/
422 |
423 | /* Get the current file offset */
424 | extern ZPOS64_T ZEXPORT unzGetOffset64 (unzFile file);
425 | extern uLong ZEXPORT unzGetOffset (unzFile file);
426 |
427 | /* Set the current file offset */
428 | extern int ZEXPORT unzSetOffset64 (unzFile file, ZPOS64_T pos);
429 | extern int ZEXPORT unzSetOffset (unzFile file, uLong pos);
430 |
431 |
432 |
433 | #ifdef __cplusplus
434 | }
435 | #endif
436 |
437 | #endif /* _unz64_H */
438 |
--------------------------------------------------------------------------------
/Pods/ZipArchive/minizip/zip.h:
--------------------------------------------------------------------------------
1 | /* zip.h -- IO on .zip files using zlib
2 | Version 1.1, February 14h, 2010
3 | part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
4 |
5 | Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
6 |
7 | Modifications for Zip64 support
8 | Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
9 |
10 | For more info read MiniZip_info.txt
11 |
12 | ---------------------------------------------------------------------------
13 |
14 | Condition of use and distribution are the same than zlib :
15 |
16 | This software is provided 'as-is', without any express or implied
17 | warranty. In no event will the authors be held liable for any damages
18 | arising from the use of this software.
19 |
20 | Permission is granted to anyone to use this software for any purpose,
21 | including commercial applications, and to alter it and redistribute it
22 | freely, subject to the following restrictions:
23 |
24 | 1. The origin of this software must not be misrepresented; you must not
25 | claim that you wrote the original software. If you use this software
26 | in a product, an acknowledgment in the product documentation would be
27 | appreciated but is not required.
28 | 2. Altered source versions must be plainly marked as such, and must not be
29 | misrepresented as being the original software.
30 | 3. This notice may not be removed or altered from any source distribution.
31 |
32 | ---------------------------------------------------------------------------
33 |
34 | Changes
35 |
36 | See header of zip.h
37 |
38 | */
39 |
40 | #ifndef _zip12_H
41 | #define _zip12_H
42 |
43 | #ifdef __cplusplus
44 | extern "C" {
45 | #endif
46 |
47 | //#define HAVE_BZIP2
48 |
49 | #ifndef _ZLIB_H
50 | #include "zlib.h"
51 | #endif
52 |
53 | #ifndef _ZLIBIOAPI_H
54 | #include "ioapi.h"
55 | #endif
56 |
57 | #ifdef HAVE_BZIP2
58 | #include "bzlib.h"
59 | #endif
60 |
61 | #define Z_BZIP2ED 12
62 |
63 | #if defined(STRICTZIP) || defined(STRICTZIPUNZIP)
64 | /* like the STRICT of WIN32, we define a pointer that cannot be converted
65 | from (void*) without cast */
66 | typedef struct TagzipFile__ { int unused; } zipFile__;
67 | typedef zipFile__ *zipFile;
68 | #else
69 | typedef voidp zipFile;
70 | #endif
71 |
72 | #define ZIP_OK (0)
73 | #define ZIP_EOF (0)
74 | #define ZIP_ERRNO (Z_ERRNO)
75 | #define ZIP_PARAMERROR (-102)
76 | #define ZIP_BADZIPFILE (-103)
77 | #define ZIP_INTERNALERROR (-104)
78 |
79 | #ifndef DEF_MEM_LEVEL
80 | # if MAX_MEM_LEVEL >= 8
81 | # define DEF_MEM_LEVEL 8
82 | # else
83 | # define DEF_MEM_LEVEL MAX_MEM_LEVEL
84 | # endif
85 | #endif
86 | /* default memLevel */
87 |
88 | /* tm_zip contain date/time info */
89 | typedef struct tm_zip_s
90 | {
91 | uInt tm_sec; /* seconds after the minute - [0,59] */
92 | uInt tm_min; /* minutes after the hour - [0,59] */
93 | uInt tm_hour; /* hours since midnight - [0,23] */
94 | uInt tm_mday; /* day of the month - [1,31] */
95 | uInt tm_mon; /* months since January - [0,11] */
96 | uInt tm_year; /* years - [1980..2044] */
97 | } tm_zip;
98 |
99 | typedef struct
100 | {
101 | tm_zip tmz_date; /* date in understandable format */
102 | uLong dosDate; /* if dos_date == 0, tmu_date is used */
103 | /* uLong flag; */ /* general purpose bit flag 2 bytes */
104 |
105 | uLong internal_fa; /* internal file attributes 2 bytes */
106 | uLong external_fa; /* external file attributes 4 bytes */
107 | } zip_fileinfo;
108 |
109 | typedef const char* zipcharpc;
110 |
111 |
112 | #define APPEND_STATUS_CREATE (0)
113 | #define APPEND_STATUS_CREATEAFTER (1)
114 | #define APPEND_STATUS_ADDINZIP (2)
115 |
116 | extern zipFile ZEXPORT zipOpen OF((const char *pathname, int append));
117 | extern zipFile ZEXPORT zipOpen64 OF((const void *pathname, int append));
118 | /*
119 | Create a zipfile.
120 | pathname contain on Windows XP a filename like "c:\\zlib\\zlib113.zip" or on
121 | an Unix computer "zlib/zlib113.zip".
122 | if the file pathname exist and append==APPEND_STATUS_CREATEAFTER, the zip
123 | will be created at the end of the file.
124 | (useful if the file contain a self extractor code)
125 | if the file pathname exist and append==APPEND_STATUS_ADDINZIP, we will
126 | add files in existing zip (be sure you don't add file that doesn't exist)
127 | If the zipfile cannot be opened, the return value is NULL.
128 | Else, the return value is a zipFile Handle, usable with other function
129 | of this zip package.
130 | */
131 |
132 | /* Note : there is no delete function into a zipfile.
133 | If you want delete file into a zipfile, you must open a zipfile, and create another
134 | Of couse, you can use RAW reading and writing to copy the file you did not want delte
135 | */
136 |
137 | extern zipFile ZEXPORT zipOpen2 OF((const char *pathname,
138 | int append,
139 | zipcharpc* globalcomment,
140 | zlib_filefunc_def* pzlib_filefunc_def));
141 |
142 | extern zipFile ZEXPORT zipOpen2_64 OF((const void *pathname,
143 | int append,
144 | zipcharpc* globalcomment,
145 | zlib_filefunc64_def* pzlib_filefunc_def));
146 |
147 | extern int ZEXPORT zipOpenNewFileInZip OF((zipFile file,
148 | const char* filename,
149 | const zip_fileinfo* zipfi,
150 | const void* extrafield_local,
151 | uInt size_extrafield_local,
152 | const void* extrafield_global,
153 | uInt size_extrafield_global,
154 | const char* comment,
155 | int method,
156 | int level));
157 |
158 | extern int ZEXPORT zipOpenNewFileInZip64 OF((zipFile file,
159 | const char* filename,
160 | const zip_fileinfo* zipfi,
161 | const void* extrafield_local,
162 | uInt size_extrafield_local,
163 | const void* extrafield_global,
164 | uInt size_extrafield_global,
165 | const char* comment,
166 | int method,
167 | int level,
168 | int zip64));
169 |
170 | /*
171 | Open a file in the ZIP for writing.
172 | filename : the filename in zip (if NULL, '-' without quote will be used
173 | *zipfi contain supplemental information
174 | if extrafield_local!=NULL and size_extrafield_local>0, extrafield_local
175 | contains the extrafield data the the local header
176 | if extrafield_global!=NULL and size_extrafield_global>0, extrafield_global
177 | contains the extrafield data the the local header
178 | if comment != NULL, comment contain the comment string
179 | method contain the compression method (0 for store, Z_DEFLATED for deflate)
180 | level contain the level of compression (can be Z_DEFAULT_COMPRESSION)
181 | zip64 is set to 1 if a zip64 extended information block should be added to the local file header.
182 | this MUST be '1' if the uncompressed size is >= 0xffffffff.
183 |
184 | */
185 |
186 |
187 | extern int ZEXPORT zipOpenNewFileInZip2 OF((zipFile file,
188 | const char* filename,
189 | const zip_fileinfo* zipfi,
190 | const void* extrafield_local,
191 | uInt size_extrafield_local,
192 | const void* extrafield_global,
193 | uInt size_extrafield_global,
194 | const char* comment,
195 | int method,
196 | int level,
197 | int raw));
198 |
199 |
200 | extern int ZEXPORT zipOpenNewFileInZip2_64 OF((zipFile file,
201 | const char* filename,
202 | const zip_fileinfo* zipfi,
203 | const void* extrafield_local,
204 | uInt size_extrafield_local,
205 | const void* extrafield_global,
206 | uInt size_extrafield_global,
207 | const char* comment,
208 | int method,
209 | int level,
210 | int raw,
211 | int zip64));
212 | /*
213 | Same than zipOpenNewFileInZip, except if raw=1, we write raw file
214 | */
215 |
216 | extern int ZEXPORT zipOpenNewFileInZip3 OF((zipFile file,
217 | const char* filename,
218 | const zip_fileinfo* zipfi,
219 | const void* extrafield_local,
220 | uInt size_extrafield_local,
221 | const void* extrafield_global,
222 | uInt size_extrafield_global,
223 | const char* comment,
224 | int method,
225 | int level,
226 | int raw,
227 | int windowBits,
228 | int memLevel,
229 | int strategy,
230 | const char* password,
231 | uLong crcForCrypting));
232 |
233 | extern int ZEXPORT zipOpenNewFileInZip3_64 OF((zipFile file,
234 | const char* filename,
235 | const zip_fileinfo* zipfi,
236 | const void* extrafield_local,
237 | uInt size_extrafield_local,
238 | const void* extrafield_global,
239 | uInt size_extrafield_global,
240 | const char* comment,
241 | int method,
242 | int level,
243 | int raw,
244 | int windowBits,
245 | int memLevel,
246 | int strategy,
247 | const char* password,
248 | uLong crcForCrypting,
249 | int zip64
250 | ));
251 |
252 | /*
253 | Same than zipOpenNewFileInZip2, except
254 | windowBits,memLevel,,strategy : see parameter strategy in deflateInit2
255 | password : crypting password (NULL for no crypting)
256 | crcForCrypting : crc of file to compress (needed for crypting)
257 | */
258 |
259 | extern int ZEXPORT zipOpenNewFileInZip4 OF((zipFile file,
260 | const char* filename,
261 | const zip_fileinfo* zipfi,
262 | const void* extrafield_local,
263 | uInt size_extrafield_local,
264 | const void* extrafield_global,
265 | uInt size_extrafield_global,
266 | const char* comment,
267 | int method,
268 | int level,
269 | int raw,
270 | int windowBits,
271 | int memLevel,
272 | int strategy,
273 | const char* password,
274 | uLong crcForCrypting,
275 | uLong versionMadeBy,
276 | uLong flagBase
277 | ));
278 |
279 |
280 | extern int ZEXPORT zipOpenNewFileInZip4_64 OF((zipFile file,
281 | const char* filename,
282 | const zip_fileinfo* zipfi,
283 | const void* extrafield_local,
284 | uInt size_extrafield_local,
285 | const void* extrafield_global,
286 | uInt size_extrafield_global,
287 | const char* comment,
288 | int method,
289 | int level,
290 | int raw,
291 | int windowBits,
292 | int memLevel,
293 | int strategy,
294 | const char* password,
295 | uLong crcForCrypting,
296 | uLong versionMadeBy,
297 | uLong flagBase,
298 | int zip64
299 | ));
300 | /*
301 | Same than zipOpenNewFileInZip4, except
302 | versionMadeBy : value for Version made by field
303 | flag : value for flag field (compression level info will be added)
304 | */
305 |
306 |
307 | extern int ZEXPORT zipWriteInFileInZip OF((zipFile file,
308 | const void* buf,
309 | unsigned len));
310 | /*
311 | Write data in the zipfile
312 | */
313 |
314 | extern int ZEXPORT zipCloseFileInZip OF((zipFile file));
315 | /*
316 | Close the current file in the zipfile
317 | */
318 |
319 | extern int ZEXPORT zipCloseFileInZipRaw OF((zipFile file,
320 | uLong uncompressed_size,
321 | uLong crc32));
322 |
323 | extern int ZEXPORT zipCloseFileInZipRaw64 OF((zipFile file,
324 | ZPOS64_T uncompressed_size,
325 | uLong crc32));
326 |
327 | /*
328 | Close the current file in the zipfile, for file opened with
329 | parameter raw=1 in zipOpenNewFileInZip2
330 | uncompressed_size and crc32 are value for the uncompressed size
331 | */
332 |
333 | extern int ZEXPORT zipClose OF((zipFile file,
334 | const char* global_comment));
335 | /*
336 | Close the zipfile
337 | */
338 |
339 |
340 | extern int ZEXPORT zipRemoveExtraInfoBlock OF((char* pData, int* dataLen, short sHeader));
341 | /*
342 | zipRemoveExtraInfoBlock - Added by Mathias Svensson
343 |
344 | Remove extra information block from a extra information data for the local file header or central directory header
345 |
346 | It is needed to remove ZIP64 extra information blocks when before data is written if using RAW mode.
347 |
348 | 0x0001 is the signature header for the ZIP64 extra information blocks
349 |
350 | usage.
351 | Remove ZIP64 Extra information from a central director extra field data
352 | zipRemoveExtraInfoBlock(pCenDirExtraFieldData, &nCenDirExtraFieldDataLen, 0x0001);
353 |
354 | Remove ZIP64 Extra information from a Local File Header extra field data
355 | zipRemoveExtraInfoBlock(pLocalHeaderExtraFieldData, &nLocalHeaderExtraFieldDataLen, 0x0001);
356 | */
357 |
358 | #ifdef __cplusplus
359 | }
360 | #endif
361 |
362 | #endif /* _zip64_H */
363 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # XBServerFramework
2 | ### 在线更新framework,可以更新功能模块不用在AppStore更新
3 |
--------------------------------------------------------------------------------
/XBServerFramework.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | archiveVersion
6 | 1
7 | classes
8 |
9 | objectVersion
10 | 46
11 | objects
12 |
13 | 34DA35F39B1E845C3BC5908E
14 |
15 | includeInIndex
16 | 1
17 | isa
18 | PBXFileReference
19 | lastKnownFileType
20 | text.xcconfig
21 | name
22 | Pods.debug.xcconfig
23 | path
24 | Pods/Target Support Files/Pods/Pods.debug.xcconfig
25 | sourceTree
26 | <group>
27 |
28 | 87E8E6D8129D6C3CDA71DE26
29 |
30 | buildActionMask
31 | 2147483647
32 | files
33 |
34 | inputPaths
35 |
36 | isa
37 | PBXShellScriptBuildPhase
38 | name
39 | Copy Pods Resources
40 | outputPaths
41 |
42 | runOnlyForDeploymentPostprocessing
43 | 0
44 | shellPath
45 | /bin/sh
46 | shellScript
47 | "${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh"
48 |
49 | showEnvVarsInLog
50 | 0
51 |
52 | B2A0F1C23F7CE94E54C1FE80
53 |
54 | children
55 |
56 | E17E7F197403A238AACA41ED
57 |
58 | isa
59 | PBXGroup
60 | name
61 | Frameworks
62 | sourceTree
63 | <group>
64 |
65 | BA72B8D23E467E3FF2F65895
66 |
67 | buildActionMask
68 | 2147483647
69 | files
70 |
71 | inputPaths
72 |
73 | isa
74 | PBXShellScriptBuildPhase
75 | name
76 | Check Pods Manifest.lock
77 | outputPaths
78 |
79 | runOnlyForDeploymentPostprocessing
80 | 0
81 | shellPath
82 | /bin/sh
83 | shellScript
84 | diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null
85 | if [[ $? != 0 ]] ; then
86 | cat << EOM
87 | error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
88 | EOM
89 | exit 1
90 | fi
91 |
92 | showEnvVarsInLog
93 | 0
94 |
95 | CDE058E0A025C6E7308F6ED9
96 |
97 | children
98 |
99 | 34DA35F39B1E845C3BC5908E
100 | FA1918F1128B4101E5FDCFFC
101 |
102 | isa
103 | PBXGroup
104 | name
105 | Pods
106 | sourceTree
107 | <group>
108 |
109 | D0ECAE011ADE2A7700216936
110 |
111 | children
112 |
113 | D0ECAE0C1ADE2A7700216936
114 | D0ECAE261ADE2A7700216936
115 | D0ECAE0B1ADE2A7700216936
116 | CDE058E0A025C6E7308F6ED9
117 | B2A0F1C23F7CE94E54C1FE80
118 |
119 | isa
120 | PBXGroup
121 | sourceTree
122 | <group>
123 |
124 | D0ECAE021ADE2A7700216936
125 |
126 | attributes
127 |
128 | LastUpgradeCheck
129 | 0630
130 | ORGANIZATIONNAME
131 | Peter
132 | TargetAttributes
133 |
134 | D0ECAE091ADE2A7700216936
135 |
136 | CreatedOnToolsVersion
137 | 6.3
138 |
139 | D0ECAE221ADE2A7700216936
140 |
141 | CreatedOnToolsVersion
142 | 6.3
143 | TestTargetID
144 | D0ECAE091ADE2A7700216936
145 |
146 |
147 |
148 | buildConfigurationList
149 | D0ECAE051ADE2A7700216936
150 | compatibilityVersion
151 | Xcode 3.2
152 | developmentRegion
153 | English
154 | hasScannedForEncodings
155 | 0
156 | isa
157 | PBXProject
158 | knownRegions
159 |
160 | en
161 | Base
162 |
163 | mainGroup
164 | D0ECAE011ADE2A7700216936
165 | productRefGroup
166 | D0ECAE0B1ADE2A7700216936
167 | projectDirPath
168 |
169 | projectReferences
170 |
171 | projectRoot
172 |
173 | targets
174 |
175 | D0ECAE091ADE2A7700216936
176 | D0ECAE221ADE2A7700216936
177 |
178 |
179 | D0ECAE051ADE2A7700216936
180 |
181 | buildConfigurations
182 |
183 | D0ECAE2B1ADE2A7700216936
184 | D0ECAE2C1ADE2A7700216936
185 |
186 | defaultConfigurationIsVisible
187 | 0
188 | defaultConfigurationName
189 | Release
190 | isa
191 | XCConfigurationList
192 |
193 | D0ECAE061ADE2A7700216936
194 |
195 | buildActionMask
196 | 2147483647
197 | files
198 |
199 | D0ECAE161ADE2A7700216936
200 | D0ECAE131ADE2A7700216936
201 | D0ECAE101ADE2A7700216936
202 |
203 | isa
204 | PBXSourcesBuildPhase
205 | runOnlyForDeploymentPostprocessing
206 | 0
207 |
208 | D0ECAE071ADE2A7700216936
209 |
210 | buildActionMask
211 | 2147483647
212 | files
213 |
214 | E840267E7C05D8D56D70A116
215 |
216 | isa
217 | PBXFrameworksBuildPhase
218 | runOnlyForDeploymentPostprocessing
219 | 0
220 |
221 | D0ECAE081ADE2A7700216936
222 |
223 | buildActionMask
224 | 2147483647
225 | files
226 |
227 | D0ECAE191ADE2A7700216936
228 | D0ECAE1E1ADE2A7700216936
229 | D0ECAE1B1ADE2A7700216936
230 |
231 | isa
232 | PBXResourcesBuildPhase
233 | runOnlyForDeploymentPostprocessing
234 | 0
235 |
236 | D0ECAE091ADE2A7700216936
237 |
238 | buildConfigurationList
239 | D0ECAE2D1ADE2A7700216936
240 | buildPhases
241 |
242 | BA72B8D23E467E3FF2F65895
243 | D0ECAE061ADE2A7700216936
244 | D0ECAE071ADE2A7700216936
245 | D0ECAE081ADE2A7700216936
246 | 87E8E6D8129D6C3CDA71DE26
247 |
248 | buildRules
249 |
250 | dependencies
251 |
252 | isa
253 | PBXNativeTarget
254 | name
255 | XBServerFramework
256 | productName
257 | XBServerFramework
258 | productReference
259 | D0ECAE0A1ADE2A7700216936
260 | productType
261 | com.apple.product-type.application
262 |
263 | D0ECAE0A1ADE2A7700216936
264 |
265 | explicitFileType
266 | wrapper.application
267 | includeInIndex
268 | 0
269 | isa
270 | PBXFileReference
271 | path
272 | XBServerFramework.app
273 | sourceTree
274 | BUILT_PRODUCTS_DIR
275 |
276 | D0ECAE0B1ADE2A7700216936
277 |
278 | children
279 |
280 | D0ECAE0A1ADE2A7700216936
281 | D0ECAE231ADE2A7700216936
282 |
283 | isa
284 | PBXGroup
285 | name
286 | Products
287 | sourceTree
288 | <group>
289 |
290 | D0ECAE0C1ADE2A7700216936
291 |
292 | children
293 |
294 | D0ECAE111ADE2A7700216936
295 | D0ECAE121ADE2A7700216936
296 | D0ECAE141ADE2A7700216936
297 | D0ECAE151ADE2A7700216936
298 | D0ECAE171ADE2A7700216936
299 | D0ECAE1A1ADE2A7700216936
300 | D0ECAE1C1ADE2A7700216936
301 | D0ECAE0D1ADE2A7700216936
302 |
303 | isa
304 | PBXGroup
305 | path
306 | XBServerFramework
307 | sourceTree
308 | <group>
309 |
310 | D0ECAE0D1ADE2A7700216936
311 |
312 | children
313 |
314 | D0ECAE0E1ADE2A7700216936
315 | D0ECAE0F1ADE2A7700216936
316 |
317 | isa
318 | PBXGroup
319 | name
320 | Supporting Files
321 | sourceTree
322 | <group>
323 |
324 | D0ECAE0E1ADE2A7700216936
325 |
326 | isa
327 | PBXFileReference
328 | lastKnownFileType
329 | text.plist.xml
330 | path
331 | Info.plist
332 | sourceTree
333 | <group>
334 |
335 | D0ECAE0F1ADE2A7700216936
336 |
337 | isa
338 | PBXFileReference
339 | lastKnownFileType
340 | sourcecode.c.objc
341 | path
342 | main.m
343 | sourceTree
344 | <group>
345 |
346 | D0ECAE101ADE2A7700216936
347 |
348 | fileRef
349 | D0ECAE0F1ADE2A7700216936
350 | isa
351 | PBXBuildFile
352 |
353 | D0ECAE111ADE2A7700216936
354 |
355 | isa
356 | PBXFileReference
357 | lastKnownFileType
358 | sourcecode.c.h
359 | path
360 | AppDelegate.h
361 | sourceTree
362 | <group>
363 |
364 | D0ECAE121ADE2A7700216936
365 |
366 | isa
367 | PBXFileReference
368 | lastKnownFileType
369 | sourcecode.c.objc
370 | path
371 | AppDelegate.m
372 | sourceTree
373 | <group>
374 |
375 | D0ECAE131ADE2A7700216936
376 |
377 | fileRef
378 | D0ECAE121ADE2A7700216936
379 | isa
380 | PBXBuildFile
381 |
382 | D0ECAE141ADE2A7700216936
383 |
384 | isa
385 | PBXFileReference
386 | lastKnownFileType
387 | sourcecode.c.h
388 | path
389 | ViewController.h
390 | sourceTree
391 | <group>
392 |
393 | D0ECAE151ADE2A7700216936
394 |
395 | isa
396 | PBXFileReference
397 | lastKnownFileType
398 | sourcecode.c.objc
399 | path
400 | ViewController.m
401 | sourceTree
402 | <group>
403 |
404 | D0ECAE161ADE2A7700216936
405 |
406 | fileRef
407 | D0ECAE151ADE2A7700216936
408 | isa
409 | PBXBuildFile
410 |
411 | D0ECAE171ADE2A7700216936
412 |
413 | children
414 |
415 | D0ECAE181ADE2A7700216936
416 |
417 | isa
418 | PBXVariantGroup
419 | name
420 | Main.storyboard
421 | sourceTree
422 | <group>
423 |
424 | D0ECAE181ADE2A7700216936
425 |
426 | isa
427 | PBXFileReference
428 | lastKnownFileType
429 | file.storyboard
430 | name
431 | Base
432 | path
433 | Base.lproj/Main.storyboard
434 | sourceTree
435 | <group>
436 |
437 | D0ECAE191ADE2A7700216936
438 |
439 | fileRef
440 | D0ECAE171ADE2A7700216936
441 | isa
442 | PBXBuildFile
443 |
444 | D0ECAE1A1ADE2A7700216936
445 |
446 | isa
447 | PBXFileReference
448 | lastKnownFileType
449 | folder.assetcatalog
450 | path
451 | Images.xcassets
452 | sourceTree
453 | <group>
454 |
455 | D0ECAE1B1ADE2A7700216936
456 |
457 | fileRef
458 | D0ECAE1A1ADE2A7700216936
459 | isa
460 | PBXBuildFile
461 |
462 | D0ECAE1C1ADE2A7700216936
463 |
464 | children
465 |
466 | D0ECAE1D1ADE2A7700216936
467 |
468 | isa
469 | PBXVariantGroup
470 | name
471 | LaunchScreen.xib
472 | sourceTree
473 | <group>
474 |
475 | D0ECAE1D1ADE2A7700216936
476 |
477 | isa
478 | PBXFileReference
479 | lastKnownFileType
480 | file.xib
481 | name
482 | Base
483 | path
484 | Base.lproj/LaunchScreen.xib
485 | sourceTree
486 | <group>
487 |
488 | D0ECAE1E1ADE2A7700216936
489 |
490 | fileRef
491 | D0ECAE1C1ADE2A7700216936
492 | isa
493 | PBXBuildFile
494 |
495 | D0ECAE1F1ADE2A7700216936
496 |
497 | buildActionMask
498 | 2147483647
499 | files
500 |
501 | D0ECAE2A1ADE2A7700216936
502 |
503 | isa
504 | PBXSourcesBuildPhase
505 | runOnlyForDeploymentPostprocessing
506 | 0
507 |
508 | D0ECAE201ADE2A7700216936
509 |
510 | buildActionMask
511 | 2147483647
512 | files
513 |
514 | isa
515 | PBXFrameworksBuildPhase
516 | runOnlyForDeploymentPostprocessing
517 | 0
518 |
519 | D0ECAE211ADE2A7700216936
520 |
521 | buildActionMask
522 | 2147483647
523 | files
524 |
525 | isa
526 | PBXResourcesBuildPhase
527 | runOnlyForDeploymentPostprocessing
528 | 0
529 |
530 | D0ECAE221ADE2A7700216936
531 |
532 | buildConfigurationList
533 | D0ECAE301ADE2A7700216936
534 | buildPhases
535 |
536 | D0ECAE1F1ADE2A7700216936
537 | D0ECAE201ADE2A7700216936
538 | D0ECAE211ADE2A7700216936
539 |
540 | buildRules
541 |
542 | dependencies
543 |
544 | D0ECAE251ADE2A7700216936
545 |
546 | isa
547 | PBXNativeTarget
548 | name
549 | XBServerFrameworkTests
550 | productName
551 | XBServerFrameworkTests
552 | productReference
553 | D0ECAE231ADE2A7700216936
554 | productType
555 | com.apple.product-type.bundle.unit-test
556 |
557 | D0ECAE231ADE2A7700216936
558 |
559 | explicitFileType
560 | wrapper.cfbundle
561 | includeInIndex
562 | 0
563 | isa
564 | PBXFileReference
565 | path
566 | XBServerFrameworkTests.xctest
567 | sourceTree
568 | BUILT_PRODUCTS_DIR
569 |
570 | D0ECAE241ADE2A7700216936
571 |
572 | containerPortal
573 | D0ECAE021ADE2A7700216936
574 | isa
575 | PBXContainerItemProxy
576 | proxyType
577 | 1
578 | remoteGlobalIDString
579 | D0ECAE091ADE2A7700216936
580 | remoteInfo
581 | XBServerFramework
582 |
583 | D0ECAE251ADE2A7700216936
584 |
585 | isa
586 | PBXTargetDependency
587 | target
588 | D0ECAE091ADE2A7700216936
589 | targetProxy
590 | D0ECAE241ADE2A7700216936
591 |
592 | D0ECAE261ADE2A7700216936
593 |
594 | children
595 |
596 | D0ECAE291ADE2A7700216936
597 | D0ECAE271ADE2A7700216936
598 |
599 | isa
600 | PBXGroup
601 | path
602 | XBServerFrameworkTests
603 | sourceTree
604 | <group>
605 |
606 | D0ECAE271ADE2A7700216936
607 |
608 | children
609 |
610 | D0ECAE281ADE2A7700216936
611 |
612 | isa
613 | PBXGroup
614 | name
615 | Supporting Files
616 | sourceTree
617 | <group>
618 |
619 | D0ECAE281ADE2A7700216936
620 |
621 | isa
622 | PBXFileReference
623 | lastKnownFileType
624 | text.plist.xml
625 | path
626 | Info.plist
627 | sourceTree
628 | <group>
629 |
630 | D0ECAE291ADE2A7700216936
631 |
632 | isa
633 | PBXFileReference
634 | lastKnownFileType
635 | sourcecode.c.objc
636 | path
637 | XBServerFrameworkTests.m
638 | sourceTree
639 | <group>
640 |
641 | D0ECAE2A1ADE2A7700216936
642 |
643 | fileRef
644 | D0ECAE291ADE2A7700216936
645 | isa
646 | PBXBuildFile
647 |
648 | D0ECAE2B1ADE2A7700216936
649 |
650 | buildSettings
651 |
652 | ALWAYS_SEARCH_USER_PATHS
653 | NO
654 | CLANG_CXX_LANGUAGE_STANDARD
655 | gnu++0x
656 | CLANG_CXX_LIBRARY
657 | libc++
658 | CLANG_ENABLE_MODULES
659 | YES
660 | CLANG_ENABLE_OBJC_ARC
661 | YES
662 | CLANG_WARN_BOOL_CONVERSION
663 | YES
664 | CLANG_WARN_CONSTANT_CONVERSION
665 | YES
666 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE
667 | YES_ERROR
668 | CLANG_WARN_EMPTY_BODY
669 | YES
670 | CLANG_WARN_ENUM_CONVERSION
671 | YES
672 | CLANG_WARN_INT_CONVERSION
673 | YES
674 | CLANG_WARN_OBJC_ROOT_CLASS
675 | YES_ERROR
676 | CLANG_WARN_UNREACHABLE_CODE
677 | YES
678 | CLANG_WARN__DUPLICATE_METHOD_MATCH
679 | YES
680 | CODE_SIGN_IDENTITY[sdk=iphoneos*]
681 | iPhone Developer
682 | COPY_PHASE_STRIP
683 | NO
684 | DEBUG_INFORMATION_FORMAT
685 | dwarf-with-dsym
686 | ENABLE_STRICT_OBJC_MSGSEND
687 | YES
688 | GCC_C_LANGUAGE_STANDARD
689 | gnu99
690 | GCC_DYNAMIC_NO_PIC
691 | NO
692 | GCC_NO_COMMON_BLOCKS
693 | YES
694 | GCC_OPTIMIZATION_LEVEL
695 | 0
696 | GCC_PREPROCESSOR_DEFINITIONS
697 |
698 | DEBUG=1
699 | $(inherited)
700 |
701 | GCC_SYMBOLS_PRIVATE_EXTERN
702 | NO
703 | GCC_WARN_64_TO_32_BIT_CONVERSION
704 | YES
705 | GCC_WARN_ABOUT_RETURN_TYPE
706 | YES_ERROR
707 | GCC_WARN_UNDECLARED_SELECTOR
708 | YES
709 | GCC_WARN_UNINITIALIZED_AUTOS
710 | YES_AGGRESSIVE
711 | GCC_WARN_UNUSED_FUNCTION
712 | YES
713 | GCC_WARN_UNUSED_VARIABLE
714 | YES
715 | IPHONEOS_DEPLOYMENT_TARGET
716 | 8.3
717 | MTL_ENABLE_DEBUG_INFO
718 | YES
719 | ONLY_ACTIVE_ARCH
720 | YES
721 | SDKROOT
722 | iphoneos
723 |
724 | isa
725 | XCBuildConfiguration
726 | name
727 | Debug
728 |
729 | D0ECAE2C1ADE2A7700216936
730 |
731 | buildSettings
732 |
733 | ALWAYS_SEARCH_USER_PATHS
734 | NO
735 | CLANG_CXX_LANGUAGE_STANDARD
736 | gnu++0x
737 | CLANG_CXX_LIBRARY
738 | libc++
739 | CLANG_ENABLE_MODULES
740 | YES
741 | CLANG_ENABLE_OBJC_ARC
742 | YES
743 | CLANG_WARN_BOOL_CONVERSION
744 | YES
745 | CLANG_WARN_CONSTANT_CONVERSION
746 | YES
747 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE
748 | YES_ERROR
749 | CLANG_WARN_EMPTY_BODY
750 | YES
751 | CLANG_WARN_ENUM_CONVERSION
752 | YES
753 | CLANG_WARN_INT_CONVERSION
754 | YES
755 | CLANG_WARN_OBJC_ROOT_CLASS
756 | YES_ERROR
757 | CLANG_WARN_UNREACHABLE_CODE
758 | YES
759 | CLANG_WARN__DUPLICATE_METHOD_MATCH
760 | YES
761 | CODE_SIGN_IDENTITY[sdk=iphoneos*]
762 | iPhone Developer
763 | COPY_PHASE_STRIP
764 | NO
765 | DEBUG_INFORMATION_FORMAT
766 | dwarf-with-dsym
767 | ENABLE_NS_ASSERTIONS
768 | NO
769 | ENABLE_STRICT_OBJC_MSGSEND
770 | YES
771 | GCC_C_LANGUAGE_STANDARD
772 | gnu99
773 | GCC_NO_COMMON_BLOCKS
774 | YES
775 | GCC_WARN_64_TO_32_BIT_CONVERSION
776 | YES
777 | GCC_WARN_ABOUT_RETURN_TYPE
778 | YES_ERROR
779 | GCC_WARN_UNDECLARED_SELECTOR
780 | YES
781 | GCC_WARN_UNINITIALIZED_AUTOS
782 | YES_AGGRESSIVE
783 | GCC_WARN_UNUSED_FUNCTION
784 | YES
785 | GCC_WARN_UNUSED_VARIABLE
786 | YES
787 | IPHONEOS_DEPLOYMENT_TARGET
788 | 8.3
789 | MTL_ENABLE_DEBUG_INFO
790 | NO
791 | SDKROOT
792 | iphoneos
793 | VALIDATE_PRODUCT
794 | YES
795 |
796 | isa
797 | XCBuildConfiguration
798 | name
799 | Release
800 |
801 | D0ECAE2D1ADE2A7700216936
802 |
803 | buildConfigurations
804 |
805 | D0ECAE2E1ADE2A7700216936
806 | D0ECAE2F1ADE2A7700216936
807 |
808 | defaultConfigurationIsVisible
809 | 0
810 | isa
811 | XCConfigurationList
812 |
813 | D0ECAE2E1ADE2A7700216936
814 |
815 | baseConfigurationReference
816 | 34DA35F39B1E845C3BC5908E
817 | buildSettings
818 |
819 | ASSETCATALOG_COMPILER_APPICON_NAME
820 | AppIcon
821 | INFOPLIST_FILE
822 | XBServerFramework/Info.plist
823 | LD_RUNPATH_SEARCH_PATHS
824 | $(inherited) @executable_path/Frameworks
825 | PRODUCT_NAME
826 | $(TARGET_NAME)
827 |
828 | isa
829 | XCBuildConfiguration
830 | name
831 | Debug
832 |
833 | D0ECAE2F1ADE2A7700216936
834 |
835 | baseConfigurationReference
836 | FA1918F1128B4101E5FDCFFC
837 | buildSettings
838 |
839 | ASSETCATALOG_COMPILER_APPICON_NAME
840 | AppIcon
841 | INFOPLIST_FILE
842 | XBServerFramework/Info.plist
843 | LD_RUNPATH_SEARCH_PATHS
844 | $(inherited) @executable_path/Frameworks
845 | PRODUCT_NAME
846 | $(TARGET_NAME)
847 |
848 | isa
849 | XCBuildConfiguration
850 | name
851 | Release
852 |
853 | D0ECAE301ADE2A7700216936
854 |
855 | buildConfigurations
856 |
857 | D0ECAE311ADE2A7700216936
858 | D0ECAE321ADE2A7700216936
859 |
860 | defaultConfigurationIsVisible
861 | 0
862 | isa
863 | XCConfigurationList
864 |
865 | D0ECAE311ADE2A7700216936
866 |
867 | buildSettings
868 |
869 | BUNDLE_LOADER
870 | $(TEST_HOST)
871 | FRAMEWORK_SEARCH_PATHS
872 |
873 | $(SDKROOT)/Developer/Library/Frameworks
874 | $(inherited)
875 |
876 | GCC_PREPROCESSOR_DEFINITIONS
877 |
878 | DEBUG=1
879 | $(inherited)
880 |
881 | INFOPLIST_FILE
882 | XBServerFrameworkTests/Info.plist
883 | LD_RUNPATH_SEARCH_PATHS
884 | $(inherited) @executable_path/Frameworks @loader_path/Frameworks
885 | PRODUCT_NAME
886 | $(TARGET_NAME)
887 | TEST_HOST
888 | $(BUILT_PRODUCTS_DIR)/XBServerFramework.app/XBServerFramework
889 |
890 | isa
891 | XCBuildConfiguration
892 | name
893 | Debug
894 |
895 | D0ECAE321ADE2A7700216936
896 |
897 | buildSettings
898 |
899 | BUNDLE_LOADER
900 | $(TEST_HOST)
901 | FRAMEWORK_SEARCH_PATHS
902 |
903 | $(SDKROOT)/Developer/Library/Frameworks
904 | $(inherited)
905 |
906 | INFOPLIST_FILE
907 | XBServerFrameworkTests/Info.plist
908 | LD_RUNPATH_SEARCH_PATHS
909 | $(inherited) @executable_path/Frameworks @loader_path/Frameworks
910 | PRODUCT_NAME
911 | $(TARGET_NAME)
912 | TEST_HOST
913 | $(BUILT_PRODUCTS_DIR)/XBServerFramework.app/XBServerFramework
914 |
915 | isa
916 | XCBuildConfiguration
917 | name
918 | Release
919 |
920 | E17E7F197403A238AACA41ED
921 |
922 | explicitFileType
923 | archive.ar
924 | includeInIndex
925 | 0
926 | isa
927 | PBXFileReference
928 | path
929 | libPods.a
930 | sourceTree
931 | BUILT_PRODUCTS_DIR
932 |
933 | E840267E7C05D8D56D70A116
934 |
935 | fileRef
936 | E17E7F197403A238AACA41ED
937 | isa
938 | PBXBuildFile
939 |
940 | FA1918F1128B4101E5FDCFFC
941 |
942 | includeInIndex
943 | 1
944 | isa
945 | PBXFileReference
946 | lastKnownFileType
947 | text.xcconfig
948 | name
949 | Pods.release.xcconfig
950 | path
951 | Pods/Target Support Files/Pods/Pods.release.xcconfig
952 | sourceTree
953 | <group>
954 |
955 |
956 | rootObject
957 | D0ECAE021ADE2A7700216936
958 |
959 |
960 |
--------------------------------------------------------------------------------
/XBServerFramework.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/XBServerFramework.xcodeproj/xcuserdata/Peter.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/XBServerFramework.xcodeproj/xcuserdata/Peter.xcuserdatad/xcschemes/XBServerFramework.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
38 |
39 |
44 |
45 |
47 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
65 |
66 |
75 |
77 |
83 |
84 |
85 |
86 |
87 |
88 |
94 |
96 |
102 |
103 |
104 |
105 |
107 |
108 |
111 |
112 |
113 |
--------------------------------------------------------------------------------
/XBServerFramework.xcodeproj/xcuserdata/Peter.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | XBServerFramework.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | D0ECAE091ADE2A7700216936
16 |
17 | primary
18 |
19 |
20 | D0ECAE221ADE2A7700216936
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/XBServerFramework.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/XBServerFramework.xcworkspace/xcshareddata/XBServerFramework.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | 2E9F0B50-3B1A-43A5-909E-A71698CE8BFF
9 | IDESourceControlProjectName
10 | XBServerFramework
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | 750ED996B0F7328903B5317BF65C00379528188D
14 | github.com:JxbSir/XBServerFramework.git
15 |
16 | IDESourceControlProjectPath
17 | XBServerFramework.xcworkspace
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | 750ED996B0F7328903B5317BF65C00379528188D
21 | ..
22 |
23 | IDESourceControlProjectURL
24 | github.com:JxbSir/XBServerFramework.git
25 | IDESourceControlProjectVersion
26 | 111
27 | IDESourceControlProjectWCCIdentifier
28 | 750ED996B0F7328903B5317BF65C00379528188D
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | 750ED996B0F7328903B5317BF65C00379528188D
36 | IDESourceControlWCCName
37 | XBServerFramework
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/XBServerFramework.xcworkspace/xcuserdata/Peter.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/XBServerFramework/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // XBServerFramework
4 | //
5 | // Created by Peter on 15/4/15.
6 | // Copyright (c) 2015年 Peter. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/XBServerFramework/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // XBServerFramework
4 | //
5 | // Created by Peter on 15/4/15.
6 | // Copyright (c) 2015年 Peter. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 | - (void)applicationWillResignActive:(UIApplication *)application {
24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
26 | }
27 |
28 | - (void)applicationDidEnterBackground:(UIApplication *)application {
29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31 | }
32 |
33 | - (void)applicationWillEnterForeground:(UIApplication *)application {
34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
35 | }
36 |
37 | - (void)applicationDidBecomeActive:(UIApplication *)application {
38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
39 | }
40 |
41 | - (void)applicationWillTerminate:(UIApplication *)application {
42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/XBServerFramework/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
20 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/XBServerFramework/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/XBServerFramework/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/XBServerFramework/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | net.fanwa.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/XBServerFramework/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // XBServerFramework
4 | //
5 | // Created by Peter on 15/4/15.
6 | // Copyright (c) 2015年 Peter. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/XBServerFramework/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // XBServerFramework
4 | //
5 | // Created by Peter on 15/4/15.
6 | // Copyright (c) 2015年 Peter. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "ZipArchive.h"
11 |
12 | @interface ViewController ()
13 |
14 | @end
15 |
16 | @implementation ViewController
17 |
18 | - (void)viewDidLoad {
19 | [super viewDidLoad];
20 | // Do any additional setup after loading the view, typically from a nib.
21 |
22 | ///当framework加载过后,必须重启app,所以:启动-更新-加载
23 |
24 | NSLog(@"%@",NSHomeDirectory());
25 |
26 | UILabel* lblTip = [[UILabel alloc] initWithFrame:CGRectMake(0, 60, [UIScreen mainScreen].bounds.size.width, 100)];
27 | lblTip.text = @"当framework加载过后,必须重启app,所以:启动-更新-加载";
28 | lblTip.numberOfLines = 0;
29 | lblTip.textAlignment = NSTextAlignmentCenter;
30 | lblTip.lineBreakMode = NSLineBreakByCharWrapping;
31 | [self.view addSubview:lblTip];
32 |
33 |
34 | UIButton *btnfw1 = [[UIButton alloc] initWithFrame:CGRectMake(100, 200, 200, 44)];
35 | [btnfw1 setTitle:@"下载framework1" forState:UIControlStateNormal];
36 | [btnfw1 addTarget:self action:@selector(downloadFramework1) forControlEvents:UIControlEventTouchUpInside];
37 | btnfw1.backgroundColor = [UIColor redColor];
38 | [self.view addSubview:btnfw1];
39 |
40 | UIButton *btnfw2 = [[UIButton alloc] initWithFrame:CGRectMake(100, 300, 200, 44)];
41 | [btnfw2 setTitle:@"下载framework2" forState:UIControlStateNormal];
42 | [btnfw2 addTarget:self action:@selector(downloadFramework2) forControlEvents:UIControlEventTouchUpInside];
43 | btnfw2.backgroundColor = [UIColor redColor];
44 | [self.view addSubview:btnfw2];
45 |
46 | UIButton *btnTest1 = [[UIButton alloc] initWithFrame:CGRectMake(100, 400, 200, 44)];
47 | [btnTest1 setTitle:@"验证framework结果" forState:UIControlStateNormal];
48 | btnTest1.backgroundColor = [UIColor redColor];
49 | [btnTest1 addTarget:self action:@selector(testFramework) forControlEvents:UIControlEventTouchUpInside];
50 | [self.view addSubview:btnTest1];
51 |
52 |
53 |
54 | }
55 |
56 | - (void)downloadFramework1
57 | {
58 | NSMutableURLRequest* req = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"http://7xi9xs.com1.z0.glb.clouddn.com/xb.zip?attname=&e=1429164961&token=wSmLCtfuHpXvG_r16jRMQNMDOeduvh_12foLm-hY:lAqwVSJnZJKrww75NKC4FKoUg8o"]];
59 | NSURLResponse* respone = nil;
60 | NSError* error = nil;
61 | NSData* data = [NSURLConnection sendSynchronousRequest:req returningResponse:&respone error:&error];
62 |
63 |
64 | NSString* file = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/tmp.zip"];
65 | [data writeToFile:file atomically:YES];
66 |
67 | ZipArchive *zip = [[ZipArchive alloc] init];
68 | if( [zip UnzipOpenFile:file] )
69 | {
70 | BOOL ret = [zip UnzipFileTo:[NSHomeDirectory() stringByAppendingPathComponent:@"Documents/tmp"] overWrite:YES];
71 | if( ret )
72 | {
73 | [[NSFileManager defaultManager] removeItemAtPath:[NSHomeDirectory() stringByAppendingPathComponent:@"/Documents/XBPrivate.framework"] error:nil];
74 | [[NSFileManager defaultManager]copyItemAtPath:[NSHomeDirectory() stringByAppendingPathComponent:@"/Documents/tmp/XBPrivate.framework"] toPath:[NSHomeDirectory() stringByAppendingPathComponent:@"/Documents/XBPrivate.framework"] error:nil];
75 | }
76 | [zip UnzipCloseFile];
77 | [[NSFileManager defaultManager] removeItemAtPath:[NSHomeDirectory() stringByAppendingPathComponent:@"/Documents/tmp"] error:nil];
78 | }
79 | [[NSFileManager defaultManager] removeItemAtPath:[NSHomeDirectory() stringByAppendingPathComponent:@"/Documents/tmp.zip"] error:nil];
80 |
81 |
82 | [[[UIAlertView alloc] initWithTitle:@"" message:@"下载完成" delegate:nil cancelButtonTitle:@"ok" otherButtonTitles: nil] show];
83 | }
84 |
85 | - (void)downloadFramework2
86 | {
87 | NSMutableURLRequest* req = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"http://7xi9xs.com1.z0.glb.clouddn.com/xb2.zip?attname=&e=1429165233&token=wSmLCtfuHpXvG_r16jRMQNMDOeduvh_12foLm-hY:LiuyB1UUoU7awGyuX4vooT0f2KA"]];
88 | NSURLResponse* respone = nil;
89 | NSError* error = nil;
90 | NSData* data = [NSURLConnection sendSynchronousRequest:req returningResponse:&respone error:&error];
91 |
92 |
93 | NSString* file = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/tmp2.zip"];
94 | [data writeToFile:file atomically:YES];
95 |
96 |
97 | ZipArchive *zip = [[ZipArchive alloc] init];
98 | if( [zip UnzipOpenFile:file] )
99 | {
100 | BOOL ret = [zip UnzipFileTo:[NSHomeDirectory() stringByAppendingPathComponent:@"Documents/tmp"] overWrite:YES];
101 | if( ret )
102 | {
103 | [[NSFileManager defaultManager] removeItemAtPath:[NSHomeDirectory() stringByAppendingPathComponent:@"/Documents/XBPrivate.framework"] error:nil];
104 | [[NSFileManager defaultManager]copyItemAtPath:[NSHomeDirectory() stringByAppendingPathComponent:@"/Documents/tmp/XBPrivate.framework"] toPath:[NSHomeDirectory() stringByAppendingPathComponent:@"/Documents/XBPrivate.framework"] error:nil];
105 | }
106 | [zip UnzipCloseFile];
107 | [[NSFileManager defaultManager] removeItemAtPath:[NSHomeDirectory() stringByAppendingPathComponent:@"/Documents/tmp"] error:nil];
108 | }
109 | [[NSFileManager defaultManager] removeItemAtPath:file error:nil];
110 |
111 | [[[UIAlertView alloc] initWithTitle:@"" message:@"下载完成" delegate:nil cancelButtonTitle:@"ok" otherButtonTitles: nil] show];
112 |
113 |
114 | }
115 |
116 | -(void)testFramework
117 | {
118 | NSArray* paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES);
119 | NSString *documentDirectory = nil;
120 | if ([paths count] != 0)
121 | documentDirectory = [paths objectAtIndex:0];
122 |
123 | //拼接我们放到document中的framework路径
124 | NSString *libName = @"XBPrivate.framework";
125 | NSString *destLibPath = [documentDirectory stringByAppendingPathComponent:libName];
126 |
127 | //判断一下有没有这个文件的存在 如果没有直接跳出
128 | NSFileManager *manager = [NSFileManager defaultManager];
129 | if (![manager fileExistsAtPath:destLibPath]) {
130 | NSLog(@"There isn't have the file");
131 | [[[UIAlertView alloc] initWithTitle:@"" message:@"There isn't have the file" delegate:nil cancelButtonTitle:@"ok" otherButtonTitles: nil] show];
132 | return;
133 | }
134 |
135 | //复制到程序中
136 | NSError *error = nil;
137 |
138 | NSBundle *frameworkBundle = [NSBundle bundleWithPath:destLibPath];
139 | if (frameworkBundle && [frameworkBundle load]) {
140 | NSLog(@"bundle load framework success.");
141 | }else {
142 | NSLog(@"bundle load framework err:%@",error);
143 | [[[UIAlertView alloc] initWithTitle:@"" message:@"bundle load framework error" delegate:nil cancelButtonTitle:@"ok" otherButtonTitles: nil] show];
144 | return;
145 | }
146 |
147 | Class pacteraClass = NSClassFromString(@"XBTest");
148 | if (!pacteraClass) {
149 | NSLog(@"Unable to get TestDylib class");
150 | [[[UIAlertView alloc] initWithTitle:@"" message:@"Unable to get TestDylib class" delegate:nil cancelButtonTitle:@"ok" otherButtonTitles: nil] show];
151 | return;
152 | }
153 |
154 | NSObject *pacteraObject = [pacteraClass new];//必须new
155 | NSString* test = [pacteraObject performSelector:@selector(getTest) withObject:nil withObject:frameworkBundle];
156 | [[[UIAlertView alloc] initWithTitle:@"" message:test delegate:nil cancelButtonTitle:@"ok" otherButtonTitles: nil] show];
157 |
158 | [frameworkBundle unload];
159 |
160 | }
161 | @end
162 |
--------------------------------------------------------------------------------
/XBServerFramework/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // XBServerFramework
4 | //
5 | // Created by Peter on 15/4/15.
6 | // Copyright (c) 2015年 Peter. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/XBServerFrameworkTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | net.fanwa.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/XBServerFrameworkTests/XBServerFrameworkTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // XBServerFrameworkTests.m
3 | // XBServerFrameworkTests
4 | //
5 | // Created by Peter on 15/4/15.
6 | // Copyright (c) 2015年 Peter. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface XBServerFrameworkTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation XBServerFrameworkTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------