From 05bfc79cf4f16cde6c28280868e6d209462a6f1f Mon Sep 17 00:00:00 2001 From: Damon Date: Tue, 28 May 2024 13:36:03 +0800 Subject: [PATCH] rename --- ...zxkit.podspec => DDKitSwift-Netfox.podspec | 6 +- .../project.pbxproj | 68 +- .../contents.xcworkspacedata | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../UserInterfaceState.xcuserstate | Bin 0 -> 16782 bytes .../xcschemes/xcschememanagement.plist | 7 +- .../contents.xcworkspacedata | 2 +- .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../UserInterfaceState.xcuserstate | Bin 0 -> 18037 bytes .../AppDelegate.swift | 2 +- .../AccentColor.colorset/Contents.json | 0 .../AppIcon.appiconset/Contents.json | 0 .../Assets.xcassets/Contents.json | 0 .../Base.lproj/LaunchScreen.storyboard | 0 .../Base.lproj/Main.storyboard | 0 .../Info.plist | 0 .../SceneDelegate.swift | 2 +- .../ViewController.swift | 10 +- example/Podfile | 6 +- example/Podfile.lock | 48 +- .../Pods/{ZXKitCore => DDKitSwift}/LICENSE | 0 example/Pods/DDKitSwift/README.md | 173 + .../pod/DDKitSwift.swift} | 77 +- .../DDKitSwiftCollectionViewHeaderView.swift} | 10 +- .../pod/DDKitSwiftFloatWindow.swift} | 60 +- .../DDKitSwiftPluginCollectionViewCell.swift} | 16 +- .../pod/DDKitSwiftPluginProtocol.swift | 44 + .../pod/DDKitSwiftUIConfig.swift} | 28 +- .../pod/DDKitSwiftWindow.swift} | 52 +- .../pod/assets/icon/icon_close@3x.png | Bin .../pod/assets/icon/icon_home@3x.png | Bin .../pod/assets/icon/icon_list@3x.png | Bin .../pod/assets/icon/icon_notice@3x.png | Bin .../pod/assets/icon/icon_search@3x.png | Bin .../pod/assets/icon/icon_setting@3x.png | Bin .../pod/assets/icon/icon_share@3x.png | Bin .../pod/assets/icon/logger_logo@3x.png | Bin .../pod/assets/icon/zx_logo@3x.png | Bin .../localizable/en.lproj/Localizable.strings | 2 +- .../zh-Hans.lproj/Localizable.strings | 2 +- .../pod/extend/DDLoggerSwift+ddkit.swift | 67 + .../pod/extend/ShareTools.swift | 6 +- .../pod/menu/CircleMenu.swift | 0 .../CircleMenuButton/CircleMenuButton.swift | 4 +- .../CircleMenuLoader/CircleMenuLoader.swift | 0 .../pod/menu/CircleMenuMaskView.swift | 2 +- .../{ZXKitLogger => DDLoggerSwift}/LICENSE | 0 example/Pods/DDLoggerSwift/README.md | 355 +++ .../pod/DDLoggerSwift.swift} | 172 +- .../pod/DDLoggerSwiftFloatWindow.swift} | 20 +- .../pod/DDLoggerSwiftItem.swift} | 27 +- .../pod/DDLoggerSwiftPickerWindow.swift} | 38 +- .../pod/DDLoggerSwiftWindow.swift} | 198 +- .../pod/HDSqliteTools.swift | 43 +- .../pod/LogContent.swift | 18 +- .../pod/assets/icon/icon_analyse.png | Bin .../pod/assets/icon/icon_back.png | Bin .../pod/assets/icon/icon_copy.png | Bin .../pod/assets/icon/icon_decrypt.png | Bin .../pod/assets/icon/icon_delete.png | Bin .../pod/assets/icon/icon_exit.png | Bin .../pod/assets/icon/icon_hide.png | Bin .../pod/assets/icon/icon_normal_back.png | Bin .../pod/assets/icon/icon_scale.png | Bin .../pod/assets/icon/icon_scroll.png | Bin .../pod/assets/icon/icon_search.png | Bin .../pod/assets/icon/icon_share.png | Bin .../pod/assets/icon/icon_upload.png | Bin .../localizable/en.lproj/Localizable.strings | 4 +- .../zh-Hans.lproj/Localizable.strings | 4 +- .../view/DDLoggerSwiftFilterTypeView.swift} | 20 +- ...DDLoggerSwiftMenuCollectionViewCell.swift} | 16 +- .../pod/view/DDLoggerSwiftMenuView.swift} | 22 +- .../view/DDLoggerSwiftTableViewCell.swift} | 10 +- example/Pods/{ZXKitUtil => DDUtils}/LICENSE | 0 example/Pods/DDUtils/README.md | 144 + .../pod/DDUtils.swift} | 14 +- example/Pods/DDUtils/pod/ZXKitNameSpace.swift | 37 + .../pod/subspec/UI/DDUtils+AppStore.swift} | 94 +- .../pod/subspec/UI/DDUtils+UI.swift} | 54 +- .../pod/subspec/UI}/UIColor+zx.swift | 10 +- .../pod/subspec/UI}/UIImage+zx.swift | 18 +- .../pod/subspec/UI}/UIView+zx.swift | 8 +- .../pod/subspec/utils/DDUtils+file.swift} | 12 +- .../pod/subspec/utils/DDUtils+media.swift} | 10 +- .../pod/subspec/utils/DDUtils+system.swift | 86 + .../pod/subspec/utils}/Data+zx.swift | 50 +- .../pod/subspec/utils}/Date+zx.swift | 8 +- .../pod/subspec/utils}/String+zx.swift | 62 +- example/Pods/Manifest.lock | 48 +- example/Pods/Pods.xcodeproj/project.pbxproj | 2091 ++++++------- ...cscheme => DDKitSwift-DDKitSwift.xcscheme} | 8 +- ...ZXKitCore.xcscheme => DDKitSwift.xcscheme} | 8 +- ...e => DDLoggerSwift-DDLoggerSwift.xcscheme} | 8 +- ...Logger.xcscheme => DDLoggerSwift.xcscheme} | 8 +- .../{ZXKitUtil.xcscheme => DDUtils.xcscheme} | 8 +- ...scheme => Pods-DDKitSwift-Netfox.xcscheme} | 8 +- .../ZXKitLogger-ZXKitLogger.xcscheme | 58 - .../xcschemes/netfox.xcscheme | 2 +- .../xcschemes/xcschememanagement.plist | 29 +- example/Pods/SSZipArchive/LICENSE.txt | 20 - example/Pods/SSZipArchive/README.md | 88 - .../SSZipArchive/SSZipArchive/SSZipArchive.h | 165 - .../SSZipArchive/SSZipArchive/SSZipArchive.m | 1433 --------- .../SSZipArchive/SSZipArchive/SSZipCommon.h | 68 - .../SSZipArchive/include/ZipArchive.h | 25 - .../SSZipArchive/SSZipArchive/minizip/mz.h | 274 -- .../SSZipArchive/minizip/mz_compat.c | 991 ------ .../SSZipArchive/minizip/mz_compat.h | 250 -- .../SSZipArchive/minizip/mz_crypt.c | 196 -- .../SSZipArchive/minizip/mz_crypt.h | 65 - .../SSZipArchive/minizip/mz_crypt_apple.c | 487 --- .../SSZipArchive/SSZipArchive/minizip/mz_os.c | 354 --- .../SSZipArchive/SSZipArchive/minizip/mz_os.h | 175 -- .../SSZipArchive/minizip/mz_os_posix.c | 367 --- .../SSZipArchive/minizip/mz_strm.c | 560 ---- .../SSZipArchive/minizip/mz_strm.h | 132 - .../SSZipArchive/minizip/mz_strm_buf.c | 385 --- .../SSZipArchive/minizip/mz_strm_buf.h | 42 - .../SSZipArchive/minizip/mz_strm_mem.c | 272 -- .../SSZipArchive/minizip/mz_strm_mem.h | 48 - .../SSZipArchive/minizip/mz_strm_os.h | 40 - .../SSZipArchive/minizip/mz_strm_os_posix.c | 206 -- .../SSZipArchive/minizip/mz_strm_pkcrypt.c | 338 -- .../SSZipArchive/minizip/mz_strm_pkcrypt.h | 46 - .../SSZipArchive/minizip/mz_strm_split.c | 438 --- .../SSZipArchive/minizip/mz_strm_split.h | 43 - .../SSZipArchive/minizip/mz_strm_wzaes.c | 362 --- .../SSZipArchive/minizip/mz_strm_wzaes.h | 46 - .../SSZipArchive/minizip/mz_strm_zlib.c | 393 --- .../SSZipArchive/minizip/mz_strm_zlib.h | 43 - .../SSZipArchive/minizip/mz_zip.c | 2771 ----------------- .../SSZipArchive/minizip/mz_zip.h | 259 -- .../SSZipArchive/minizip/mz_zip_rw.c | 1943 ------------ .../SSZipArchive/minizip/mz_zip_rw.h | 285 -- .../DDKitSwift-Info.plist} | 4 +- .../DDKitSwift/DDKitSwift-dummy.m | 5 + .../DDKitSwift-prefix.pch} | 0 .../DDKitSwift-umbrella.h} | 4 +- .../DDKitSwift.debug.xcconfig} | 11 +- .../DDKitSwift/DDKitSwift.modulemap | 6 + .../DDKitSwift.release.xcconfig} | 11 +- ...ceBundle-DDKitSwift-DDKitSwift-Info.plist} | 4 +- .../DDLoggerSwift-Info.plist} | 4 +- .../DDLoggerSwift/DDLoggerSwift-dummy.m | 5 + .../DDLoggerSwift-prefix.pch} | 0 .../DDLoggerSwift-umbrella.h} | 4 +- .../DDLoggerSwift.debug.xcconfig} | 11 +- .../DDLoggerSwift/DDLoggerSwift.modulemap | 6 + .../DDLoggerSwift.release.xcconfig} | 11 +- ...le-DDLoggerSwift-DDLoggerSwift-Info.plist} | 4 +- .../DDUtils-Info.plist} | 4 +- .../DDUtils/DDUtils-dummy.m | 5 + .../DDUtils-prefix.pch} | 0 .../DDUtils-umbrella.h} | 4 + .../DDUtils.debug.xcconfig} | 7 +- .../DDUtils/DDUtils.modulemap | 6 + .../DDUtils.release.xcconfig} | 7 +- .../Pods-DDKitSwift-Netfox-Info.plist} | 2 +- ...KitSwift-Netfox-acknowledgements.markdown} | 30 +- ...-DDKitSwift-Netfox-acknowledgements.plist} | 36 +- .../Pods-DDKitSwift-Netfox-dummy.m | 5 + ...ox-frameworks-Debug-input-files.xcfilelist | 5 + ...x-frameworks-Debug-output-files.xcfilelist | 4 + ...-frameworks-Release-input-files.xcfilelist | 5 + ...frameworks-Release-output-files.xcfilelist | 4 + .../Pods-DDKitSwift-Netfox-frameworks.sh} | 18 +- .../Pods-DDKitSwift-Netfox-umbrella.h} | 4 +- .../Pods-DDKitSwift-Netfox.debug.xcconfig | 15 + .../Pods-DDKitSwift-Netfox.modulemap | 6 + .../Pods-DDKitSwift-Netfox.release.xcconfig | 15 + .../Pods-netfox-zxkit-dummy.m | 5 - ...it-frameworks-Debug-input-files.xcfilelist | 6 - ...t-frameworks-Debug-output-files.xcfilelist | 5 - ...-frameworks-Release-input-files.xcfilelist | 6 - ...frameworks-Release-output-files.xcfilelist | 5 - .../Pods-netfox-zxkit.debug.xcconfig | 15 - .../Pods-netfox-zxkit.modulemap | 6 - .../Pods-netfox-zxkit.release.xcconfig | 15 - .../SSZipArchive/SSZipArchive-dummy.m | 5 - .../SSZipArchive/SSZipArchive-umbrella.h | 18 - .../SSZipArchive/SSZipArchive.debug.xcconfig | 13 - .../SSZipArchive/SSZipArchive.modulemap | 6 - .../SSZipArchive.release.xcconfig | 13 - .../ZXKitCore/ZXKitCore-dummy.m | 5 - .../ZXKitCore/ZXKitCore.modulemap | 6 - .../ZXKitLogger/ZXKitLogger-dummy.m | 5 - .../ZXKitLogger/ZXKitLogger-umbrella.h | 16 - .../ZXKitLogger/ZXKitLogger.modulemap | 6 - .../ZXKitUtil/ZXKitUtil-Info.plist | 26 - .../ZXKitUtil/ZXKitUtil-dummy.m | 5 - .../ZXKitUtil/ZXKitUtil.modulemap | 6 - .../netfox/netfox-Info.plist | 2 +- .../netfox/netfox.debug.xcconfig | 3 +- .../netfox/netfox.release.xcconfig | 3 +- example/Pods/ZXKitCore/README.md | 171 - .../ZXKitCore/pod/ZXKitPluginProtocol.swift | 25 - .../pod/extend/ZXKitLogger+zxkit.swift | 43 - example/Pods/ZXKitLogger/README.md | 357 --- example/Pods/ZXKitUtil/README.md | 146 - .../ZXKitUtil/pod/ZXKitUtil+permission.swift | 208 -- .../ZXKitUtil/pod/extend/ZXKitNameSpace.swift | 37 - .../UserInterfaceState.xcuserstate | Bin 5653 -> 0 bytes .../UserInterfaceState.xcuserstate | Bin 33283 -> 0 bytes example/netfox-zxkit/.DS_Store | Bin 6148 -> 0 bytes .../netfox-zxkit/Assets.xcassets/.DS_Store | Bin 6148 -> 0 bytes ...ox+zxkit.swift => NetFox+DDkitSwift.swift} | 12 +- 207 files changed, 2686 insertions(+), 16920 deletions(-) rename netfox-zxkit.podspec => DDKitSwift-Netfox.podspec (87%) rename example/{netfox-zxkit.xcodeproj => DDKitSwift-Netfox.xcodeproj}/project.pbxproj (82%) rename example/{netfox-zxkit.xcodeproj => DDKitSwift-Netfox.xcodeproj}/project.xcworkspace/contents.xcworkspacedata (100%) rename example/{netfox-zxkit.xcodeproj => DDKitSwift-Netfox.xcodeproj}/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) create mode 100644 example/DDKitSwift-Netfox.xcodeproj/project.xcworkspace/xcuserdata/damon.xcuserdatad/UserInterfaceState.xcuserstate rename example/{netfox-zxkit.xcodeproj => DDKitSwift-Netfox.xcodeproj}/xcuserdata/damon.xcuserdatad/xcschemes/xcschememanagement.plist (69%) rename example/{netfox-zxkit.xcworkspace => DDKitSwift-Netfox.xcworkspace}/contents.xcworkspacedata (77%) rename example/{netfox-zxkit.xcworkspace => DDKitSwift-Netfox.xcworkspace}/xcshareddata/IDEWorkspaceChecks.plist (100%) create mode 100644 example/DDKitSwift-Netfox.xcworkspace/xcuserdata/damon.xcuserdatad/UserInterfaceState.xcuserstate rename example/{netfox-zxkit => DDKitSwift-Netfox}/AppDelegate.swift (98%) rename example/{netfox-zxkit => DDKitSwift-Netfox}/Assets.xcassets/AccentColor.colorset/Contents.json (100%) rename example/{netfox-zxkit => DDKitSwift-Netfox}/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename example/{netfox-zxkit => DDKitSwift-Netfox}/Assets.xcassets/Contents.json (100%) rename example/{netfox-zxkit => DDKitSwift-Netfox}/Base.lproj/LaunchScreen.storyboard (100%) rename example/{netfox-zxkit => DDKitSwift-Netfox}/Base.lproj/Main.storyboard (100%) rename example/{netfox-zxkit => DDKitSwift-Netfox}/Info.plist (100%) rename example/{netfox-zxkit => DDKitSwift-Netfox}/SceneDelegate.swift (99%) rename example/{netfox-zxkit => DDKitSwift-Netfox}/ViewController.swift (92%) rename example/Pods/{ZXKitCore => DDKitSwift}/LICENSE (100%) create mode 100644 example/Pods/DDKitSwift/README.md rename example/Pods/{ZXKitCore/pod/ZXKit.swift => DDKitSwift/pod/DDKitSwift.swift} (67%) rename example/Pods/{ZXKitCore/pod/ZXKitCollectionViewHeaderView.swift => DDKitSwift/pod/DDKitSwiftCollectionViewHeaderView.swift} (78%) rename example/Pods/{ZXKitCore/pod/ZXKitFloatWindow.swift => DDKitSwift/pod/DDKitSwiftFloatWindow.swift} (80%) rename example/Pods/{ZXKitCore/pod/ZXKitPluginCollectionViewCell.swift => DDKitSwift/pod/DDKitSwiftPluginCollectionViewCell.swift} (86%) create mode 100644 example/Pods/DDKitSwift/pod/DDKitSwiftPluginProtocol.swift rename example/Pods/{ZXKitCore/pod/ZXKitUIConfig.swift => DDKitSwift/pod/DDKitSwiftUIConfig.swift} (55%) rename example/Pods/{ZXKitCore/pod/ZXKitWindow.swift => DDKitSwift/pod/DDKitSwiftWindow.swift} (80%) rename example/Pods/{ZXKitCore => DDKitSwift}/pod/assets/icon/icon_close@3x.png (100%) rename example/Pods/{ZXKitCore => DDKitSwift}/pod/assets/icon/icon_home@3x.png (100%) rename example/Pods/{ZXKitCore => DDKitSwift}/pod/assets/icon/icon_list@3x.png (100%) rename example/Pods/{ZXKitCore => DDKitSwift}/pod/assets/icon/icon_notice@3x.png (100%) rename example/Pods/{ZXKitCore => DDKitSwift}/pod/assets/icon/icon_search@3x.png (100%) rename example/Pods/{ZXKitCore => DDKitSwift}/pod/assets/icon/icon_setting@3x.png (100%) rename example/Pods/{ZXKitCore => DDKitSwift}/pod/assets/icon/icon_share@3x.png (100%) rename example/Pods/{ZXKitCore => DDKitSwift}/pod/assets/icon/logger_logo@3x.png (100%) rename example/Pods/{ZXKitCore => DDKitSwift}/pod/assets/icon/zx_logo@3x.png (100%) rename example/Pods/{ZXKitCore => DDKitSwift}/pod/assets/localizable/en.lproj/Localizable.strings (93%) rename example/Pods/{ZXKitCore => DDKitSwift}/pod/assets/localizable/zh-Hans.lproj/Localizable.strings (94%) create mode 100644 example/Pods/DDKitSwift/pod/extend/DDLoggerSwift+ddkit.swift rename example/Pods/{ZXKitCore => DDKitSwift}/pod/extend/ShareTools.swift (90%) rename example/Pods/{ZXKitCore => DDKitSwift}/pod/menu/CircleMenu.swift (100%) rename example/Pods/{ZXKitCore => DDKitSwift}/pod/menu/CircleMenuButton/CircleMenuButton.swift (99%) rename example/Pods/{ZXKitCore => DDKitSwift}/pod/menu/CircleMenuLoader/CircleMenuLoader.swift (100%) rename example/Pods/{ZXKitCore => DDKitSwift}/pod/menu/CircleMenuMaskView.swift (99%) rename example/Pods/{ZXKitLogger => DDLoggerSwift}/LICENSE (100%) create mode 100644 example/Pods/DDLoggerSwift/README.md rename example/Pods/{ZXKitLogger/pod/ZXKitLogger.swift => DDLoggerSwift/pod/DDLoggerSwift.swift} (64%) rename example/Pods/{ZXKitLogger/pod/ZXKitLoggerFloatWindow.swift => DDLoggerSwift/pod/DDLoggerSwiftFloatWindow.swift} (86%) rename example/Pods/{ZXKitLogger/pod/ZXKitLoggerItem.swift => DDLoggerSwift/pod/DDLoggerSwiftItem.swift} (86%) rename example/Pods/{ZXKitLogger/pod/ZXKitLoggerPickerWindow.swift => DDLoggerSwift/pod/DDLoggerSwiftPickerWindow.swift} (90%) rename example/Pods/{ZXKitLogger/pod/ZXKitLoggerWindow.swift => DDLoggerSwift/pod/DDLoggerSwiftWindow.swift} (82%) rename example/Pods/{ZXKitLogger => DDLoggerSwift}/pod/HDSqliteTools.swift (84%) rename example/Pods/{ZXKitLogger => DDLoggerSwift}/pod/LogContent.swift (79%) rename example/Pods/{ZXKitLogger => DDLoggerSwift}/pod/assets/icon/icon_analyse.png (100%) rename example/Pods/{ZXKitLogger => DDLoggerSwift}/pod/assets/icon/icon_back.png (100%) rename example/Pods/{ZXKitLogger => DDLoggerSwift}/pod/assets/icon/icon_copy.png (100%) rename example/Pods/{ZXKitLogger => DDLoggerSwift}/pod/assets/icon/icon_decrypt.png (100%) rename example/Pods/{ZXKitLogger => DDLoggerSwift}/pod/assets/icon/icon_delete.png (100%) rename example/Pods/{ZXKitLogger => DDLoggerSwift}/pod/assets/icon/icon_exit.png (100%) rename example/Pods/{ZXKitLogger => DDLoggerSwift}/pod/assets/icon/icon_hide.png (100%) rename example/Pods/{ZXKitLogger => DDLoggerSwift}/pod/assets/icon/icon_normal_back.png (100%) rename example/Pods/{ZXKitLogger => DDLoggerSwift}/pod/assets/icon/icon_scale.png (100%) rename example/Pods/{ZXKitLogger => DDLoggerSwift}/pod/assets/icon/icon_scroll.png (100%) rename example/Pods/{ZXKitLogger => DDLoggerSwift}/pod/assets/icon/icon_search.png (100%) rename example/Pods/{ZXKitLogger => DDLoggerSwift}/pod/assets/icon/icon_share.png (100%) rename example/Pods/{ZXKitLogger => DDLoggerSwift}/pod/assets/icon/icon_upload.png (100%) rename example/Pods/{ZXKitLogger => DDLoggerSwift}/pod/assets/localizable/en.lproj/Localizable.strings (94%) rename example/Pods/{ZXKitLogger => DDLoggerSwift}/pod/assets/localizable/zh-Hans.lproj/Localizable.strings (93%) rename example/Pods/{ZXKitLogger/pod/view/ZXKitLoggerFilterTypeView.swift => DDLoggerSwift/pod/view/DDLoggerSwiftFilterTypeView.swift} (88%) rename example/Pods/{ZXKitLogger/pod/view/ZXKitLoggerMenuCollectionViewCell.swift => DDLoggerSwift/pod/view/DDLoggerSwiftMenuCollectionViewCell.swift} (87%) rename example/Pods/{ZXKitLogger/pod/view/ZXKitLoggerMenuView.swift => DDLoggerSwift/pod/view/DDLoggerSwiftMenuView.swift} (82%) rename example/Pods/{ZXKitLogger/pod/view/ZXKitLoggerTableViewCell.swift => DDLoggerSwift/pod/view/DDLoggerSwiftTableViewCell.swift} (89%) rename example/Pods/{ZXKitUtil => DDUtils}/LICENSE (100%) create mode 100644 example/Pods/DDUtils/README.md rename example/Pods/{ZXKitUtil/pod/ZXKitUtil.swift => DDUtils/pod/DDUtils.swift} (91%) create mode 100644 example/Pods/DDUtils/pod/ZXKitNameSpace.swift rename example/Pods/{ZXKitUtil/pod/ZXKitUtil+system.swift => DDUtils/pod/subspec/UI/DDUtils+AppStore.swift} (59%) rename example/Pods/{ZXKitUtil/pod/ZXKitUtil+UI.swift => DDUtils/pod/subspec/UI/DDUtils+UI.swift} (80%) rename example/Pods/{ZXKitUtil/pod/extend => DDUtils/pod/subspec/UI}/UIColor+zx.swift (95%) rename example/Pods/{ZXKitUtil/pod/extend => DDUtils/pod/subspec/UI}/UIImage+zx.swift (87%) rename example/Pods/{ZXKitUtil/pod/extend => DDUtils/pod/subspec/UI}/UIView+zx.swift (92%) rename example/Pods/{ZXKitUtil/pod/ZXKitUtil+file.swift => DDUtils/pod/subspec/utils/DDUtils+file.swift} (91%) rename example/Pods/{ZXKitUtil/pod/ZXKitUtil+media.swift => DDUtils/pod/subspec/utils/DDUtils+media.swift} (93%) create mode 100644 example/Pods/DDUtils/pod/subspec/utils/DDUtils+system.swift rename example/Pods/{ZXKitUtil/pod/extend => DDUtils/pod/subspec/utils}/Data+zx.swift (85%) rename example/Pods/{ZXKitUtil/pod/extend => DDUtils/pod/subspec/utils}/Date+zx.swift (88%) rename example/Pods/{ZXKitUtil/pod/extend => DDUtils/pod/subspec/utils}/String+zx.swift (65%) rename example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/{SSZipArchive.xcscheme => DDKitSwift-DDKitSwift.xcscheme} (89%) rename example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/{ZXKitCore.xcscheme => DDKitSwift.xcscheme} (90%) rename example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/{Pods-netfox-zxkit.xcscheme => DDLoggerSwift-DDLoggerSwift.xcscheme} (89%) rename example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/{ZXKitLogger.xcscheme => DDLoggerSwift.xcscheme} (89%) rename example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/{ZXKitUtil.xcscheme => DDUtils.xcscheme} (90%) rename example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/{ZXKitCore-ZXKitCore.xcscheme => Pods-DDKitSwift-Netfox.xcscheme} (89%) delete mode 100644 example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/ZXKitLogger-ZXKitLogger.xcscheme delete mode 100644 example/Pods/SSZipArchive/LICENSE.txt delete mode 100644 example/Pods/SSZipArchive/README.md delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/SSZipArchive.h delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/SSZipArchive.m delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/SSZipCommon.h delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/include/ZipArchive.h delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/minizip/mz.h delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/minizip/mz_compat.c delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/minizip/mz_compat.h delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/minizip/mz_crypt.c delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/minizip/mz_crypt.h delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/minizip/mz_crypt_apple.c delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/minizip/mz_os.c delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/minizip/mz_os.h delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/minizip/mz_os_posix.c delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm.c delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm.h delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_buf.c delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_buf.h delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_mem.c delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_mem.h delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_os.h delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_os_posix.c delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_pkcrypt.c delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_pkcrypt.h delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_split.c delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_split.h delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_wzaes.c delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_wzaes.h delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_zlib.c delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_zlib.h delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/minizip/mz_zip.c delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/minizip/mz_zip.h delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/minizip/mz_zip_rw.c delete mode 100644 example/Pods/SSZipArchive/SSZipArchive/minizip/mz_zip_rw.h rename example/Pods/Target Support Files/{SSZipArchive/SSZipArchive-Info.plist => DDKitSwift/DDKitSwift-Info.plist} (91%) create mode 100644 example/Pods/Target Support Files/DDKitSwift/DDKitSwift-dummy.m rename example/Pods/Target Support Files/{SSZipArchive/SSZipArchive-prefix.pch => DDKitSwift/DDKitSwift-prefix.pch} (100%) rename example/Pods/Target Support Files/{ZXKitUtil/ZXKitUtil-umbrella.h => DDKitSwift/DDKitSwift-umbrella.h} (63%) rename example/Pods/Target Support Files/{ZXKitCore/ZXKitCore.debug.xcconfig => DDKitSwift/DDKitSwift.debug.xcconfig} (55%) create mode 100644 example/Pods/Target Support Files/DDKitSwift/DDKitSwift.modulemap rename example/Pods/Target Support Files/{ZXKitCore/ZXKitCore.release.xcconfig => DDKitSwift/DDKitSwift.release.xcconfig} (55%) rename example/Pods/Target Support Files/{ZXKitLogger/ResourceBundle-ZXKitLogger-ZXKitLogger-Info.plist => DDKitSwift/ResourceBundle-DDKitSwift-DDKitSwift-Info.plist} (90%) rename example/Pods/Target Support Files/{ZXKitLogger/ZXKitLogger-Info.plist => DDLoggerSwift/DDLoggerSwift-Info.plist} (91%) create mode 100644 example/Pods/Target Support Files/DDLoggerSwift/DDLoggerSwift-dummy.m rename example/Pods/Target Support Files/{ZXKitCore/ZXKitCore-prefix.pch => DDLoggerSwift/DDLoggerSwift-prefix.pch} (100%) rename example/Pods/Target Support Files/{ZXKitCore/ZXKitCore-umbrella.h => DDLoggerSwift/DDLoggerSwift-umbrella.h} (61%) rename example/Pods/Target Support Files/{ZXKitLogger/ZXKitLogger.debug.xcconfig => DDLoggerSwift/DDLoggerSwift.debug.xcconfig} (61%) create mode 100644 example/Pods/Target Support Files/DDLoggerSwift/DDLoggerSwift.modulemap rename example/Pods/Target Support Files/{ZXKitLogger/ZXKitLogger.release.xcconfig => DDLoggerSwift/DDLoggerSwift.release.xcconfig} (61%) rename example/Pods/Target Support Files/{ZXKitCore/ResourceBundle-ZXKitCore-ZXKitCore-Info.plist => DDLoggerSwift/ResourceBundle-DDLoggerSwift-DDLoggerSwift-Info.plist} (90%) rename example/Pods/Target Support Files/{ZXKitCore/ZXKitCore-Info.plist => DDUtils/DDUtils-Info.plist} (91%) create mode 100644 example/Pods/Target Support Files/DDUtils/DDUtils-dummy.m rename example/Pods/Target Support Files/{ZXKitLogger/ZXKitLogger-prefix.pch => DDUtils/DDUtils-prefix.pch} (100%) rename example/Pods/Target Support Files/{ZXKitUtil/ZXKitUtil-prefix.pch => DDUtils/DDUtils-umbrella.h} (63%) rename example/Pods/Target Support Files/{ZXKitUtil/ZXKitUtil.debug.xcconfig => DDUtils/DDUtils.debug.xcconfig} (69%) create mode 100644 example/Pods/Target Support Files/DDUtils/DDUtils.modulemap rename example/Pods/Target Support Files/{ZXKitUtil/ZXKitUtil.release.xcconfig => DDUtils/DDUtils.release.xcconfig} (69%) rename example/Pods/Target Support Files/{Pods-netfox-zxkit/Pods-netfox-zxkit-Info.plist => Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-Info.plist} (94%) rename example/Pods/Target Support Files/{Pods-netfox-zxkit/Pods-netfox-zxkit-acknowledgements.markdown => Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-acknowledgements.markdown} (79%) rename example/Pods/Target Support Files/{Pods-netfox-zxkit/Pods-netfox-zxkit-acknowledgements.plist => Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-acknowledgements.plist} (80%) create mode 100644 example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-dummy.m create mode 100644 example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-frameworks-Debug-input-files.xcfilelist create mode 100644 example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-frameworks-Debug-output-files.xcfilelist create mode 100644 example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-frameworks-Release-input-files.xcfilelist create mode 100644 example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-frameworks-Release-output-files.xcfilelist rename example/Pods/Target Support Files/{Pods-netfox-zxkit/Pods-netfox-zxkit-frameworks.sh => Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-frameworks.sh} (92%) rename example/Pods/Target Support Files/{Pods-netfox-zxkit/Pods-netfox-zxkit-umbrella.h => Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-umbrella.h} (58%) create mode 100644 example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox.debug.xcconfig create mode 100644 example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox.modulemap create mode 100644 example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox.release.xcconfig delete mode 100644 example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-dummy.m delete mode 100644 example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-frameworks-Debug-input-files.xcfilelist delete mode 100644 example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-frameworks-Debug-output-files.xcfilelist delete mode 100644 example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-frameworks-Release-input-files.xcfilelist delete mode 100644 example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-frameworks-Release-output-files.xcfilelist delete mode 100644 example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit.debug.xcconfig delete mode 100644 example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit.modulemap delete mode 100644 example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit.release.xcconfig delete mode 100644 example/Pods/Target Support Files/SSZipArchive/SSZipArchive-dummy.m delete mode 100644 example/Pods/Target Support Files/SSZipArchive/SSZipArchive-umbrella.h delete mode 100644 example/Pods/Target Support Files/SSZipArchive/SSZipArchive.debug.xcconfig delete mode 100644 example/Pods/Target Support Files/SSZipArchive/SSZipArchive.modulemap delete mode 100644 example/Pods/Target Support Files/SSZipArchive/SSZipArchive.release.xcconfig delete mode 100644 example/Pods/Target Support Files/ZXKitCore/ZXKitCore-dummy.m delete mode 100644 example/Pods/Target Support Files/ZXKitCore/ZXKitCore.modulemap delete mode 100644 example/Pods/Target Support Files/ZXKitLogger/ZXKitLogger-dummy.m delete mode 100644 example/Pods/Target Support Files/ZXKitLogger/ZXKitLogger-umbrella.h delete mode 100644 example/Pods/Target Support Files/ZXKitLogger/ZXKitLogger.modulemap delete mode 100644 example/Pods/Target Support Files/ZXKitUtil/ZXKitUtil-Info.plist delete mode 100644 example/Pods/Target Support Files/ZXKitUtil/ZXKitUtil-dummy.m delete mode 100644 example/Pods/Target Support Files/ZXKitUtil/ZXKitUtil.modulemap delete mode 100644 example/Pods/ZXKitCore/README.md delete mode 100644 example/Pods/ZXKitCore/pod/ZXKitPluginProtocol.swift delete mode 100644 example/Pods/ZXKitCore/pod/extend/ZXKitLogger+zxkit.swift delete mode 100644 example/Pods/ZXKitLogger/README.md delete mode 100644 example/Pods/ZXKitUtil/README.md delete mode 100644 example/Pods/ZXKitUtil/pod/ZXKitUtil+permission.swift delete mode 100644 example/Pods/ZXKitUtil/pod/extend/ZXKitNameSpace.swift delete mode 100644 example/netfox-zxkit.xcodeproj/project.xcworkspace/xcuserdata/damon.xcuserdatad/UserInterfaceState.xcuserstate delete mode 100644 example/netfox-zxkit.xcworkspace/xcuserdata/damon.xcuserdatad/UserInterfaceState.xcuserstate delete mode 100644 example/netfox-zxkit/.DS_Store delete mode 100644 example/netfox-zxkit/Assets.xcassets/.DS_Store rename pod/zxkit/{NetFox+zxkit.swift => NetFox+DDkitSwift.swift} (90%) diff --git a/netfox-zxkit.podspec b/DDKitSwift-Netfox.podspec similarity index 87% rename from netfox-zxkit.podspec rename to DDKitSwift-Netfox.podspec index c9bb6e4..6ef2caa 100644 --- a/netfox-zxkit.podspec +++ b/DDKitSwift-Netfox.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| -s.name = 'netfox-zxkit' +s.name = 'DDKitSwift-Netfox' s.swift_version = '5.0' -s.version = '2.0.0' +s.version = '3.0.0' s.license= { :type => "MIT", :file => "LICENSE" } s.summary = 'a quick look on all executed network requests performed by netfox' s.homepage = 'https://github.com/DamonHu/netfox-zxkit' @@ -14,6 +14,6 @@ s.resource_bundles = { } s.source_files = "pod/zxkit/*.swift" s.dependency 'netfox', '1.21.0' -s.dependency 'ZXKitCore', '~> 2.0.0' +s.dependency 'DDKitSwift/core', '~> 3.0.0' s.documentation_url = 'https://blog.hudongdong.com/ios/1169.html' end diff --git a/example/netfox-zxkit.xcodeproj/project.pbxproj b/example/DDKitSwift-Netfox.xcodeproj/project.pbxproj similarity index 82% rename from example/netfox-zxkit.xcodeproj/project.pbxproj rename to example/DDKitSwift-Netfox.xcodeproj/project.pbxproj index ec0214a..a34adc7 100644 --- a/example/netfox-zxkit.xcodeproj/project.pbxproj +++ b/example/DDKitSwift-Netfox.xcodeproj/project.pbxproj @@ -3,25 +3,28 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ - 6027F7B2179819CDEAA74C09 /* Pods_netfox_zxkit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F91733194141C773D771F9CA /* Pods_netfox_zxkit.framework */; }; + 391B23491D933141DF197B29 /* Pods_DDKitSwift_Netfox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6EA9F66332AB8012BAB331C9 /* Pods_DDKitSwift_Netfox.framework */; }; E4ADD4CE26A29C38000BD07F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4ADD4CD26A29C38000BD07F /* AppDelegate.swift */; }; E4ADD4D026A29C38000BD07F /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4ADD4CF26A29C38000BD07F /* SceneDelegate.swift */; }; E4ADD4D226A29C38000BD07F /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4ADD4D126A29C38000BD07F /* ViewController.swift */; }; E4ADD4D526A29C38000BD07F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E4ADD4D326A29C38000BD07F /* Main.storyboard */; }; E4ADD4D726A29C3B000BD07F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E4ADD4D626A29C3B000BD07F /* Assets.xcassets */; }; E4ADD4DA26A29C3B000BD07F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E4ADD4D826A29C3B000BD07F /* LaunchScreen.storyboard */; }; - E4ADD4E426A29E75000BD07F /* NetFox+zxkit.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4ADD4E326A29E75000BD07F /* NetFox+zxkit.swift */; }; + E4ADD4E426A29E75000BD07F /* NetFox+DDkitSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4ADD4E326A29E75000BD07F /* NetFox+DDkitSwift.swift */; }; E4ADD4E726A2A077000BD07F /* netfox_logo.png in Resources */ = {isa = PBXBuildFile; fileRef = E4ADD4E626A2A077000BD07F /* netfox_logo.png */; }; E4ADD4EC26A2A1CA000BD07F /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = E4ADD4E926A2A1C9000BD07F /* Localizable.strings */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 6EA9F66332AB8012BAB331C9 /* Pods_DDKitSwift_Netfox.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_DDKitSwift_Netfox.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 8E2CA20016EDE011159639AF /* Pods-DDKitSwift-Netfox.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DDKitSwift-Netfox.release.xcconfig"; path = "Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox.release.xcconfig"; sourceTree = ""; }; + B8DFD1ABEBDF91BA4ACD5F61 /* Pods-DDKitSwift-Netfox.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DDKitSwift-Netfox.debug.xcconfig"; path = "Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox.debug.xcconfig"; sourceTree = ""; }; E18898D0600D75BA91CF8FC5 /* Pods-netfox-zxkit.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-netfox-zxkit.release.xcconfig"; path = "Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit.release.xcconfig"; sourceTree = ""; }; - E4ADD4CA26A29C38000BD07F /* netfox-zxkit.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "netfox-zxkit.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + E4ADD4CA26A29C38000BD07F /* DDKitSwift-Netfox.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "DDKitSwift-Netfox.app"; sourceTree = BUILT_PRODUCTS_DIR; }; E4ADD4CD26A29C38000BD07F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; E4ADD4CF26A29C38000BD07F /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; E4ADD4D126A29C38000BD07F /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; @@ -29,12 +32,11 @@ E4ADD4D626A29C3B000BD07F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; E4ADD4D926A29C3B000BD07F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; E4ADD4DB26A29C3B000BD07F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - E4ADD4E326A29E75000BD07F /* NetFox+zxkit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NetFox+zxkit.swift"; sourceTree = ""; }; + E4ADD4E326A29E75000BD07F /* NetFox+DDkitSwift.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NetFox+DDkitSwift.swift"; sourceTree = ""; }; E4ADD4E626A2A077000BD07F /* netfox_logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = netfox_logo.png; sourceTree = ""; }; E4ADD4EA26A2A1C9000BD07F /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = ""; }; E4ADD4EB26A2A1CA000BD07F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; EA49D478A1A34EB3EB0CCE8F /* Pods-netfox-zxkit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-netfox-zxkit.debug.xcconfig"; path = "Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit.debug.xcconfig"; sourceTree = ""; }; - F91733194141C773D771F9CA /* Pods_netfox_zxkit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_netfox_zxkit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -42,7 +44,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 6027F7B2179819CDEAA74C09 /* Pods_netfox_zxkit.framework in Frameworks */, + 391B23491D933141DF197B29 /* Pods_DDKitSwift_Netfox.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -54,6 +56,8 @@ children = ( EA49D478A1A34EB3EB0CCE8F /* Pods-netfox-zxkit.debug.xcconfig */, E18898D0600D75BA91CF8FC5 /* Pods-netfox-zxkit.release.xcconfig */, + B8DFD1ABEBDF91BA4ACD5F61 /* Pods-DDKitSwift-Netfox.debug.xcconfig */, + 8E2CA20016EDE011159639AF /* Pods-DDKitSwift-Netfox.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -61,7 +65,7 @@ 3D3C94EADC2DA3BB7C6A4B9F /* Frameworks */ = { isa = PBXGroup; children = ( - F91733194141C773D771F9CA /* Pods_netfox_zxkit.framework */, + 6EA9F66332AB8012BAB331C9 /* Pods_DDKitSwift_Netfox.framework */, ); name = Frameworks; sourceTree = ""; @@ -69,7 +73,7 @@ E4ADD4C126A29C38000BD07F = { isa = PBXGroup; children = ( - E4ADD4CC26A29C38000BD07F /* netfox-zxkit */, + E4ADD4CC26A29C38000BD07F /* DDKitSwift-Netfox */, E4ADD4CB26A29C38000BD07F /* Products */, 0CD0B536E92A2F0D6045FBFF /* Pods */, 3D3C94EADC2DA3BB7C6A4B9F /* Frameworks */, @@ -79,12 +83,12 @@ E4ADD4CB26A29C38000BD07F /* Products */ = { isa = PBXGroup; children = ( - E4ADD4CA26A29C38000BD07F /* netfox-zxkit.app */, + E4ADD4CA26A29C38000BD07F /* DDKitSwift-Netfox.app */, ); name = Products; sourceTree = ""; }; - E4ADD4CC26A29C38000BD07F /* netfox-zxkit */ = { + E4ADD4CC26A29C38000BD07F /* DDKitSwift-Netfox */ = { isa = PBXGroup; children = ( E4ADD4E126A29E3F000BD07F /* pod */, @@ -96,7 +100,7 @@ E4ADD4D826A29C3B000BD07F /* LaunchScreen.storyboard */, E4ADD4DB26A29C3B000BD07F /* Info.plist */, ); - path = "netfox-zxkit"; + path = "DDKitSwift-Netfox"; sourceTree = ""; }; E4ADD4E126A29E3F000BD07F /* pod */ = { @@ -112,7 +116,7 @@ E4ADD4E226A29E5A000BD07F /* zxkit */ = { isa = PBXGroup; children = ( - E4ADD4E326A29E75000BD07F /* NetFox+zxkit.swift */, + E4ADD4E326A29E75000BD07F /* NetFox+DDkitSwift.swift */, ); path = zxkit; sourceTree = ""; @@ -137,9 +141,9 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - E4ADD4C926A29C38000BD07F /* netfox-zxkit */ = { + E4ADD4C926A29C38000BD07F /* DDKitSwift-Netfox */ = { isa = PBXNativeTarget; - buildConfigurationList = E4ADD4DE26A29C3B000BD07F /* Build configuration list for PBXNativeTarget "netfox-zxkit" */; + buildConfigurationList = E4ADD4DE26A29C3B000BD07F /* Build configuration list for PBXNativeTarget "DDKitSwift-Netfox" */; buildPhases = ( DF0D68020569058627016BCA /* [CP] Check Pods Manifest.lock */, E4ADD4C626A29C38000BD07F /* Sources */, @@ -151,9 +155,9 @@ ); dependencies = ( ); - name = "netfox-zxkit"; + name = "DDKitSwift-Netfox"; productName = "netfox-zxkit"; - productReference = E4ADD4CA26A29C38000BD07F /* netfox-zxkit.app */; + productReference = E4ADD4CA26A29C38000BD07F /* DDKitSwift-Netfox.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -170,7 +174,7 @@ }; }; }; - buildConfigurationList = E4ADD4C526A29C38000BD07F /* Build configuration list for PBXProject "netfox-zxkit" */; + buildConfigurationList = E4ADD4C526A29C38000BD07F /* Build configuration list for PBXProject "DDKitSwift-Netfox" */; compatibilityVersion = "Xcode 9.3"; developmentRegion = en; hasScannedForEncodings = 0; @@ -184,7 +188,7 @@ projectDirPath = ""; projectRoot = ""; targets = ( - E4ADD4C926A29C38000BD07F /* netfox-zxkit */, + E4ADD4C926A29C38000BD07F /* DDKitSwift-Netfox */, ); }; /* End PBXProject section */ @@ -211,15 +215,15 @@ files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-frameworks-${CONFIGURATION}-input-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-frameworks-${CONFIGURATION}-output-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; DF0D68020569058627016BCA /* [CP] Check Pods Manifest.lock */ = { @@ -237,7 +241,7 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-netfox-zxkit-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-DDKitSwift-Netfox-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -253,7 +257,7 @@ files = ( E4ADD4D226A29C38000BD07F /* ViewController.swift in Sources */, E4ADD4CE26A29C38000BD07F /* AppDelegate.swift in Sources */, - E4ADD4E426A29E75000BD07F /* NetFox+zxkit.swift in Sources */, + E4ADD4E426A29E75000BD07F /* NetFox+DDkitSwift.swift in Sources */, E4ADD4D026A29C38000BD07F /* SceneDelegate.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -407,17 +411,17 @@ }; E4ADD4DF26A29C3B000BD07F /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = EA49D478A1A34EB3EB0CCE8F /* Pods-netfox-zxkit.debug.xcconfig */; + baseConfigurationReference = B8DFD1ABEBDF91BA4ACD5F61 /* Pods-DDKitSwift-Netfox.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = "netfox-zxkit/Info.plist"; + INFOPLIST_FILE = "DDKitSwift-Netfox/Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = "com.lazypig.netfox-zxkit"; + PRODUCT_BUNDLE_IDENTIFIER = "com.lazypig.DDKitSwift-Netfox"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -426,17 +430,17 @@ }; E4ADD4E026A29C3B000BD07F /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E18898D0600D75BA91CF8FC5 /* Pods-netfox-zxkit.release.xcconfig */; + baseConfigurationReference = 8E2CA20016EDE011159639AF /* Pods-DDKitSwift-Netfox.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = "netfox-zxkit/Info.plist"; + INFOPLIST_FILE = "DDKitSwift-Netfox/Info.plist"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = "com.lazypig.netfox-zxkit"; + PRODUCT_BUNDLE_IDENTIFIER = "com.lazypig.DDKitSwift-Netfox"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -446,7 +450,7 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - E4ADD4C526A29C38000BD07F /* Build configuration list for PBXProject "netfox-zxkit" */ = { + E4ADD4C526A29C38000BD07F /* Build configuration list for PBXProject "DDKitSwift-Netfox" */ = { isa = XCConfigurationList; buildConfigurations = ( E4ADD4DC26A29C3B000BD07F /* Debug */, @@ -455,7 +459,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - E4ADD4DE26A29C3B000BD07F /* Build configuration list for PBXNativeTarget "netfox-zxkit" */ = { + E4ADD4DE26A29C3B000BD07F /* Build configuration list for PBXNativeTarget "DDKitSwift-Netfox" */ = { isa = XCConfigurationList; buildConfigurations = ( E4ADD4DF26A29C3B000BD07F /* Debug */, diff --git a/example/netfox-zxkit.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/example/DDKitSwift-Netfox.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from example/netfox-zxkit.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to example/DDKitSwift-Netfox.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/example/netfox-zxkit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/DDKitSwift-Netfox.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from example/netfox-zxkit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to example/DDKitSwift-Netfox.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/example/DDKitSwift-Netfox.xcodeproj/project.xcworkspace/xcuserdata/damon.xcuserdatad/UserInterfaceState.xcuserstate b/example/DDKitSwift-Netfox.xcodeproj/project.xcworkspace/xcuserdata/damon.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000000000000000000000000000000000000..4d695d61296e2f505e55380ea10bdeb49741ba63 GIT binary patch literal 16782 zcmdsed0bOx*8j6yz=e>6EkJ|-L1jxwAPI372w;>=0;pI`BLs{>LX)6awLWQWYg@Zb z?Y;>*wzjo)pJ}JtwA0;Mi*~b{-KKTgPN(bG+S>O#_Yxp2&e(Z>^ZxOJ59H?F^X%t2 z=X<`-xhs0QJb|FWa0p>U5JdutLeVG&O<0_>#_bPyeBLEFE`Qrf4}5FN3Ho{#=lE8v za<>Ho@d%%{-Kmh*ITpCrx!cQzgkDDD(D-IY&=qtuyjO`GXd;S5DwKj!Q4umABPvEE z$b`(uf=ZDUO+yP%4XQ@$cF-G9Xb;+6hh~s^Uy`; z5_BoL5?zI^MmM6HP(S)T+J$aGPobyLGw50L9C{wTfcBvm(SGz2I)GkAgXkc7106>1 zqNC_<=u`9=`W*co9Yf!vAJB31BSskGXgmQYV-;58ES!y};9Q)Ci?9KkuoX|kvv3)% z#dWwIH{gYM8D5T^_;l>T?f6W*9&f-K@mY8iW;le;#sWSEUw|*fm*Q*jb@+Pxd%O$Z zf^Wxv!Vlv|@T2%K{5bwIegW^pFXH`p5WkO);?MDy_$&N1{wMy4Ac6@Yl*EvUL{3tO zhG@xDl1uW4j!Yxd$qX`+%p$W%IhjZ7WIkyk&7_4aB8$lqvW#>SFY%Ecat85}09i}c zlTG9bauvCj+(2$71LXJQR&qPJliW@2BYz+dkw?hm*NjcHhGVH zPktcB$&chGa)SI!5yg~HN+;4-8c&m{iWX4=HPT{QLQT|6Ewq$c=`=cv+Gr)MrFFEP zHc|&&Lfy23cG8v9LswBR4bUJxi*BNfhUnS!9C|*znqEV%rPtBx=?(NodN;j~{((M3 zAEA%aC+XAlIl7O&L8Kgc_k%s1xdi24SJlC^&>g!ZN`nv^VE? zd%L<0A{mN9a-={BD0xwxL%-U+F3<{}LptA*)7Iq*1O|{2#WTX_07^tjOkjsumQ#^q zDXXyADyCKFY{k|Royk;Ht}CxJR_To9X{NF=gJoKoWtvlwXtz}^^7&T>dR%R8o3E|6 z+wBd88%{$xNWUAY(Ik|PGLQykqAZk+v@D86vlupxjb{_sL>9|ryU}Dc1x-b{@S6|f zlTj{T>&?l?F?3X;qa;H_cFPfdQIJb!DZ+m8opr=sUSQtAjf{GO~ z9W%mWlVF1`%vs%-ZR6$%f=T8x&UR;FfoET4BZ zb8(xm-K~e>3p_#na69_pxrKf@++ENgcl+>D@Cem@UvH1}0Q^TF+~VoTjr2Q_3#~wH zsGUt>=`4e3cA^f{iB_TxmdUc27XCxaiB+DipxZBMW%;^V=mq!~XsyN-2oATzZ#xyq z&EAeNg;S(D-0jWw$a=#4=|N|pkfAK`gCXZt@Z>Xz9`UOoLmt*R> zXe=)I4YjO_VhdIDhIA@m8ry06eT=zAOsAT9^sTOk0q*?2Cl#EWq!?!mnP z*3QS5;41)--48(QN&E~xgx|oQ;p0Rg;{k4INDe6_Riqw3RSRh&D*--T2=GaQPPdDY z>2dNLfTaUuP#Oop(kB4eh#&G-$*i1@wt%mz?Ca^0JZ*h%u*>6hw|LxZCCJS8`H+d) zfi6H7qP|m>cPdsmn}XF9Ek=v2rD>!M*h0mYk*}kgY+Bdj4wMcx=WKB}ON=9O;vRK? zU-EX^+ri#=Iy~U?rD1GE7dsURb&lHJAn)*qN!)?9a-(<(-Xd%hFN1~C_oK^MK|fjo zz6R|53I0EV9)+vN(Vszyb6FWHXLYQeHNgLctP!r7SQ|TA!f~0B53lX* z3VM0~v4Q;$Huyc=;B9JL>wLXIzJJ^+dOJJ8aq@>;#hi-ba(9Q%@2++AdAdDkx+{F$ zJubf|;PZ;^vl(V<2z3or4^FjpmKAixTh= zeZsmf@ZgzY3^4*y#Qxj4^JxG#v^?DT_96GC?UBYEE+B@d?U8;Gv=tofQ0K*Ykswo2 zxRBc=wjx#ugUJ1t^W+H(_ra-%ADZtPcSo?v*XZe7IgH;Ap;x&^zQQW{(QC}cHBt#% zb9g;Oe=BL=n`rw0dJDbHD%k>N2rJeR^dU;#f!;&!qYqdWt7h|dppO7ke#|(QoX@hB zL3Ja$^ECc#1i>ocD_{0nSEtt#>}_{18ODCvxt`M_HqRI6>tD6>4Pe&qSPdv#Er%*{ zaRw!o;8oj`inOu4P~J#Mev3xGRt5ED$191G|N90gNQ=NMkh z8n?GoM6;vri7|-+Gl#ezaSR@}bkx%UJRbFpzVRxa2sT~@^~Yg3R$wKL#|bzQCjkNp z2UIn_HW4l@ADJtzN)V0=qt`~CF9;aXE!~Hb-7b%JMBE9n0@uL$j&PkL&)8|Kg*n*@ z*36bV6-C3=OVVwyk9?h_3P;fLupJZEAE)57ew@k{vDSll5>AKFWS|FeX6r~R&0_m( zF<65oV>w4@wzN3Msh9*SHR4X7C2qr|{p0Zu;K|%T|4SLk67IxPMZ=e{>1XNZAkK%5 z6@V+%Vg1tfp=h*yqC~9|g`@BV+o}d%{ z=Jl>95;0uSXb@TC?t}7O?xJ6TK7AjLJbL`TRni!ZxES^`D0g@%!pl2=OZd>ndIWG9 zo3RC#wsI&dO$l?c)18XC|3(+5;~7h#gJFdlz%xN|;_wj?gc)evdn3Ty-HQ^neun{}|xop>I$2Tlxw#vPhho^x?*IJ2-fN&@B=}>IqX!G@O_Ym<=Ebj9MZElEYJUtN9g6&R@ z5D{zVKu6kVD{$I&*kcm2gWcE%1Pkr}K)4cn@G86-cj0dAWj@x!&R~8PU_sW)*08m^ zVI0!$gYXIT3OHy^t?=JE_~Z17NU#+0NeW|>cA!fFzAiU6m&548%SRq|UIix;ukoz# zgEOy;kml^on3X$vR|M99Kkhz7`KIuGjg(go^;Zg(rB&zpHfEcAQX`9>bnLb6psOAD zq)73ilhxed_wiu04kGW!68R@BVYfBGvr&^3UgFL8Jn+HzTy|zZKA)}s7d{wY1U?vV z#TT;;Y}2q0#+Tu3zx0gwN;DZ?%{IcSpT)96hO-@`VubJ=<9e71#MunRo| zLCgd2|Bs-U_3T1+1N?uLt7HUzQ%ZOTyfScXL-;8{x;GE-9DrlE*|s{cOuEN4z*thS zlsm8m9&fwIyQIUG>g{Uh8>;~ryhisKKp_SJ?{Vrf%Wu0Lp%ouWr3lFMKA-Zo2QBWVv*q(i(SXAVTfJEu7|6u*tL-W z=L7uV5Wx9_UCAyV!X4YBIr$r(lTX?2Mo`4xIf`Icz=V$p8pd|*k`q6OkHLg~4-^9= zxIw3)RKiE%{}R~g{H~+7rw7cqUeda-Th~X(oD}mwv<|3}6X_9(%=Kx2MDxy!`AnQK zG7dHx8P9Hn=#RuAIgyb#Am!S6Azt(be^np5iM=wWwvl*}5Y{$v{eI7G9&`OjDoK;p zk7Tf&Z2Qpq?T~tt3F}9)SpV?)ksNXT2L7Y=t$_+r5*R zh?!VODZ7o`&JMCed`A{W%(ygs2%pz@e7%7tm%r0JG$j@M++%F<@b(QaVi=o&xNeNv zozlJXUJqClcQ6P@H6XPMyvNDqM|TEx_em>}rgaXV*17Bs)_RCk0Dc7&OKhYPsGaI1 z68Fie)V=IZwucS=x3H_0)1904UO#KdGm!4KZIm?^tY&Dfm zFiv$%_9}a2qi8P42C|WpA7KIw@D-HW0k_W*PZXr@Qo9Uo->XoP5ILKiLpGCh$$8{_ zvV~j#ROCfuE4i3lLM|njk;~bi*%RzZ_80aPdzwANo@LLm=h+KvAA6DQXD_h>?B$W3 zU&;HMifwM-A=h!YyQ{!wXYnm4x;5A$B+YyweRWsAL{(pgnjYp+=nE^resP=ISZ-qkPznYzqsx7Y1=b#2&CV{MN&pr z9bV14vfAN_Z{t#_*x>y&6Q{U(u-HE$+ z?Y954_OgZsdqsU+M2+|I8gs=nm(l&Kad|s?U7hX?8yt)5RZY&8%0`F1zAik=5AaeN z9_#CXWCKRK9VVovtPX~9^3r&v{YIamQ8!IcC zVfZbu-W9MNnqWUPG&ecmBYdM_UYVm(BCyCa)NMq%l}Z zGD}RxOryzQ$ead$I^(orLuQG^kSSgm4Q6xZAUO;x^d@vCQp!)%t}ZZkRC`$ z4{krCb?~5w)88Ow4?v{T0(jPLx4{9g9r#`kBq=EB9914aKZ6bQ_<&FI0~!{gkQ7KL zhHI5rlK?z+1cBAAbp=+#+J)O3<{a%dso83OkJt_maN7Ie^g-%dU2pdax1V7~S@gK^ z3}7l^0*g^XUPlyDDv(k*xK|NBH8&5A8+H29S+nOD+(_g~I^_wAYMRCwN%{YC=Ofa`FRbncLGvsO`D}DuV&)5z zLBuZya%%nhV(5!uV__zA%K(?KG#dd7B&}aRa-Vlsybt}Ys~=VfsojA(8{A&l7@3Q( z(6-#rSK47MwU)X&+ReoV@vxL<5amIRT`97oRj3cL=C+}mAv^9)ICpv;PA86{Z-G8f z#u|w747eEb+c-(ebKGV?mfIZQ4sEy!n8F2+-`0UQBrAPQ2jCf0{;NHX_Q1k zZW=!>jfaf1a=_J9kcsAlqf!R=WEWZ>Vehgd>^=5A`+$9T8=6eMApam=lCQ|u(8F)Zcfe4@ zv5!KyAcUud@XQdd3*q_@UKqlS5^a%K4s71)9v>t^1jO_ro=62)WaxBBGLc|bgOFI| z^Fv4sm{!@?>*X87-3P{_jq@a@NtsEGwv}#9LL^FGK@7M|h=Ro93b4H4-6bg-)RZP& z@smhzClvJp`3Yw-c5jCd#KW+9SUg2)PU=*+GO16RMjwEZpewRX@%)dc8ilh~s6bNE;cdG!^>c;1XcWuO9+|R_pP?nQae{P-8ykvsU4QWLrR9U}MIV zv3u7@iE^MEzpkZAJPaOYnLtMS>srKYAW>uWzK#x1im_@6jFRFx3nv>=S#NNqkMr=q z9x*@0sq%HT1703$w$}PxJrD@Er9*i-9imb?gMG(Z#XyM8#%Viw(8+(rfRodRt;2aG z;RUXuc9c8-wq+jsp8YUD=hFr3IQx-hHFrSMf#vN($5ztOqf~W+cq*VAXAW1=L|Zs( ze1u)qPZzNhprR6)LR+a5$P~Jio<^6^+7`kzgoO~!3t=&D z?*C6tg|6nS(-p!|qevC%qdmBgREKa(2uA~pI5BaPt5SE9q zB7~J893R37A)L62UPdqHiU=oY^Fuf(gr|xs*(Y%z+EZd3{?AB|e@$K%LO3OaQ$si{gw-KDDTLEQ zI3t8LA)Fb)Ss|Pq!rBnd3E{~hJY|@ipkf62Z^;QNhMd2JoS3ZR>3{e*A)gMJx#;~RPmjza0T^gH^`5H1X1T?m68_@4eikB4wk2$zJg zg=ZOMKsfpfu9+W#3=CK5LDmd^o?U7ive4SKKEXUt4_*KP`^1Oke5eQhIfB*y% z!iIhU+_{lOruq&FC|EU0t{B__7c#79$oRR**@-iF-hZMSbC#<${ve z4F1H_FMvNW|FUL@(-KsC9cCD-jHU_$gx?mc(WWz1R#|jqriyZ1vBhM7bj@NzS%t~z z=~?Lm+~n!*g_AjWiJ;GFaav5_22%ydne7+A443u`V1}(6tp0B*md2hbOpwML>hZ&v z!>wtB$&lnOfLWj3FH8yH8IYw0Q_m?9DWZ?aDh`(_5G*M9Hla|^33{POFbGDWSSS%p zf;og|h4AbUo)f}zL%1x2%R{&#gl!>Q8NyW%zzJ3k(S;epOktKVTbLuvWpN=~%`tii z&kJFDh`Z7@I{B+55OzU&KAdXV;E1aY^6OoY)9&wvD1G#8djKLg z;3k3~|BDBUJa85YnF>G+NhKV%1!DGz7a(**-Qg1&pfe;%G0P_iXP=PDx@5TU@MEb* zRdDRx1v;NJx|>*7p0A*`r;N( z16RCO>BDF#G>SMuXaZD)l<-beIMYU0EVP0S@_YTl(hzQ7xsv2^us@^al z;__=ZP8+~SAWpoBeZpFS&q#%rp9+x?O-FO!-M|)jH*h&bqj3<(X{jFGJDW~t(%G~E z-Z`tLcG?5)lWhZRvKw&89=aFaCcBs35ATyb2ycY^H=oKdc*wkUU0XOt&ubyRnh zFY4^5E2DNtJsfo)>Vv2+qfSIeMaM*skDeGEADtMT9Gw!K7CkF^VRTz`PxQLz_0b!n zH${h{FO1$AeM$6X(Z7q{7JYm4W6`fie;tEja14nNVq`HXF)9z zF(Ib<2FRGh|z3m&h)Y{Z6(`c9rZJ*>$oTWH-sS%LZgSWxHgz%3hGY8{;i~LIY4f31h z+vNlD-SXSzd*plNcgr7>?~}hPKPvx9{<9)lF-|c-5vxd0Bq>yiRE1ihQ&<#M#dJlr zVxGdTSfFT8v?vt)T%x#Iu|sjI;y%TTiX)0IlrhRQrA28~PFK!U&Q{JF+v9h~ zKNkO&_`~rZ#Q#11AMsx$R3y|SEKXRK;7RZ&+?X(s@M6N@gbxxvO87Y8Xu_un-z0pO za4g}6gdY=5B*r8v6DK8_63Y_jC)Om^B{n2BCN51}mgr1$CAKBH6VFN9p7>9>S>&b5>zny#}`TgV%laHyeDq1y8H9-}tN>yd5vQ;^%DJq?+ zNM%%&sLZO_s%lk}YN=|O%BgaxR;pI1x>R0OkLpa-IjXIyOI4Svu25}P?NRMj-L1M; zb-(Hlss~k1tDaRouiB^DuR5R_R2@>itNJ=+e2OYXn^KX|kg_OcNy^fcWhw0`9VshQ zR;6^Mgi^Mp>`K|2a!<;ADG#K)mhyF~Dm5>)I(2DkXX?4B=citfdQs}dsh6f+o_a;< zm8o~8-j#Y!>V2sXr2aAWq0}c+pH6)?_4(A-Qr}2@GxhD%FH?U=i%A=wHZe_>mX?;C zrcX1Z6{nffW~Ei6%}ZO6c0<}-X%D6yNP8viv$Sv1j-~yO_M*uU@EjsGHSZb&uMw4yxCv`_yNu&rzSJ-lD!xeYN^p_4Vo-)px5OQa_`9PW^)V zMfG9z2kMX1AFGe5KUIID{!V>N{e${P^@&NkNvBQPI_dsNFHbr=>Fr7HPI_N8m{zLjt=|5-S zjJOPSMtX)OBP&CjF*##uhAG36Va=GHF*9R!#@vkZjLwX6GH%N_knx=+S)%Oex*+O=7wlRBp_RQ?%*`3**?DMlP%l=*V-PsRiKb-x3_NUpO zYh$zuZM?Q#yI9+&-K4!)d%yMx?UUNSXrI;|)E?5lqJ2$!M0-s8Q%+LO)SQJmtvM@l zx8+`ydvord-1~C>l>2P%+qv)NzL)z!?nk*F=N`@dH23q|FLJ-ki_RODHz7}!r^rjl zOU_Hpo0O-?%gWQ{P0w4Dw>qyc@6x>fyhrm6*e@&oz3`D^nx=bx9qCI7lf-< z^__aJ{tSIkzgB;iKBV8QKVN@={xbd5`iJ$e>p#H3$78vRb3k^+%MTSVUJ<2;Z?)ChWCsyMujonIM--5E-A?lS(__`GqS@e|{h#;=R3itCFP7GG1`U%aDufAMR@ZxkOd5lW&@zmU}GESe~=&v+TDVupG3!YI(!*mgQZ``<4$aUzA3d zYT%G%LFtOpwWXobt4i-IeY|wgnqW<{8sPM$+`7P8XKk=HTAkJv)^=;Bb(OWt+H38z ko@w1+J=c1kb&K_K>s8iktk(^ld=TkV@I)MZAnOhP1A(S6W&i*H literal 0 HcmV?d00001 diff --git a/example/netfox-zxkit.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/xcschememanagement.plist b/example/DDKitSwift-Netfox.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/xcschememanagement.plist similarity index 69% rename from example/netfox-zxkit.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/xcschememanagement.plist rename to example/DDKitSwift-Netfox.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/xcschememanagement.plist index 40ab22b..b0fc518 100644 --- a/example/netfox-zxkit.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/example/DDKitSwift-Netfox.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/xcschememanagement.plist @@ -4,10 +4,15 @@ SchemeUserState + DDKitSwift-Netfox.xcscheme_^#shared#^_ + + orderHint + 7 + netfox-zxkit.xcscheme_^#shared#^_ orderHint - 8 + 0 diff --git a/example/netfox-zxkit.xcworkspace/contents.xcworkspacedata b/example/DDKitSwift-Netfox.xcworkspace/contents.xcworkspacedata similarity index 77% rename from example/netfox-zxkit.xcworkspace/contents.xcworkspacedata rename to example/DDKitSwift-Netfox.xcworkspace/contents.xcworkspacedata index 502b869..18a984f 100644 --- a/example/netfox-zxkit.xcworkspace/contents.xcworkspacedata +++ b/example/DDKitSwift-Netfox.xcworkspace/contents.xcworkspacedata @@ -2,7 +2,7 @@ + location = "group:DDKitSwift-Netfox.xcodeproj"> diff --git a/example/netfox-zxkit.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/DDKitSwift-Netfox.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from example/netfox-zxkit.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to example/DDKitSwift-Netfox.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/example/DDKitSwift-Netfox.xcworkspace/xcuserdata/damon.xcuserdatad/UserInterfaceState.xcuserstate b/example/DDKitSwift-Netfox.xcworkspace/xcuserdata/damon.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000000000000000000000000000000000000..8da905057d6395fcc2b8e57e270a5ff85339d8e0 GIT binary patch literal 18037 zcmeHvd013s-~YXw0R|Xm28Ka}aX@5e7G{PSWYj>BBo$E>cgF!n90dkv2Di-ala<+` znWeUwfLdv#Syr~FSx>8#Tb8X)^|Yw%R$5lR-*XNFqO`ov?|HB5_s1g_%$$2)zRTyk z9BW$|y@8uN>uB=&3L6Y;+JsAbE9V&>i$JyiJX7Kv5_fC7?d2FR~&V%13tOKm}+J zDnw2+7!5%~(MVK=E<>ZxI5ZyBps8pEnu!|F9OOf-XdYUKE=Nnz)#w^@16qY{LARm1 z(Ry?bYDb&U{b&n%3_XdSLVM6&^gQ|pdKtZfK1QFQf1yv&XXtbE1v-vSpp)oJ^esA# z&Y+*sFX${fhY^mzavX^jI0mQV44jFxa5m1tx!8b>*o4j4hMjmgF2PgrG&~)<@C@w6 zwYUz~V-KE*XXClpj|2E}ycpk#Z^LWwTD%V5j_<&C;=AzOcs*{%_v0;iD}De!ig)72 z@YDDiyc-|IZ{fG`G5ijG7r%$!#~NBk2$jnCkp z@h=3CND@V&iGsusCFx80kwl^=sl-ZbB%j!cgA|ZKWH1>*ibx5$jFgjcWFl!KO{AIl zNDG-u{3Jkvq?Ifq*OBGqdU6A~k=#U9kUPkof*t>gjnAbE&vBRk1sC?xM) zQfbOcMojSe=LA~Zb)FJmU2Bu4Ip|Uiv<@pR7*=A*GgwM&!wfcyt;A4Z8J=fwj3_N0 zVKJ8!n2Ym56Zb>u$g&kBq9mk4{gECeqZBj%rJ{i-jmcOT3uh5b&LUY9i)IQI!<1W5 z2FgTPC>!OVTx38-WI|??$5bqZEoIlTOW8X17<-%<*)H}Z>*G?X$G0{Q_caGS3xeZ4 zb+E*MOVzK$Gt=GL7#vaW4f_0|un3g;{MF+}2c{O+1wq(U*3I%Xd0>;$BaBhv2?V{( z?jVRHC?4kbxaYL^yfB>D0>n+dOJyGI4g`n$npzq?@LVAXus{%|ltvro4uG5zhW7>+ zj`y_q{BT^#(8*2kHrM;+3yYJ!75n|}<_1_qbFjoy+uBgpJk#e=>Bsv5o?y`3b3rxU zfVbA$2*bjFm7YeBkDmIj0sBb%mNpxjPS|Vc7A`@p&%F1S(}3 z)|cso%kB@CebGTm+X{gEb*b`uYakp)HEg=)YKJY9I*R?$d+XP;y)Z#&siRRjvb3Qw zEWQnmWm@rqOG-w0gO&5WGlPb5PjIGh!68%$L|uid1(FVWn>?w-FOUO|etB*KOE`ok zpowS_nmk#e?PhnAXQK4g6R0V#EPs(>vn!YgxZGRL>IsXthc-3whD(NwC^L(C=+-U`Z~O zGp{tyHr#9;X0R9Jl^ARzO6`VX+wfrqi`{0n<^d-a54X9zEwg;ho`AQhwb2cv>{?J@ zciC;yk{eNzs2@9*TqzFSff`Y>xI5`NwA2>l7nVAg^>0G~rWcm_|F#0*3g)9~@#uG| zu74(U^e(ihT{y7N#Ea3D$kL9kKug#FmfDUO;@LoE5*E-GXk%Qfw{Fg8pKp#tzDDW8 zr7}#c^VNHd&;l;Mvou88#tKh^JJ1@a^tJlyJj0<~XtHb3b;2%}v9va{oMo~;htZ9& z&YRE*v=ZGckV`Ev=@j_%d*DDp5HQ3tSh`C!dZxG0Q)n`ofS&yUQ@y*%*KBI=23_zw zvbENO42XEnODy1Wt?u^p}MK94o% zcHunMqIE2bWw)a{(48!Y8N~Alv36*qqkVOvKnhF?)l|3}Jb^=^P~U*sHn3c2st&Xf zHYbRbh3%*VO_5q`Ms01#1fnumg+eE^6>UeBjpzaNAbJRGV`gSyHfG<59!5LRBj{09 zz$%!Fwe&o>UE(R_xm4x<-YH4v1g8h?d%rku>NP}5GTBNj_1TV z@?EOR|I|K2v2^i7FNqU5T&fxW`-waY+=7BJT_pBQHD1qrLDl(vjg20EXjVzZzlx3` z%NDdBy@p;#Z=eI{AUXt>egwVA2C+isWP{ldHk4h$idZolwgtTf`t=z6yo=rg4SNiI zh;rC)(5@rlr;J?&L^G0&f@fgUe%*Z5$)o{M1&Nw6>Eg;+zWHOk&E6(=i%XT#Yqh|# z!+ikxfto?*_1dPad7hy48a<#gFCL}Qz0lVh9I*hjuV6$#o79U(sS^%L)c!`_%$dNb zy^Rz&uT`VB8P?PLmWo@0vwVJ-=;CTYQkD7|>p`;jc3SiO?v~Loawp$@C2-}}tVG~l z0i1n@+BTx^(JA4VjbNqXZ?39H6)TSjaqX|@H>BOLfhDKz`4)-)I%_b-9MZO9f+-u# z#WIrigD7!7ARes3Y8;E>um;Ct zEl$9Fa9=i#jc1jtidC~3Hi1oKli1`fII$=3;8Y-K|Eg~iFrU0zP~1kD=;9cEqDpO5;M%>tMF2MHNFO4i|Q3C8F2{M8OM0u>+LIRV?`eIiU_~2+`5w zco)*P;V0PDZTLxc4NIN|P`wj66(4Kzk;+|@Lv2Z-iM#V&*OjK7x0Vt zCHyj5#;#+_+4bxOb|brqtzawJ&0A0o-Y*apeghxC2k{|%7#{%wS|t+IEo?QrmEFeH zu(d3CvNtfI(c2(^1~B1+ZhwOZZ0mX6I!^_F{h2;L*h|{;i^~E4r|SG*%wJS7!3!3G zCjk0hCH1H*8CB!(CT}Cy)$!-A zXAA&|MgbgwU3a17*GtLJ`gy^6aesyjS{MEur~YufHYTBOqOkT0{F!Zi7}wSh9E)+_ z=_v(E>1cm_a>{_1)PZT~8JSR4>0RW3xn`C&x*Gz5OUDE7-`fJ774V9VbO$DQ>w~kP zogm0ki_)c&R$r%L;Su1hOaO{D7Po+LR=E)TeofV7!W_c@XCIEq$u$^FE>(gwZ}+%e z#M|$}n)5cOjb-?1jztJN%gayfuvl%9SG2?KC=flP@hnbsPYDwWo9OE7QYDvH4zCi* zOFeEuLg!ra3~B(@JPVM?ZIFTGUq z6uMN2FnVZY!Sm?zm(>Gvd1rb(e%NqVZPmgSPj`(9slpDGkF6Njn;))+Gp)U1e77&I zd~8+q^e!))=+Nk>su>@0Zh%~r_9`5@xD}XV(qs_Q7oKkWl<~ckLhEVMJ87eR+IV=J z;ReBc9<|j=bl6@C-FqpA=#v`t1NU_nvOt`v42_1UQl%J4S_~1S8^O7AC&Z8LfymKz z^aOeiB1SJl%;;4x%a5RsAX@Yt`W@mzD%=+*;r>{UQ*bIC3~``oco9T;cz{>e;}!U3 zd<#T<)!h@frnDkyxSuKDR+crh<$o6G$zYLl%(B z$<+{rSqG7qjSy*hio8w^l7Ero{0l;LlCC}{#@<}H1(H_U@6cj3J*$=XU4!@dDO=2rUB_-ZpUFrGX32-aX(XQj0A2 zk;!BVnM$US>BL255I1|8J;QdhJ!~&~mhEHD-G`2mdI43D1~Ogv1X%vOh^YPnO$0X( zTuwY3sT5@>3zR}QsS==)r+Io;X{jH?B)Dp!0A%MFZv!YZPraz60;PUmQ+efh2&(w} zfN|@C+O-fAbH8rCv*xC>Pm7e zz&>&_Sw(IktJ&-94R(MX+(>SNqP1ilI|N1VvwsRpPVV8m@0!opbqTQEkVCtx7DW4{ zeqU>gRMF|v>l&!s7X%m|5Mlw+*RFn{_1!}@3hUcI+DJR;V29Ze_9i>J5xq+`lY7y- z;M9DJy$ye1eVS5lW6&eT1&1vZK(`pGQVZd%u5pE8(D&8N;KA*saUW?6PknWnNZRL( zBY@i;!&Lg90H*BIC+BX0?#7&83k6V5K<~2 zzUcP^Ko5%n0`?wzcdVKw_QY^`mO+!efK$W;!bLa2{)z!aLCm6FkcZO&{D6nF!WRIt z@ikAA+`69nGUyZ75~fgV`XnW%Wf=~IN64eATHL`|lOTxcSuhg9qV17Uz1euZm8sAn z0C~~9Ex@y&#VtB;#U)xHjCXL=$htC^FgCgk5YNR%efTMFdS52i0 z;=Wx=6Ir4Xq<(WlH>`GrWXQARc?cttedIaz0sF8Wgs>o!4+`QftxIZ(;xeQ+MCob- zc-ty^CID9bS-Y}8pw$z~ARw=j1A=hfPhJBs`3C!leat>#{}P1jA#zw0uAj2c{{IlJ z?~xA#;rc%Nyp4RwzW7Vw`UwcvPyb4|9v`dP(NngDg~$B+vUP(b>58NFv`0j>%OiW? z%xJ~MoVg)FooE~~YIOC)DfLY)3$K!h8;4-LGDPg1pG#AVT8hN)A)+}>P6F5@C)k&5 z zSck~0;G#-xk=li-#mvU~p2`{wc|ZuADM}?m?vDh{k~@pK^NM=*3rrv5Uf^v4>mQ6% zxF|t33%wfv$_PsogxF!)m-Yk5P=M~Ig32qe>^dPS0tj08yfP81vtLEoNOiP7WJYwg zZ>M@R<@|!lV_Q7UWz7J@11bd8apzf#_RI`c`Nn%2W(7rCg$@MUg{JWscRAK*CN&8b z;u)Gvb7(F#P$N6VW5Q#~V~)o%9*1qFW|~JW@YjZp@i?5v5j-9$ewiYfBWmeTVSX?g zI!_=@DjNxi2*?%+>*fTeNoB%C=UH>62xw*$;1&_%=>ST%Hr5M(x&kbk@t(OL<%Eyo_+vzZ5;&BuZDKJf}a0bPJ&RIpc1m_weQK%FTQ96y0 zsI8rr(aU%o&Er&-`!*dz%jsBJfs}L{9ZxH16|F`q=ma{ER)JZ!1oC1+L0gGPK_dxM z2tFy`S0SN5u%iUs(V0%vlS}|e2L$ryPFDgSPP3>5I!C&&y}C!OFwd0G3Ltw0dWW96 z#X^?{h{tLkr$ABdJdR;Tm&(+o z?s^=nG-|hP(xo7!>zj?*Hqkk>kv7q0>f^DB$8kK4=WzlL(ed2F)K3Gj&nl2<^CoxC zUoEaoI1VF^WB(X2Nu0NkE`q!Q5DMKGL~=ukqg1%P{&sq~fJFYZO=vAw5CfgZV-4E@ zQ%is}RCSfGOde~+RSD=fRIyB|=+n8}i*a|T;f+$met*(%6`aQ{=s9{TT5&!dO%gKo zfHIp}SU!)F804owsvccS*MUF;z!bW~P&}ob-Y#spw<<7-=$-T~diP|(D3Oke$9f+3 zcd0D@iwv&LR2yj_8)(}USVoB8+94Zu%J~IStBrJ%OO@GW;dOFU_r3Mxt#-Ou*u&p$ z58G{Nt!?zyNy$BifSBPX&3r%I0;Vg>+(YCElA)b$6=vzR?qYHCAg!j`=ynh{I{=X{ z;c*5qFpmv99w>6~5b!2lz`>8v$3q;<<6IttaPML)iA|nCZ5?zs-9z{CIGx8?JkIWB zjtA-U0@cAhnIbc2dP`&i+1trWJ!mmh_?kp_Ie$raF9~$V93q8w&)9vAU=^2O{1+MP?}lITRPzo6YEeaU0M1H~e{O}a>7as#;3Zgwl<@vsZojmrY9 z#AS0iTrOwefP#nfxP-?ecwEZkOS>6Q)Jh>G6yl^F>LFCvLotL3dt*edSYpJHf60iV z0_YU=p&Pl3s|H5oMscILFVyIEw`+jo9cNy?ILcvN#Ldx+)D0dZWVV6kEiq4#p4+~cJsLQ|CXCJN!(QT zZ*kK@+#}$X;kI$xxrezOJf6wp1|HAiv3Dc)D7TXsxW{=so5wx@2`*rLCJLsSAnGQG z)|&8bvSh?bMzL_dU6y2*VH&#C-Q07+Y}+k1 zCgSLVK@?i+>)cxq1moV|4sZv#L)>BR2=^v;l*cVRp37rDj{`go^0<}9fJ^2>FiiZB zGNR!->_hmGvY~}?Om>?^R^ng&J*01;J4yV@_1nz_Z5#92^XRUu--+jq75$T?eFlp zcJ6!b6pt_GG3)X{a6fUsz*|tXMm|`)Hui){L4sILD;eG?&VVCmwN=RdaQM=8! zslrotL{J5f0y&OxH#B>Lt@WPNB7Xb%9yS>#i|B2V?I=eU1>7l2!b28!5zl&bQ_57x z0?-BCR}s_sWpT3jt{uy?JifX!Ff8i}yOZ^kfpvQgkFV?6ovgoXKra)^ATwJAXdT|0 z1E)Gmo&@(L$;i|q?~EQx$d(y<8vx!7kO4AY&H(OSFE~?`Fht1hB#?h<(bT=-K;ZoE ziw3|;dwKBc?In;FA-rlk9bUa$0xw*yhF2{&(Jk zzOcDri^8r6TM>3!*d1XVVGo4u3wt^2XxJxVpM`x9b~5a%uy4X?cyzcnyia&dxGQ{a z_=0dgd`0-G@YUgK!q5Ci0iaUn75yaz`~sEseS+YFX6ss2iegidq@9 zDr$AqZBc8Z9*BAl&)Jg34cs*&r>f@ zFH$d7FHtX3FITTo->JS^eUEyhdb9dI^%nIm^$Y5E)$gl6RDY!YME$AybMwz&0iTjRFJ?TC9cZdcq>anHoMK?_>ba0iT^bI^Z4WO z-^c$D|5N;#_+R3G)y8Yh+ELmi+N-rUYFB92YS(KwXxp_LwVSn%XrI(Rt=+BNt9?=X zvi4Q&YuY!oXA;sA#wSckn3ga*VQxYop*3NC!jc4*a8<(93D+j9Ojwg}Pr|*4k0m~l z_-x`EiANLPPdt%$I`QYkvx&bYo=d_>G)a{do1{t7CiO|`mz0#$KWTW#MjE-t$v(BP(>W1oybi;I`bfb0Ux(T`& zx>{YmZl-RQZnkc|?mFG|x*K&XbT{j6(cP+Bqg$uDU$<5Fpl+M)VcjFTow~<$yL3J#-kyxb%# z^p*OV`bGMi^lkb__51X1=-<}Aqkm8Tf&QQRkI@=eJrlUF6LPTrEdJNd2T?^6^h{Ze!(`ji1F15?sdic>C2X-M&= z%o%w7z|{kv9{AkAFVn`QO;4*!^Q1MTHKsMEwWRse?nv8{wme%fbg zU!0{Gpr_WDcl)gCq%5*+`Y5Mx~d()p!e`NK#{P`gGTz8|JLA)gUo(EsM42R$%M8nm$c)U4&Wy=aWyWS^W#(iW zGEJFznbu5u=Ag{MnU`c1XO?7^W_mN%WZswgNaoSZud_5+*;!+MOv8=DNPG|j+^;_1t?C9*i*@@Zxvs1DMW@lt)XFIYBvxj6CWe?9T z%^sP3S@!hoVD?qnE3zNT-k$wT_P*?YWWSXCTK0kLL)k~Nk7xgyBg=`*QRJv{VsorH zV{-yI*W`5MJf8Dh&PO@_%K1F!c+QtO-{gFs^Fz*0xysxDxp}!|xl?l&xw3hT9Ey88#RmG;BBQFzhtEY&dE-W_Z`|f#G|@Ib)PD-k4zQXG}7t8J)%= zV~x>eoNa6}wiq`VA2L2^++%#zc*J4vH?^BKneH=fH9cf{*z~CB zG1C*KgQg>3h?UrZc9qrr*qwW`$X0jx%SQbIpUygUv(D#pZJJ zICG`B#ys0R-@MSg*u2DigL#9w!@Svizxe_4HuDbiPV*Dyr_8&}hs{ULZ=2sSzi0l? z{E_(+^QY!7%qPrW=E?Ii^G4@2=iQR`MBaOOXD$6K4oi_`xTVxG(lX96*)r8K-7>>c zYpJ))wfHRoORME7%QDMy%Z-**merQqENd;BEjul{Ezeq>x4d9^!*as%mE~Kj+N!Z8 zSo>LZ)?{m{HO-n~EwT=`mRifKqpf4D|mnw_A5ucUt#Z|6zU6`ik`}>pRx>tRGrW*^rIcWVUdd#+GHvwVB|5Daf}K z*qpYZwqjd}?NZxRo6F|5)!96@S+?1>Mq9IOt}S3|wcTQS*!HIFbbexfalR-2>imxU zz4o7I;vIb)X^u=sw!`2kc9c6R9F>l0N3COyquDXn5p>LVFvn8IwT|l?H#lx` ztZ{5`Y;`>6IN&(uc+c^n<73CCj;|fxI=*-O;P}aLra)U@EvPB*6)Y~eso>^<)dgz` zZZEj2;GTl^f=vaF6+BV!WWmz~y9@Rf>??S_;Dv&h3Vs@tKB#igRf8TJ^nRhTaA@JE z!t%m#g;j+U3MUmd70xTXyl_b&U%0gJ=EAjwcNE@TxS{ag!Yzdl6mBbgxNuM5{=yFn zzbO2%@Ylj~PU4g~qn%2p+Np7BoqA`k)8I5Z&CVgtBIj^tsk6*E%30-{ 1.21.0' - pod 'ZXKitCore', '~> 2.0.0' + pod 'DDKitSwift/core', '~> 3.0.0' end diff --git a/example/Podfile.lock b/example/Podfile.lock index b068b87..ceb8797 100644 --- a/example/Podfile.lock +++ b/example/Podfile.lock @@ -1,39 +1,37 @@ PODS: + - DDKitSwift/core (3.0.0): + - DDLoggerSwift (~> 5.0.0) + - DDUtils/ui (~> 5.0.0) + - DDUtils/utils (~> 5.0.0) + - DDLoggerSwift (5.0.0): + - DDLoggerSwift/core (= 5.0.0) + - DDLoggerSwift/core (5.0.0): + - DDUtils/ui (~> 5.0.0) + - DDUtils/utils (~> 5.0.0) + - DDUtils/core (5.0.2) + - DDUtils/ui (5.0.2): + - DDUtils/core + - DDUtils/utils (5.0.2): + - DDUtils/core - netfox (1.21.0) - - SSZipArchive (2.4.3) - - ZXKitCore (2.0.2): - - ZXKitCore/core (= 2.0.2) - - ZXKitCore/core (2.0.2): - - SSZipArchive - - ZXKitLogger (~> 4.0.0) - - ZXKitUtil - - ZXKitLogger (4.0.5): - - ZXKitLogger/core (= 4.0.5) - - ZXKitLogger/core (4.0.5): - - ZXKitUtil (~> 4.0.0) - - ZXKitUtil (4.0.0): - - ZXKitUtil/core (= 4.0.0) - - ZXKitUtil/core (4.0.0) DEPENDENCIES: + - DDKitSwift/core (~> 3.0.0) - netfox (~> 1.21.0) - - ZXKitCore (~> 2.0.0) SPEC REPOS: trunk: + - DDKitSwift + - DDLoggerSwift + - DDUtils - netfox - - SSZipArchive - - ZXKitCore - - ZXKitLogger - - ZXKitUtil SPEC CHECKSUMS: + DDKitSwift: 3143fa7df258879898f08e16f2b59b1227661541 + DDLoggerSwift: 3b6e451251ae07a6614d93493b7c4e512e155950 + DDUtils: 56b14d305b574751a3e5336717a6dfd56dd2c58c netfox: 9d5cc727fe7576c4c7688a2504618a156b7d44b7 - SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef - ZXKitCore: 7a67edfda54439ae7d81bbb40cd990f1c09bad2f - ZXKitLogger: 22f226509df679728bc8da7a7983d672cc9ccbae - ZXKitUtil: 0d23a979cdc7a7f9df0722148a613986ef007288 -PODFILE CHECKSUM: a3053aa19941ffbde4e9953a46524f1b8d21a1a1 +PODFILE CHECKSUM: 238c855ba3ca3eaa269370530b9691c2704e94f8 -COCOAPODS: 1.11.2 +COCOAPODS: 1.15.2 diff --git a/example/Pods/ZXKitCore/LICENSE b/example/Pods/DDKitSwift/LICENSE similarity index 100% rename from example/Pods/ZXKitCore/LICENSE rename to example/Pods/DDKitSwift/LICENSE diff --git a/example/Pods/DDKitSwift/README.md b/example/Pods/DDKitSwift/README.md new file mode 100644 index 0000000..3c49a24 --- /dev/null +++ b/example/Pods/DDKitSwift/README.md @@ -0,0 +1,173 @@ +# DDKitSwift + +![](https://img.shields.io/badge/CocoaPods-supported-brightgreen) ![](https://img.shields.io/badge/Swift-5.0-brightgreen) ![](https://img.shields.io/badge/License-MIT-brightgreen) ![](https://img.shields.io/badge/version-iOS11.0-brightgreen) + +### [中文文档](https://ddceo.com/blog/1306.html) + +`DDKitSwift` is the supporting framework of `DDKitSwift` plug-ins, the object-oriented is the development of `DDKitSwift` plug-in. It provides plug-in display, management and other functions. You can quickly develop and display DDKitSwift plug-ins by implementing the `DDKitSwiftPluginProtocol`. This document provides plug-in development tutorials and use tutorials, which developers can view as needed. + + +## Develop a DDKitSwift plugin + +## 1. Import the core file + +Project import `DDKitSwift`, you can use cocoapods to quickly import core files + +``` +pod 'DDKitSwift' +``` + +## 2. Implement the protocol + +Declare an object and follow the `DDKitSwiftPluginProtocol` protocol. + +``` +class PluginDemo: NSObject { + var isPluginRunning = true +} + +extension PluginDemo: DDKitSwiftPluginProtocol { + //Unique identification + var pluginIdentifier: String { + return "com.DDKitSwift.pluginDemo" + } + + var pluginIcon: UIImage? { + return UIImage(named: "DDKitSwift") + } + + var pluginTitle: String { + return "title" + } + + var pluginType: DDKitSwiftPluginType { + return .ui + } + + func start() { + print("start plugin") + isPluginRunning = true + } + + var isRunning: Bool { + return isPluginRunning + } + + func stop() { + print("plugin stop running") + isPluginRunning = false + } +} +``` + +#### Optional Protocol + +``` +func willStart() +func willStop() +``` + +### 3. Register the plug-in + +After that, you can register the plug-in, you only need to register once globally + + +``` +DDKitSwift.regist(plugin: PluginDemo()) +``` + +### 4. Done + +After cocoapods is released and online, when the user opens `DDKitSwift`, your plug-in will appear on the debug collection page + + +## 5. Custom Configuration + +#### 5.1、The window color and other display can be modified by modifying 'UIConfig' + +``` +DDKitSwift.UIConfig +``` + +#### 5.2、Debug folder, which will be packaged and shared during floating menu sharing + +``` +DDKitSwift.DebugFolderPath +``` + +#### 5.3、Display textField + +``` +DDKitSwift.show(.input(placeholder: "placeholder", text: nil, endEdit: { text in + print(text) +})) +``` + +#### 5.4、Update floating icon + +``` +let config = DDKitSwiftButtonConfig(title: "test\(i)") +DDKitSwift.updateFloatButton(config: config, plugin: PluginDemo()) +``` + +#### 5.5、 Output debugging data to floating window + +``` +printError("error") +``` + +### NSNotification + +`DDKitSwift` provides the following message notifications, you can get the frame display, hide, close, and register new plug-in timing by binding the following notifications + +``` +//new plug-in regist +NSNotification.Name.DDKitSwiftPluginRegist +//show +NSNotification.Name.DDKitSwiftShow +//hide +NSNotification.Name.DDKitSwiftHide +//close +NSNotification.Name.DDKitSwiftClose +``` + +## Install and use a DDKitSwift plugin + +The DDKitSwift plug-in is easy to use. For example, install the log plugin `DDKitSwiftLogger`. + +### install it + +``` +pod 'DDKitSwiftLogger/DDKitSwift' +``` +### regist it + +``` +DDKitSwift.regist(plugin: DDKitSwiftLogger.shared) +``` + +### open the plugin list + +``` +DDKitSwift.show() +``` + +### hide the plugin list + +``` +DDKitSwift.hide() +``` + +### close the plugin list + +``` +DDKitSwift.close() +``` + +## DDKitSwift + +We have released a cocoaPods library named [DDKitSwift](https://github.com/DamonHu/DDKitSwift), which is a tool library that integrates multiple DDKitSwift-plugins。It can help you quickly use multiple debugging functions + +## License + +DDKitSwift is released under the MIT license. diff --git a/example/Pods/ZXKitCore/pod/ZXKit.swift b/example/Pods/DDKitSwift/pod/DDKitSwift.swift similarity index 67% rename from example/Pods/ZXKitCore/pod/ZXKit.swift rename to example/Pods/DDKitSwift/pod/DDKitSwift.swift index c03f6d3..1fa491a 100644 --- a/example/Pods/ZXKitCore/pod/ZXKit.swift +++ b/example/Pods/DDKitSwift/pod/DDKitSwift.swift @@ -1,17 +1,17 @@ // -// ZXKit.swift -// ZXKit +// DDKitSwift.swift +// DDKitSwift // // Created by Damon on 2021/4/23. // import UIKit -import ZXKitUtil -import ZXKitLogger +import DDUtils +import DDLoggerSwift extension String{ var ZXLocaleString: String { - guard let bundlePath = Bundle(for: ZXKit.self).path(forResource: "ZXKitCore", ofType: "bundle") else { return NSLocalizedString(self, comment: "") } + guard let bundlePath = Bundle(for: DDKitSwift.self).path(forResource: "DDKitSwiftCore", ofType: "bundle") else { return NSLocalizedString(self, comment: "") } guard let bundle = Bundle(path: bundlePath) else { return NSLocalizedString(self, comment: "") } let msg = NSLocalizedString(self, tableName: nil, bundle: bundle, value: "", comment: "") return msg @@ -20,16 +20,16 @@ extension String{ func UIImageHDBoundle(named: String?) -> UIImage? { guard let name = named else { return nil } - guard let bundlePath = Bundle(for: ZXKit.self).path(forResource: "ZXKitCore", ofType: "bundle") else { return UIImage(named: name) } + guard let bundlePath = Bundle(for: DDKitSwift.self).path(forResource: "DDKitSwiftCore", ofType: "bundle") else { return UIImage(named: name) } guard let bundle = Bundle(path: bundlePath) else { return UIImage(named: name) } return UIImage(named: name, in: bundle, compatibleWith: nil) } public extension NSNotification.Name { - static let ZXKitPluginRegist = NSNotification.Name("ZXKitPluginRegist") - static let ZXKitShow = NSNotification.Name("ZXKitShow") - static let ZXKitHide = NSNotification.Name("ZXKitHide") - static let ZXKitClose = NSNotification.Name("ZXKitClose") + static let DDKitSwiftPluginRegist = NSNotification.Name("DDKitSwiftPluginRegist") + static let DDKitSwiftShow = NSNotification.Name("DDKitSwiftShow") + static let DDKitSwiftHide = NSNotification.Name("DDKitSwiftHide") + static let DDKitSwiftClose = NSNotification.Name("DDKitSwiftClose") } public enum DisplayMode { @@ -37,21 +37,21 @@ public enum DisplayMode { case input(placeholder: String?, text: String?, endEdit: ((String)->Void)?) } -public class ZXKit: NSObject { - public static var UIConfig = ZXKitUIConfig() - public static let DebugFolderPath = ZXKitUtil.shared.createFileDirectory(in: .caches, directoryName: "zxkit") +public class DDKitSwift: NSObject { + public static var UIConfig = DDKitSwiftUIConfig() + public static let DebugFolderPath = DDUtils.shared.createFileDirectory(in: .caches, directoryName: "zxkit") //MARK: Private private static var hasConfig = false - private static var window: ZXKitWindow? - private static var floatWindow: ZXKitFloatWindow? + private static var window: DDKitSwiftWindow? + internal static var floatWindow: DDKitSwiftFloatWindow? private static var floatChangeTimer: Timer? //悬浮按钮的修改 - private static var changeQueue = [(ZXKitButtonConfig, ZXKitPluginProtocol)]() //悬浮按钮修改的队列 - static var pluginList = [[ZXKitPluginProtocol](), [ZXKitPluginProtocol](), [ZXKitPluginProtocol]()] + private static var changeQueue = [(DDKitSwiftButtonConfig, DDKitSwiftPluginProtocol)]() //悬浮按钮修改的队列 + static var pluginList = [[DDKitSwiftPluginProtocol](), [DDKitSwiftPluginProtocol](), [DDKitSwiftPluginProtocol]()] } -public extension ZXKit { - static func regist(plugin: ZXKitPluginProtocol) { +public extension DDKitSwift { + static func regist(plugin: DDKitSwiftPluginProtocol) { if !hasConfig { self._initConfig() } @@ -68,20 +68,21 @@ public extension ZXKit { return tPlugin.pluginIdentifier == plugin.pluginIdentifier }) { self.pluginList[index].append(plugin) + plugin.didRegist() } if let window = self.window, !window.isHidden { DispatchQueue.main.async { window.reloadData() } } - NotificationCenter.default.post(name: .ZXKitPluginRegist, object: self.pluginList) + NotificationCenter.default.post(name: .DDKitSwiftPluginRegist, object: self.pluginList) } static func show(_ mode: DisplayMode = .none) { if !hasConfig { self._initConfig() } - NotificationCenter.default.post(name: .ZXKitShow, object: nil) + NotificationCenter.default.post(name: .DDKitSwiftShow, object: nil) DispatchQueue.main.async { self.floatWindow?.isHidden = true if let window = self.window { @@ -90,13 +91,13 @@ public extension ZXKit { if #available(iOS 13.0, *) { for windowScene:UIWindowScene in ((UIApplication.shared.connectedScenes as? Set)!) { if windowScene.activationState == .foregroundActive { - self.window = ZXKitWindow(windowScene: windowScene) + self.window = DDKitSwiftWindow(windowScene: windowScene) self.window?.frame = UIScreen.main.bounds } } } if self.window == nil { - self.window = ZXKitWindow(frame: UIScreen.main.bounds) + self.window = DDKitSwiftWindow(frame: UIScreen.main.bounds) } self.window?.isHidden = false self.window?.reloadData() @@ -112,7 +113,7 @@ public extension ZXKit { } static func hide() { - NotificationCenter.default.post(name: .ZXKitHide, object: nil) + NotificationCenter.default.post(name: .DDKitSwiftHide, object: nil) DispatchQueue.main.async { self.window?.isHidden = true //float window @@ -122,17 +123,17 @@ public extension ZXKit { if #available(iOS 13.0, *) { for windowScene:UIWindowScene in ((UIApplication.shared.connectedScenes as? Set)!) { if windowScene.activationState == .foregroundActive { - self.floatWindow = ZXKitFloatWindow(windowScene: windowScene) + self.floatWindow = DDKitSwiftFloatWindow(windowScene: windowScene) self.floatWindow?.frame = CGRect(x: UIScreen.main.bounds.size.width - 80, y: 100, width: 60, height: 60) } } } if self.floatWindow == nil { - self.floatWindow = ZXKitFloatWindow(frame: CGRect(x: UIScreen.main.bounds.size.width - 80, y: 100, width: 60, height: 60)) + self.floatWindow = DDKitSwiftFloatWindow(frame: CGRect(x: UIScreen.main.bounds.size.width - 80, y: 100, width: 60, height: 60)) } self.floatWindow?.isHidden = false } - let count = ZXKitLogger.getItemCount(type: .error) + let count = DDLoggerSwift.getItemCount(type: .error) if count == 0 { self.floatWindow?.setBadge(value: nil, index: 3) } else { @@ -142,7 +143,7 @@ public extension ZXKit { } static func close() { - NotificationCenter.default.post(name: .ZXKitClose, object: nil) + NotificationCenter.default.post(name: .DDKitSwiftClose, object: nil) DispatchQueue.main.async { self.window?.isHidden = true self.floatWindow?.isHidden = true @@ -152,7 +153,7 @@ public extension ZXKit { } } - static func updateFloatButton(config: ZXKitButtonConfig, plugin: ZXKitPluginProtocol) { + static func updateFloatButton(config: DDKitSwiftButtonConfig, plugin: DDKitSwiftPluginProtocol) { if let last = self.changeQueue.last, last.0 == config, last.1.pluginIdentifier == plugin.pluginIdentifier { //如果和最后一次重复就不再添加 return @@ -163,29 +164,15 @@ public extension ZXKit { } } -private extension ZXKit { +private extension DDKitSwift { static func _initConfig() { if hasConfig { return } self.hasConfig = true - self.regist(plugin: ZXKitLogger.shared) - NotificationCenter.default.addObserver(self, selector: #selector(_logUpdate(notification: )), name: .ZXKitLogDBUpdate, object: nil) + self.regist(plugin: DDLoggerSwift.shared) } - @objc static func _logUpdate(notification: Notification) { - DispatchQueue.main.async { - if let floatWindow = self.floatWindow { - let count = ZXKitLogger.getItemCount(type: .error) - if count == 0 { - floatWindow.setBadge(value: nil, index: 3) - } else { - floatWindow.setBadge(value: "\(count)", index: 3) - } - } - } - } - static func _floatButtonChange() { guard let firstQueue = self.changeQueue.first else { return } if let floatWindow = self.floatWindow { diff --git a/example/Pods/ZXKitCore/pod/ZXKitCollectionViewHeaderView.swift b/example/Pods/DDKitSwift/pod/DDKitSwiftCollectionViewHeaderView.swift similarity index 78% rename from example/Pods/ZXKitCore/pod/ZXKitCollectionViewHeaderView.swift rename to example/Pods/DDKitSwift/pod/DDKitSwiftCollectionViewHeaderView.swift index e47f634..cbaaffe 100644 --- a/example/Pods/ZXKitCore/pod/ZXKitCollectionViewHeaderView.swift +++ b/example/Pods/DDKitSwift/pod/DDKitSwiftCollectionViewHeaderView.swift @@ -1,13 +1,13 @@ // -// ZXKitCollectionViewHeaderView.swift -// ZXKit +// DDKitSwiftCollectionViewHeaderView.swift +// DDKitSwift // // Created by Damon on 2021/4/23. // import UIKit -class ZXKitCollectionViewHeaderView: UICollectionViewCell { +class DDKitSwiftCollectionViewHeaderView: UICollectionViewCell { override init(frame: CGRect) { super.init(frame: frame) self.createUI() @@ -18,7 +18,7 @@ class ZXKitCollectionViewHeaderView: UICollectionViewCell { } func createUI() { - self.contentView.backgroundColor = ZXKit.UIConfig.collectionViewTitleBackgroundColor + self.contentView.backgroundColor = DDKitSwift.UIConfig.collectionViewTitleBackgroundColor self.contentView.addSubview(mTitleLabel) mTitleLabel.leftAnchor.constraint(equalTo: self.contentView.leftAnchor, constant: 20).isActive = true @@ -37,7 +37,7 @@ class ZXKitCollectionViewHeaderView: UICollectionViewCell { tLabel.numberOfLines = 2 tLabel.textAlignment = .left tLabel.font = .systemFont(ofSize: 18, weight: .medium) - tLabel.textColor = ZXKit.UIConfig.collectionViewTitleColor + tLabel.textColor = DDKitSwift.UIConfig.collectionViewTitleColor return tLabel }() } diff --git a/example/Pods/ZXKitCore/pod/ZXKitFloatWindow.swift b/example/Pods/DDKitSwift/pod/DDKitSwiftFloatWindow.swift similarity index 80% rename from example/Pods/ZXKitCore/pod/ZXKitFloatWindow.swift rename to example/Pods/DDKitSwift/pod/DDKitSwiftFloatWindow.swift index 5725e9e..97f0584 100644 --- a/example/Pods/ZXKitCore/pod/ZXKitFloatWindow.swift +++ b/example/Pods/DDKitSwift/pod/DDKitSwiftFloatWindow.swift @@ -1,14 +1,14 @@ // -// ZXKitFloatWindow.swift -// ZXKit +// DDKitSwiftFloatWindow.swift +// DDKitSwift // // Created by Damon on 2021/4/25. // import UIKit -import ZXKitUtil -import ZXKitLogger -import SSZipArchive +import DDUtils +import DDLoggerSwift +//import SSZipArchive enum ZXFloatMenuStatus { case collapsed @@ -17,10 +17,10 @@ enum ZXFloatMenuStatus { enum ZXFloatMenuButtonType { case `default` - case info(config: ZXKitButtonConfig, image: UIImage?) + case info(config: DDKitSwiftButtonConfig, image: UIImage?) } -class ZXKitFloatWindow: UIWindow { +class DDKitSwiftFloatWindow: UIWindow { let items: [(icon: String, color: UIColor)] = [ ("icon_home", UIColor(red: 0.19, green: 0.57, blue: 1, alpha: 1)), ("icon_share", UIColor(red: 0.22, green: 0.74, blue: 0, alpha: 1)), @@ -54,7 +54,7 @@ class ZXKitFloatWindow: UIWindow { mButton.mMaskView.mImageView.image = image mButton.mMaskView.mLabel.text = config.title mButton.mMaskView.mLabel.textColor = config.titleColor - mButton.mMaskView.mMaskView.backgroundColor = config.backgroundColor ?? UIColor.zx.color(hexValue: 0x000000, alpha: 0.5) + mButton.mMaskView.mMaskView.backgroundColor = config.backgroundColor ?? UIColor.dd.color(hexValue: 0x000000, alpha: 0.5) mButton.mMaskView.mLabel.font = config.titleFont } } @@ -89,8 +89,8 @@ class ZXKitFloatWindow: UIWindow { distance: 120) button.delegate = self button.translatesAutoresizingMaskIntoConstraints = false - button.backgroundColor = ZXKit.UIConfig.floatButtonColor - button.zx.addLayerShadow(color: UIColor.zx.color(hexValue: 0x333333), offset: CGSize(width: 2, height: 2), radius: 4, cornerRadius: 30) + button.backgroundColor = DDKitSwift.UIConfig.floatButtonColor + button.dd.addLayerShadow(color: UIColor.dd.color(hexValue: 0x333333), offset: CGSize(width: 2, height: 2), radius: 4, cornerRadius: 30) let pan = UIPanGestureRecognizer(target: self, action: #selector(_touchMove(p:))) button.addGestureRecognizer(pan) @@ -98,13 +98,13 @@ class ZXKitFloatWindow: UIWindow { }() } -extension ZXKitFloatWindow { +extension DDKitSwiftFloatWindow { func setBadge(value: String?, index: Int) { self.mButton.setBadge(value: value, index: index) } } -private extension ZXKitFloatWindow { +private extension DDKitSwiftFloatWindow { func _initVC() { self.rootViewController = UIViewController() self.windowLevel = UIWindow.Level.alert @@ -124,7 +124,7 @@ private extension ZXKitFloatWindow { } @objc func _touchMove(p:UIPanGestureRecognizer) { - guard let window = ZXKitUtil.shared.getCurrentNormalWindow() else { return } + guard let window = DDUtils.shared.getCurrentNormalWindow() else { return } let panPoint = p.location(in: window) //跟随手指拖拽 if p.state == .changed { @@ -139,7 +139,7 @@ private extension ZXKitFloatWindow { } func _resetPosition() { - guard let window = ZXKitUtil.shared.getCurrentNormalWindow() else { return } + guard let window = DDUtils.shared.getCurrentNormalWindow() else { return } var x: CGFloat = 50 if self.center.x > (window.bounds.size.width) / 2.0 { switch self.menuStatus { @@ -163,7 +163,7 @@ private extension ZXKitFloatWindow { } } -extension ZXKitFloatWindow: CircleMenuDelegate { +extension DDKitSwiftFloatWindow: CircleMenuDelegate { func circleMenu(_: CircleMenu, willDisplay button: UIButton, atIndex: Int) { button.backgroundColor = items[atIndex].color @@ -177,29 +177,29 @@ extension ZXKitFloatWindow: CircleMenuDelegate { func circleMenu(_ circleMenu: CircleMenu, buttonWillSelected button: UIButton, atIndex: Int) { if atIndex == 1 { - let zipPath = ZXKitUtil.shared.getFileDirectory(type: .caches).appendingPathComponent("zxkit.zip", isDirectory: false) - if FileManager.default.fileExists(atPath: zipPath.path) { - try? FileManager.default.removeItem(at: zipPath) - } - SSZipArchive.createZipFile(atPath: zipPath.path, withContentsOfDirectory: ZXKit.DebugFolderPath.path) - //分享 - ShareTools.shared.share(type: .file(url: zipPath), sourceView: button) { result in - if result == .fail { - printError("share error") - } - } +// let zipPath = DDUtils.shared.getFileDirectory(type: .caches).appendingPathComponent("zxkit.zip", isDirectory: false) +// if FileManager.default.fileExists(atPath: zipPath.path) { +// try? FileManager.default.removeItem(at: zipPath) +// } +// SSZipArchive.createZipFile(atPath: zipPath.path, withContentsOfDirectory: DDKitSwift.DebugFolderPath.path) +// //分享 +// ShareTools.shared.share(type: .file(url: zipPath), sourceView: button) { result in +// if result == .fail { +// printError("share error") +// } +// } } } func circleMenu(_: CircleMenu, buttonDidSelected button: UIButton, atIndex: Int) { if atIndex == 0 { - ZXKit.show() + DDKitSwift.show() } else if atIndex == 1 { //已经提前处理 } else if atIndex == 2 { - ZXKit.close() + DDKitSwift.close() } else if atIndex == 3 { - ZXKitLogger.show(filterType: .error) + DDLoggerSwift.show(filterType: .error) } } @@ -210,7 +210,7 @@ extension ZXKitFloatWindow: CircleMenuDelegate { func menuOpened(_ circleMenu: CircleMenu) { self.menuStatus = .open //计算运行中的数量 - let count = ZXKit.pluginList.flatMap { $0 }.filter { plugin in + let count = DDKitSwift.pluginList.flatMap { $0 }.filter { plugin in plugin.isRunning }.count if count == 0 { diff --git a/example/Pods/ZXKitCore/pod/ZXKitPluginCollectionViewCell.swift b/example/Pods/DDKitSwift/pod/DDKitSwiftPluginCollectionViewCell.swift similarity index 86% rename from example/Pods/ZXKitCore/pod/ZXKitPluginCollectionViewCell.swift rename to example/Pods/DDKitSwift/pod/DDKitSwiftPluginCollectionViewCell.swift index a043fcb..d1b7aeb 100644 --- a/example/Pods/ZXKitCore/pod/ZXKitPluginCollectionViewCell.swift +++ b/example/Pods/DDKitSwift/pod/DDKitSwiftPluginCollectionViewCell.swift @@ -1,13 +1,13 @@ // -// ZXKitPluginCollectionViewCell.swift -// ZXKit +// DDKitSwiftPluginCollectionViewCell.swift +// DDKitSwift // // Created by Damon on 2021/4/23. // import UIKit -class ZXKitPluginCollectionViewCell: UICollectionViewCell { +class DDKitSwiftPluginCollectionViewCell: UICollectionViewCell { override init(frame: CGRect) { super.init(frame: frame) self.createUI() @@ -19,7 +19,7 @@ class ZXKitPluginCollectionViewCell: UICollectionViewCell { func createUI() { self.layer.borderWidth = 0.5 - self.layer.borderColor = UIColor.zx.color(hexValue: 0xeeeeee, alpha: 0.7).cgColor + self.layer.borderColor = UIColor.dd.color(hexValue: 0xeeeeee, alpha: 0.7).cgColor self.contentView.addSubview(mImageView) mImageView.topAnchor.constraint(equalTo: self.contentView.topAnchor, constant: 13).isActive = true mImageView.centerXAnchor.constraint(equalTo: self.contentView.centerXAnchor).isActive = true @@ -39,7 +39,7 @@ class ZXKitPluginCollectionViewCell: UICollectionViewCell { mTitleLabel.rightAnchor.constraint(equalTo: self.contentView.rightAnchor, constant: -10).isActive = true } - func updateUI(plugin: ZXKitPluginProtocol) { + func updateUI(plugin: DDKitSwiftPluginProtocol) { mImageView.image = plugin.pluginIcon mTitleLabel.text = plugin.pluginTitle mStatusView.isHidden = !plugin.isRunning @@ -53,7 +53,7 @@ class ZXKitPluginCollectionViewCell: UICollectionViewCell { tImageView.layer.masksToBounds = true tImageView.layer.cornerRadius = 22 tImageView.layer.borderWidth = 3 - tImageView.layer.borderColor = UIColor.zx.color(hexValue: 0xd8e3e7).cgColor + tImageView.layer.borderColor = UIColor.dd.color(hexValue: 0xd8e3e7).cgColor return tImageView }() @@ -63,7 +63,7 @@ class ZXKitPluginCollectionViewCell: UICollectionViewCell { tLabel.numberOfLines = 2 tLabel.textAlignment = .center tLabel.font = .systemFont(ofSize: 13, weight: .medium) - tLabel.textColor = UIColor.zx.color(hexValue: 0x666666) + tLabel.textColor = UIColor.dd.color(hexValue: 0x666666) return tLabel }() @@ -71,7 +71,7 @@ class ZXKitPluginCollectionViewCell: UICollectionViewCell { let tView = UIView() tView.translatesAutoresizingMaskIntoConstraints = false tView.isHidden = true - tView.backgroundColor = UIColor.zx.color(hexValue: 0x81b214) + tView.backgroundColor = UIColor.dd.color(hexValue: 0x81b214) tView.layer.masksToBounds = true tView.layer.cornerRadius = 5 return tView diff --git a/example/Pods/DDKitSwift/pod/DDKitSwiftPluginProtocol.swift b/example/Pods/DDKitSwift/pod/DDKitSwiftPluginProtocol.swift new file mode 100644 index 0000000..4405a64 --- /dev/null +++ b/example/Pods/DDKitSwift/pod/DDKitSwiftPluginProtocol.swift @@ -0,0 +1,44 @@ +// +// DDKitSwiftPluginProtocol.swift +// DDKitSwift +// +// Created by Damon on 2021/4/23. +// + +import UIKit + +public enum DDKitSwiftPluginType { + case ui + case data + case other +} + +public protocol DDKitSwiftPluginProtocol { + var pluginIdentifier: String { get } + var pluginIcon: UIImage? { get } + var pluginTitle: String { get } + var pluginType: DDKitSwiftPluginType { get } + var isRunning: Bool { get } + + func didRegist() + func willStart() + func start() + func willStop() + func stop() +} + +public extension DDKitSwiftPluginProtocol { + func didRegist() { + + } + + func willStart() { + + } + + func willStop() { + + } +} + + diff --git a/example/Pods/ZXKitCore/pod/ZXKitUIConfig.swift b/example/Pods/DDKitSwift/pod/DDKitSwiftUIConfig.swift similarity index 55% rename from example/Pods/ZXKitCore/pod/ZXKitUIConfig.swift rename to example/Pods/DDKitSwift/pod/DDKitSwiftUIConfig.swift index d31a8cb..61b9e04 100644 --- a/example/Pods/ZXKitCore/pod/ZXKitUIConfig.swift +++ b/example/Pods/DDKitSwift/pod/DDKitSwiftUIConfig.swift @@ -1,30 +1,30 @@ // -// ZXKitUIConfig.swift -// ZXKitCore +// DDKitSwiftUIConfig.swift +// DDKitSwiftCore // // Created by Damon on 2022/7/23. // import Foundation -import ZXKitUtil +import DDUtils -public struct ZXKitUIConfig { - public var floatButtonColor = UIColor.zx.color(hexValue: 0x5dae8b) //悬浮窗按钮颜色 - public var collectionViewBackgroundColor = UIColor.zx.color(hexValue: 0xffffff, alpha: 0.7) - public var collectionViewTitleColor = UIColor.zx.color(hexValue: 0xffffff) - public var collectionViewTitleBackgroundColor = UIColor.zx.color(hexValue: 0x5dae8b) - public var inputBackgroundColor = UIColor.zx.color(hexValue: 0x000000, alpha: 0.7) - public var textFieldBackgroundColor = UIColor.zx.color(hexValue: 0xffffff, alpha: 0.8) - public var inputButtonBackgroundColor = UIColor.zx.color(hexValue: 0x5dae8b) +public struct DDKitSwiftUIConfig { + public var floatButtonColor = UIColor.dd.color(hexValue: 0x5dae8b) //悬浮窗按钮颜色 + public var collectionViewBackgroundColor = UIColor.dd.color(hexValue: 0xffffff, alpha: 0.7) + public var collectionViewTitleColor = UIColor.dd.color(hexValue: 0xffffff) + public var collectionViewTitleBackgroundColor = UIColor.dd.color(hexValue: 0x5dae8b) + public var inputBackgroundColor = UIColor.dd.color(hexValue: 0x000000, alpha: 0.7) + public var textFieldBackgroundColor = UIColor.dd.color(hexValue: 0xffffff, alpha: 0.8) + public var inputButtonBackgroundColor = UIColor.dd.color(hexValue: 0x5dae8b) } -public struct ZXKitButtonConfig: Equatable { +public struct DDKitSwiftButtonConfig: Equatable { public var title: String? - public var titleColor: UIColor = UIColor.zx.color(hexValue: 0xffffff) + public var titleColor: UIColor = UIColor.dd.color(hexValue: 0xffffff) public var titleFont: UIFont = UIFont.systemFont(ofSize: 13, weight: .bold) public var backgroundColor: UIColor? - public init(title: String?, titleColor: UIColor = UIColor.zx.color(hexValue: 0xffffff), titleFont: UIFont = UIFont.systemFont(ofSize: 13, weight: .bold), backgroundColor: UIColor? = nil) { + public init(title: String?, titleColor: UIColor = UIColor.dd.color(hexValue: 0xffffff), titleFont: UIFont = UIFont.systemFont(ofSize: 13, weight: .bold), backgroundColor: UIColor? = nil) { self.title = title self.titleColor = titleColor self.titleFont = titleFont diff --git a/example/Pods/ZXKitCore/pod/ZXKitWindow.swift b/example/Pods/DDKitSwift/pod/DDKitSwiftWindow.swift similarity index 80% rename from example/Pods/ZXKitCore/pod/ZXKitWindow.swift rename to example/Pods/DDKitSwift/pod/DDKitSwiftWindow.swift index 28a8d3b..c1fee73 100644 --- a/example/Pods/ZXKitCore/pod/ZXKitWindow.swift +++ b/example/Pods/DDKitSwift/pod/DDKitSwiftWindow.swift @@ -1,13 +1,13 @@ // -// ZXKitWindow.swift -// ZXKit +// DDKitSwiftWindow.swift +// DDKitSwift // // Created by Damon on 2021/4/23. // import UIKit -class ZXKitWindow: UIWindow { +class DDKitSwiftWindow: UIWindow { private var inputComplete: ((String)->Void)? @available(iOS 13.0, *) @@ -43,8 +43,8 @@ class ZXKitWindow: UIWindow { tCollectionView.delegate = self tCollectionView.isPagingEnabled = false tCollectionView.showsHorizontalScrollIndicator = false - tCollectionView.register(ZXKitPluginCollectionViewCell.self, forCellWithReuseIdentifier: "ZXKitPluginCollectionViewCell") - tCollectionView.register(ZXKitCollectionViewHeaderView.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: "ZXKitCollectionViewHeaderView") + tCollectionView.register(DDKitSwiftPluginCollectionViewCell.self, forCellWithReuseIdentifier: "DDKitSwiftPluginCollectionViewCell") + tCollectionView.register(DDKitSwiftCollectionViewHeaderView.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: "DDKitSwiftCollectionViewHeaderView") return tCollectionView }() @@ -52,7 +52,7 @@ class ZXKitWindow: UIWindow { let tView = UIView() tView.translatesAutoresizingMaskIntoConstraints = false tView.isHidden = true - tView.backgroundColor = ZXKit.UIConfig.inputBackgroundColor + tView.backgroundColor = DDKitSwift.UIConfig.inputBackgroundColor let tap = UITapGestureRecognizer(target: self, action: #selector(_endTextField)) tView.addGestureRecognizer(tap) return tView @@ -63,14 +63,14 @@ class ZXKitWindow: UIWindow { tTextField.translatesAutoresizingMaskIntoConstraints = false tTextField.leftViewMode = .always tTextField.leftView = UIView(frame: CGRect(x: 0, y: 0, width: 14, height: 10)) - tTextField.backgroundColor = ZXKit.UIConfig.textFieldBackgroundColor + tTextField.backgroundColor = DDKitSwift.UIConfig.textFieldBackgroundColor tTextField.font = .systemFont(ofSize: 14) tTextField.placeholder = "input text".ZXLocaleString tTextField.clearButtonMode = .always tTextField.layer.borderWidth = 1.0 - tTextField.layer.borderColor = UIColor.zx.color(hexValue: 0xcccccc).cgColor + tTextField.layer.borderColor = UIColor.dd.color(hexValue: 0xcccccc).cgColor tTextField.delegate = self - tTextField.textColor = UIColor.zx.color(hexValue: 0x333333) + tTextField.textColor = UIColor.dd.color(hexValue: 0x333333) return tTextField }() @@ -79,15 +79,15 @@ class ZXKitWindow: UIWindow { tButton.translatesAutoresizingMaskIntoConstraints = false tButton.addTarget(self, action: #selector(_endTextField), for: .touchUpInside) tButton.setTitle("confirm".ZXLocaleString, for: .normal) - tButton.setTitleColor(UIColor.zx.color(hexValue: 0xffffff), for: .normal) - tButton.backgroundColor = ZXKit.UIConfig.inputButtonBackgroundColor + tButton.setTitleColor(UIColor.dd.color(hexValue: 0xffffff), for: .normal) + tButton.backgroundColor = DDKitSwift.UIConfig.inputButtonBackgroundColor tButton.layer.borderWidth = 1.0 - tButton.layer.borderColor = UIColor.zx.color(hexValue: 0xcccccc).cgColor + tButton.layer.borderColor = UIColor.dd.color(hexValue: 0xcccccc).cgColor return tButton }() } -extension ZXKitWindow { +extension DDKitSwiftWindow { func reloadData() { self.mCollectionView.reloadData() } @@ -108,34 +108,36 @@ extension ZXKitWindow { } } -extension ZXKitWindow: UICollectionViewDelegate,UICollectionViewDataSource { +extension DDKitSwiftWindow: UICollectionViewDelegate,UICollectionViewDataSource { func numberOfSections(in collectionView: UICollectionView) -> Int { - return ZXKit.pluginList.count + return DDKitSwift.pluginList.count } func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { - return ZXKit.pluginList[section].count + return DDKitSwift.pluginList[section].count } func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { - let plugin = ZXKit.pluginList[indexPath.section][indexPath.item] - let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "ZXKitPluginCollectionViewCell", for: indexPath) as! ZXKitPluginCollectionViewCell + let plugin = DDKitSwift.pluginList[indexPath.section][indexPath.item] + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "DDKitSwiftPluginCollectionViewCell", for: indexPath) as! DDKitSwiftPluginCollectionViewCell cell.updateUI(plugin: plugin) return cell } func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView { let title = ["UI".ZXLocaleString, "Data".ZXLocaleString, "Other".ZXLocaleString] - let cell = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: "ZXKitCollectionViewHeaderView", for: indexPath) as! ZXKitCollectionViewHeaderView + let cell = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: "DDKitSwiftCollectionViewHeaderView", for: indexPath) as! DDKitSwiftCollectionViewHeaderView cell.updateUI(title: title[indexPath.section]) return cell } func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { - let plugin = ZXKit.pluginList[indexPath.section][indexPath.item] + let plugin = DDKitSwift.pluginList[indexPath.section][indexPath.item] if plugin.isRunning { + plugin.willStop() plugin.stop() self.reloadData() } else { + plugin.willStart() plugin.start() self.reloadData() } @@ -143,7 +145,7 @@ extension ZXKitWindow: UICollectionViewDelegate,UICollectionViewDataSource { } } -extension ZXKitWindow: UITextFieldDelegate { +extension DDKitSwiftWindow: UITextFieldDelegate { func textFieldDidEndEditing(_ textField: UITextField) { if let complete = self.inputComplete { complete(textField.text ?? "") @@ -156,10 +158,10 @@ extension ZXKitWindow: UITextFieldDelegate { } } -private extension ZXKitWindow { +private extension DDKitSwiftWindow { func _initVC() { - self.backgroundColor = ZXKit.UIConfig.collectionViewBackgroundColor + self.backgroundColor = DDKitSwift.UIConfig.collectionViewBackgroundColor let rootViewController = UIViewController() let navigation = UINavigationController(rootViewController: rootViewController) @@ -168,7 +170,7 @@ private extension ZXKitWindow { let view = UIView() let label = UILabel() label.translatesAutoresizingMaskIntoConstraints = false - label.attributedText = NSAttributedString(string: "ZXKit", attributes: [NSAttributedString.Key.font:UIFont.systemFont(ofSize: 18, weight: .medium), NSAttributedString.Key.foregroundColor:UIColor.black]) + label.attributedText = NSAttributedString(string: "DDKitSwift", attributes: [NSAttributedString.Key.font:UIFont.systemFont(ofSize: 18, weight: .medium), NSAttributedString.Key.foregroundColor:UIColor.black]) view.addSubview(label) label.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true label.centerYAnchor.constraint(equalTo: view.centerYAnchor).isActive = true @@ -187,7 +189,7 @@ private extension ZXKitWindow { if !self.mInputBGView.isHidden { self.hideInput() } - ZXKit.hide() + DDKitSwift.hide() } @objc func _endTextField() { diff --git a/example/Pods/ZXKitCore/pod/assets/icon/icon_close@3x.png b/example/Pods/DDKitSwift/pod/assets/icon/icon_close@3x.png similarity index 100% rename from example/Pods/ZXKitCore/pod/assets/icon/icon_close@3x.png rename to example/Pods/DDKitSwift/pod/assets/icon/icon_close@3x.png diff --git a/example/Pods/ZXKitCore/pod/assets/icon/icon_home@3x.png b/example/Pods/DDKitSwift/pod/assets/icon/icon_home@3x.png similarity index 100% rename from example/Pods/ZXKitCore/pod/assets/icon/icon_home@3x.png rename to example/Pods/DDKitSwift/pod/assets/icon/icon_home@3x.png diff --git a/example/Pods/ZXKitCore/pod/assets/icon/icon_list@3x.png b/example/Pods/DDKitSwift/pod/assets/icon/icon_list@3x.png similarity index 100% rename from example/Pods/ZXKitCore/pod/assets/icon/icon_list@3x.png rename to example/Pods/DDKitSwift/pod/assets/icon/icon_list@3x.png diff --git a/example/Pods/ZXKitCore/pod/assets/icon/icon_notice@3x.png b/example/Pods/DDKitSwift/pod/assets/icon/icon_notice@3x.png similarity index 100% rename from example/Pods/ZXKitCore/pod/assets/icon/icon_notice@3x.png rename to example/Pods/DDKitSwift/pod/assets/icon/icon_notice@3x.png diff --git a/example/Pods/ZXKitCore/pod/assets/icon/icon_search@3x.png b/example/Pods/DDKitSwift/pod/assets/icon/icon_search@3x.png similarity index 100% rename from example/Pods/ZXKitCore/pod/assets/icon/icon_search@3x.png rename to example/Pods/DDKitSwift/pod/assets/icon/icon_search@3x.png diff --git a/example/Pods/ZXKitCore/pod/assets/icon/icon_setting@3x.png b/example/Pods/DDKitSwift/pod/assets/icon/icon_setting@3x.png similarity index 100% rename from example/Pods/ZXKitCore/pod/assets/icon/icon_setting@3x.png rename to example/Pods/DDKitSwift/pod/assets/icon/icon_setting@3x.png diff --git a/example/Pods/ZXKitCore/pod/assets/icon/icon_share@3x.png b/example/Pods/DDKitSwift/pod/assets/icon/icon_share@3x.png similarity index 100% rename from example/Pods/ZXKitCore/pod/assets/icon/icon_share@3x.png rename to example/Pods/DDKitSwift/pod/assets/icon/icon_share@3x.png diff --git a/example/Pods/ZXKitCore/pod/assets/icon/logger_logo@3x.png b/example/Pods/DDKitSwift/pod/assets/icon/logger_logo@3x.png similarity index 100% rename from example/Pods/ZXKitCore/pod/assets/icon/logger_logo@3x.png rename to example/Pods/DDKitSwift/pod/assets/icon/logger_logo@3x.png diff --git a/example/Pods/ZXKitCore/pod/assets/icon/zx_logo@3x.png b/example/Pods/DDKitSwift/pod/assets/icon/zx_logo@3x.png similarity index 100% rename from example/Pods/ZXKitCore/pod/assets/icon/zx_logo@3x.png rename to example/Pods/DDKitSwift/pod/assets/icon/zx_logo@3x.png diff --git a/example/Pods/ZXKitCore/pod/assets/localizable/en.lproj/Localizable.strings b/example/Pods/DDKitSwift/pod/assets/localizable/en.lproj/Localizable.strings similarity index 93% rename from example/Pods/ZXKitCore/pod/assets/localizable/en.lproj/Localizable.strings rename to example/Pods/DDKitSwift/pod/assets/localizable/en.lproj/Localizable.strings index 4204c00..d3e381d 100644 --- a/example/Pods/ZXKitCore/pod/assets/localizable/en.lproj/Localizable.strings +++ b/example/Pods/DDKitSwift/pod/assets/localizable/en.lproj/Localizable.strings @@ -1,6 +1,6 @@ /* Localizable.strings - ZXKit + DDKitSwift Created by Damon on 2021/4/25. diff --git a/example/Pods/ZXKitCore/pod/assets/localizable/zh-Hans.lproj/Localizable.strings b/example/Pods/DDKitSwift/pod/assets/localizable/zh-Hans.lproj/Localizable.strings similarity index 94% rename from example/Pods/ZXKitCore/pod/assets/localizable/zh-Hans.lproj/Localizable.strings rename to example/Pods/DDKitSwift/pod/assets/localizable/zh-Hans.lproj/Localizable.strings index 8346c43..5b157fb 100644 --- a/example/Pods/ZXKitCore/pod/assets/localizable/zh-Hans.lproj/Localizable.strings +++ b/example/Pods/DDKitSwift/pod/assets/localizable/zh-Hans.lproj/Localizable.strings @@ -1,6 +1,6 @@ /* Localizable.strings - ZXKit + DDKitSwift Created by Damon on 2021/4/25. diff --git a/example/Pods/DDKitSwift/pod/extend/DDLoggerSwift+ddkit.swift b/example/Pods/DDKitSwift/pod/extend/DDLoggerSwift+ddkit.swift new file mode 100644 index 0000000..51ceec0 --- /dev/null +++ b/example/Pods/DDKitSwift/pod/extend/DDLoggerSwift+ddkit.swift @@ -0,0 +1,67 @@ +// +// ZXLogger+zxkit.swift +// DDLoggerSwift +// +// Created by Damon on 2021/4/25. +// Copyright © 2021 Damon. All rights reserved. +// + +import Foundation +import DDLoggerSwift + +//DDKitSwiftPlugin +extension DDLoggerSwift: DDKitSwiftPluginProtocol { + public var pluginIdentifier: String { + return "com.zxkit.zxkitLogger" + } + + public var pluginIcon: UIImage? { + return UIImageHDBoundle(named: "logger_logo") + } + + public var pluginTitle: String { + return "Logger".ZXLocaleString + } + + public var pluginType: DDKitSwiftPluginType { + return .data + } + + public func didRegist() { + NotificationCenter.default.addObserver(self, selector: #selector(_loggerDidHidden), name: .DDLoggerSwiftDidHidden, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(_logUpdate(notification: )), name: .DDLoggerSwiftDBUpdate, object: nil) + } + + public func start() { + DDKitSwift.hide() + DDLoggerSwift.show() + } + + public var isRunning: Bool { + return true + } + + public func stop() { + DDKitSwift.hide() + DDLoggerSwift.show() + } +} + +extension DDLoggerSwift { + @objc func _logUpdate(notification: Notification) { + DispatchQueue.main.async { + if let floatWindow = DDKitSwift.floatWindow { + let count = DDLoggerSwift.getItemCount(type: .error) + if count == 0 { + floatWindow.setBadge(value: nil, index: 3) + } else { + floatWindow.setBadge(value: "\(count)", index: 3) + } + } + } + } + + @objc func _loggerDidHidden() { + DDLoggerSwift.close() + } +} diff --git a/example/Pods/ZXKitCore/pod/extend/ShareTools.swift b/example/Pods/DDKitSwift/pod/extend/ShareTools.swift similarity index 90% rename from example/Pods/ZXKitCore/pod/extend/ShareTools.swift rename to example/Pods/DDKitSwift/pod/extend/ShareTools.swift index 99dc0a7..b5f6952 100644 --- a/example/Pods/ZXKitCore/pod/extend/ShareTools.swift +++ b/example/Pods/DDKitSwift/pod/extend/ShareTools.swift @@ -6,7 +6,7 @@ // import UIKit -import ZXKitUtil +import DDUtils enum ShareType { case image(imageList: [UIImage]) @@ -53,11 +53,11 @@ class ShareTools: NSObject { } } } - let ipadView = sourceView ?? ZXKitUtil.shared.getCurrentVC()?.view + let ipadView = sourceView ?? DDUtils.shared.getCurrentVC()?.view self.shareActivityVC!.popoverPresentationController?.sourceView = ipadView self.shareActivityVC!.popoverPresentationController?.sourceRect = ipadView?.bounds ?? CGRect(x: 0, y: 0, width: UIScreenWidth, height: UIScreenHeight) - ZXKitUtil.shared.getCurrentVC()?.present(self.shareActivityVC!, animated: true, completion: nil) + DDUtils.shared.getCurrentVC()?.present(self.shareActivityVC!, animated: true, completion: nil) } } } diff --git a/example/Pods/ZXKitCore/pod/menu/CircleMenu.swift b/example/Pods/DDKitSwift/pod/menu/CircleMenu.swift similarity index 100% rename from example/Pods/ZXKitCore/pod/menu/CircleMenu.swift rename to example/Pods/DDKitSwift/pod/menu/CircleMenu.swift diff --git a/example/Pods/ZXKitCore/pod/menu/CircleMenuButton/CircleMenuButton.swift b/example/Pods/DDKitSwift/pod/menu/CircleMenuButton/CircleMenuButton.swift similarity index 99% rename from example/Pods/ZXKitCore/pod/menu/CircleMenuButton/CircleMenuButton.swift rename to example/Pods/DDKitSwift/pod/menu/CircleMenuButton/CircleMenuButton.swift index 3f14a18..e7f0e40 100755 --- a/example/Pods/ZXKitCore/pod/menu/CircleMenuButton/CircleMenuButton.swift +++ b/example/Pods/DDKitSwift/pod/menu/CircleMenuButton/CircleMenuButton.swift @@ -22,7 +22,7 @@ // THE SOFTWARE. import UIKit -import ZXKitUtil +import DDUtils internal class CircleMenuButton: UIButton { @@ -31,7 +31,7 @@ internal class CircleMenuButton: UIButton { lazy var mBadgeLable: UILabel = { let label = UILabel() label.textAlignment = .right - label.textColor = UIColor.zx.color(hexValue: 0xffffff) + label.textColor = UIColor.dd.color(hexValue: 0xffffff) label.font = .systemFont(ofSize: 14, weight: .bold) return label }() diff --git a/example/Pods/ZXKitCore/pod/menu/CircleMenuLoader/CircleMenuLoader.swift b/example/Pods/DDKitSwift/pod/menu/CircleMenuLoader/CircleMenuLoader.swift similarity index 100% rename from example/Pods/ZXKitCore/pod/menu/CircleMenuLoader/CircleMenuLoader.swift rename to example/Pods/DDKitSwift/pod/menu/CircleMenuLoader/CircleMenuLoader.swift diff --git a/example/Pods/ZXKitCore/pod/menu/CircleMenuMaskView.swift b/example/Pods/DDKitSwift/pod/menu/CircleMenuMaskView.swift similarity index 99% rename from example/Pods/ZXKitCore/pod/menu/CircleMenuMaskView.swift rename to example/Pods/DDKitSwift/pod/menu/CircleMenuMaskView.swift index 5b22574..bf70359 100644 --- a/example/Pods/ZXKitCore/pod/menu/CircleMenuMaskView.swift +++ b/example/Pods/DDKitSwift/pod/menu/CircleMenuMaskView.swift @@ -1,6 +1,6 @@ // // CircleMenuMaskView.swift -// ZXKit +// DDKitSwift // // Created by Damon on 2023/4/13. // diff --git a/example/Pods/ZXKitLogger/LICENSE b/example/Pods/DDLoggerSwift/LICENSE similarity index 100% rename from example/Pods/ZXKitLogger/LICENSE rename to example/Pods/DDLoggerSwift/LICENSE diff --git a/example/Pods/DDLoggerSwift/README.md b/example/Pods/DDLoggerSwift/README.md new file mode 100644 index 0000000..89b1fcd --- /dev/null +++ b/example/Pods/DDLoggerSwift/README.md @@ -0,0 +1,355 @@ +# DDLoggerSwift + +![](https://img.shields.io/badge/CocoaPods-supported-brightgreen) ![](https://img.shields.io/badge/Swift-5.0-brightgreen) ![](https://img.shields.io/badge/License-MIT-brightgreen) ![](https://img.shields.io/badge/version-iOS11.0-brightgreen) + +### [中文文档](https://ddceo.com/blog/1305.html) + +The iOS terminal will display the output log suspended on the screen, which can generate log file sharing, and debug information when the real machine is not connected to Xcode. You can share, filter logs and other operations. Use SQLite to store log information, support system sharing and screen FPS display + + +|Preview GIF picture|Xcode debug GIF| +|----|----| +|![](./readmeResources/preview.gif)|![](./readmeResources/debug.gif)| + + +|preview|share & FPS| +|----|----| +|![](./readmeResources/mobile_preview.png)
Xcode Preview
![](./readmeResources/xcode_preview.png)|![](./readmeResources/share_preview.png)| + +![](./readmeResources/preview.png) + +## I. Installation + +You can choose to install using cocoaPod, or you can download the source file directly into the project. + +### 1.1, cocoaPod installation + +``` +pod 'DDLoggerSwift' +``` + + +### 1.2, file installation + +You can drag the files in the `pod` folder into the project under the project. + +## II. Use + +### 1、Import header file + +``` +Import DDLoggerSwift +``` + + +### 2、 display the floating window + +``` +DDLoggerSwift.show() +``` + +### 3 、 Print log content + +The font colors of the three output methods are different, and the corresponding types of printLog are different. + +``` +printDebug(log) //the log will not be written to the window, only output in xcode + +printLog(log) // Log's textColor is green + +printWarn(log) // log's textColor is yellow + +printError(log) // Log's textColor is red + +printPrivacy(log) // Output of encrypted data, the specific encryption method is described in the following encryption +``` + +Output format + +``` +2021-08-11 10:07:28.378 ---- ⚠️⚠️ ---- File: ViewController.swift -- Line: 82 -- Function:ViewController.swift.onClickButton() ---- +警告提示 + +2021-08-11 10:07:28.380 ---- ❌❌ ---- File: ViewController.swift -- Line: 84 -- Function:ViewController.swift.onClickButton() ---- +错误出现 + +2021-08-11 10:07:28.381 ---- ⛔️⛔️ ---- File: ViewController.swift -- Line: 86 -- Function:ViewController.swift.onClickButton() ---- +AAuKjIm5hC2jiPqz7OKHAngWspeACyWZufDguqdOcugituhWV8jnbr/6SHYoK0/9 + +2021-08-11 10:07:28.383 ---- ✅✅ ---- File: ViewController.swift -- Line: 89 -- Function:ViewController.swift.onClickButton() ---- +{ + "77777" : "数据库的复健科花见花开会尽快圣诞节开发和金黄色的费四大皆空回复就开始和豆腐是砍价的回复斯柯达金凤凰", + "hhhhhhh" : "撒旦法是打发斯蒂芬是打发斯蒂芬" +} + +2021-08-11 10:07:28.388 ---- 💜💜 ---- File: ViewController.swift -- Line: 76 -- Function:ViewController.swift.onClickButton() ---- +测试输出,默认不会写入数据库 +``` + +## III. more settings + +### 1、Set whether to output all information + +``` +DDLoggerSwift.isFullLogOut = true +``` + +If it is set to `true`, the output format is as follows, including the output file, the number of lines called, and the function name + +``` +2021-08-11 10:07:28.378 ---- ⚠️⚠️ ---- File: ViewController.swift -- Line: 82 -- Function:ViewController.swift.onClickButton() ---- +警告提示 + +2021-08-11 10:07:28.380 ---- ❌❌ ---- File: ViewController.swift -- Line: 84 -- Function:ViewController.swift.onClickButton() ---- +错误出现 + +2021-08-11 10:07:28.381 ---- ⛔️⛔️ ---- File: ViewController.swift -- Line: 86 -- Function:ViewController.swift.onClickButton() ---- +AAuKjIm5hC2jiPqz7OKHAngWspeACyWZufDguqdOcugituhWV8jnbr/6SHYoK0/9 + +2021-08-11 10:07:28.383 ---- ✅✅ ---- File: ViewController.swift -- Line: 89 -- Function:ViewController.swift.onClickButton() ---- +{ + "77777" : "数据库的复健科花见花开会尽快圣诞节开发和金黄色的费四大皆空回复就开始和豆腐是砍价的回复斯柯达金凤凰", + "hhhhhhh" : "撒旦法是打发斯蒂芬是打发斯蒂芬" +} + +2021-08-11 10:07:28.388 ---- 💜💜 ---- File: ViewController.swift -- Line: 76 -- Function:ViewController.swift.onClickButton() ---- +测试输出,默认不会写入数据库 +``` + +If it is set to `false`, the output format is as follows + +``` +2021-08-11 10:10:33.309 ---- ⚠️⚠️ ---- +警告提示 + +2021-08-11 10:10:33.310 ---- ❌❌ ---- +错误出现 + +2021-08-11 10:10:33.312 ---- ⛔️⛔️ ---- +AAuKjIm5hC2jiPqz7OKHAngWspeACyWZufDguqdOcugituhWV8jnbr/6SHYoK0/9 + +2021-08-11 10:10:33.318 ---- ✅✅ ---- +{ + "hhhhhhh" : "撒旦法是打发斯蒂芬是打发斯蒂芬", + "77777" : "数据库的复健科花见花开会尽快圣诞节开发和金黄色的费四大皆空回复就开始和豆腐是砍价的回复斯柯达金凤凰" +} + +2021-08-11 10:10:33.323 ---- 💜💜 ---- +测试输出,默认不会写入数据库 +``` + +### 2、 Whether to output content synchronously in the debug bar at the bottom of xcode + +``` +DDLoggerSwift.isSyncConsole = true +``` + +### 3、Separate log folder for different users + +``` +DDLoggerSwift.userID = "1001" +``` + +### 4、Clear the log + +``` +DDLoggerSwift.cleanLog() +``` + +### 5、close the entire log window + +``` +DDLoggerSwift.close() +``` + +### 6、only hide the log output window + +``` +DDLoggerSwift.hide() +``` + +### 7、set the log maximum number of records, 0 is not limited, default value is 100 + +``` +DDLoggerSwift.maxDisplayCount = 100 +``` +### 8、 delete the local LogFile + +``` +DDLoggerSwift.deleteLogFile() +``` + +### 9、 The validity period of the local log file (days), the local log beyond the validity period will be deleted, 0 is no validity period, default is 30 days + +``` +DDLoggerSwift.logExpiryDay = 30 +``` + +### 10、storageLevels + +The included log level will be stored in the database. By default, the debug level is not stored + +``` + +DDLoggerSwift.storageLevels = [.info, .warn, .error, .privacy] + +``` + +### 11、Get the array of logs. You can specify the date + +``` +//today +DDLoggerSwift.getAllLog() + +//Special date +DDLoggerSwift.getAllLog(date: Date(timeIntervalSinceNow: 1000)) +``` + +If you want to get all the log files, you can get the folder where the log is stored, return a URL result, and then traverse to process it yourself + +``` +DDLoggerSwift.getDBFolder() +``` + +for example + +``` +let dbFolder = DDLoggerSwift.getDBFolder() + +if let enumer = FileManager.default.enumerator(atPath: dbFolder.path) { + while let file = enumer.nextObject() { + if let file: String = file as? String { + if file.hasSuffix(".db") { + //Get the specific log file log + let logFilePath = dbFolder.appendingPathComponent(file, isDirectory: false) + } + } + } +} +``` + +### 12. Directly display log sharing window + +If you don't want users to see the log output window, but just let them share the log, you can call + +``` +DDLoggerSwift.showShare() +``` + +### 13、Display log upload, select window and button + +If you want users to upload DB files, in addition to traversing by themselves, we also provide a shortcut scheme. Like sharing, call + +``` +DDLoggerSwift.showUpload() +``` + +The upload option will appears. The callback determined after the user selects is in `uploadcomplete`. You can implement the callback, for example + +``` +DDLoggerSwift.uploadComplete = { file in + print(file) + //Process upload +} +``` + +### 14、 Throttling + +Refreshing the interface with a large amount of output content in a short period of time can cause a large amount of CPU computation. Therefore, a throttling method can be adopted, and a timed refresh interface can be set in seconds, with a default value of 0 + +``` +DDLoggerSwift.throttleTime = 2 +``` + +### LogContent protocol + +If you want to customize the output content, you can integrate and use this type of `LogContent` protocol. For example, you can print the `URL` type to output only its` path`. You can directly set the returned `logStringValue`. + +``` +extension URL: LogContent { +    public var logStringValue: String { +        return self.path +    } +} +``` + +## IV. sensitive information output encryption and decryption + +If there is sensitive information that you don't want users to see when debugging, you can set encryption in two simple steps + +``` +// 1. Set the encryption password, 32 characters +DDLoggerSwift.privacyLogPassword = "12345678901234561234567890123456" + +// 2, output encrypted content +printPrivacy("This is test data 222 for encrypted data") +``` + +### 4.2 Decrypt the contents of the display window + +After the setting, the display in the display window is `This content is encrypted, please view it after decryption`, enter the set encryption password and click decrypt to display the info encrypted content. + +### 4.1. Decrypting shared files + +* If the data has been decrypted in the display window, the content of the shared file will not be encrypted at this time, and all content will be displayed. +* If it is not decrypted in the display window, the content of the file shared at this time is AES encrypted content, you can search the `AES Online Decryption Website` to decrypt the content, and the settings are as follows: + +![](./readmeResources/decrypt.png) + +* Mode: CBC +* Fill: Pkcs7 +* Data block: 128 bits +* Offset: `abcdefghijklmnop` +* Encoding: Base64 +* Character set: UTF8 +* Password: The password you set in the SDK yourself + +Then click Decrypt. + +Here are a few online sites recommended, you can also Google it by yourself + +* [https://oktools.net/aes](https://oktools.net/aes) +* [http://tools.bugscaner.com/cryptoaes/](http://tools.bugscaner.com/cryptoaes/) +* [http://tool.chacuo.net/cryptaes](http://tool.chacuo.net/cryptaes) + +## V. Log viewing client + +This library uses `SQLite` to store log information. So you can use [DDLoggerSwift_Mac](https://github.com/DamonHu/DDLoggerSwift_Mac), the client of `DDLoggerSwift` cooperates to view the export SQLite data. + +![](./readmeResources/Jietu20220731-212644.png) + +## local network real-time log + +After the `3.0.0` version, it can be used with the above log viewing tool to realize real-time log viewing on the local area network, and use the simple configuration interface + +1. Increase the local network function + +```` +pod 'DDLoggerSwift/socket' +```` + +2. Add the local network description and the service field of `Bonjour` in the project `info.plist`. + +```` +NSBonjourServices + +_DDLoggerSwift._tcp + +NSLocalNetworkUsageDescription +Find the local network to use the Bonjour feature +```` + +**Note: The type value of `NSBonjourServices` is consistent with `DDLoggerSwift.socketType`. The `socketType` in the DDLoggerSwift code can be customized. After modification, the `info.plist` should be modified accordingly ** + +No other configuration is required, you can view the device logs under the same local network by [DDLoggerSwift_Mac](https://github.com/DamonHu/DDLoggerSwift_Mac) + +## Other Tips + +1. For the convenience of viewing, it is divided into three types: info, warning and error. It corresponds to three different colors for easy viewing. +2. Click the corresponding cell to copy the output log directly to the system clipboard. +3. Share the system share that is called. Which software you can share depends on which software is installed on your phone. +4. The shared log file can be viewed in any text editor. When viewed in 'vscode', the code will be highlighted + +## License + +The project is based on the MIT License \ No newline at end of file diff --git a/example/Pods/ZXKitLogger/pod/ZXKitLogger.swift b/example/Pods/DDLoggerSwift/pod/DDLoggerSwift.swift similarity index 64% rename from example/Pods/ZXKitLogger/pod/ZXKitLogger.swift rename to example/Pods/DDLoggerSwift/pod/DDLoggerSwift.swift index 7cfef7c..fe4940c 100644 --- a/example/Pods/ZXKitLogger/pod/ZXKitLogger.swift +++ b/example/Pods/DDLoggerSwift/pod/DDLoggerSwift.swift @@ -1,21 +1,21 @@ // -// ZXKitLogger.swift -// ZXKitLogger +// DDLoggerSwift.swift +// DDLoggerSwift // // Created by Damon on 2019/6/24. // Copyright © 2019 Damon. All rights reserved. // import UIKit -import ZXKitUtil +import DDUtils ///log的级别,对应不同的颜色 -public struct ZXKitLogType : OptionSet { - public static let debug = ZXKitLogType([]) //only show in debug output - public static let info = ZXKitLogType(rawValue: 1) //textColor #50d890 - public static let warn = ZXKitLogType(rawValue: 2) //textColor #f6f49d - public static let error = ZXKitLogType(rawValue: 4) //textColor #ff7676 - public static let privacy = ZXKitLogType(rawValue: 8) //textColor #42e6a4 +public struct DDLogType : OptionSet { + public static let debug = DDLogType([]) //only show in debug output + public static let info = DDLogType(rawValue: 1) //textColor #50d890 + public static let warn = DDLogType(rawValue: 2) //textColor #f6f49d + public static let error = DDLogType(rawValue: 4) //textColor #ff7676 + public static let privacy = DDLogType(rawValue: 8) //textColor #42e6a4 public let rawValue: Int public init(rawValue: Int) { @@ -23,17 +23,17 @@ public struct ZXKitLogType : OptionSet { } } -extension ZXKitLogType { +extension DDLogType { func textColor() -> UIColor { switch self { case .debug: - return UIColor.zx.color(hexValue: 0xD1B6E1) + return UIColor.dd.color(hexValue: 0xD1B6E1) case .info: return UIColor(red: 80.0/255.0, green: 216.0/255.0, blue: 144.0/255.0, alpha: 1.0) case .warn: return UIColor(red: 246.0/255.0, green: 244.0/255.0, blue: 157.0/255.0, alpha: 1.0) case .error: - return UIColor.zx.color(hexValue: 0xFFAFAF) + return UIColor.dd.color(hexValue: 0xFFAFAF) case .privacy: return UIColor(red: 66.0/255.0, green: 230.0/255.0, blue: 164.0/255.0, alpha: 1.0) default: @@ -60,63 +60,67 @@ extension ZXKitLogType { } public extension NSNotification.Name { - static let ZXKitLogDBUpdate = NSNotification.Name("ZXKitLogDBUpdate") + static let DDLoggerSwiftDBUpdate = NSNotification.Name("DDLoggerSwiftDBUpdate") + static let DDLoggerSwiftDidShow = NSNotification.Name("DDLoggerSwiftDidShow") + static let DDLoggerSwiftDidHidden = NSNotification.Name("DDLoggerSwiftDidHidden") + static let DDLoggerSwiftDidClose = NSNotification.Name("DDLoggerSwiftDidClose") } /////测试输出,不会写入到悬浮窗中 public func printDebug(_ log:Any, file:String = #file, funcName:String = #function, lineNum:Int = #line) -> Void { - ZXKitLogger.printLog(log: log, logType: ZXKitLogType.debug, file:file, funcName:funcName, lineNum:lineNum) + DDLoggerSwift.printLog(log: log, logType: DDLogType.debug, file:file, funcName:funcName, lineNum:lineNum) } public func printDebug(_ log:Any ..., file:String = #file, funcName:String = #function, lineNum:Int = #line) -> Void { - ZXKitLogger.printLog(log: log, logType: ZXKitLogType.debug, file:file, funcName:funcName, lineNum:lineNum) + DDLoggerSwift.printLog(log: log, logType: DDLogType.debug, file:file, funcName:funcName, lineNum:lineNum) } //普通输出,默认为info和printInfo一致 public func printLog(_ log:Any, file:String = #file, funcName:String = #function, lineNum:Int = #line) -> Void { - ZXKitLogger.printLog(log: log, logType: ZXKitLogType.info, file:file, funcName:funcName, lineNum:lineNum) + DDLoggerSwift.printLog(log: log, logType: DDLogType.info, file:file, funcName:funcName, lineNum:lineNum) } public func printLog(_ log:Any ..., file:String = #file, funcName:String = #function, lineNum:Int = #line) -> Void { - ZXKitLogger.printLog(log: log, logType: ZXKitLogType.info, file:file, funcName:funcName, lineNum:lineNum) + DDLoggerSwift.printLog(log: log, logType: DDLogType.info, file:file, funcName:funcName, lineNum:lineNum) } //普通类型的输出 public func printInfo(_ log:Any, file:String = #file, funcName:String = #function, lineNum:Int = #line) -> Void { - ZXKitLogger.printLog(log: log, logType: ZXKitLogType.info, file:file, funcName:funcName, lineNum:lineNum) + DDLoggerSwift.printLog(log: log, logType: DDLogType.info, file:file, funcName:funcName, lineNum:lineNum) } public func printInfo(_ log:Any ..., file:String = #file, funcName:String = #function, lineNum:Int = #line) -> Void { - ZXKitLogger.printLog(log: log, logType: ZXKitLogType.info, file:file, funcName:funcName, lineNum:lineNum) + DDLoggerSwift.printLog(log: log, logType: DDLogType.info, file:file, funcName:funcName, lineNum:lineNum) } //警告类型的输出 public func printWarn(_ log:Any, file:String = #file, funcName:String = #function, lineNum:Int = #line) -> Void { - ZXKitLogger.printLog(log: log, logType: ZXKitLogType.warn, file:file, funcName:funcName, lineNum:lineNum) + DDLoggerSwift.printLog(log: log, logType: DDLogType.warn, file:file, funcName:funcName, lineNum:lineNum) } public func printWarn(_ log:Any ..., file:String = #file, funcName:String = #function, lineNum:Int = #line) -> Void { - ZXKitLogger.printLog(log: log, logType: ZXKitLogType.warn, file:file, funcName:funcName, lineNum:lineNum) + DDLoggerSwift.printLog(log: log, logType: DDLogType.warn, file:file, funcName:funcName, lineNum:lineNum) } //错误类型的输出 public func printError(_ log:Any, file:String = #file, funcName:String = #function, lineNum:Int = #line) -> Void { - ZXKitLogger.printLog(log: log, logType: ZXKitLogType.error, file:file, funcName:funcName, lineNum:lineNum) + DDLoggerSwift.printLog(log: log, logType: DDLogType.error, file:file, funcName:funcName, lineNum:lineNum) } public func printError(_ log:Any ..., file:String = #file, funcName:String = #function, lineNum:Int = #line) -> Void { - ZXKitLogger.printLog(log: log, logType: ZXKitLogType.error, file:file, funcName:funcName, lineNum:lineNum) + DDLoggerSwift.printLog(log: log, logType: DDLogType.error, file:file, funcName:funcName, lineNum:lineNum) } //加密类型的输出 public func printPrivacy(_ log:Any, file:String = #file, funcName:String = #function, lineNum:Int = #line) -> Void { - ZXKitLogger.printLog(log: log, logType: ZXKitLogType.privacy, file:file, funcName:funcName, lineNum:lineNum) + DDLoggerSwift.printLog(log: log, logType: DDLogType.privacy, file:file, funcName:funcName, lineNum:lineNum) } public func printPrivacy(_ log:Any ..., file:String = #file, funcName:String = #function, lineNum:Int = #line) -> Void { - ZXKitLogger.printLog(log: log, logType: ZXKitLogType.privacy, file:file, funcName:funcName, lineNum:lineNum) + DDLoggerSwift.printLog(log: log, logType: DDLogType.privacy, file:file, funcName:funcName, lineNum:lineNum) } ///log的输出 -public class ZXKitLogger { - public static let shared = ZXKitLogger() +public class DDLoggerSwift { + public static let shared = DDLoggerSwift() public static var isFullLogOut = true //是否完整输出日志文件名等调试内容 public static var isSyncConsole = true //是否在xcode底部的调试栏同步输出内容 - public static var storageLevels: ZXKitLogType = [.info, .warn, .error, .privacy] //存储到数据库的级别 + public static var storageLevels: DDLogType = [.info, .warn, .error, .privacy] //存储到数据库的级别 public static var logExpiryDay = 30 //本地日志文件的有效期(天),超出有效期的本地日志会被删除,0为没有有效期,默认为30天 public static var userID = "0" //为不同用户创建的独立的日志库 - public static var DBParentFolder = ZXKitUtil.shared.getFileDirectory(type: .documents) + public static var DBParentFolder = DDUtils.shared.getFileDirectory(type: .documents) public static var uploadComplete: ((URL) ->Void)? //点击上传日志的回调 + public static var throttleTime: TimeInterval = 0 //节流的时间,单位秒 /*隐私数据采用AESCBC加密 *需要设置密码privacyLogPassword *初始向量privacyLogIv @@ -124,8 +128,8 @@ public class ZXKitLogger { **/ public static var privacyLogPassword = "12345678901234561234567890123456" public static var privacyLogIv = "abcdefghijklmnop" - public static var privacyResultEncodeType = ZXKitUtilEncodeType.hex - + public static var privacyResultEncodeType = DDUtilsEncodeType.hex + /** 如果集成实时日志功能 */ @@ -133,54 +137,55 @@ public class ZXKitLogger { public static var isTCP: Bool = true //是否TCP链接,UDP在iOS14以后需要向App Store申请权限 public static var socketPort: UInt16 = 888 //连接的端口 public static var socketDomain: String = "local" //支持自定义 - public static var socketType: String = "_zxkitlogger"//支持自定义 + public static var socketType: String = "_DDLoggerSwift"//支持自定义 #endif //MARK: 内部 static var fileSelectedComplete: ((URL, String) ->Void)? //选择历史文件过滤回调 //MARK: - Private变量 - private lazy var loggerWindow: ZXKitLoggerWindow? = { - var window: ZXKitLoggerWindow? + private lazy var loggerWindow: DDLoggerSwiftWindow? = { + var window: DDLoggerSwiftWindow? if #available(iOS 13.0, *) { for windowScene:UIWindowScene in ((UIApplication.shared.connectedScenes as? Set)!) { if windowScene.activationState == .foregroundActive { - window = ZXKitLoggerWindow(windowScene: windowScene) + window = DDLoggerSwiftWindow(windowScene: windowScene) } } } if window == nil { - window = ZXKitLoggerWindow(frame: CGRect.zero) + window = DDLoggerSwiftWindow(frame: CGRect.zero) } return window }() - private lazy var pickerWindow: ZXKitLoggerPickerWindow? = { - var window: ZXKitLoggerPickerWindow? + private lazy var pickerWindow: DDLoggerSwiftPickerWindow? = { + var window: DDLoggerSwiftPickerWindow? if #available(iOS 13.0, *) { for windowScene:UIWindowScene in ((UIApplication.shared.connectedScenes as? Set)!) { if windowScene.activationState == .foregroundActive { - window = ZXKitLoggerPickerWindow(windowScene: windowScene) + window = DDLoggerSwiftPickerWindow(windowScene: windowScene) } } } if window == nil { - window = ZXKitLoggerPickerWindow(frame: CGRect.zero) + window = DDLoggerSwiftPickerWindow(frame: CGRect.zero) } return window }() - private var floatWindow: ZXKitLoggerFloatWindow? + private var floatWindow: DDLoggerSwiftFloatWindow? var isPasswordCorrect: Bool = false - private let logQueue = DispatchQueue(label:"com.ZXKitLogger.logQueue", qos:.utility, attributes:.concurrent) - + private let logQueue = DispatchQueue(label:"com.DDLoggerSwift.logQueue", qos:.utility, attributes: .concurrent) + private var chunkList = [DDLoggerSwiftItem]() + private var lastUpdateTime: TimeInterval = 0 + private var throttleTimer: Timer? //MARK: - Public函数 /// 根据日志的输出类型去输出相应的日志,不同日志类型颜色不一样 /// - Parameter log: 日志内容 /// - Parameter logType: 日志类型 - public class func printLog(log:Any, logType:ZXKitLogType, file:String = #file, funcName:String = #function, lineNum:Int = #line) -> Void { + public class func printLog(log:Any, logType:DDLogType, file:String = #file, funcName:String = #function, lineNum:Int = #line) -> Void { shared.logQueue.async(group: nil, qos: .default, flags: .barrier) { - let loggerItem = ZXKitLoggerItem() + let loggerItem = DDLoggerSwiftItem() loggerItem.mLogItemType = logType - loggerItem.mCreateDate = Date() let fileName = (file as NSString).lastPathComponent; loggerItem.mLogDebugContent = "File: \(fileName) -- Line: \(lineNum) -- Function:\(fileName).\(funcName) ----" @@ -189,9 +194,43 @@ public class ZXKitLogger { if self.isSyncConsole { print(loggerItem.getFullContentString()) } + //刷新列表 - DispatchQueue.main.async { - self.shared.loggerWindow?.insert(model: loggerItem) + if throttleTime > 0 { + //设置节流 + let currentTime = Date().timeIntervalSince1970 + if currentTime - shared.lastUpdateTime > throttleTime { + if shared.throttleTimer != nil { + shared.throttleTimer?.invalidate() + shared.throttleTimer = nil + } + let chunkList = shared.chunkList + DispatchQueue.main.async { + self.shared.loggerWindow?.insert(models: chunkList) + } + shared.chunkList.removeAll() + shared.lastUpdateTime = currentTime + } else { + shared.chunkList.append(loggerItem) + if shared.throttleTimer != nil { + shared.throttleTimer?.invalidate() + shared.throttleTimer = nil + } + shared.throttleTimer = Timer(timeInterval: 2, repeats: false) { timer in + timer.invalidate() + let chunkList = shared.chunkList + DispatchQueue.main.async { + self.shared.loggerWindow?.insert(models: chunkList) + } + shared.chunkList.removeAll() + shared.lastUpdateTime = Date().timeIntervalSince1970 + } + RunLoop.main.add(shared.throttleTimer!, forMode: .common) + } + } else { + DispatchQueue.main.async { + self.shared.loggerWindow?.insert(models: [loggerItem]) + } } //写入文件 if self.storageLevels.contains(logType) { @@ -199,10 +238,10 @@ public class ZXKitLogger { } #if canImport(CocoaAsyncSocket) DispatchQueue.global().async { - if ZXKitLogger.isTCP { - ZXKitLoggerTCPSocketManager.shared.send(loggerItem: loggerItem) + if DDLoggerSwift.isTCP { + DDLoggerSwiftTCPSocketManager.shared.send(loggerItem: loggerItem) } else { - ZXKitLoggerUDPSocketManager.shared.send(loggerItem: loggerItem) + DDLoggerSwiftUDPSocketManager.shared.send(loggerItem: loggerItem) } } #endif @@ -210,7 +249,7 @@ public class ZXKitLogger { } ///获取log日志数组 - public class func getAllLog(date: Date? = nil, keyword: String? = nil, type: ZXKitLogType? = nil) -> [ZXKitLoggerItem] { + public class func getAllLog(date: Date? = nil, keyword: String? = nil, type: DDLogType? = nil) -> [DDLoggerSwiftItem] { if let date = date { let dateFormatter = DateFormatter() dateFormatter.dateFormat = "yyyy-MM-dd" @@ -236,7 +275,7 @@ public class ZXKitLogger { return logFilePath } - public class func getItemCount(type: ZXKitLogType?) -> Int { + public class func getItemCount(type: DDLogType?) -> Int { return HDSqliteTools.shared.getItemCount(type: type) } @@ -248,11 +287,12 @@ public class ZXKitLogger { } /// 显示log窗口 - public class func show(filterType: ZXKitLogType? = nil) { + public class func show(filterType: DDLogType? = nil) { DispatchQueue.main.async { self.shared.floatWindow?.isHidden = true self.shared.loggerWindow?.isHidden = false self.shared.loggerWindow?.filterType = filterType + NotificationCenter.default.post(name: .DDLoggerSwiftDidShow, object: nil) } } @@ -261,9 +301,6 @@ public class ZXKitLogger { DispatchQueue.main.async { self.shared.loggerWindow?.isHidden = true self.shared.pickerWindow?.isHidden = true - #if canImport(ZXKitCore) - print(NSLocalizedString("The float button already exists", comment: "")) - #else //float window if let window = self.shared.floatWindow { window.isHidden = false @@ -271,17 +308,17 @@ public class ZXKitLogger { if #available(iOS 13.0, *) { for windowScene:UIWindowScene in ((UIApplication.shared.connectedScenes as? Set)!) { if windowScene.activationState == .foregroundActive { - self.shared.floatWindow = ZXKitLoggerFloatWindow(windowScene: windowScene) + self.shared.floatWindow = DDLoggerSwiftFloatWindow(windowScene: windowScene) self.shared.floatWindow?.frame = CGRect(x: UIScreen.main.bounds.size.width - 80, y: 100, width: 60, height: 60) } } } if self.shared.floatWindow == nil { - self.shared.floatWindow = ZXKitLoggerFloatWindow(frame: CGRect(x: UIScreen.main.bounds.size.width - 80, y: 100, width: 60, height: 60)) + self.shared.floatWindow = DDLoggerSwiftFloatWindow(frame: CGRect(x: UIScreen.main.bounds.size.width - 80, y: 100, width: 60, height: 60)) } self.shared.floatWindow?.isHidden = false } - #endif + NotificationCenter.default.post(name: .DDLoggerSwiftDidHidden, object: nil) } } @@ -291,6 +328,7 @@ public class ZXKitLogger { self.shared.loggerWindow?.isHidden = true self.shared.floatWindow?.isHidden = true self.shared.pickerWindow?.isHidden = true + NotificationCenter.default.post(name: .DDLoggerSwiftDidClose, object: nil) } } @@ -333,24 +371,24 @@ public class ZXKitLogger { //MARK: init init() { - if ZXKitLogger.logExpiryDay > 0 { + if DDLoggerSwift.logExpiryDay > 0 { self._checkValidity() } #if canImport(CocoaAsyncSocket) //发起服务 - ZXKitLoggerBonjour.shared.start() - if ZXKitLogger.isTCP { - ZXKitLoggerTCPSocketManager.shared.start() + DDLoggerSwiftBonjour.shared.start() + if DDLoggerSwift.isTCP { + DDLoggerSwiftTCPSocketManager.shared.start() } else { - ZXKitLoggerUDPSocketManager.shared.start() + DDLoggerSwiftUDPSocketManager.shared.start() } #endif } } -private extension ZXKitLogger { - func _writeDB(log: ZXKitLoggerItem) -> Void { +private extension DDLoggerSwift { + func _writeDB(log: DDLoggerSwiftItem) -> Void { HDSqliteTools.shared.insertLog(log: log) } diff --git a/example/Pods/ZXKitLogger/pod/ZXKitLoggerFloatWindow.swift b/example/Pods/DDLoggerSwift/pod/DDLoggerSwiftFloatWindow.swift similarity index 86% rename from example/Pods/ZXKitLogger/pod/ZXKitLoggerFloatWindow.swift rename to example/Pods/DDLoggerSwift/pod/DDLoggerSwiftFloatWindow.swift index 140264f..b4545aa 100644 --- a/example/Pods/ZXKitLogger/pod/ZXKitLoggerFloatWindow.swift +++ b/example/Pods/DDLoggerSwift/pod/DDLoggerSwiftFloatWindow.swift @@ -1,15 +1,15 @@ // -// ZXKitLoggerFloatWindow.swift -// ZXKitLogger +// DDLoggerSwiftFloatWindow.swift +// DDLoggerSwift // // Created by Damon on 2021/4/28. // Copyright © 2021 Damon. All rights reserved. // import UIKit -import ZXKitUtil +import DDUtils -class ZXKitLoggerFloatWindow: UIWindow { +class DDLoggerSwiftFloatWindow: UIWindow { @available(iOS 13.0, *) override init(windowScene: UIWindowScene) { @@ -31,11 +31,11 @@ class ZXKitLoggerFloatWindow: UIWindow { lazy var mButton: UIButton = { let button = UIButton(type: .custom) button.translatesAutoresizingMaskIntoConstraints = false - button.backgroundColor = UIColor.zx.color(hexValue: 0x5dae8b) + button.backgroundColor = UIColor.dd.color(hexValue: 0x5dae8b) button.setTitle("Z".ZXLocaleString, for: UIControl.State.normal) button.titleLabel?.font = UIFont.systemFont(ofSize: 23, weight: .bold) - button.layer.borderColor = UIColor.zx.color(hexValue: 0xffffff).cgColor - button.zx.addLayerShadow(color: UIColor.zx.color(hexValue: 0x333333), offset: CGSize(width: 2, height: 2), radius: 4, cornerRadius: 30) + button.layer.borderColor = UIColor.dd.color(hexValue: 0xffffff).cgColor + button.dd.addLayerShadow(color: UIColor.dd.color(hexValue: 0x333333), offset: CGSize(width: 2, height: 2), radius: 4, cornerRadius: 30) button.layer.borderWidth = 4.0 button.addTarget(self, action: #selector(_show), for: UIControl.Event.touchUpInside) button.frame = CGRect(x: 0, y: 0, width: 60, height: 60) @@ -47,7 +47,7 @@ class ZXKitLoggerFloatWindow: UIWindow { } -private extension ZXKitLoggerFloatWindow { +private extension DDLoggerSwiftFloatWindow { func _initVC() { self.rootViewController = UIViewController() @@ -56,7 +56,7 @@ private extension ZXKitLoggerFloatWindow { } @objc func _show() { - ZXKitLogger.show() + DDLoggerSwift.show() } func _createUI() { @@ -71,7 +71,7 @@ private extension ZXKitLoggerFloatWindow { } @objc private func _touchMove(p:UIPanGestureRecognizer) { - guard let window = ZXKitUtil.shared.getCurrentNormalWindow() else { return } + guard let window = DDUtils.shared.getCurrentNormalWindow() else { return } let panPoint = p.location(in: window) //跟随手指拖拽 if p.state == .changed { diff --git a/example/Pods/ZXKitLogger/pod/ZXKitLoggerItem.swift b/example/Pods/DDLoggerSwift/pod/DDLoggerSwiftItem.swift similarity index 86% rename from example/Pods/ZXKitLogger/pod/ZXKitLoggerItem.swift rename to example/Pods/DDLoggerSwift/pod/DDLoggerSwiftItem.swift index 6b6d7d3..35729fd 100644 --- a/example/Pods/ZXKitLogger/pod/ZXKitLoggerItem.swift +++ b/example/Pods/DDLoggerSwift/pod/DDLoggerSwiftItem.swift @@ -1,32 +1,31 @@ // -// ZXKitLoggerItem.swift -// ZXKitLoggerSwift +// DDLoggerSwiftItem.swift +// DDLoggerSwiftSwift // // Created by Damon on 2020/6/10. // Copyright © 2020 Damon. All rights reserved. // import UIKit -import CommonCrypto -import ZXKitUtil +import DDUtils enum Section: CaseIterable { case main } ///log的内容 -public class ZXKitLoggerItem { +public class DDLoggerSwiftItem { let identifier = UUID() //用于hash计算 - public var mLogItemType = ZXKitLogType.debug //log类型 + public var mLogItemType = DDLogType.debug //log类型 public var mLogDebugContent: String = "" //log输出的文件、行数、函数名 - public var mLogContent: Any? = "ZXKitLogger: Click Log To Copy".ZXLocaleString //log的内容 + public var mLogContent: Any? = "DDLoggerSwift: Click Log To Copy" //log的内容 public var mCreateDate = Date() //log日期 private var mCurrentHighlightString = "" //当前需要高亮的字符串 private var mCacheHasHighlightString = false //上次查询是否包含高亮的字符串 - var mCacheHighlightCompleteString = NSMutableAttributedString() //上次包含高亮支付的富文本 + var mCacheHighlightCompleteString: NSMutableAttributedString? //上次包含高亮支付的富文本 } -public extension ZXKitLoggerItem { +public extension DDLoggerSwiftItem { //LogContent转字符串格式化 func getLogContent() -> String { var contentString = "" @@ -37,7 +36,7 @@ public extension ZXKitLoggerItem { contentString = "\(mContent)" } if self.mLogItemType == .privacy { - contentString = contentString.zx.aesCBCEncrypt(password: ZXKitLogger.privacyLogPassword, ivString: ZXKitLogger.privacyLogIv, encodeType: ZXKitLogger.privacyResultEncodeType) ?? "Invalid encryption".ZXLocaleString + contentString = contentString.dd.aesCBCEncrypt(password: DDLoggerSwift.privacyLogPassword, ivString: DDLoggerSwift.privacyLogIv, encodeType: DDLoggerSwift.privacyResultEncodeType) ?? "Invalid encryption".ZXLocaleString } } return contentString @@ -52,7 +51,7 @@ public extension ZXKitLoggerItem { //内容 let contentString = self.getLogContent() //所有的内容 - if ZXKitLogger.isFullLogOut { + if DDLoggerSwift.isFullLogOut { switch mLogItemType { case .info: return dateStr + " ---- ✅✅ ---- " + mLogDebugContent + "\n" + contentString + "\n" @@ -82,7 +81,7 @@ public extension ZXKitLoggerItem { } //根据需要高亮内容查询组装高亮内容 - func getHighlightAttributedString(highlightString: String, complete:(Bool, NSAttributedString)->Void) -> Void { + func getHighlightAttributedString(highlightString: String, complete:(Bool, NSAttributedString?)->Void) -> Void { if highlightString.isEmpty { //空的直接返回 let contentString = self.getFullContentString() @@ -117,12 +116,12 @@ public extension ZXKitLoggerItem { } } -extension ZXKitLoggerItem: Hashable { +extension DDLoggerSwiftItem: Hashable { public func hash(into hasher: inout Hasher) { hasher.combine(identifier) } - public static func ==(lhs: ZXKitLoggerItem, rhs: ZXKitLoggerItem) -> Bool { + public static func ==(lhs: DDLoggerSwiftItem, rhs: DDLoggerSwiftItem) -> Bool { return lhs.identifier == rhs.identifier } diff --git a/example/Pods/ZXKitLogger/pod/ZXKitLoggerPickerWindow.swift b/example/Pods/DDLoggerSwift/pod/DDLoggerSwiftPickerWindow.swift similarity index 90% rename from example/Pods/ZXKitLogger/pod/ZXKitLoggerPickerWindow.swift rename to example/Pods/DDLoggerSwift/pod/DDLoggerSwiftPickerWindow.swift index da6be6f..bc4b6d1 100644 --- a/example/Pods/ZXKitLogger/pod/ZXKitLoggerPickerWindow.swift +++ b/example/Pods/DDLoggerSwift/pod/DDLoggerSwiftPickerWindow.swift @@ -1,13 +1,13 @@ // -// ZXKitLoggerPickerWindow.swift -// ZXKitLogger +// DDLoggerSwiftPickerWindow.swift +// DDLoggerSwift // // Created by Damon on 2021/8/6. // Copyright © 2021 Damon. All rights reserved. // import UIKit -import ZXKitUtil +import DDUtils enum PickerType { case filter @@ -15,7 +15,7 @@ enum PickerType { case upload } -class ZXKitLoggerPickerWindow: UIWindow { +class DDLoggerSwiftPickerWindow: UIWindow { @available(iOS 13.0, *) override init(windowScene: UIWindowScene) { super.init(windowScene: windowScene) @@ -57,14 +57,14 @@ class ZXKitLoggerPickerWindow: UIWindow { private lazy var mContentBGView: UIView = { let mContentBGView = UIView() mContentBGView.translatesAutoresizingMaskIntoConstraints = false - mContentBGView.backgroundColor = UIColor.zx.color(hexValue: 0x272d55) + mContentBGView.backgroundColor = UIColor.dd.color(hexValue: 0x272d55) return mContentBGView }() private lazy var mPickerBGView: UIView = { let tView = UIView() tView.translatesAutoresizingMaskIntoConstraints = false - tView.backgroundColor = UIColor.zx.color(hexValue: 0x272d55) + tView.backgroundColor = UIColor.dd.color(hexValue: 0x272d55) tView.layer.masksToBounds = true tView.layer.borderColor = UIColor(red: 57.0/255.0, green: 74.0/255.0, blue: 81.0/255.0, alpha: 1.0).cgColor tView.layer.borderWidth = 1.0 @@ -76,7 +76,7 @@ class ZXKitLoggerPickerWindow: UIWindow { tipLabel.translatesAutoresizingMaskIntoConstraints = false tipLabel.text = "Please select the log to share".ZXLocaleString tipLabel.font = UIFont.systemFont(ofSize: 14, weight: UIFont.Weight.medium) - tipLabel.textColor = UIColor.zx.color(hexValue: 0xffffff) + tipLabel.textColor = UIColor.dd.color(hexValue: 0xffffff) return tipLabel }() @@ -98,7 +98,7 @@ class ZXKitLoggerPickerWindow: UIWindow { }() } -extension ZXKitLoggerPickerWindow { +extension DDLoggerSwiftPickerWindow { func showPicker(pickType: PickerType, date: Date?, isCloseWhenComplete: Bool) { self.pickerType = pickType self.isCloseWhenComplete = isCloseWhenComplete @@ -128,7 +128,7 @@ extension ZXKitLoggerPickerWindow { } } -private extension ZXKitLoggerPickerWindow { +private extension DDLoggerSwiftPickerWindow { func _initVC() { self.rootViewController = UIViewController() self.windowLevel = UIWindow.Level.alert @@ -185,7 +185,7 @@ private extension ZXKitLoggerPickerWindow { } //写入到text文件好解析 //文件路径 - let logFilePathURL = ZXKitUtil.shared.getFileDirectory(type: .caches).appendingPathComponent("ZXKitLogger.log", isDirectory: false) + let logFilePathURL = DDUtils.shared.getFileDirectory(type: .caches).appendingPathComponent("DDLoggerSwift.log", isDirectory: false) if FileManager.default.fileExists(atPath: logFilePathURL.path) { try? FileManager.default.removeItem(at: logFilePathURL) } @@ -199,25 +199,25 @@ private extension ZXKitLoggerPickerWindow { let activityVC = UIActivityViewController(activityItems: [logFilePathURL], applicationActivities: nil) if UIDevice.current.model == "iPad" { activityVC.modalPresentationStyle = UIModalPresentationStyle.popover - let view: UIView = ZXKitUtil.shared.getCurrentVC()?.view ?? self.rootViewController!.view + let view: UIView = DDUtils.shared.getCurrentVC()?.view ?? self.rootViewController!.view activityVC.popoverPresentationController?.sourceView = view activityVC.popoverPresentationController?.sourceRect = CGRect(x: 0, y: UIScreenHeight - 200, width: UIScreenWidth, height: 200) } if isCloseWhenComplete { - ZXKitLogger.close() + DDLoggerSwift.close() } else { - ZXKitLogger.hide() + DDLoggerSwift.hide() } - ZXKitUtil.shared.getCurrentVC()?.present(activityVC, animated: true, completion: nil) - } else if self.pickerType == .upload, let complete = ZXKitLogger.uploadComplete { + DDUtils.shared.getCurrentVC()?.present(activityVC, animated: true, completion: nil) + } else if self.pickerType == .upload, let complete = DDLoggerSwift.uploadComplete { let path = HDSqliteTools.shared.getDBFolder().appendingPathComponent(self.mShareFileName) complete(path) if isCloseWhenComplete { - ZXKitLogger.close() + DDLoggerSwift.close() } else { - ZXKitLogger.hide() + DDLoggerSwift.hide() } - } else if self.pickerType == .filter, let complete = ZXKitLogger.fileSelectedComplete { + } else if self.pickerType == .filter, let complete = DDLoggerSwift.fileSelectedComplete { let path = HDSqliteTools.shared.getDBFolder().appendingPathComponent(self.mShareFileName) complete(path, self.mShareFileName) self.isHidden = true @@ -225,7 +225,7 @@ private extension ZXKitLoggerPickerWindow { } } -extension ZXKitLoggerPickerWindow: UIPickerViewDelegate, UIPickerViewDataSource { +extension DDLoggerSwiftPickerWindow: UIPickerViewDelegate, UIPickerViewDataSource { //MARK: UIPickerViewDelegate public func numberOfComponents(in pickerView: UIPickerView) -> Int { return 1 diff --git a/example/Pods/ZXKitLogger/pod/ZXKitLoggerWindow.swift b/example/Pods/DDLoggerSwift/pod/DDLoggerSwiftWindow.swift similarity index 82% rename from example/Pods/ZXKitLogger/pod/ZXKitLoggerWindow.swift rename to example/Pods/DDLoggerSwift/pod/DDLoggerSwiftWindow.swift index 8e2d4c8..b45f8d3 100644 --- a/example/Pods/ZXKitLogger/pod/ZXKitLoggerWindow.swift +++ b/example/Pods/DDLoggerSwift/pod/DDLoggerSwiftWindow.swift @@ -1,31 +1,31 @@ // -// ZXKitLoggerWindow.swift -// ZXKitLogger +// DDLoggerSwiftWindow.swift +// DDLoggerSwift // // Created by Damon on 2020/9/9. // Copyright © 2020 Damon. All rights reserved. // import UIKit -import ZXKitUtil +import DDUtils func UIImageHDBoundle(named: String?) -> UIImage? { guard let name = named else { return nil } - guard let bundlePath = Bundle(for: ZXKitLogger.self).path(forResource: "ZXKitLogger", ofType: "bundle") else { return UIImage(named: name) } + guard let bundlePath = Bundle(for: DDLoggerSwift.self).path(forResource: "DDLoggerSwift", ofType: "bundle") else { return UIImage(named: name) } guard let bundle = Bundle(path: bundlePath) else { return UIImage(named: name) } return UIImage(named: name, in: bundle, compatibleWith: nil) } extension String{ var ZXLocaleString: String { - guard let bundlePath = Bundle(for: ZXKitLogger.self).path(forResource: "ZXKitLogger", ofType: "bundle") else { return NSLocalizedString(self, comment: "") } + guard let bundlePath = Bundle(for: DDLoggerSwift.self).path(forResource: "DDLoggerSwift", ofType: "bundle") else { return NSLocalizedString(self, comment: "") } guard let bundle = Bundle(path: bundlePath) else { return NSLocalizedString(self, comment: "") } let msg = NSLocalizedString(self, tableName: nil, bundle: bundle, value: "", comment: "") return msg } } -class ZXKitLoggerWindow: UIWindow { +class DDLoggerSwiftWindow: UIWindow { required init?(coder: NSCoder) { super.init(coder: coder) } @@ -40,7 +40,7 @@ class ZXKitLoggerWindow: UIWindow { super.init(frame: frame) self._init() } - private var mDisplayLogDataArray = [ZXKitLoggerItem]() //tableview显示的logger + private var mDisplayLogDataArray = [DDLoggerSwiftItem]() //tableview显示的logger private var mFilterIndexArray = [IndexPath]() //索引的排序 private var mCurrentSearchIndex = 0 //当前搜索到的索引 @@ -49,14 +49,14 @@ class ZXKitLoggerWindow: UIWindow { super.isHidden = newValue if !newValue { self.changeWindowFrame() - self._reloadView(newModel: nil) + self._reloadView(newModels: nil) } } } - var filterType: ZXKitLogType? { + var filterType: DDLogType? { didSet { - self._reloadView(newModel: nil) + self._reloadView(newModels: nil) } } @@ -111,11 +111,11 @@ class ZXKitLoggerWindow: UIWindow { var dataBaseName: String? { didSet { if dataBaseName == nil { - self.mTipLabel.text = "ZXKitLogger" + self.mTipLabel.text = "DDLoggerSwift" } else { self.mTipLabel.text = dataBaseName } - self._reloadView(newModel: nil) + self._reloadView(newModels: nil) } } @@ -124,7 +124,7 @@ class ZXKitLoggerWindow: UIWindow { private lazy var mContentBGView: UIView = { let mContentBGView = UIView() mContentBGView.translatesAutoresizingMaskIntoConstraints = false - mContentBGView.backgroundColor = UIColor.zx.color(hexValue: 0x272d55, alpha: 0.6) + mContentBGView.backgroundColor = UIColor.dd.color(hexValue: 0x272d55, alpha: 0.6) return mContentBGView }() @@ -141,16 +141,16 @@ class ZXKitLoggerWindow: UIWindow { tableView.showsVerticalScrollIndicator = true tableView.keyboardDismissMode = UIScrollView.KeyboardDismissMode.onDrag tableView.backgroundColor = UIColor.clear - tableView.separatorColor = UIColor.zx.color(hexValue: 0xfcfcfc) + tableView.separatorColor = UIColor.dd.color(hexValue: 0xfcfcfc) tableView.separatorInset = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 5) tableView.separatorStyle = UITableViewCell.SeparatorStyle.singleLine - tableView.register(ZXKitLoggerTableViewCell.self, forCellReuseIdentifier: "ZXKitLoggerTableViewCell") + tableView.register(DDLoggerSwiftTableViewCell.self, forCellReuseIdentifier: "DDLoggerSwiftTableViewCell") return tableView }() lazy var mNavigationBar: UIView = { let view = UIView() - view.backgroundColor = UIColor.zx.color(hexValue: 0x45526c) + view.backgroundColor = UIColor.dd.color(hexValue: 0x45526c) view.translatesAutoresizingMaskIntoConstraints = false return view }() @@ -182,8 +182,17 @@ class ZXKitLoggerWindow: UIWindow { return button }() - private lazy var mMenuView: ZXKitLoggerMenuView = { - let tMenuView = ZXKitLoggerMenuView() + lazy var mCloseButton: UIButton = { + let button = UIButton(type: .custom) + button.tag = 3 + button.translatesAutoresizingMaskIntoConstraints = false + button.setImage(UIImageHDBoundle(named: "icon_exit"), for: .normal) + button.addTarget(self, action: #selector(_bindClick(button:)), for: .touchUpInside) + return button + }() + + private lazy var mMenuView: DDLoggerSwiftMenuView = { + let tMenuView = DDLoggerSwiftMenuView() tMenuView.translatesAutoresizingMaskIntoConstraints = false tMenuView.isHidden = true tMenuView.clickSubject = {(index) -> Void in @@ -196,20 +205,20 @@ class ZXKitLoggerWindow: UIWindow { case 2: self._close() case 3: - ZXKitLogger.showShare(isCloseWhenComplete: false) + DDLoggerSwift.showShare(isCloseWhenComplete: false) case 4: self.isDecryptViewHidden = false case 5: - ZXKitLogger.fileSelectedComplete = { filePath, name in + DDLoggerSwift.fileSelectedComplete = { filePath, name in self.dataBaseName = name } - ZXKitLogger.showFileFilter() + DDLoggerSwift.showFileFilter() break case 6: break case 7: - let folder = ZXKitLogger.getDBFolder() - let size = ZXKitUtil.shared.getFileDirectorySize(fileDirectoryPth: folder) + let folder = DDLoggerSwift.getDBFolder() + let size = DDUtils.shared.getFileDirectorySize(fileDirectoryPth: folder) //数据库条数 var count = 0 if let enumer = FileManager.default.enumerator(at: folder, includingPropertiesForKeys: [URLResourceKey.creationDateKey]) { @@ -221,15 +230,15 @@ class ZXKitLoggerWindow: UIWindow { } let info = """ - 📅 \("Number of Today's Logs".ZXLocaleString): \(ZXKitLogger.getItemCount(type: nil)) + 📅 \("Number of Today's Logs".ZXLocaleString): \(DDLoggerSwift.getItemCount(type: nil)) - ✅ Info count: \(ZXKitLogger.getItemCount(type: .info)) + ✅ Info count: \(DDLoggerSwift.getItemCount(type: .info)) - ⚠️ Warn count: \(ZXKitLogger.getItemCount(type: .warn)) + ⚠️ Warn count: \(DDLoggerSwift.getItemCount(type: .warn)) - ❌ Error count: \(ZXKitLogger.getItemCount(type: .error)) + ❌ Error count: \(DDLoggerSwift.getItemCount(type: .error)) - ⛔️ Privacy count: \(ZXKitLogger.getItemCount(type: .privacy)) + ⛔️ Privacy count: \(DDLoggerSwift.getItemCount(type: .privacy)) 📊 \("LogFile count".ZXLocaleString): \(count) @@ -237,7 +246,7 @@ class ZXKitLoggerWindow: UIWindow { """ printWarn(info) case 8: - ZXKitLogger.showUpload(isCloseWhenComplete: false) + DDLoggerSwift.showUpload(isCloseWhenComplete: false) default: break } @@ -248,7 +257,7 @@ class ZXKitLoggerWindow: UIWindow { private lazy var mPasswordTextField: UITextField = { let tTextField = UITextField() tTextField.translatesAutoresizingMaskIntoConstraints = false - tTextField.backgroundColor = UIColor.zx.color(hexValue: 0x687980) + tTextField.backgroundColor = UIColor.dd.color(hexValue: 0x687980) tTextField.isHidden = true tTextField.isSecureTextEntry = true tTextField.delegate = self @@ -327,7 +336,7 @@ class ZXKitLoggerWindow: UIWindow { private lazy var mTipLabel: UILabel = { let tLabel = UILabel() tLabel.translatesAutoresizingMaskIntoConstraints = false - tLabel.text = "ZXKitLogger" + tLabel.text = "DDLoggerSwift" tLabel.textAlignment = NSTextAlignment.center tLabel.font = UIFont.systemFont(ofSize: 18, weight: .bold) tLabel.textColor = UIColor(red: 255.0/255.0, green: 255.0/255.0, blue: 255.0/255.0, alpha: 0.9) @@ -335,8 +344,8 @@ class ZXKitLoggerWindow: UIWindow { return tLabel }() - lazy var mFilterTypeView: ZXKitLoggerFilterTypeView = { - let view = ZXKitLoggerFilterTypeView() + lazy var mFilterTypeView: DDLoggerSwiftFilterTypeView = { + let view = DDLoggerSwiftFilterTypeView() view.delegate = self view.isHidden = true view.translatesAutoresizingMaskIntoConstraints = false @@ -346,10 +355,10 @@ class ZXKitLoggerWindow: UIWindow { //MARK: - Function -extension ZXKitLoggerWindow { - func insert(model: ZXKitLoggerItem) { +extension DDLoggerSwiftWindow { + func insert(models: [DDLoggerSwiftItem]) { if !self.isHidden { - self._reloadView(newModel: model) + self._reloadView(newModels: models) } } @@ -359,12 +368,12 @@ extension ZXKitLoggerWindow { HDSqliteTools.shared.deleteLog(timeStamp: Date().timeIntervalSince1970) self.mDisplayLogDataArray.removeAll() self.mFilterIndexArray.removeAll() - self._reloadView(newModel: ZXKitLoggerItem()) + self._reloadView(newModels: [DDLoggerSwiftItem()]) } } //MARK: - private Function -private extension ZXKitLoggerWindow { +private extension DDLoggerSwiftWindow { @objc func changeWindowFrame() { self.frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.size.width, height: 420) if let view = self.rootViewController?.view { @@ -394,46 +403,67 @@ private extension ZXKitLoggerWindow { self.isShowMenu = true case 2: self.cleanLog() + case 3: + DDLoggerSwift.close() default: break } } //过滤刷新 - private func _reloadView(newModel: ZXKitLoggerItem?) { - if let newModel = newModel { + private func _reloadView(newModels: [DDLoggerSwiftItem]?) { + if let newModels = newModels { + var insertIndexList = [IndexPath]() if let keyword = self.mSearchBar.text, !keyword.isEmpty { - if let filterType = self.filterType { - if newModel.mLogItemType == filterType && newModel.getFullContentString().localizedCaseInsensitiveContains(keyword) { - self.mDisplayLogDataArray.append(newModel) - //插入检索的 - let indexPath = IndexPath(row: self.mDisplayLogDataArray.count - 1, section: 0) - self.mFilterIndexArray.append(indexPath) - self.mNextButton.isEnabled = true - self.mCurrentSearchIndex = self.mFilterIndexArray.count - 1; - self.mSearchNumLabel.text = "\(self.mCurrentSearchIndex + 1)/\(self.mFilterIndexArray.count)" + let addModels = newModels.filter { model in + if let filterType = self.filterType { + return model.mLogItemType == filterType && model.getFullContentString().localizedCaseInsensitiveContains(keyword) + } else { + return model.getFullContentString().localizedCaseInsensitiveContains(keyword) + } + } + //插入检索索引 + for i in 0.. 1 else { return } DispatchQueue.main.async { @@ -497,12 +513,12 @@ private extension ZXKitLoggerWindow { //只隐藏log的输出窗口,保留悬浮图标 func _hide() { - ZXKitLogger.hide() + DDLoggerSwift.hide() self.isDecryptViewHidden = true } func _close() { - ZXKitLogger.close() + DDLoggerSwift.close() self.isDecryptViewHidden = true } @@ -511,7 +527,7 @@ private extension ZXKitLoggerWindow { self.mPasswordTextField.resignFirstResponder() self.mSearchBar.resignFirstResponder() self.isDecryptViewHidden = true - if ZXKitLogger.shared.isPasswordCorrect { + if DDLoggerSwift.shared.isPasswordCorrect { self.mTableView.reloadData() } else { printError("Password Error".ZXLocaleString) @@ -553,10 +569,16 @@ private extension ZXKitLoggerWindow { mDeleteButton.leftAnchor.constraint(equalTo: self.mScaleButton.rightAnchor, constant: 25).isActive = true mDeleteButton.widthAnchor.constraint(equalToConstant: 25).isActive = true mDeleteButton.heightAnchor.constraint(equalToConstant: 25).isActive = true + //关闭 + self.mNavigationBar.addSubview(self.mCloseButton) + mCloseButton.centerYAnchor.constraint(equalTo: self.mScaleButton.centerYAnchor).isActive = true + mCloseButton.rightAnchor.constraint(equalTo: self.mNavigationBar.rightAnchor, constant: -20).isActive = true + mCloseButton.widthAnchor.constraint(equalToConstant: 23).isActive = true + mCloseButton.heightAnchor.constraint(equalToConstant: 23).isActive = true //菜单 self.mNavigationBar.addSubview(self.mMenuButton) mMenuButton.centerYAnchor.constraint(equalTo: self.mScaleButton.centerYAnchor).isActive = true - mMenuButton.rightAnchor.constraint(equalTo: self.mNavigationBar.rightAnchor, constant: -20).isActive = true + mMenuButton.rightAnchor.constraint(equalTo: self.mCloseButton.leftAnchor, constant: -25).isActive = true mMenuButton.widthAnchor.constraint(equalToConstant: 23).isActive = true mMenuButton.heightAnchor.constraint(equalToConstant: 23).isActive = true //标题 @@ -616,8 +638,8 @@ private extension ZXKitLoggerWindow { } //MARK: Delegate -extension ZXKitLoggerWindow: ZXKitLoggerFilterTypeViewDelegate { - func filterSelected(filterType: ZXKitLogType?) { +extension DDLoggerSwiftWindow: DDLoggerSwiftFilterTypeViewDelegate { + func filterSelected(filterType: DDLogType?) { self.mFilterTypeView.isHidden = true self.filterType = filterType if let filterType = filterType { @@ -629,7 +651,7 @@ extension ZXKitLoggerWindow: ZXKitLoggerFilterTypeViewDelegate { } -extension ZXKitLoggerWindow: UITableViewDataSource, UITableViewDelegate { +extension DDLoggerSwiftWindow: UITableViewDataSource, UITableViewDelegate { func scrollViewDidScrollToTop(_ scrollView: UIScrollView) { @@ -642,7 +664,7 @@ extension ZXKitLoggerWindow: UITableViewDataSource, UITableViewDelegate { public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let loggerItem = self.mDisplayLogDataArray[indexPath.row] - let loggerCell = tableView.dequeueReusableCell(withIdentifier: "ZXKitLoggerTableViewCell") as! ZXKitLoggerTableViewCell + let loggerCell = tableView.dequeueReusableCell(withIdentifier: "DDLoggerSwiftTableViewCell") as! DDLoggerSwiftTableViewCell loggerCell.backgroundColor = UIColor.clear loggerCell.selectionStyle = .none loggerCell.updateWithLoggerItem(loggerItem: loggerItem, highlightText: self.mSearchBar.text ?? "") @@ -695,10 +717,10 @@ extension ZXKitLoggerWindow: UITableViewDataSource, UITableViewDelegate { } } -extension ZXKitLoggerWindow: UISearchBarDelegate { +extension DDLoggerSwiftWindow: UISearchBarDelegate { //UISearchBarDelegate public func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) { - self._reloadView(newModel: nil) + self._reloadView(newModels: nil) } public func searchBarTextDidEndEditing(_ searchBar: UISearchBar) { @@ -710,10 +732,10 @@ extension ZXKitLoggerWindow: UISearchBarDelegate { } } -extension ZXKitLoggerWindow: UITextFieldDelegate { +extension DDLoggerSwiftWindow: UITextFieldDelegate { //MAKR:UITextFieldDelegate public func textFieldDidEndEditing(_ textField: UITextField) { - ZXKitLogger.shared.isPasswordCorrect = (ZXKitLogger.privacyLogPassword == textField.text) + DDLoggerSwift.shared.isPasswordCorrect = (DDLoggerSwift.privacyLogPassword == textField.text) } public func textFieldShouldReturn(_ textField: UITextField) -> Bool { return textField.resignFirstResponder() diff --git a/example/Pods/ZXKitLogger/pod/HDSqliteTools.swift b/example/Pods/DDLoggerSwift/pod/HDSqliteTools.swift similarity index 84% rename from example/Pods/ZXKitLogger/pod/HDSqliteTools.swift rename to example/Pods/DDLoggerSwift/pod/HDSqliteTools.swift index 613d959..ba88234 100644 --- a/example/Pods/ZXKitLogger/pod/HDSqliteTools.swift +++ b/example/Pods/DDLoggerSwift/pod/HDSqliteTools.swift @@ -1,12 +1,17 @@ // // HDSqliteTools.swift -// ZXKitLogger +// DDLoggerSwift // // Created by Damon on 2021/2/18. // Copyright © 2021 Damon. All rights reserved. // + +#if canImport(WCDBSwift) +import WCDBSwift +#else import SQLite3 -import ZXKitUtil +#endif +import DDUtils class HDSqliteTools { static let shared = HDSqliteTools() @@ -20,10 +25,10 @@ class HDSqliteTools { //获取数据库文件夹 func getDBFolder() -> URL { - let dbFolder = ZXKitLogger.userID.zx.hashString(hashType: .md5) ?? "ZXKitLog" + let dbFolder = DDLoggerSwift.userID.dd.hashString(hashType: .md5) ?? "DDLoggerSwift" //创建文件夹 let manager = FileManager.default - let superDirectory = ZXKitLogger.DBParentFolder + let superDirectory = DDLoggerSwift.DBParentFolder let newFolder = superDirectory.appendingPathComponent(dbFolder, isDirectory: true) @@ -41,7 +46,7 @@ class HDSqliteTools { } //插入数据 - func insertLog(log: ZXKitLoggerItem) { + func insertLog(log: DDLoggerSwiftItem) { let insertRowString = String(format: "insert into hdlog(log, logType, time, debugContent, contentString) values ('%@','%d','%f', '%@', '%@')", log.getFullContentString(), log.mLogItemType.rawValue, Date().timeIntervalSince1970, log.mLogDebugContent, log.getLogContent()) var insertStatement: OpaquePointer? //第一步 @@ -50,18 +55,18 @@ class HDSqliteTools { //第三步 if sqlite3_step(insertStatement) == SQLITE_DONE { // print("插入数据成功") - NotificationCenter.default.post(name: .ZXKitLogDBUpdate, object: ["type": "insert", "logType": log.mLogItemType] as [String : Any]) + NotificationCenter.default.post(name: .DDLoggerSwiftDBUpdate, object: ["type": "insert", "logType": log.mLogItemType] as [String : Any]) } else { - print("ZXKitLogger_插入数据失败") + print("DDLoggerSwift_插入数据失败") } } else { - print("ZXKitLogger_插入时打开数据库失败") + print("DDLoggerSwift_插入时打开数据库失败") } //第四步 sqlite3_finalize(insertStatement) } - func getAllLog(name: String? = nil, keyword: String? = nil, type: ZXKitLogType? = nil) -> [ZXKitLoggerItem] { + func getAllLog(name: String? = nil, keyword: String? = nil, type: DDLogType? = nil) -> [DDLoggerSwiftItem] { let databasePath = self._getDataBasePath(name: name) guard FileManager.default.fileExists(atPath: databasePath.path) else { //数据库文件不存在 @@ -80,14 +85,14 @@ class HDSqliteTools { } var queryStatement: OpaquePointer? //第一步 - var logList = [ZXKitLoggerItem]() + var logList = [DDLoggerSwiftItem]() if sqlite3_prepare_v2(queryDB, queryString, -1, &queryStatement, nil) == SQLITE_OK { //第二步 while(sqlite3_step(queryStatement) == SQLITE_ROW) { //第三步 - let item = ZXKitLoggerItem() + let item = DDLoggerSwiftItem() // item.id = Int(sqlite3_column_int(queryStatement, 0)) - item.mLogItemType = ZXKitLogType.init(rawValue: Int(sqlite3_column_int(queryStatement, 2))) + item.mLogItemType = DDLogType.init(rawValue: Int(sqlite3_column_int(queryStatement, 2))) item.mLogDebugContent = String(cString: sqlite3_column_text(queryStatement, 4)) //更新内容 item.mLogContent = String(cString: sqlite3_column_text(queryStatement, 5)) @@ -102,7 +107,7 @@ class HDSqliteTools { return logList } - func getItemCount(type: ZXKitLogType?) -> Int { + func getItemCount(type: DDLogType?) -> Int { return self._getItemCount(type: type) } @@ -133,7 +138,7 @@ private extension HDSqliteTools { // print("成功打开数据库\(dbPath.absoluteString)") return db } else { - print("ZXKitLogger_打开数据库失败") + print("DDLoggerSwift_打开数据库失败") return nil } } @@ -147,7 +152,7 @@ private extension HDSqliteTools { if sqlite3_step(createTableStatement) == SQLITE_DONE { // print("成功创建表") } else { - print("ZXKitLogger_未成功创建表") + print("DDLoggerSwift_未成功创建表") } } else { @@ -156,7 +161,7 @@ private extension HDSqliteTools { sqlite3_finalize(createTableStatement) } - func _getItemCount(type: ZXKitLogType?) -> Int { + func _getItemCount(type: DDLogType?) -> Int { var count = 0 let databasePath = self._getDataBasePath() guard FileManager.default.fileExists(atPath: databasePath.path) else { @@ -192,12 +197,12 @@ private extension HDSqliteTools { //第三步 if sqlite3_step(insertStatement) == SQLITE_DONE { // print("删除过期数据成功") - NotificationCenter.default.post(name: .ZXKitLogDBUpdate, object: ["type": "delete"]) + NotificationCenter.default.post(name: .DDLoggerSwiftDBUpdate, object: ["type": "delete"]) } else { - print("ZXKitLogger_删除过期数据失败") + print("DDLoggerSwift_删除过期数据失败") } } else { - print("ZXKitLogger_删除时打开虚拟数据库失败") + print("DDLoggerSwift_删除时打开虚拟数据库失败") } //第四步 sqlite3_finalize(insertStatement) diff --git a/example/Pods/ZXKitLogger/pod/LogContent.swift b/example/Pods/DDLoggerSwift/pod/LogContent.swift similarity index 79% rename from example/Pods/ZXKitLogger/pod/LogContent.swift rename to example/Pods/DDLoggerSwift/pod/LogContent.swift index 2db3850..b3b1041 100644 --- a/example/Pods/ZXKitLogger/pod/LogContent.swift +++ b/example/Pods/DDLoggerSwift/pod/LogContent.swift @@ -1,13 +1,13 @@ // // LogContent.swift -// ZXKitLogger +// DDLoggerSwift // // Created by Damon on 2019/6/28. // Copyright © 2019 Damon. All rights reserved. // import Foundation -import ZXKitUtil +import DDUtils //输出内容需要遵循的协议 public protocol LogContent { @@ -21,14 +21,14 @@ extension Dictionary: LogContent { let data = try? JSONSerialization.data(withJSONObject: self, options:JSONSerialization.WritingOptions.prettyPrinted) if let data = data { let string = String(data: data, encoding: String.Encoding.utf8) ?? "\(self)" - return string.zx.unicodeDecode() + return string.dd.unicodeDecode() } else { let string = "\(self)" - return string.zx.unicodeDecode() + return string.dd.unicodeDecode() } } else { let string = "\(self)" - return string.zx.unicodeDecode() + return string.dd.unicodeDecode() } } } @@ -39,20 +39,20 @@ extension Array: LogContent { let data = try? JSONSerialization.data(withJSONObject: self, options:JSONSerialization.WritingOptions.prettyPrinted) if let data = data { let string = String(data: data, encoding: String.Encoding.utf8) ?? "\(self)" - return string.zx.unicodeDecode() + return string.dd.unicodeDecode() } else { let string = "\(self)" - return string.zx.unicodeDecode() + return string.dd.unicodeDecode() } } else { let string = "\(self)" - return string.zx.unicodeDecode() + return string.dd.unicodeDecode() } } } extension String: LogContent { public var logStringValue: String { - return self.zx.unicodeDecode() + return self.dd.unicodeDecode() } } diff --git a/example/Pods/ZXKitLogger/pod/assets/icon/icon_analyse.png b/example/Pods/DDLoggerSwift/pod/assets/icon/icon_analyse.png similarity index 100% rename from example/Pods/ZXKitLogger/pod/assets/icon/icon_analyse.png rename to example/Pods/DDLoggerSwift/pod/assets/icon/icon_analyse.png diff --git a/example/Pods/ZXKitLogger/pod/assets/icon/icon_back.png b/example/Pods/DDLoggerSwift/pod/assets/icon/icon_back.png similarity index 100% rename from example/Pods/ZXKitLogger/pod/assets/icon/icon_back.png rename to example/Pods/DDLoggerSwift/pod/assets/icon/icon_back.png diff --git a/example/Pods/ZXKitLogger/pod/assets/icon/icon_copy.png b/example/Pods/DDLoggerSwift/pod/assets/icon/icon_copy.png similarity index 100% rename from example/Pods/ZXKitLogger/pod/assets/icon/icon_copy.png rename to example/Pods/DDLoggerSwift/pod/assets/icon/icon_copy.png diff --git a/example/Pods/ZXKitLogger/pod/assets/icon/icon_decrypt.png b/example/Pods/DDLoggerSwift/pod/assets/icon/icon_decrypt.png similarity index 100% rename from example/Pods/ZXKitLogger/pod/assets/icon/icon_decrypt.png rename to example/Pods/DDLoggerSwift/pod/assets/icon/icon_decrypt.png diff --git a/example/Pods/ZXKitLogger/pod/assets/icon/icon_delete.png b/example/Pods/DDLoggerSwift/pod/assets/icon/icon_delete.png similarity index 100% rename from example/Pods/ZXKitLogger/pod/assets/icon/icon_delete.png rename to example/Pods/DDLoggerSwift/pod/assets/icon/icon_delete.png diff --git a/example/Pods/ZXKitLogger/pod/assets/icon/icon_exit.png b/example/Pods/DDLoggerSwift/pod/assets/icon/icon_exit.png similarity index 100% rename from example/Pods/ZXKitLogger/pod/assets/icon/icon_exit.png rename to example/Pods/DDLoggerSwift/pod/assets/icon/icon_exit.png diff --git a/example/Pods/ZXKitLogger/pod/assets/icon/icon_hide.png b/example/Pods/DDLoggerSwift/pod/assets/icon/icon_hide.png similarity index 100% rename from example/Pods/ZXKitLogger/pod/assets/icon/icon_hide.png rename to example/Pods/DDLoggerSwift/pod/assets/icon/icon_hide.png diff --git a/example/Pods/ZXKitLogger/pod/assets/icon/icon_normal_back.png b/example/Pods/DDLoggerSwift/pod/assets/icon/icon_normal_back.png similarity index 100% rename from example/Pods/ZXKitLogger/pod/assets/icon/icon_normal_back.png rename to example/Pods/DDLoggerSwift/pod/assets/icon/icon_normal_back.png diff --git a/example/Pods/ZXKitLogger/pod/assets/icon/icon_scale.png b/example/Pods/DDLoggerSwift/pod/assets/icon/icon_scale.png similarity index 100% rename from example/Pods/ZXKitLogger/pod/assets/icon/icon_scale.png rename to example/Pods/DDLoggerSwift/pod/assets/icon/icon_scale.png diff --git a/example/Pods/ZXKitLogger/pod/assets/icon/icon_scroll.png b/example/Pods/DDLoggerSwift/pod/assets/icon/icon_scroll.png similarity index 100% rename from example/Pods/ZXKitLogger/pod/assets/icon/icon_scroll.png rename to example/Pods/DDLoggerSwift/pod/assets/icon/icon_scroll.png diff --git a/example/Pods/ZXKitLogger/pod/assets/icon/icon_search.png b/example/Pods/DDLoggerSwift/pod/assets/icon/icon_search.png similarity index 100% rename from example/Pods/ZXKitLogger/pod/assets/icon/icon_search.png rename to example/Pods/DDLoggerSwift/pod/assets/icon/icon_search.png diff --git a/example/Pods/ZXKitLogger/pod/assets/icon/icon_share.png b/example/Pods/DDLoggerSwift/pod/assets/icon/icon_share.png similarity index 100% rename from example/Pods/ZXKitLogger/pod/assets/icon/icon_share.png rename to example/Pods/DDLoggerSwift/pod/assets/icon/icon_share.png diff --git a/example/Pods/ZXKitLogger/pod/assets/icon/icon_upload.png b/example/Pods/DDLoggerSwift/pod/assets/icon/icon_upload.png similarity index 100% rename from example/Pods/ZXKitLogger/pod/assets/icon/icon_upload.png rename to example/Pods/DDLoggerSwift/pod/assets/icon/icon_upload.png diff --git a/example/Pods/ZXKitLogger/pod/assets/localizable/en.lproj/Localizable.strings b/example/Pods/DDLoggerSwift/pod/assets/localizable/en.lproj/Localizable.strings similarity index 94% rename from example/Pods/ZXKitLogger/pod/assets/localizable/en.lproj/Localizable.strings rename to example/Pods/DDLoggerSwift/pod/assets/localizable/en.lproj/Localizable.strings index 965426c..7c60596 100644 --- a/example/Pods/ZXKitLogger/pod/assets/localizable/en.lproj/Localizable.strings +++ b/example/Pods/DDLoggerSwift/pod/assets/localizable/en.lproj/Localizable.strings @@ -1,11 +1,11 @@ /* Localizable.strings - ZXKitLogger + DDLoggerSwift Created by Damon on 2019/6/24. Copyright © 2019 Damon. All rights reserved. */ -"ZXKitLogger: Click Log To Copy" = "ZXKitLogger: Click Log To Copy"; +"DDLoggerSwift: Click Log To Copy" = "DDLoggerSwift: Click Log To Copy"; "Please select the log to share" = "Please select the log to share"; "Please select the log to upload" = "Please select the log to upload"; "Please select the log" = "Please select the log"; diff --git a/example/Pods/ZXKitLogger/pod/assets/localizable/zh-Hans.lproj/Localizable.strings b/example/Pods/DDLoggerSwift/pod/assets/localizable/zh-Hans.lproj/Localizable.strings similarity index 93% rename from example/Pods/ZXKitLogger/pod/assets/localizable/zh-Hans.lproj/Localizable.strings rename to example/Pods/DDLoggerSwift/pod/assets/localizable/zh-Hans.lproj/Localizable.strings index 89fd453..d9fc927 100644 --- a/example/Pods/ZXKitLogger/pod/assets/localizable/zh-Hans.lproj/Localizable.strings +++ b/example/Pods/DDLoggerSwift/pod/assets/localizable/zh-Hans.lproj/Localizable.strings @@ -1,11 +1,11 @@ /* Localizable.strings - ZXKitLogger + DDLoggerSwift Created by Damon on 2019/6/24. Copyright © 2019 Damon. All rights reserved. */ -"ZXKitLogger: Click Log To Copy" = "ZXKitLogger: 点击对应日志可快速复制"; +"DDLoggerSwift: Click Log To Copy" = "DDLoggerSwift: 点击对应日志可快速复制"; "Please select the log to share" = "请选择要分享的日志"; "Please select the log to upload" = "请选择要上传的日志"; "Please select the log" = "请选择日志文件"; diff --git a/example/Pods/ZXKitLogger/pod/view/ZXKitLoggerFilterTypeView.swift b/example/Pods/DDLoggerSwift/pod/view/DDLoggerSwiftFilterTypeView.swift similarity index 88% rename from example/Pods/ZXKitLogger/pod/view/ZXKitLoggerFilterTypeView.swift rename to example/Pods/DDLoggerSwift/pod/view/DDLoggerSwiftFilterTypeView.swift index b76750d..56eaef1 100644 --- a/example/Pods/ZXKitLogger/pod/view/ZXKitLoggerFilterTypeView.swift +++ b/example/Pods/DDLoggerSwift/pod/view/DDLoggerSwiftFilterTypeView.swift @@ -1,6 +1,6 @@ // -// ZXKitLoggerFilterTypeView.swift -// ZXKitLogger +// DDLoggerSwiftFilterTypeView.swift +// DDLoggerSwift // // Created by Damon on 2023/4/9. // Copyright © 2023 Damon. All rights reserved. @@ -8,13 +8,13 @@ import UIKit -protocol ZXKitLoggerFilterTypeViewDelegate: AnyObject { - func filterSelected(filterType: ZXKitLogType?) +protocol DDLoggerSwiftFilterTypeViewDelegate: AnyObject { + func filterSelected(filterType: DDLogType?) } -class ZXKitLoggerFilterTypeView: UIView { +class DDLoggerSwiftFilterTypeView: UIView { private let dataList = ["none", "debug", "info", "warn", "error", "privacy"] - weak var delegate: ZXKitLoggerFilterTypeViewDelegate? + weak var delegate: DDLoggerSwiftFilterTypeViewDelegate? override init(frame: CGRect) { super.init(frame: frame) @@ -38,8 +38,8 @@ class ZXKitLoggerFilterTypeView: UIView { tableView.showsHorizontalScrollIndicator = false tableView.showsVerticalScrollIndicator = true tableView.keyboardDismissMode = UIScrollView.KeyboardDismissMode.onDrag - tableView.backgroundColor = UIColor.zx.color(hexValue: 0xfcfcfc) - tableView.separatorColor = UIColor.zx.color(hexValue: 0xcccccc) + tableView.backgroundColor = UIColor.dd.color(hexValue: 0xfcfcfc) + tableView.separatorColor = UIColor.dd.color(hexValue: 0xcccccc) tableView.separatorInset = UIEdgeInsets(top: 0, left: 5, bottom: 0, right: 5) tableView.separatorStyle = UITableViewCell.SeparatorStyle.singleLine tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell") @@ -48,7 +48,7 @@ class ZXKitLoggerFilterTypeView: UIView { } -extension ZXKitLoggerFilterTypeView { +extension DDLoggerSwiftFilterTypeView { func _createUI() { self.addSubview(mTableView) mTableView.leftAnchor.constraint(equalTo: self.leftAnchor).isActive = true @@ -58,7 +58,7 @@ extension ZXKitLoggerFilterTypeView { } } -extension ZXKitLoggerFilterTypeView: UITableViewDelegate, UITableViewDataSource { +extension DDLoggerSwiftFilterTypeView: UITableViewDelegate, UITableViewDataSource { //MARK:UITableViewDelegate public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return self.dataList.count diff --git a/example/Pods/ZXKitLogger/pod/view/ZXKitLoggerMenuCollectionViewCell.swift b/example/Pods/DDLoggerSwift/pod/view/DDLoggerSwiftMenuCollectionViewCell.swift similarity index 87% rename from example/Pods/ZXKitLogger/pod/view/ZXKitLoggerMenuCollectionViewCell.swift rename to example/Pods/DDLoggerSwift/pod/view/DDLoggerSwiftMenuCollectionViewCell.swift index 9a92a45..0a7aae0 100644 --- a/example/Pods/ZXKitLogger/pod/view/ZXKitLoggerMenuCollectionViewCell.swift +++ b/example/Pods/DDLoggerSwift/pod/view/DDLoggerSwiftMenuCollectionViewCell.swift @@ -1,6 +1,6 @@ // -// ZXKitLoggerMenuCollectionViewCell.swift -// ZXKitLogger +// DDLoggerSwiftMenuCollectionViewCell.swift +// DDLoggerSwift // // Created by Damon on 2021/5/21. // Copyright © 2021 Damon. All rights reserved. @@ -8,13 +8,13 @@ import UIKit -struct ZXKitLoggerMenuCollectionViewCellModel { +struct DDLoggerSwiftMenuCollectionViewCellModel { var title = "" var image: UIImage? var isSwitchItem: Bool? } -class ZXKitLoggerMenuCollectionViewCell: UICollectionViewCell { +class DDLoggerSwiftMenuCollectionViewCell: UICollectionViewCell { var switchSubject: ((_ index: Int, _ isOn: Bool) -> Void)? override init(frame: CGRect) { @@ -26,7 +26,7 @@ class ZXKitLoggerMenuCollectionViewCell: UICollectionViewCell { super.init(coder: coder) } - func updateUI(model: ZXKitLoggerMenuCollectionViewCellModel) { + func updateUI(model: DDLoggerSwiftMenuCollectionViewCellModel) { self.mTitleLabel.text = model.title self.mImageView.image = model.image if let isSwitch = model.isSwitchItem { @@ -46,7 +46,7 @@ class ZXKitLoggerMenuCollectionViewCell: UICollectionViewCell { tLabel.textAlignment = NSTextAlignment.center tLabel.numberOfLines = 3 tLabel.font = UIFont.systemFont(ofSize: 13) - tLabel.textColor = UIColor.zx.color(hexValue: 0xffffff) + tLabel.textColor = UIColor.dd.color(hexValue: 0xffffff) return tLabel }() @@ -66,9 +66,9 @@ class ZXKitLoggerMenuCollectionViewCell: UICollectionViewCell { }() } -private extension ZXKitLoggerMenuCollectionViewCell { +private extension DDLoggerSwiftMenuCollectionViewCell { func _createUI() { - self.backgroundColor = UIColor.zx.color(hexValue: 0x323764, alpha: 0.5) + self.backgroundColor = UIColor.dd.color(hexValue: 0x323764, alpha: 0.5) self.layer.cornerRadius = 15 self.contentView.addSubview(mImageView) mImageView.centerXAnchor.constraint(equalTo: self.contentView.centerXAnchor).isActive = true diff --git a/example/Pods/ZXKitLogger/pod/view/ZXKitLoggerMenuView.swift b/example/Pods/DDLoggerSwift/pod/view/DDLoggerSwiftMenuView.swift similarity index 82% rename from example/Pods/ZXKitLogger/pod/view/ZXKitLoggerMenuView.swift rename to example/Pods/DDLoggerSwift/pod/view/DDLoggerSwiftMenuView.swift index bf0ee68..11fd626 100644 --- a/example/Pods/ZXKitLogger/pod/view/ZXKitLoggerMenuView.swift +++ b/example/Pods/DDLoggerSwift/pod/view/DDLoggerSwiftMenuView.swift @@ -1,6 +1,6 @@ // -// ZXKitLoggerMenuView.swift -// ZXKitLogger +// DDLoggerSwiftMenuView.swift +// DDLoggerSwift // // Created by Damon on 2021/5/21. // Copyright © 2021 Damon. All rights reserved. @@ -8,8 +8,8 @@ import UIKit -class ZXKitLoggerMenuView: UIView { - var mCollectionList = [ZXKitLoggerMenuCollectionViewCellModel]() +class DDLoggerSwiftMenuView: UIView { + var mCollectionList = [DDLoggerSwiftMenuCollectionViewCellModel]() var clickSubject: ((_ index: Int) -> Void)? private(set) var isAutoScrollSwitch = true override init(frame: CGRect) { @@ -36,14 +36,14 @@ class ZXKitLoggerMenuView: UIView { tCollectionView.delegate = self tCollectionView.isPagingEnabled = false tCollectionView.showsHorizontalScrollIndicator = false - tCollectionView.register(ZXKitLoggerMenuCollectionViewCell.self, forCellWithReuseIdentifier: "ZXKitLoggerMenuCollectionViewCell") + tCollectionView.register(DDLoggerSwiftMenuCollectionViewCell.self, forCellWithReuseIdentifier: "DDLoggerSwiftMenuCollectionViewCell") return tCollectionView }() } -private extension ZXKitLoggerMenuView { +private extension DDLoggerSwiftMenuView { func _createUI() { - self.backgroundColor = UIColor.zx.color(hexValue: 0x272d55, alpha: 0.8) + self.backgroundColor = UIColor.dd.color(hexValue: 0x272d55, alpha: 0.8) self.addSubview(mCollectionView) mCollectionView.topAnchor.constraint(equalTo: self.topAnchor, constant: 10).isActive = true mCollectionView.leftAnchor.constraint(equalTo: self.leftAnchor).isActive = true @@ -56,13 +56,13 @@ private extension ZXKitLoggerMenuView { var titleList = ["Back".ZXLocaleString, "Hide".ZXLocaleString, "Exit".ZXLocaleString, "Share".ZXLocaleString, "Decrypt".ZXLocaleString, "History".ZXLocaleString, "Auto scroll".ZXLocaleString, "Analyse".ZXLocaleString] var imageList = [UIImageHDBoundle(named: "icon_back"), UIImageHDBoundle(named: "icon_hide"), UIImageHDBoundle(named: "icon_exit"), UIImageHDBoundle(named: "icon_share"), UIImageHDBoundle(named: "icon_decrypt"), UIImageHDBoundle(named: "icon_search"), UIImageHDBoundle(named: "icon_scroll"), UIImageHDBoundle(named: "icon_analyse")] - if ZXKitLogger.uploadComplete != nil { + if DDLoggerSwift.uploadComplete != nil { titleList.append("Upload".ZXLocaleString) imageList.append(UIImageHDBoundle(named: "icon_upload")) } for i in 0.. Int { return self.mCollectionList.count @@ -80,7 +80,7 @@ extension ZXKitLoggerMenuView: UICollectionViewDelegate,UICollectionViewDataSour func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let model = self.mCollectionList[indexPath.item] - let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "ZXKitLoggerMenuCollectionViewCell", for: indexPath) as! ZXKitLoggerMenuCollectionViewCell + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "DDLoggerSwiftMenuCollectionViewCell", for: indexPath) as! DDLoggerSwiftMenuCollectionViewCell cell.updateUI(model: model) cell.tag = indexPath.item cell.switchSubject = { [weak self] (tag, isOn) in diff --git a/example/Pods/ZXKitLogger/pod/view/ZXKitLoggerTableViewCell.swift b/example/Pods/DDLoggerSwift/pod/view/DDLoggerSwiftTableViewCell.swift similarity index 89% rename from example/Pods/ZXKitLogger/pod/view/ZXKitLoggerTableViewCell.swift rename to example/Pods/DDLoggerSwift/pod/view/DDLoggerSwiftTableViewCell.swift index 3ac31f6..45b4733 100644 --- a/example/Pods/ZXKitLogger/pod/view/ZXKitLoggerTableViewCell.swift +++ b/example/Pods/DDLoggerSwift/pod/view/DDLoggerSwiftTableViewCell.swift @@ -1,6 +1,6 @@ // -// ZXKitLoggerTableViewCell.swift -// ZXKitLogger +// DDLoggerSwiftTableViewCell.swift +// DDLoggerSwift // // Created by Damon on 2019/6/24. // Copyright © 2019 Damon. All rights reserved. @@ -8,7 +8,7 @@ import UIKit -class ZXKitLoggerTableViewCell: UITableViewCell { +class DDLoggerSwiftTableViewCell: UITableViewCell { private lazy var mContentLabel: UILabel = { var label = UILabel() @@ -46,12 +46,12 @@ class ZXKitLoggerTableViewCell: UITableViewCell { self.mContentLabel.bottomAnchor.constraint(equalTo: self.contentView.bottomAnchor, constant: -2).isActive = true } - func updateWithLoggerItem(loggerItem:ZXKitLoggerItem, highlightText:String) { + func updateWithLoggerItem(loggerItem:DDLoggerSwiftItem, highlightText:String) { self.mContentLabel.textColor = loggerItem.mLogItemType.textColor() loggerItem.getHighlightAttributedString(highlightString: highlightText) { (hasHighlightStr, hightlightAttributedString) in self.mContentLabel.attributedText = hightlightAttributedString // if hasHighlightStr { -// self.contentView.backgroundColor = UIColor.zx.color(hexValue: 0xe58e23) +// self.contentView.backgroundColor = UIColor.dd.color(hexValue: 0xe58e23) // } else { // self.contentView.backgroundColor = UIColor.clear // } diff --git a/example/Pods/ZXKitUtil/LICENSE b/example/Pods/DDUtils/LICENSE similarity index 100% rename from example/Pods/ZXKitUtil/LICENSE rename to example/Pods/DDUtils/LICENSE diff --git a/example/Pods/DDUtils/README.md b/example/Pods/DDUtils/README.md new file mode 100644 index 0000000..f88aeb6 --- /dev/null +++ b/example/Pods/DDUtils/README.md @@ -0,0 +1,144 @@ +# DDUtils + +![](https://img.shields.io/badge/CocoaPods-supported-brightgreen) ![](https://img.shields.io/badge/Swift-5.0-brightgreen) ![](https://img.shields.io/badge/License-MIT-brightgreen) ![](https://img.shields.io/badge/version-iOS10.0-brightgreen) + + +`DDUtils` is a collection of commonly used features, developed based on Swift, that can be quickly implemented on iOS devices. + +### [中文文档](https://ddceo.com/blog/1281.html) + +## import the project + +### Import via cocoapods + +``` +pod 'DDUtils' +``` + +If you need the function of `idfa`, you can choose to import + +``` +pod 'DDUtils/idfa' +``` + +### Import via file + +Download the project and import the contents of the `pod` folder under the project file into the project + +## API list + +Existing data type operations can be used through the syntax of `.zx`, and other operations can be used through the singleton of `DDUtils.shared`. + +* There is no difference between singleton and `.zx`, singleton will be more unified and simple. The advantage of `.zx` syntax is that it does not need to be imported where it is used + +### UI related + +|Name|Function description|Example| +|----|----|----| +|func getCurrentNormalWindow()|Get the current NormalWindow|DDUtils.shared.getCurrentNormalWindow()| +|func getCurrentVC()|Get the current ViewController|DDUtils.shared.getCurrentVC()| +|func getImage(color: UIColor)|Generate a solid color background image by color|DDUtils.shared.getImage(color: UIColor.red)
or
UIImage.dd.getImage(color: UIColor .red)| +|func getLinearGradientImage(colors: [UIColor], directionType: DDUtilsGradientDirection, size: CGSize = CGSize(width: 100, height: 100))|Generate a linear gradient image|DDUtils.shared.getLinearGradientImage(colors: [UIColor.red , UIColor.black, UIColor.blue]
or
UIImage.dd.getLinearGradientImage(colors: [UIColor.red, UIColor.black, UIColor.blue], directionType: .leftToRight)| +|func getRadialGradientImage(colors: [UIColor], raduis: CGFloat, size: CGSize = CGSize(width: 100, height: 100))|Generate an angular gradient image|DDUtils.shared.getRadialGradientImage(colors: [UIColor.red , UIColor.black, UIColor.blue], raduis: 45)
or
UIImage.dd.getRadialGradientImage(colors: [UIColor.red, UIColor.black, UIColor.blue], raduis: 45)| +|func getColor(hexString: String, alpha: CGFloat = 1.0)|Get color by hexadecimal string| UIColor.dd.color(hexString: "#FFFFFF")| +|func UIColor(hexValue: Int, darkHexValue: Int = 0x333333, alpha: Float = 1.0, darkAlpha: Float = 1.0)|Get color by hexadecimal| UIColor.dd.color(hexValue: 0xffffff)| +|UIScreenWidth|Screen width|| +|UIScreenHeight|Screen height|| +|DDUtils_StatusBar_Height|Status Bar height|| +|DDUtils_HomeIndicator_Height|Home Indicator height|| +|func DDUtils_Default_NavigationBar_Height(vc: UIViewController? = nil)|Navigation Bar Height|DDUtils_Default_NavigationBar_Height()| +|func func DDUtils_Default_Tabbar_Height(vc: UIViewController? = nil)|tabbar height|DDUtils_Default_Tabbar_Height()| +|func addLayerShadow(color: UIColor, offset: CGSize, radius: CGFloat, cornerRadius: CGFloat? = nil)|Add a shadow to the view|view.dd.addLayerShadow(color: UIColor.black, offset: CGSize(width: 2, height : 0), radius: 10)| +|func setFrame(x: CGFloat? = nil, y: CGFloat? = nil, width: CGFloat? = nil, height: CGFloat? = nil)|view individually sets a certain value of Frame|view.dd.setFrame(x: 10)| +|func className() -> String| get view's class name|button.dd.className()| + +### System and software information + +|Name|Function description|Example| +|----|----|----| +|func getAppVersionString()|Get software version|DDUtils.shared.getAppVersionString()| +|func getAppBuildVersionString()|Get software build version|DDUtils.shared.getAppBuildVersionString()| +|func getAppNameString()|get app's Name|DDUtils.shared.getAppNameString()| +|func getIOSVersionString()|Get the iOS version of the system|DDUtils.shared.getIOSVersionString()| +|func getIOSLanguageStr()|Get system language|DDUtils.shared.getIOSLanguageStr()| +|func getBundleIdentifier()|Get Software Bundle Identifier|DDUtils.shared.getBundleIdentifier()| +|func getSystemHardware()|Get the machine model identification|DDUtils.shared.getSystemHardware()| +|func getSystemUpTime()|Get the last restart time of this machine|DDUtils.shared.getSystemUpTime()| +|func getIDFAString(idfvIfFailed: Bool = true)|The unique identification of the simulation software|DDUtils.shared.getIDFAString()| +|func getMacAddress()|To get the MAC address of the mobile phone WIFI, you need to enable Access WiFi information|DDUtils.shared.getMacAddress()| +|func openSystemSetting()|Open system settings|DDUtils.shared.openSystemSetting()| +|func openAppStorePage(openType: DDUtilsOpenAppStoreType, appleID: String)|Open the App Store page corresponding to the software|DDUtils.shared.openAppStorePage(openType: .app, appleID: "1123211")| +|func openAppStoreReviewPage(openType: DDUtilsOpenAppStoreType, appleID: String = "")|Open the score page corresponding to the software|DDUtils.shared.openAppStoreReviewPage(openType: .app)| + +### Software permissions + +|Name|Function description|Example| +|----|----|----| +|func requestPermission(type: DDUtilsPermissionType, complete: @escaping ((DDUtilsPermissionStatus) -> Void))|Request permission|DDUtils.shared.requestPermission(type: .notification) {(status) in print("Permission setting callback" , status) }| +|func checkPermission(type: DDUtilsPermissionType, complete: @escaping ((DDUtilsPermissionStatus) -> Void))|Checking software permissions|DDUtils.shared.checkPermission(type: .notification) {(status) in print("Current permission status ", status) }| +|func requestIDFAPermission(complete: @escaping ((DDUtilsPermissionStatus) -> Void)) -> Void|request idfa permission|DDUtils.shared.requestIDFAPermission {(status) in print("Current idfa permission status", status)} | +|func checkIDFAPermission(type: DDUtilsPermissionType, complete: @escaping ((DDUtilsPermissionStatus) -> Void)) -> Void|check software idfa permission|DDUtils.shared.checkIDFAPermission {(status) in print("Current Permission Status", status) }| + +### Multimedia operation + +|Name|Function description|Example| +|----|----|----| +|func getVideoDuration(videoURL: URL) -> Double|Get the duration of the specified video, in seconds | DDUtils.shared.getVideoDuration(videoURL: URL(fileURLWithPath: path))| +|func getVideoSize(videoURL: URL)|Get the specified video resolution, support local or network address|DDUtils.shared.getVideoSize(videoURL: URL(fileURLWithPath: path))| +|func playMusic(url: URL?, repeated: Bool = false, audioSessionCategory: AVAudioSession.Category = AVAudioSession.Category.playback)|Play music|DDUtils.shared.playMusic(url: url, repeated: false)| +|func stopMusic()|Turn off music playback|DDUtils.shared.stopMusic()| +|func playEffect(url: URL?, vibrate: Bool = false)|Play sound effects, silent mode will not play sound effects|DDUtils.shared.playEffect(url: url, vibrate: true)| +|func startVibrate(repeated: Bool = false)|Start vibration|DDUtils.shared.startVibrate()| +|func stopVibrate()|End vibration|DDUtils.shared.stopVibrate()| + +### File operations + +|Name|Function description|Example| +|----|----|----| +|func getFileDirectory(type: DDUtilsFileDirectoryType)|Get folder path|DDUtils.shared.getFileDirectory(type: .documents)| +|func createFileDirectory(in type: DDUtilsFileDirectoryType, directoryName: String)|Create a folder in the specified folder|DDUtils.shared.createFileDirectory(in: .documents, directoryName: "filePath")| +|func getFileSize(filePath: URL)|Get the size of the specified file|DDUtils.shared.getFileSize(filePath: url)| +|func getFileDirectorySize(fileDirectoryPth: URL)|Get the size of the specified folder|DDUtils.shared.getFileDirectorySize(fileDirectoryPth: url)| + +### Other + +#### DDUtils + +|Name|Function description|Example| +|----|----|----| +|func getDictionary(object: Any, debug: Bool = false) -> [String: Any]| get all key and value from class\struct|DDUtils.shared.getDictionary(object: testModel)| +|func runInMainThread(type: ZXMainThreadType = .default, function: @escaping ()->Void)|run function in main thread|DDUtils.shared.runInMainThread(type: .sync) { ... }| + + +#### String + +|Name|Function description|Example| +|----|----|----| +|func subString(rang: NSRange)|截取字符串|string.dd.subString(rang: NSRange(location: 2, length: 5))| +|func unicodeDecode()|unicode转中文|"\\u54c8\\u54c8\\u54c8".dd.unicodeDecode()| +|func unicodeEncode()|字符串转unicode|"哈哈是电话费".dd.unicodeEncode()| +|func encodeString(from originType: DDUtilsEncodeType = .system(.utf8), to encodeType: DDUtilsEncodeType)|字符串修改编码显示|"5ZOI5ZOI5piv55S16K+d6LS5".dd.encodeString(from: .base64, to: .system(.utf8))| +|func aesCBCEncrypt(password: String, ivString: String = "abcdefghijklmnop")|aes cbc Encrypt |string.dd.aesCBCEncrypt(password: "password")| +|func aesCBCDecrypt(password: String, ivString: String = "abcdefghijklmnop")|aes cbc Decrypt |string.dd.aesCBCDecrypt(password: "password")| +|func hashString(hashType: DDUtilsHashType, lowercase: Bool = true)|get hash value of the string|string.dd.hashString(hashType: .md5)
Support md5/sha1/sha224/sha256/sha384/sha512| +|func aesGCMEncrypt(password: String, encodeType: DDUtilsEncodeType = .base64, nonce: AES.GCM.Nonce? = AES.GCM.Nonce())|aes gcm Encrypt |string.dd.aesGCMEncrypt(password: "password")| +|func aesGCMDecrypt(password: String, encodeType: DDUtilsEncodeType = .base64)|aes gcm Decrypt |string.dd.aesGCMDecrypt(password: "password")| +|func hmac(hashType: DDUtilsHashType, password: String, encodeType: DDUtilsEncodeType = .base64)|HMAC|"DDUtils".dd.hmac(hashType: .sha1, password: "67FG", encodeType: .hex)| + +#### Data + +|Name|Function description|Example| +|----|----|----| +|static func data(from string: String, encodeType: DDUtilsEncodeType)|get data from string with encodeType | Data.dd.data(from: "d5a423f64b607ea7c65b311d855dc48f36114b227bd0c7a3d403f6158a9e4412", encodeType: .hex)| +|func encodeString(encodeType: DDUtilsEncodeType)| encode data to string with encodeType | data.dd.encodeString(encodeType: .hex)| +|func aesCBCEncrypt(password: String, ivString: String = "abcdefghijklmnop")|aes cbc Encrypt|data.dd.aesCBCEncrypt(password: "password")| +|func aesCBCDecrypt(password: String, ivString: String = "abcdefghijklmnop")|aes cbc Decrypt|data.dd.aesCBCDecrypt(password: "password")| +|func hashString(hashType: DDUtilsHashType, lowercase: Bool = true)|get hash value of the string|data.dd. hashString(hashType: .md5)
支持md5/sha1/sha224/sha256/sha384/sha512| +|func aesGCMEncrypt(password: String, encodeType: DDUtilsEncodeType = .base64, nonce: AES.GCM.Nonce? = AES.GCM.Nonce())|aes gcm Encrypt|data.dd.aesGCMEncrypt(password: "password")| +|func aesGCMDecrypt(password: String, encodeType: DDUtilsEncodeType = .base64)|aes gcm Decrypt|data.dd.aesGCMDecrypt(password: "password")| +|func hmac(hashType: DDUtilsHashType, password: String, encodeType: DDUtilsEncodeType = .base64)|HMAC|data.dd.hmac(hashType: .sha1, password: "67FG", encodeType: .hex)| + + +## License + +The project is based on the MIT License \ No newline at end of file diff --git a/example/Pods/ZXKitUtil/pod/ZXKitUtil.swift b/example/Pods/DDUtils/pod/DDUtils.swift similarity index 91% rename from example/Pods/ZXKitUtil/pod/ZXKitUtil.swift rename to example/Pods/DDUtils/pod/DDUtils.swift index 656b621..3c68514 100644 --- a/example/Pods/ZXKitUtil/pod/ZXKitUtil.swift +++ b/example/Pods/DDUtils/pod/DDUtils.swift @@ -1,6 +1,6 @@ // -// ZXKitUtil.swift -// ZXKitUtil +// DDUtils.swift +// DDUtils // // Created by Damon on 2020/7/2. // Copyright © 2020 Damon. All rights reserved. @@ -9,9 +9,9 @@ import Foundation import UIKit -open class ZXKitUtil: NSObject { - private static let instance = ZXKitUtil() - open class var shared: ZXKitUtil { +open class DDUtils: NSObject { + private static let instance = DDUtils() + open class var shared: DDUtils { return instance } @@ -27,7 +27,7 @@ public enum ZXMainThreadType { case sync //在主线程顺序执行,在其他线程同步回归到主线程(后续操作等待当前任务完毕之后继续执行,可能会阻塞界面) } -public extension ZXKitUtil { +public extension DDUtils { /// 获取class\struct的所有属性 /// - Parameters: /// - object: 需要获取的属性 @@ -38,7 +38,7 @@ public extension ZXKitUtil { var dictionary = [String : Any]() if debug { - print("--- ZXKitUtil.getDictionary(object:debug:) ---") + print("--- DDUtils.getDictionary(object:debug:) ---") } for (key, value) in reflection { if let key = key { diff --git a/example/Pods/DDUtils/pod/ZXKitNameSpace.swift b/example/Pods/DDUtils/pod/ZXKitNameSpace.swift new file mode 100644 index 0000000..2503159 --- /dev/null +++ b/example/Pods/DDUtils/pod/ZXKitNameSpace.swift @@ -0,0 +1,37 @@ +// +// DDUtilsNameSpace.swift +// DDUtils +// +// Created by Damon on 2020/7/3. +// Copyright © 2020 Damon. All rights reserved. +// + +import Foundation + +//实现命名空间需遵守的协议 +public protocol DDUtilsNameSpaceWrappable { + associatedtype WrapperType + var dd: WrapperType { get } + static var dd: WrapperType.Type { get } +} + +public struct DDUtilsNameSpace { + let object: T //存储的实例对象 + static var classObject: T.Type { + return T.self + } + internal init(object: T) { + self.object = object + } +} + +//协议默认的实现方式 +public extension DDUtilsNameSpaceWrappable { + var dd: DDUtilsNameSpace { + return DDUtilsNameSpace(object: self) + } + + static var dd: DDUtilsNameSpace.Type { + return DDUtilsNameSpace.self + } +} diff --git a/example/Pods/ZXKitUtil/pod/ZXKitUtil+system.swift b/example/Pods/DDUtils/pod/subspec/UI/DDUtils+AppStore.swift similarity index 59% rename from example/Pods/ZXKitUtil/pod/ZXKitUtil+system.swift rename to example/Pods/DDUtils/pod/subspec/UI/DDUtils+AppStore.swift index b59923f..9c64f7c 100644 --- a/example/Pods/ZXKitUtil/pod/ZXKitUtil+system.swift +++ b/example/Pods/DDUtils/pod/subspec/UI/DDUtils+AppStore.swift @@ -1,100 +1,25 @@ // -// ZXKitUtil+system.swift -// ZXKitUtil +// DDUtils+AppStore.swift +// DDUtils // -// Created by Damon on 2020/7/3. -// Copyright © 2020 Damon. All rights reserved. +// Created by Damon on 2024/5/27. +// Copyright © 2024 Damon. All rights reserved. // import Foundation -import UIKit -import SystemConfiguration.CaptiveNetwork #if canImport(StoreKit) import StoreKit #endif -public enum ZXKitUtilOpenAppStoreType { +public enum DDUtilsOpenAppStoreType { case app //应用内打开,ios10.3以下无反应 case appStore //跳转到App Store case auto //ios10.3以上应用内打开,以下跳转到App Store打开 } -public extension ZXKitUtil { - ///获取软件版本 - func getAppVersionString() -> String { - let version = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String - return version ?? "" - } - - ///获取软件构建版本 - func getAppBuildVersionString() -> String { - let version = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String - return version ?? "" - } - - ///获取软件名 - func getAppNameString() -> String { - let version = Bundle.main.object(forInfoDictionaryKey: "CFBundleDisplayName") as? String - return version ?? "" - } - - ///获取系统的iOS版本 - func getIOSVersionString() -> String { - return UIDevice.current.systemVersion - } - - ///获取系统语言 - func getIOSLanguageStr() -> String { - let language = Bundle.main.preferredLocalizations.first - return language ?? "" - } - - ///获取软件Bundle Identifier - func getBundleIdentifier() -> String { - return Bundle.main.bundleIdentifier ?? "" - } - - ///获取本机机型标识 - func getSystemHardware() -> String { - var systemInfo = utsname() - uname(&systemInfo) - let machineMirror = Mirror(reflecting: systemInfo.machine) - let identifier = machineMirror.children.reduce("") { identifier, element in - guard let value = element.value as? Int8, value != 0 else { return identifier } - return identifier + String(UnicodeScalar(UInt8(value))) - } - return identifier - } - - ///获取本机上次重启时间 - func getSystemUpTime() -> TimeInterval { - let timeInterval = ProcessInfo.processInfo.systemUptime - return Date().timeIntervalSince1970 - timeInterval - } - - ///获取手机WIFI的MAC地址,需要开启Access WiFi information - func getMacAddress() -> (ssid: String?, mac: String?) { - let interfaces:NSArray = CNCopySupportedInterfaces()! - var ssid: String? - var mac: String? - for sub in interfaces { - if let dict = CFBridgingRetain(CNCopyCurrentNetworkInfo(sub as! CFString)) { - ssid = dict["SSID"] as? String - mac = dict["BSSID"] as? String - break - } - } - return (ssid: ssid, mac: mac) - } - - ///打开系统设置 - func openSystemSetting(completion: ((Bool) -> Void)? = nil) -> Void { - let url = URL(string: UIApplication.openSettingsURLString)! - UIApplication.shared.open(url, options: [:], completionHandler: completion) - } - +public extension DDUtils { ///打开软件对应的App Store页面 - func openAppStorePage(openType: ZXKitUtilOpenAppStoreType, appleID: String, completion: ((Bool, Error?) -> Void)? = nil) -> Void { + func openAppStorePage(openType: DDUtilsOpenAppStoreType, appleID: String, completion: ((Bool, Error?) -> Void)? = nil) -> Void { switch openType { case .app: let storeProductVC = SKStoreProductViewController() @@ -146,7 +71,7 @@ public extension ZXKitUtil { /// - openType: 打开评分页面的类型 /// - appleID: 打开的appid /// - openWriteAction: 是否直接到输入评论的页面,仅对跳转到appStore有效 - func openAppStoreReviewPage(openType: ZXKitUtilOpenAppStoreType, appleID: String = "", openWriteAction: Bool = true) -> Void { + func openAppStoreReviewPage(openType: DDUtilsOpenAppStoreType, appleID: String = "", openWriteAction: Bool = true) -> Void { switch openType { case .app: if #available(iOS 14.0, *) { @@ -184,7 +109,8 @@ public extension ZXKitUtil { } } -extension ZXKitUtil : SKStoreProductViewControllerDelegate { + +extension DDUtils : SKStoreProductViewControllerDelegate { public func productViewControllerDidFinish(_ viewController: SKStoreProductViewController) { viewController.dismiss(animated: true, completion: nil) } diff --git a/example/Pods/ZXKitUtil/pod/ZXKitUtil+UI.swift b/example/Pods/DDUtils/pod/subspec/UI/DDUtils+UI.swift similarity index 80% rename from example/Pods/ZXKitUtil/pod/ZXKitUtil+UI.swift rename to example/Pods/DDUtils/pod/subspec/UI/DDUtils+UI.swift index 6fe21fe..63d9bcd 100644 --- a/example/Pods/ZXKitUtil/pod/ZXKitUtil+UI.swift +++ b/example/Pods/DDUtils/pod/subspec/UI/DDUtils+UI.swift @@ -1,6 +1,6 @@ // -// ZXKitUtil+UI.swift -// ZXKitUtil +// DDUtils+UI.swift +// DDUtils // // Created by Damon on 2020/7/2. // Copyright © 2020 Damon. All rights reserved. @@ -14,25 +14,15 @@ import UIKit // | | // --------- // C D -public enum ZXKitUtilGradientDirection { +public enum DDUtilsGradientDirection { case minXToMaxX //AC - BD case minYToMaxY //AB - CD case minXMinYToMaxXMaxY //A - D case minXMaxYToMaxXminY //C - B - - - @available(*, deprecated, message: "user minXToMaxX") - case leftToRight //AC - BD - @available(*, deprecated, message: "user minYToMaxY") - case topToBottom //AB - CD - @available(*, deprecated, message: "user minXMinYToMaxXMaxY") - case leftTopToRightBottom //A - D - @available(*, deprecated, message: "user minXMaxYToMaxXminY") - case leftBottomToRightTop //C - B } -public extension ZXKitUtil { +public extension DDUtils { ///获取当前的normalwindow func getCurrentNormalWindow() -> UIWindow? { var window:UIWindow? = UIApplication.shared.keyWindow @@ -110,7 +100,7 @@ public extension ZXKitUtil { } ///线性渐变 - func getLinearGradientImage(colors: [UIColor], directionType: ZXKitUtilGradientDirection, size: CGSize = CGSize(width: 100, height: 100)) -> UIImage { + func getLinearGradientImage(colors: [UIColor], directionType: DDUtilsGradientDirection, size: CGSize = CGSize(width: 100, height: 100)) -> UIImage { if (colors.count == 0) { return UIImage() } else if (colors.count == 1) { @@ -129,16 +119,16 @@ public extension ZXKitUtil { gradientLayer.colors = cgColors gradientLayer.locations = locations - if (directionType == .leftToRight || directionType == .minXToMaxX) { + if (directionType == .minXToMaxX) { gradientLayer.startPoint = CGPoint(x: 0, y: 0) gradientLayer.endPoint = CGPoint(x: 1, y: 0) - } else if (directionType == .topToBottom || directionType == .minYToMaxY){ + } else if (directionType == .minYToMaxY){ gradientLayer.startPoint = CGPoint(x: 0, y: 0) gradientLayer.endPoint = CGPoint(x: 0, y: 1) - } else if (directionType == .leftTopToRightBottom || directionType == .minXMinYToMaxXMaxY){ + } else if (directionType == .minXMinYToMaxXMaxY){ gradientLayer.startPoint = CGPoint(x: 0, y: 0) gradientLayer.endPoint = CGPoint(x: 1, y: 1) - } else if (directionType == .leftBottomToRightTop || directionType == .minXMaxYToMaxXminY){ + } else if (directionType == .minXMaxYToMaxXminY){ gradientLayer.startPoint = CGPoint(x: 0, y: 1) gradientLayer.endPoint = CGPoint(x: 1, y: 0) } @@ -217,18 +207,18 @@ public var UIScreenHeight: CGFloat { } ///状态栏高度 -public var ZXKitUtil_StatusBar_Height: CGFloat { +public var DDUtils_StatusBar_Height: CGFloat { return UIApplication.shared.statusBarFrame.size.height } ///底部Home Indicator高度 -public var ZXKitUtil_HomeIndicator_Height: CGFloat { +public var DDUtils_HomeIndicator_Height: CGFloat { if #available(iOS 11.0, *) { - if let cacheHomeIndicatorHeight = ZXKitUtil.shared.cacheHomeIndicatorHeight { + if let cacheHomeIndicatorHeight = DDUtils.shared.cacheHomeIndicatorHeight { return cacheHomeIndicatorHeight - } else if let window = ZXKitUtil.shared.getCurrentNormalWindow() { + } else if let window = DDUtils.shared.getCurrentNormalWindow() { let bottom = window.safeAreaInsets.bottom - ZXKitUtil.shared.cacheHomeIndicatorHeight = bottom + DDUtils.shared.cacheHomeIndicatorHeight = bottom return bottom } } @@ -236,8 +226,8 @@ public var ZXKitUtil_HomeIndicator_Height: CGFloat { } ///导航栏高度 -public func ZXKitUtil_Default_NavigationBar_Height(vc: UIViewController? = nil, cachePrior: Bool = true) -> CGFloat { - if cachePrior, let cacheDefaultNavigationBarHeight = ZXKitUtil.shared.cacheDefaultNavigationBarHeight { +public func DDUtils_Default_NavigationBar_Height(vc: UIViewController? = nil, cachePrior: Bool = true) -> CGFloat { + if cachePrior, let cacheDefaultNavigationBarHeight = DDUtils.shared.cacheDefaultNavigationBarHeight { return cacheDefaultNavigationBarHeight } else { var height: CGFloat = 0 @@ -246,14 +236,14 @@ public func ZXKitUtil_Default_NavigationBar_Height(vc: UIViewController? = nil, } else { height = UINavigationController(nibName: nil, bundle: nil).navigationBar.frame.size.height } - ZXKitUtil.shared.cacheDefaultNavigationBarHeight = height + DDUtils.shared.cacheDefaultNavigationBarHeight = height return height } } ///tabbar高度 -public func ZXKitUtil_Default_Tabbar_Height(vc: UIViewController? = nil, cachePrior: Bool = true) -> CGFloat { - if cachePrior, let cacheDefaultTabbarHeight = ZXKitUtil.shared.cacheDefaultTabbarHeight { +public func DDUtils_Default_Tabbar_Height(vc: UIViewController? = nil, cachePrior: Bool = true) -> CGFloat { + if cachePrior, let cacheDefaultTabbarHeight = DDUtils.shared.cacheDefaultTabbarHeight { return cacheDefaultTabbarHeight } else { var height: CGFloat = 0 @@ -262,12 +252,12 @@ public func ZXKitUtil_Default_Tabbar_Height(vc: UIViewController? = nil, cachePr } else { height = UITabBarController(nibName: nil, bundle: nil).tabBar.frame.size.height } - ZXKitUtil.shared.cacheDefaultTabbarHeight = height + DDUtils.shared.cacheDefaultTabbarHeight = height return height } } ///状态栏和导航栏总高度 -public func ZXKitUtil_Default_Nav_And_Status_Height(vc: UIViewController? = nil) -> CGFloat { - return ZXKitUtil_Default_NavigationBar_Height(vc: vc) + ZXKitUtil_StatusBar_Height +public func DDUtils_Default_Nav_And_Status_Height(vc: UIViewController? = nil) -> CGFloat { + return DDUtils_Default_NavigationBar_Height(vc: vc) + DDUtils_StatusBar_Height } diff --git a/example/Pods/ZXKitUtil/pod/extend/UIColor+zx.swift b/example/Pods/DDUtils/pod/subspec/UI/UIColor+zx.swift similarity index 95% rename from example/Pods/ZXKitUtil/pod/extend/UIColor+zx.swift rename to example/Pods/DDUtils/pod/subspec/UI/UIColor+zx.swift index 2890d04..503486e 100644 --- a/example/Pods/ZXKitUtil/pod/extend/UIColor+zx.swift +++ b/example/Pods/DDUtils/pod/subspec/UI/UIColor+zx.swift @@ -1,6 +1,6 @@ // -// UIColor+zx.swift -// ZXKitUtil +// UIColor+dd.swift +// DDUtils // // Created by Damon on 2020/7/9. // Copyright © 2020 Damon. All rights reserved. @@ -8,11 +8,11 @@ import UIKit -extension UIColor: ZXKitUtilNameSpaceWrappable { +extension UIColor: DDUtilsNameSpaceWrappable { } -public extension ZXKitUtilNameSpace where T : UIColor { +public extension DDUtilsNameSpace where T : UIColor { /// 16进制颜色转为UIColor /// - Parameters: @@ -67,7 +67,7 @@ public extension ZXKitUtilNameSpace where T : UIColor { } } -private extension ZXKitUtilNameSpace where T : UIColor { +private extension DDUtilsNameSpace where T : UIColor { ///通过十六进制字符串获取颜色 static func _getColor(hexString: String, alpha: CGFloat = 1.0) -> UIColor { var hex = "" diff --git a/example/Pods/ZXKitUtil/pod/extend/UIImage+zx.swift b/example/Pods/DDUtils/pod/subspec/UI/UIImage+zx.swift similarity index 87% rename from example/Pods/ZXKitUtil/pod/extend/UIImage+zx.swift rename to example/Pods/DDUtils/pod/subspec/UI/UIImage+zx.swift index 30a6011..5635bdf 100644 --- a/example/Pods/ZXKitUtil/pod/extend/UIImage+zx.swift +++ b/example/Pods/DDUtils/pod/subspec/UI/UIImage+zx.swift @@ -1,6 +1,6 @@ // -// UIImage+zx.swift -// ZXKitUtil +// UIImage+dd.swift +// DDUtils // // Created by Damon on 2020/7/11. // Copyright © 2020 Damon. All rights reserved. @@ -8,24 +8,24 @@ import UIKit -extension UIImage: ZXKitUtilNameSpaceWrappable { +extension UIImage: DDUtilsNameSpaceWrappable { } -public extension ZXKitUtilNameSpace where T : UIImage { +public extension DDUtilsNameSpace where T : UIImage { ///通过颜色获取纯色图片 static func getImage(color: UIColor, size: CGSize = CGSize(width: 1, height: 1)) -> UIImage { - return ZXKitUtil.shared.getImage(color: color, size: size) + return DDUtils.shared.getImage(color: color, size: size) } ///线性渐变 - static func getLinearGradientImage(colors: [UIColor], directionType: ZXKitUtilGradientDirection, size: CGSize = CGSize(width: 100, height: 100)) -> UIImage { - return ZXKitUtil.shared.getLinearGradientImage(colors: colors, directionType: directionType, size: size) + static func getLinearGradientImage(colors: [UIColor], directionType: DDUtilsGradientDirection, size: CGSize = CGSize(width: 100, height: 100)) -> UIImage { + return DDUtils.shared.getLinearGradientImage(colors: colors, directionType: directionType, size: size) } ///角度渐变 static func getRadialGradientImage(colors: [UIColor], raduis: CGFloat, size: CGSize = CGSize(width: 100, height: 100)) -> UIImage { - return ZXKitUtil.shared.getRadialGradientImage(colors: colors, raduis: raduis, size: size) + return DDUtils.shared.getRadialGradientImage(colors: colors, raduis: raduis, size: size) } ///通过view专为图片 @@ -69,7 +69,7 @@ public extension ZXKitUtilNameSpace where T : UIImage { } -private extension ZXKitUtilNameSpace where T : UIImage { +private extension DDUtilsNameSpace where T : UIImage { static func _getImage(view: UIView) -> UIImage? { view.layoutIfNeeded() UIGraphicsBeginImageContextWithOptions(view.bounds.size, false, 0) diff --git a/example/Pods/ZXKitUtil/pod/extend/UIView+zx.swift b/example/Pods/DDUtils/pod/subspec/UI/UIView+zx.swift similarity index 92% rename from example/Pods/ZXKitUtil/pod/extend/UIView+zx.swift rename to example/Pods/DDUtils/pod/subspec/UI/UIView+zx.swift index 202e8ab..59839cc 100644 --- a/example/Pods/ZXKitUtil/pod/extend/UIView+zx.swift +++ b/example/Pods/DDUtils/pod/subspec/UI/UIView+zx.swift @@ -1,6 +1,6 @@ // -// UIView+zx.swift -// ZXKitUtil +// UIView+dd.swift +// DDUtils // // Created by Damon on 2020/7/5. // Copyright © 2020 Damon. All rights reserved. @@ -8,11 +8,11 @@ import UIKit -extension UIView: ZXKitUtilNameSpaceWrappable { +extension UIView: DDUtilsNameSpaceWrappable { } -public extension ZXKitUtilNameSpace where T : UIView { +public extension DDUtilsNameSpace where T : UIView { ///添加阴影 func addLayerShadow(color: UIColor, offset: CGSize, radius: CGFloat, cornerRadius: CGFloat? = nil) -> Void { object.layer.shadowColor = color.cgColor diff --git a/example/Pods/ZXKitUtil/pod/ZXKitUtil+file.swift b/example/Pods/DDUtils/pod/subspec/utils/DDUtils+file.swift similarity index 91% rename from example/Pods/ZXKitUtil/pod/ZXKitUtil+file.swift rename to example/Pods/DDUtils/pod/subspec/utils/DDUtils+file.swift index 760b0c1..cfbcaf2 100644 --- a/example/Pods/ZXKitUtil/pod/ZXKitUtil+file.swift +++ b/example/Pods/DDUtils/pod/subspec/utils/DDUtils+file.swift @@ -1,6 +1,6 @@ // -// ZXKitUtil+file.swift -// ZXKitUtil +// DDUtils+file.swift +// DDUtils // // Created by Damon on 2020/7/4. // Copyright © 2020 Damon. All rights reserved. @@ -9,16 +9,16 @@ import Foundation import CommonCrypto -public enum ZXKitUtilFileDirectoryType { +public enum DDUtilsFileDirectoryType { case home //程序主目录 case documents //应用中用户数据可以放在这里,iTunes备份和恢复的时候会包括此目录 case tmp //存放临时文件,iTunes不会备份和恢复此目录,此目录下文件可能会在应用退出后删除 case caches //存放缓存文件,iTunes不会备份此目录,此目录下文件不会在应用退出删除,硬盘资源紧张时会被删除 } -public extension ZXKitUtil { +public extension DDUtils { ///获取文件夹路径 - func getFileDirectory(type: ZXKitUtilFileDirectoryType) -> URL { + func getFileDirectory(type: DDUtilsFileDirectoryType) -> URL { let homePath = NSHomeDirectory() switch type { case .home: @@ -37,7 +37,7 @@ public extension ZXKitUtil { /// - type: 浮层文件夹类型 /// - directoryName: 文件夹名称 /// - Returns: 创建的文件夹路径 - func createFileDirectory(in type: ZXKitUtilFileDirectoryType, directoryName: String) -> URL { + func createFileDirectory(in type: DDUtilsFileDirectoryType, directoryName: String) -> URL { let manager = FileManager.default let superDirectory = self.getFileDirectory(type: type) diff --git a/example/Pods/ZXKitUtil/pod/ZXKitUtil+media.swift b/example/Pods/DDUtils/pod/subspec/utils/DDUtils+media.swift similarity index 93% rename from example/Pods/ZXKitUtil/pod/ZXKitUtil+media.swift rename to example/Pods/DDUtils/pod/subspec/utils/DDUtils+media.swift index b88861a..a65ab23 100644 --- a/example/Pods/ZXKitUtil/pod/ZXKitUtil+media.swift +++ b/example/Pods/DDUtils/pod/subspec/utils/DDUtils+media.swift @@ -1,6 +1,6 @@ // -// ZXKitUtil+media.swift -// ZXKitUtil +// DDUtils+media.swift +// DDUtils // // Created by Damon on 2020/7/4. // Copyright © 2020 Damon. All rights reserved. @@ -12,7 +12,7 @@ import AVFoundation private var vibrateRepeat = false //标记是否循环震动 private var audioPlayer: AVAudioPlayer? //音乐播放器 -public extension ZXKitUtil { +public extension DDUtils { ///获取指定video的时长, 单位秒 func getVideoDuration(videoURL: URL) -> Double { @@ -46,8 +46,8 @@ public extension ZXKitUtil { if musicURL.absoluteString.hasPrefix("http://") || musicURL.absoluteString.hasPrefix("https://") { - guard let name = musicURL.path.zx.hashString(hashType: .md5) else { return nil } - let path = ZXKitUtil.shared.createFileDirectory(in: .caches, directoryName: "music").appendingPathComponent(name, isDirectory: false) + guard let name = musicURL.path.dd.hashString(hashType: .md5) else { return nil } + let path = DDUtils.shared.createFileDirectory(in: .caches, directoryName: "music").appendingPathComponent(name, isDirectory: false) let audioData = try? Data(contentsOf: musicURL) try? audioData?.write(to: path) musicURL = path diff --git a/example/Pods/DDUtils/pod/subspec/utils/DDUtils+system.swift b/example/Pods/DDUtils/pod/subspec/utils/DDUtils+system.swift new file mode 100644 index 0000000..31038f4 --- /dev/null +++ b/example/Pods/DDUtils/pod/subspec/utils/DDUtils+system.swift @@ -0,0 +1,86 @@ +// +// DDUtils+system.swift +// DDUtils +// +// Created by Damon on 2020/7/3. +// Copyright © 2020 Damon. All rights reserved. +// + +import Foundation +import UIKit +import SystemConfiguration.CaptiveNetwork + +public extension DDUtils { + ///获取软件版本 + func getAppVersionString() -> String { + let version = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String + return version ?? "" + } + + ///获取软件构建版本 + func getAppBuildVersionString() -> String { + let version = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String + return version ?? "" + } + + ///获取软件名 + func getAppNameString() -> String { + let version = Bundle.main.object(forInfoDictionaryKey: "CFBundleDisplayName") as? String + return version ?? "" + } + + ///获取系统的iOS版本 + func getIOSVersionString() -> String { + return UIDevice.current.systemVersion + } + + ///获取系统语言 + func getIOSLanguageStr() -> String { + let language = Bundle.main.preferredLocalizations.first + return language ?? "" + } + + ///获取软件Bundle Identifier + func getBundleIdentifier() -> String { + return Bundle.main.bundleIdentifier ?? "" + } + + ///获取本机机型标识 + func getSystemHardware() -> String { + var systemInfo = utsname() + uname(&systemInfo) + let machineMirror = Mirror(reflecting: systemInfo.machine) + let identifier = machineMirror.children.reduce("") { identifier, element in + guard let value = element.value as? Int8, value != 0 else { return identifier } + return identifier + String(UnicodeScalar(UInt8(value))) + } + return identifier + } + + ///获取本机上次重启时间 + func getSystemUpTime() -> TimeInterval { + let timeInterval = ProcessInfo.processInfo.systemUptime + return Date().timeIntervalSince1970 - timeInterval + } + + ///获取手机WIFI的MAC地址,需要开启Access WiFi information + func getMacAddress() -> (ssid: String?, mac: String?) { + let interfaces:NSArray = CNCopySupportedInterfaces()! + var ssid: String? + var mac: String? + for sub in interfaces { + if let dict = CFBridgingRetain(CNCopyCurrentNetworkInfo(sub as! CFString)) { + ssid = dict["SSID"] as? String + mac = dict["BSSID"] as? String + break + } + } + return (ssid: ssid, mac: mac) + } + + ///打开系统设置 + func openSystemSetting(completion: ((Bool) -> Void)? = nil) -> Void { + let url = URL(string: UIApplication.openSettingsURLString)! + UIApplication.shared.open(url, options: [:], completionHandler: completion) + } +} diff --git a/example/Pods/ZXKitUtil/pod/extend/Data+zx.swift b/example/Pods/DDUtils/pod/subspec/utils/Data+zx.swift similarity index 85% rename from example/Pods/ZXKitUtil/pod/extend/Data+zx.swift rename to example/Pods/DDUtils/pod/subspec/utils/Data+zx.swift index b03daa4..aac369a 100644 --- a/example/Pods/ZXKitUtil/pod/extend/Data+zx.swift +++ b/example/Pods/DDUtils/pod/subspec/utils/Data+zx.swift @@ -1,6 +1,6 @@ // -// Data+zx.swift -// ZXKitUtil +// Data+dd.swift +// DDUtils // // Created by Damon on 2021/5/31. // Copyright © 2021 Damon. All rights reserved. @@ -12,7 +12,7 @@ import CommonCrypto import CryptoKit #endif -public enum ZXKitUtilHashType { +public enum DDUtilsHashType { case md5 case sha1 case sha224 @@ -21,19 +21,19 @@ public enum ZXKitUtilHashType { case sha512 } -public enum ZXKitUtilEncodeType { +public enum DDUtilsEncodeType { case hex case base64 case system(String.Encoding) } -extension Data: ZXKitUtilNameSpaceWrappable { +extension Data: DDUtilsNameSpaceWrappable { } -public extension ZXKitUtilNameSpace where T == Data { +public extension DDUtilsNameSpace where T == Data { //string生成Data,兼容hex和base64 - static func data(from string: String, encodeType: ZXKitUtilEncodeType) -> Data? { + static func data(from string: String, encodeType: DDUtilsEncodeType) -> Data? { switch encodeType { case .hex: let len = string.count / 2 @@ -58,7 +58,7 @@ public extension ZXKitUtilNameSpace where T == Data { } //编码 - func encodeString(encodeType: ZXKitUtilEncodeType) -> String? { + func encodeString(encodeType: DDUtilsEncodeType) -> String? { switch encodeType { case .hex: return object.map { String(format: "%02hhx", $0) }.joined() @@ -70,7 +70,7 @@ public extension ZXKitUtilNameSpace where T == Data { } ///hash计算 - func hashString(hashType: ZXKitUtilHashType, lowercase: Bool = true) -> String { + func hashString(hashType: DDUtilsHashType, lowercase: Bool = true) -> String { var output = NSMutableString() switch hashType { case .md5: @@ -153,11 +153,11 @@ public extension ZXKitUtilNameSpace where T == Data { padding: PKCS7Padding AES block Size: 128 **/ - func aesCBCEncrypt(password: String, ivString: String = "abcdefghijklmnop", encodeType: ZXKitUtilEncodeType = .base64) -> String? { + func aesCBCEncrypt(password: String, ivString: String = "abcdefghijklmnop", encodeType: DDUtilsEncodeType = .base64) -> String? { assert(ivString.count == kCCKeySizeAES128, "iv should be \(kCCKeySizeAES128) bytes") assert(password.count == kCCKeySizeAES128 || password.count == kCCKeySizeAES192 || password.count == kCCKeySizeAES256, "Invalid key length. Available length is \(kCCKeySizeAES128) \(kCCKeySizeAES192) \(kCCKeySizeAES256)") let encryptData = self._crypt(data: object, password: password, ivString: ivString, option: CCOperation(kCCEncrypt)) - return encryptData?.zx.encodeString(encodeType: encodeType) + return encryptData?.dd.encodeString(encodeType: encodeType) } ///AES CBC解密 @@ -171,27 +171,27 @@ public extension ZXKitUtilNameSpace where T == Data { } /**deprecated*/ - @available(*, deprecated, message: "Use hashString(hashType: ZXKitUtilHashType, lowercase: Bool) instead") - func encryptString(encryType: ZXKitUtilHashType, lowercase: Bool = true) -> String { + @available(*, deprecated, message: "Use hashString(hashType: DDUtilsHashType, lowercase: Bool) instead") + func encryptString(encryType: DDUtilsHashType, lowercase: Bool = true) -> String { return self.hashString(hashType: encryType, lowercase: lowercase) } } #if canImport(CryptoKit) @available(iOS 13.0, *) -public extension ZXKitUtilNameSpace where T == Data { +public extension DDUtilsNameSpace where T == Data { //AES GCM加密 - func aesGCMEncrypt(password: String, encodeType: ZXKitUtilEncodeType = .base64, nonce: AES.GCM.Nonce? = AES.GCM.Nonce()) -> String? { + func aesGCMEncrypt(password: String, encodeType: DDUtilsEncodeType = .base64, nonce: AES.GCM.Nonce? = AES.GCM.Nonce()) -> String? { assert(password.count == kCCKeySizeAES128 || password.count == kCCKeySizeAES192 || password.count == kCCKeySizeAES256, "Invalid key length. Available length is \(kCCKeySizeAES128) \(kCCKeySizeAES192) \(kCCKeySizeAES256)") return self.aesGCMEncrypt(key: SymmetricKey.init(data: password.data(using:String.Encoding.utf8)!), encodeType: encodeType, nonce: nonce) } ///AES GCM加密 - func aesGCMEncrypt(key: SymmetricKey, encodeType: ZXKitUtilEncodeType = .base64, nonce: AES.GCM.Nonce? = AES.GCM.Nonce()) -> String? { + func aesGCMEncrypt(key: SymmetricKey, encodeType: DDUtilsEncodeType = .base64, nonce: AES.GCM.Nonce? = AES.GCM.Nonce()) -> String? { assert(key.bitCount / 8 == kCCKeySizeAES128 || key.bitCount / 8 == kCCKeySizeAES192 || key.bitCount / 8 == kCCKeySizeAES256, "Invalid key length. Available length is \(kCCKeySizeAES128) \(kCCKeySizeAES192) \(kCCKeySizeAES256)") guard let sealedBox = try? AES.GCM.seal(object, using: key, nonce: nonce) else { return nil } guard let encode = sealedBox.combined else { return nil } - return encode.zx.encodeString(encodeType: encodeType) + return encode.dd.encodeString(encodeType: encodeType) } //AES GCM解密 func aesGCMDecrypt(password: String) -> String? { @@ -209,38 +209,38 @@ public extension ZXKitUtilNameSpace where T == Data { } ///HMAC计算 - func hmac(hashType: ZXKitUtilHashType, password: String, encodeType: ZXKitUtilEncodeType = .base64) -> String? { + func hmac(hashType: DDUtilsHashType, password: String, encodeType: DDUtilsEncodeType = .base64) -> String? { let key = SymmetricKey.init(data: password.data(using:String.Encoding.utf8)!) return self.hmac(hashType: hashType, key: key, encodeType: encodeType) } ///HMAC计算 - func hmac(hashType: ZXKitUtilHashType, key: SymmetricKey, encodeType: ZXKitUtilEncodeType = .base64) -> String? { + func hmac(hashType: DDUtilsHashType, key: SymmetricKey, encodeType: DDUtilsEncodeType = .base64) -> String? { switch hashType { case .md5: let sign = HMAC.authenticationCode(for: object, using: key) - return Data(sign).zx.encodeString(encodeType: encodeType) + return Data(sign).dd.encodeString(encodeType: encodeType) case .sha1: let sign = HMAC.authenticationCode(for: object, using: key) - return Data(sign).zx.encodeString(encodeType: encodeType) + return Data(sign).dd.encodeString(encodeType: encodeType) case .sha224: assert(false, "unsupported hash type") return nil case .sha256: let sign = HMAC.authenticationCode(for: object, using: key) - return Data(sign).zx.encodeString(encodeType: encodeType) + return Data(sign).dd.encodeString(encodeType: encodeType) case .sha384: let sign = HMAC.authenticationCode(for: object, using: key) - return Data(sign).zx.encodeString(encodeType: encodeType) + return Data(sign).dd.encodeString(encodeType: encodeType) case .sha512: let sign = HMAC.authenticationCode(for: object, using: key) - return Data(sign).zx.encodeString(encodeType: encodeType) + return Data(sign).dd.encodeString(encodeType: encodeType) } } } #endif -private extension ZXKitUtilNameSpace where T == Data { +private extension DDUtilsNameSpace where T == Data { func _crypt(data: Data, password: String, ivString: String, option: CCOperation) -> Data? { guard let iv = ivString.data(using:String.Encoding.utf8) else { return nil } guard let key = password.data(using:String.Encoding.utf8) else { return nil } diff --git a/example/Pods/ZXKitUtil/pod/extend/Date+zx.swift b/example/Pods/DDUtils/pod/subspec/utils/Date+zx.swift similarity index 88% rename from example/Pods/ZXKitUtil/pod/extend/Date+zx.swift rename to example/Pods/DDUtils/pod/subspec/utils/Date+zx.swift index 543d735..6cb844b 100644 --- a/example/Pods/ZXKitUtil/pod/extend/Date+zx.swift +++ b/example/Pods/DDUtils/pod/subspec/utils/Date+zx.swift @@ -1,6 +1,6 @@ // -// Date+zx.swift -// ZXKitUtil +// Date+dd.swift +// DDUtils // // Created by Damon on 2020/7/3. // Copyright © 2020 Damon. All rights reserved. @@ -8,11 +8,11 @@ import Foundation -extension Date: ZXKitUtilNameSpaceWrappable { +extension Date: DDUtilsNameSpaceWrappable { } -public extension ZXKitUtilNameSpace where T == Date { +public extension DDUtilsNameSpace where T == Date { ///比较日期,设置是否忽略时间 func compare(anotherDate: Date, ignoreTime: Bool = false) -> ComparisonResult { if !ignoreTime { diff --git a/example/Pods/ZXKitUtil/pod/extend/String+zx.swift b/example/Pods/DDUtils/pod/subspec/utils/String+zx.swift similarity index 65% rename from example/Pods/ZXKitUtil/pod/extend/String+zx.swift rename to example/Pods/DDUtils/pod/subspec/utils/String+zx.swift index 07d31ec..a22bda0 100644 --- a/example/Pods/ZXKitUtil/pod/extend/String+zx.swift +++ b/example/Pods/DDUtils/pod/subspec/utils/String+zx.swift @@ -1,6 +1,6 @@ // -// String+zx.swift -// ZXKitUtil +// String+dd.swift +// DDUtils // // Created by Damon on 2020/7/3. // Copyright © 2020 Damon. All rights reserved. @@ -11,11 +11,11 @@ import Foundation import CryptoKit #endif -extension String: ZXKitUtilNameSpaceWrappable { +extension String: DDUtilsNameSpaceWrappable { } -public extension ZXKitUtilNameSpace where T == String { +public extension DDUtilsNameSpace where T == String { ///截取字符串 func subString(rang: NSRange) -> String { var string = String() @@ -75,9 +75,9 @@ public extension ZXKitUtilNameSpace where T == String { /// - originType: 字符串原来的编码格式 /// - encodeType: 即将转换的编码格式 /// - Returns: 转换成功的新字符串 - func encodeString(from originType: ZXKitUtilEncodeType = .system(.utf8), to encodeType: ZXKitUtilEncodeType) -> String? { - let data = Data.zx.data(from: object, encodeType: originType) - return data?.zx.encodeString(encodeType: encodeType) + func encodeString(from originType: DDUtilsEncodeType = .system(.utf8), to encodeType: DDUtilsEncodeType) -> String? { + let data = Data.dd.data(from: object, encodeType: originType) + return data?.dd.encodeString(encodeType: encodeType) } /* @@ -86,79 +86,79 @@ public extension ZXKitUtilNameSpace where T == String { padding: PKCS7Padding AES block Size: 128 **/ - func aesCBCEncrypt(password: String, ivString: String = "abcdefghijklmnop", encodeType: ZXKitUtilEncodeType = .base64) -> String? { + func aesCBCEncrypt(password: String, ivString: String = "abcdefghijklmnop", encodeType: DDUtilsEncodeType = .base64) -> String? { let data = object.data(using:String.Encoding.utf8) - return data?.zx.aesCBCEncrypt(password: password, ivString: ivString, encodeType: encodeType) + return data?.dd.aesCBCEncrypt(password: password, ivString: ivString, encodeType: encodeType) } ///aes CBC解密 - func aesCBCDecrypt(password: String, ivString: String = "abcdefghijklmnop", encodeType: ZXKitUtilEncodeType = .base64) -> String? { - let data = Data.zx.data(from: object, encodeType: encodeType) - return data?.zx.aesCBCDecrypt(password: password, ivString: ivString) + func aesCBCDecrypt(password: String, ivString: String = "abcdefghijklmnop", encodeType: DDUtilsEncodeType = .base64) -> String? { + let data = Data.dd.data(from: object, encodeType: encodeType) + return data?.dd.aesCBCDecrypt(password: password, ivString: ivString) } //MARK: 加密 - func hashString(hashType: ZXKitUtilHashType, lowercase: Bool = true) -> String? { + func hashString(hashType: DDUtilsHashType, lowercase: Bool = true) -> String? { let data = object.data(using: String.Encoding.utf8) - return data?.zx.hashString(hashType: hashType, lowercase: lowercase) + return data?.dd.hashString(hashType: hashType, lowercase: lowercase) } - @available(*, deprecated, message: "Use hashString(hashType: ZXKitUtilHashType, lowercase: Bool) instead") - func encryptString(encryType: ZXKitUtilHashType, lowercase: Bool = true) -> String? { + @available(*, deprecated, message: "Use hashString(hashType: DDUtilsHashType, lowercase: Bool) instead") + func encryptString(encryType: DDUtilsHashType, lowercase: Bool = true) -> String? { return self.hashString(hashType: encryType, lowercase: lowercase) } } #if canImport(CryptoKit) @available(iOS 13.0, *) -public extension ZXKitUtilNameSpace where T == String { +public extension DDUtilsNameSpace where T == String { /* AES加密 model: GCM **/ - func aesGCMEncrypt(password: String, encodeType: ZXKitUtilEncodeType = .base64, nonce: AES.GCM.Nonce? = AES.GCM.Nonce()) -> String? { + func aesGCMEncrypt(password: String, encodeType: DDUtilsEncodeType = .base64, nonce: AES.GCM.Nonce? = AES.GCM.Nonce()) -> String? { let data = object.data(using:String.Encoding.utf8) - return data?.zx.aesGCMEncrypt(password: password, encodeType: encodeType, nonce: nonce) + return data?.dd.aesGCMEncrypt(password: password, encodeType: encodeType, nonce: nonce) } /* AES加密 model: GCM **/ - func aesGCMEncrypt(key: SymmetricKey, encodeType: ZXKitUtilEncodeType = .base64, nonce: AES.GCM.Nonce? = AES.GCM.Nonce()) -> String? { + func aesGCMEncrypt(key: SymmetricKey, encodeType: DDUtilsEncodeType = .base64, nonce: AES.GCM.Nonce? = AES.GCM.Nonce()) -> String? { let data = object.data(using:String.Encoding.utf8) - return data?.zx.aesGCMEncrypt(key: key, encodeType: encodeType, nonce: nonce) + return data?.dd.aesGCMEncrypt(key: key, encodeType: encodeType, nonce: nonce) } /* AES解密 model: GCM **/ - func aesGCMDecrypt(password: String, encodeType: ZXKitUtilEncodeType = .base64) -> String? { - let data = Data.zx.data(from: object, encodeType: encodeType) - return data?.zx.aesGCMDecrypt(password: password) + func aesGCMDecrypt(password: String, encodeType: DDUtilsEncodeType = .base64) -> String? { + let data = Data.dd.data(from: object, encodeType: encodeType) + return data?.dd.aesGCMDecrypt(password: password) } /* AES解密 model: GCM **/ - func aesGCMDecrypt(key: SymmetricKey, encodeType: ZXKitUtilEncodeType = .base64) -> String? { - let data = Data.zx.data(from: object, encodeType: encodeType) - return data?.zx.aesGCMDecrypt(key: key) + func aesGCMDecrypt(key: SymmetricKey, encodeType: DDUtilsEncodeType = .base64) -> String? { + let data = Data.dd.data(from: object, encodeType: encodeType) + return data?.dd.aesGCMDecrypt(key: key) } ///HMAC计算 - func hmac(hashType: ZXKitUtilHashType, password: String, encodeType: ZXKitUtilEncodeType = .base64) -> String? { + func hmac(hashType: DDUtilsHashType, password: String, encodeType: DDUtilsEncodeType = .base64) -> String? { let data = object.data(using:String.Encoding.utf8) - return data?.zx.hmac(hashType: hashType, password: password, encodeType: encodeType) + return data?.dd.hmac(hashType: hashType, password: password, encodeType: encodeType) } ///HMAC计算 - func hmac(hashType: ZXKitUtilHashType, key: SymmetricKey, encodeType: ZXKitUtilEncodeType = .base64) -> String? { + func hmac(hashType: DDUtilsHashType, key: SymmetricKey, encodeType: DDUtilsEncodeType = .base64) -> String? { let data = object.data(using:String.Encoding.utf8) - return data?.zx.hmac(hashType: hashType, key: key, encodeType: encodeType) + return data?.dd.hmac(hashType: hashType, key: key, encodeType: encodeType) } } #endif diff --git a/example/Pods/Manifest.lock b/example/Pods/Manifest.lock index b068b87..ceb8797 100644 --- a/example/Pods/Manifest.lock +++ b/example/Pods/Manifest.lock @@ -1,39 +1,37 @@ PODS: + - DDKitSwift/core (3.0.0): + - DDLoggerSwift (~> 5.0.0) + - DDUtils/ui (~> 5.0.0) + - DDUtils/utils (~> 5.0.0) + - DDLoggerSwift (5.0.0): + - DDLoggerSwift/core (= 5.0.0) + - DDLoggerSwift/core (5.0.0): + - DDUtils/ui (~> 5.0.0) + - DDUtils/utils (~> 5.0.0) + - DDUtils/core (5.0.2) + - DDUtils/ui (5.0.2): + - DDUtils/core + - DDUtils/utils (5.0.2): + - DDUtils/core - netfox (1.21.0) - - SSZipArchive (2.4.3) - - ZXKitCore (2.0.2): - - ZXKitCore/core (= 2.0.2) - - ZXKitCore/core (2.0.2): - - SSZipArchive - - ZXKitLogger (~> 4.0.0) - - ZXKitUtil - - ZXKitLogger (4.0.5): - - ZXKitLogger/core (= 4.0.5) - - ZXKitLogger/core (4.0.5): - - ZXKitUtil (~> 4.0.0) - - ZXKitUtil (4.0.0): - - ZXKitUtil/core (= 4.0.0) - - ZXKitUtil/core (4.0.0) DEPENDENCIES: + - DDKitSwift/core (~> 3.0.0) - netfox (~> 1.21.0) - - ZXKitCore (~> 2.0.0) SPEC REPOS: trunk: + - DDKitSwift + - DDLoggerSwift + - DDUtils - netfox - - SSZipArchive - - ZXKitCore - - ZXKitLogger - - ZXKitUtil SPEC CHECKSUMS: + DDKitSwift: 3143fa7df258879898f08e16f2b59b1227661541 + DDLoggerSwift: 3b6e451251ae07a6614d93493b7c4e512e155950 + DDUtils: 56b14d305b574751a3e5336717a6dfd56dd2c58c netfox: 9d5cc727fe7576c4c7688a2504618a156b7d44b7 - SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef - ZXKitCore: 7a67edfda54439ae7d81bbb40cd990f1c09bad2f - ZXKitLogger: 22f226509df679728bc8da7a7983d672cc9ccbae - ZXKitUtil: 0d23a979cdc7a7f9df0722148a613986ef007288 -PODFILE CHECKSUM: a3053aa19941ffbde4e9953a46524f1b8d21a1a1 +PODFILE CHECKSUM: 238c855ba3ca3eaa269370530b9691c2704e94f8 -COCOAPODS: 1.11.2 +COCOAPODS: 1.15.2 diff --git a/example/Pods/Pods.xcodeproj/project.pbxproj b/example/Pods/Pods.xcodeproj/project.pbxproj index acab1cb..50c9502 100644 --- a/example/Pods/Pods.xcodeproj/project.pbxproj +++ b/example/Pods/Pods.xcodeproj/project.pbxproj @@ -3,437 +3,335 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ - 02225BD133C0D7119C996482394BDCDC /* icon_exit.png in Resources */ = {isa = PBXBuildFile; fileRef = 368531A24D4173FFA9B0D83E67408C2C /* icon_exit.png */; }; - 02AD91C5250ED7D91B06BEAC91A5E507 /* mz_os.h in Headers */ = {isa = PBXBuildFile; fileRef = 9D15A458909A3D897282FB39198E8A69 /* mz_os.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 03A3C6313E9B3F808CE58B8E59C60A8B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 952925E838A0DE4D7BDC4EE54022633D /* Foundation.framework */; }; - 059332136CAAB8014F2099D6AC105162 /* mz_strm_split.h in Headers */ = {isa = PBXBuildFile; fileRef = C6E92A31E1513765C96481CDDFBD7FB0 /* mz_strm_split.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 0AE196DA421B10CE8EADF7027554CD5B /* mz_strm_split.c in Sources */ = {isa = PBXBuildFile; fileRef = D665EBF11BEF4E0F65361906FEF6BE82 /* mz_strm_split.c */; }; - 0C524450F5579F35CF05958F488670A4 /* mz_zip_rw.c in Sources */ = {isa = PBXBuildFile; fileRef = 8A1C42BB0445A6105A6441032CAF8A42 /* mz_zip_rw.c */; }; - 0D87C4665F8AD43731710EBBD8CCFCF8 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C3B2A0B779CE31153B2C0D8A7F8DC7FE /* Security.framework */; }; - 0EF3774AC45C05C24674C6F390E4B571 /* mz_strm_os.h in Headers */ = {isa = PBXBuildFile; fileRef = 0167BC2FFCAEB97A8605B52787F6A6E3 /* mz_strm_os.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 10D146685A627FBB929EE24BB4ED9D0F /* icon_search@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 96C7B862918F1432EFA5509AF30FE080 /* icon_search@3x.png */; }; - 10ECB321C6D50C57D6D863AB291E870D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 952925E838A0DE4D7BDC4EE54022633D /* Foundation.framework */; }; - 128CE09CD1B5963378F625E4C96C42FF /* NFXStatisticsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48CC00B47B6B7E94C88C7BEB448C3171 /* NFXStatisticsController.swift */; }; - 138D5C92E017FCFC4671E77B7449EED9 /* mz_compat.c in Sources */ = {isa = PBXBuildFile; fileRef = AFAFFDB25C6393FF4BE608AB7905D9E3 /* mz_compat.c */; }; - 143F776BF2DA6C9BC86C7D1A5026A588 /* ZXKitLoggerMenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17698F1F65B8DBE0535EA3C394937285 /* ZXKitLoggerMenuView.swift */; }; - 192E0619D159E2AE88B64C76A12F646E /* UIImage+zx.swift in Sources */ = {isa = PBXBuildFile; fileRef = F02DE7182DF39D0E171ACCA6E5EFF059 /* UIImage+zx.swift */; }; - 19FA9B07CD47A1A2A8299E63070210D2 /* mz_strm_mem.c in Sources */ = {isa = PBXBuildFile; fileRef = 1640BDE71BDD4279EC8FFF28DF51FE3C /* mz_strm_mem.c */; }; - 1BC5207ED5AA2B6956BB9CD10C71C1AA /* mz_strm_pkcrypt.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C889A2D3CD4893D5E3E5B1225DED48D /* mz_strm_pkcrypt.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 1C789E086190CB49AD3473DD4B26450B /* mz.h in Headers */ = {isa = PBXBuildFile; fileRef = DF9B9B967978F9B169E088D2DD21AFF9 /* mz.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 255CB9700C81C0AACEF38F42E802272B /* mz_strm_wzaes.c in Sources */ = {isa = PBXBuildFile; fileRef = 2C54A44EDA63784147D07E86AAB3D9A3 /* mz_strm_wzaes.c */; }; - 266B91BCD9BF5B8FD4087834D63F60D0 /* ZXKitLoggerMenuCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9E51FDB7DEE50523B9F4AFDC31FB313 /* ZXKitLoggerMenuCollectionViewCell.swift */; }; - 26A29E1970F9BB29B3C8DF42C7892BD9 /* NFXHelper_iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFB24B963110B42C3AE74786F69A1503 /* NFXHelper_iOS.swift */; }; - 27E4BD707CAF03DB3B807980BA0DBEEF /* Date+zx.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE596EFEDF3C76049AD75F22B36EB333 /* Date+zx.swift */; }; - 296F4C9067AAAF2C9743ECD63587FBDD /* ZXKitUtil+media.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1B283D1C146640E56C639E31D6CCB12C /* ZXKitUtil+media.swift */; }; - 29E7BA0C815B632CBD0AE4E2BA23B590 /* icon_share@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 0F0AEFBC080BDE74B4233B23EC6C22D1 /* icon_share@3x.png */; }; - 2C6F7D2DA819D3131A280FFDD8C522DD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 952925E838A0DE4D7BDC4EE54022633D /* Foundation.framework */; }; - 2CEC993669E1B2A01DEDE716B8287C68 /* NFXSettingsController_iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 188AE37E6F5E5BF4F8718CAF1F4FD7FF /* NFXSettingsController_iOS.swift */; }; - 2E6338BE7828FC84E3EB85A620927A9B /* icon_upload.png in Resources */ = {isa = PBXBuildFile; fileRef = 634B12EA16374DEBFC2C54AE00E37B4E /* icon_upload.png */; }; - 30D23C352773401AE1389972956969C4 /* SSZipArchive.h in Headers */ = {isa = PBXBuildFile; fileRef = 39C26435D949588A24FF90CB8D94BEB2 /* SSZipArchive.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 31212EE57AA39C409AF4C6D3AD801B1A /* NFXInfoController_iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE3C0E84979780B1653968C6094F534A /* NFXInfoController_iOS.swift */; }; - 337895F7B33AAF44D36F9E19BEDED78F /* localizable in Resources */ = {isa = PBXBuildFile; fileRef = 98E1E42D21D0672A33C5A17DB35CC55B /* localizable */; }; - 3574700CB4882DD22F2B6E45E071E01D /* NFXGenericBodyDetailsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8859EF41700E7E6B3F5AB9A8F837AAC7 /* NFXGenericBodyDetailsController.swift */; }; - 38B9E9F82A988CAA21601B733C1E92B7 /* mz_strm_pkcrypt.c in Sources */ = {isa = PBXBuildFile; fileRef = 8A96FB16A9ACF544186F6AB332BFCD92 /* mz_strm_pkcrypt.c */; }; - 396243FFDF538EF71B16A48C13261702 /* CircleMenuButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E70F20796A8FD8286FD42C73C90A710 /* CircleMenuButton.swift */; }; - 39973596540F6B4082E6DFAB718C18B9 /* icon_scale.png in Resources */ = {isa = PBXBuildFile; fileRef = 0409EE68E5A615B1E57297F4E7EB073F /* icon_scale.png */; }; - 3D9E0C057077E23BCC7E26608928FFC1 /* logger_logo@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 44989837B31F21C138F66624D96C1632 /* logger_logo@3x.png */; }; - 4204E981117688B0E01EEA0F1FE87DAE /* netfox-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 24C5CC8BCD63DD5B8F5FFFAE8AF9ED61 /* netfox-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4508F66BC08A1F32C26F0CD35EE9F397 /* ZXKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 59A3A18AA771E239753B8F5EEDD866A4 /* ZXKit.swift */; }; - 48481D11F19F6F4CAC62800613A49F27 /* NFXAssets.swift in Sources */ = {isa = PBXBuildFile; fileRef = C02060E2F4856A17AF6D68BA34F72DAA /* NFXAssets.swift */; }; - 49FF3FA18363F510789526811404F3F1 /* UIColor+zx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E8E794E96A7AABDBB802802D089E6E1 /* UIColor+zx.swift */; }; - 4C64EFB4FC53E130DD9B2DD3E1A6C42C /* ZXKitCore-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A70BCB1B0E798D3E6C42ECA3DCD83F0E /* ZXKitCore-dummy.m */; }; - 4E36BCCAE751312F8E9F5144E15D06B4 /* ZXKitLoggerTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3529439853A1B2F1213F5DF5EF32896 /* ZXKitLoggerTableViewCell.swift */; }; - 534EDA976CDBE519C377D315BA3FD183 /* SSZipCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = CA6CA96D2CA01114C98E1C56B5B4CA9B /* SSZipCommon.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 55BCF3E6AF495AED09D1E4B856D7E38B /* NFXInfoController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB1A37BF2D4F9925374BE267891E262E /* NFXInfoController.swift */; }; - 56EB4E4C09AC74C3A762F6CFCB10A265 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 952925E838A0DE4D7BDC4EE54022633D /* Foundation.framework */; }; - 5815697429E348EC76907DC972098DB0 /* NFXAuthenticationChallengeSender.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79834805CC63935DA1B1D4CD6286C1E8 /* NFXAuthenticationChallengeSender.swift */; }; - 58D07C314EB9F7838A8CB3562B9767C2 /* NFXConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12277DBD9D8EBC869D96A71FDE6D8B5F /* NFXConstants.swift */; }; - 5F650BC535E2D4A481E00793AB4FBBE4 /* icon_share.png in Resources */ = {isa = PBXBuildFile; fileRef = D020C35D7E85FB2F96EA830C32CA3D2F /* icon_share.png */; }; - 5F800E52E1FE0F1A5F624C09F5BF2FD6 /* mz_zip.c in Sources */ = {isa = PBXBuildFile; fileRef = 60D656E9A5BBD0AF042833FDA76049E7 /* mz_zip.c */; }; - 602488AC2AB6D13045BE08728C7C58F4 /* icon_setting@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = D6DA2F60BE5545E729D04F578F897D33 /* icon_setting@3x.png */; }; - 6237B1C7B06E20BA4AE31200A29496EC /* icon_decrypt.png in Resources */ = {isa = PBXBuildFile; fileRef = B4B6981A43830883B1BDC93114393E96 /* icon_decrypt.png */; }; - 63A9B4B6687825051414E843330E07B2 /* ShareTools.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9DF394F038B3ACB2A54D774F2920A7F /* ShareTools.swift */; }; - 65BBA1E423831C2A18FD4A39061DEA5F /* ZXKitLogger-ZXKitLogger in Resources */ = {isa = PBXBuildFile; fileRef = CAB850F66F7AE765FD9C2ACF5391A5F0 /* ZXKitLogger-ZXKitLogger */; }; - 691193D4939AF2BE59C3782E1D0BC81A /* NFXRawBodyDetailsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B956D807D1938ABCC287186984F25AF5 /* NFXRawBodyDetailsController.swift */; }; - 6C72D16AAF1F2D3CA02DCF08BCF64120 /* ZXKitCollectionViewHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9116634DAC397EA301AD468FD55F9F5B /* ZXKitCollectionViewHeaderView.swift */; }; - 6E8A4AF7D7C29017C91D3E82912E103A /* icon_scroll.png in Resources */ = {isa = PBXBuildFile; fileRef = DC74D9E5ACA8C0CB1730F331FBF24BE4 /* icon_scroll.png */; }; - 6E9EDFEEF240398858948A473D762631 /* ZXKitUtil+file.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FC6274779E0A73FC8D5632C03C245FC /* ZXKitUtil+file.swift */; }; - 6EDBF1B28EBFBE7BC81EE5EDEDDB7FA7 /* ZXKitLogger+zxkit.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8868F7CE2A80E2289A1190101CB98DD /* ZXKitLogger+zxkit.swift */; }; - 6EE6789633DEFBD624DE3896B5CDE779 /* ZXKitUIConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6BB30B18A1DDF52DE1A9056703699D2 /* ZXKitUIConfig.swift */; }; - 7358B9EBDDC8C1A425EB5702739B4DA2 /* NFXURLDetailsControllerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CAF27289C0227B6047B8CEB45FB0D74 /* NFXURLDetailsControllerViewController.swift */; }; - 74229E1865DD1520975E777775B80BB1 /* NFXProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDF98797E13A9FD4929713BF87E21937 /* NFXProtocol.swift */; }; - 7472C16947AD3B45BEA7F1BA314229D4 /* ZXKitUtil+UI.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECEFB45C5B66A87D7F43FE57A48180D4 /* ZXKitUtil+UI.swift */; }; - 761C78E0E1256C52E8A351F9428FA902 /* NFXListCell_iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C8B6F37606052F053FE15C784F1F944 /* NFXListCell_iOS.swift */; }; - 799428161A5C657A5D66EA9F074865DD /* ZXKitCore-ZXKitCore in Resources */ = {isa = PBXBuildFile; fileRef = B462C8B2CB78AE609523A787505C2EB4 /* ZXKitCore-ZXKitCore */; }; - 79D3CA2F2974532D6FAE85C14C8591DD /* ZXKitFloatWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C07E9EDC9A0214194D214BAE8788414 /* ZXKitFloatWindow.swift */; }; - 7D29143D343D8A86D3B0176E32755550 /* ZXKitPluginCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 276E0AF1306F1E93521E8085353F27C4 /* ZXKitPluginCollectionViewCell.swift */; }; - 7DB2C0596405DB863CF2B2A489AE2636 /* mz_zip.h in Headers */ = {isa = PBXBuildFile; fileRef = AAB97A4E2AE8E1AD66A6725365C16FF2 /* mz_zip.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 7E4E2EC81D343AD40EA422F9B6D6F7ED /* ZXKitLoggerPickerWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = B16609C5E98CFE978928A80BE0668C99 /* ZXKitLoggerPickerWindow.swift */; }; - 7F1547D086DD32FA4F709A7D3E1DA97A /* ZXKitLoggerFloatWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = BE09C088CA2B9601D10FAB6247510D14 /* ZXKitLoggerFloatWindow.swift */; }; - 7F58BE8838D03B2D5B30E68952FF1E4D /* SSZipArchive-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 35F868145E5165003FE6ACEF121F2A31 /* SSZipArchive-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 7FA25114C2DC7FF1B0009A0B7D5CB128 /* icon_copy.png in Resources */ = {isa = PBXBuildFile; fileRef = CE6A77207EC469A2837E481E94EE4071 /* icon_copy.png */; }; - 8338498A37A0E552818CB72FA9EDB996 /* NFXHTTPModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4CCD4AD13ED57B9E203B2DE6851C780 /* NFXHTTPModel.swift */; }; - 83393F6B273883E849C8D4E4DC2921B9 /* ZXKitPluginProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9DBAC7423E4273F050893669FE33511 /* ZXKitPluginProtocol.swift */; }; - 83A27318DBE678133AF58B9B15CDB67D /* UIView+zx.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC42F0E4B2359061A95A3F08EE9FE7DB /* UIView+zx.swift */; }; - 883D13CBF9BD500E11712C8B86039F8E /* icon in Resources */ = {isa = PBXBuildFile; fileRef = 5AB4D46949DB003E54107DA00A884FBB /* icon */; }; - 89AECD9F4931EA70C032C83AB105F415 /* mz_os.c in Sources */ = {isa = PBXBuildFile; fileRef = 2F70AA1830A13D3821B0EAEC2EE80C26 /* mz_os.c */; }; - 8AB091199F99F1C2E9E67030DAC50F6E /* mz_strm_mem.h in Headers */ = {isa = PBXBuildFile; fileRef = 10A42749B05E4B6A7EA0CB3DD5EB4CCC /* mz_strm_mem.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 8AB42E959E8F7F2B75841D73A507BAD6 /* NFXWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4B44CAA13AEF830A6A02DF52528D135 /* NFXWindowController.swift */; }; - 8B8BDF2551B0B94BBBB13E1772D50C3F /* CircleMenuMaskView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A9FC2777BA9139AB7A0A3A721416875 /* CircleMenuMaskView.swift */; }; - 8C4FBC2492C6DDE369B02AEE117ED2BF /* mz_strm.c in Sources */ = {isa = PBXBuildFile; fileRef = EA0CAD0A52E03214DCC5119528A3218A /* mz_strm.c */; }; - 90CD4E17A446CE7F95013F4F3F093A8C /* icon_normal_back.png in Resources */ = {isa = PBXBuildFile; fileRef = 029E633F96E0572A701C011B0C9C54D5 /* icon_normal_back.png */; }; - 90DF670DC21B9EFD8DFEFC5081073963 /* mz_strm_buf.h in Headers */ = {isa = PBXBuildFile; fileRef = C89B168488EA718C8696E0AC7A3D48AA /* mz_strm_buf.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 91FC83B4D4780F46C25F62FDDF7A790F /* ZXKitLoggerFilterTypeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1C4849E990A59E7FF438F6E78C5AD77 /* ZXKitLoggerFilterTypeView.swift */; }; - 9334E518B0185C5F6235BC843B7F8A27 /* NFXDetailsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 274E0A1495A50CB474A40FEF9289E868 /* NFXDetailsController.swift */; }; - 9A8AA93E06A47DDA976BFC1E4C73AC18 /* Pods-netfox-zxkit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D9EB0A317A10F31E2920626E042626CC /* Pods-netfox-zxkit-dummy.m */; }; - 9AE06BA381CC1DEF77E030A05FDFCB28 /* zx_logo@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3A11A9F01B939E32EE3896A2878E0F8F /* zx_logo@3x.png */; }; - 9BE2265DFBE0E6C8940912BE438EE9FA /* String+zx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BE674746D866EEF7B2DFA5752C5B3FE /* String+zx.swift */; }; - 9D420997871F24FEB04C2A77D881E6C9 /* SSZipArchive-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 782712DB3F2E5A8CF3F322D1DF9A8CB5 /* SSZipArchive-dummy.m */; }; - 9DE0DCF18BEC7CC5E732F99B8A3D3F63 /* ZXKitLogger-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A0385C4C19CC50137018FB831373EDC /* ZXKitLogger-dummy.m */; }; - A2EEEEDC77C8D999FBA0640AEABC4EB2 /* ZXKitUtil+system.swift in Sources */ = {isa = PBXBuildFile; fileRef = 332ADAB8C86CD40E14F4A5A4274FD6DB /* ZXKitUtil+system.swift */; }; - A343DEAFC5468C7D1049BFC68E679FEC /* localizable in Resources */ = {isa = PBXBuildFile; fileRef = BC66DCCACE7A91FCC56283CAC44529FC /* localizable */; }; - A4F447FA7122B13300BD80CE080444F7 /* mz_strm.h in Headers */ = {isa = PBXBuildFile; fileRef = EA12FE13077487215E0A9BF4741CEBD3 /* mz_strm.h */; settings = {ATTRIBUTES = (Project, ); }; }; - A641568B5A691790189CF5CCAE31A095 /* icon_back.png in Resources */ = {isa = PBXBuildFile; fileRef = 091848F99E0718D86D9653EBFCEAAEF5 /* icon_back.png */; }; - A87F265168F263F2BB4361361BF616DF /* mz_crypt_apple.c in Sources */ = {isa = PBXBuildFile; fileRef = 3CA96854097640C54AC3CAB5D2C6D991 /* mz_crypt_apple.c */; }; - AAB0384853C90088036B7501CA8ACFE0 /* mz_crypt.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FB6405D61298A835CF8B4F208DDEE95 /* mz_crypt.h */; settings = {ATTRIBUTES = (Project, ); }; }; - AF48F21F13058D4DA35F3BE185FE03D0 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 952925E838A0DE4D7BDC4EE54022633D /* Foundation.framework */; }; - B05C6FC0332B40E5092FFA97827C76C9 /* NFXListController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10A2068553EB876AE0F05EA4EFC3C4BB /* NFXListController.swift */; }; - B221E27B4BE5ED1DAC9DC65A6E69149A /* icon_hide.png in Resources */ = {isa = PBXBuildFile; fileRef = 54AF4D974AB8C5D6DEC4107F214A5BB5 /* icon_hide.png */; }; - B2AC995AA58EEB36566CB335FE07864A /* icon_notice@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = F5D64411657007EB6C16E41271465C11 /* icon_notice@3x.png */; }; - B529041E4C15D801791215F8E311FF47 /* NFXSettingsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D912DCBD4553B8C20167F3FFC64694C /* NFXSettingsController.swift */; }; - B55F62B5825A84366334F2388EE104C8 /* ZXKitWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C23EBF54AFABCFA0132B65C073F1EF0 /* ZXKitWindow.swift */; }; - B85218C188A0342EC73ECEFD1CB43F8D /* NFXHTTPModelManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB9B7A95649E514F6C627962AEB3C025 /* NFXHTTPModelManager.swift */; }; - B88E75160457951F03BA84516B672B05 /* NFXGenericController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A638499C72C6B94C551C115E634766B0 /* NFXGenericController.swift */; }; - B9234355451A7887E6BEAE054B14A3FE /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 63223FFF70CBA065817589C3612C267D /* Localizable.strings */; }; - BB4782EE1267513C3BA8E6D226D245E5 /* SSZipArchive.m in Sources */ = {isa = PBXBuildFile; fileRef = E977D9049E28209DFE2393A399B97AB3 /* SSZipArchive.m */; }; - BCEA9245D650D5153C9A0FD9F18DD4AC /* NFXListController_iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 817CF017300A77F4A5662603CAA0FBFC /* NFXListController_iOS.swift */; }; - BD8CD18F89F7E0B432C5F5B74F3A19FE /* icon_analyse.png in Resources */ = {isa = PBXBuildFile; fileRef = BD9624031211F7F2074962D4B7652C3E /* icon_analyse.png */; }; - BDCCA4A9A781026F988E16D64945E358 /* mz_strm_zlib.c in Sources */ = {isa = PBXBuildFile; fileRef = B07132CA0C13A5B494F6452B646363CC /* mz_strm_zlib.c */; }; - BEF4CC97D88ADCD73B93AA179F7E1802 /* mz_compat.h in Headers */ = {isa = PBXBuildFile; fileRef = 0E060ED4B31F0DB72CD3188A20E12FC1 /* mz_compat.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C265F97A777979D61333F2088A689BB4 /* ZXKitUtil+permission.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7C580942DAF0C0022A328FAAEB735D6 /* ZXKitUtil+permission.swift */; }; - C30DB8F46569FBD4D1C7D7DA0E4B67EC /* mz_zip_rw.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BC703A81196D6F5F8D3EF0BAB472E89 /* mz_zip_rw.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C3D352F8B703F950FD32936D16968D12 /* mz_crypt.c in Sources */ = {isa = PBXBuildFile; fileRef = 8E2BAEB2106BE699780B6F27D213EAC4 /* mz_crypt.c */; }; - C624D207FC5B3D396C76BB01F592F9FC /* ZXKitUtil-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 8D0BAC8A47751D93162C617C788E922F /* ZXKitUtil-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D21459EB156B909DAB65DC64B8256C3B /* NFXHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2167A7D7ECBA03E92A72715E5D0910D7 /* NFXHelper.swift */; }; - D3340EC887ADD4CCC83BF67712BC883A /* mz_strm_buf.c in Sources */ = {isa = PBXBuildFile; fileRef = 6616871FCB1AD9A871E643FBFD8BB508 /* mz_strm_buf.c */; }; - D477756D27AD85A8C3C5F169BE218B76 /* NFXDetailsController_iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CE25B5FEC019CD6F9D07196C58A1F08 /* NFXDetailsController_iOS.swift */; }; - D54A35F498ED731BD3F4E97FA95274C5 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 952925E838A0DE4D7BDC4EE54022633D /* Foundation.framework */; }; - D7EC5FF54630FE4D546D546E22304CD0 /* NFXImageBodyDetailsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 017F068828884D46521192547057BED8 /* NFXImageBodyDetailsController.swift */; }; - D9EED6FDF393033C942E5B2149E99B2F /* mz_os_posix.c in Sources */ = {isa = PBXBuildFile; fileRef = F105D6159B1EAADE8D9FF07DB1D6BB28 /* mz_os_posix.c */; }; - DC8486F58BD475093B0F6CE401FB0569 /* HDSqliteTools.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27F88506F1A8B0FDC2A9BEF148E6470F /* HDSqliteTools.swift */; }; - E0A9B2E253914C7FA31DFD89FB296268 /* icon_delete.png in Resources */ = {isa = PBXBuildFile; fileRef = F44A62B05E369692296F31B9CC5D3A4F /* icon_delete.png */; }; - E1999227230CCDDDCC1BE6301CCD1494 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 2EAB52A882FE1551521143CB9EFDA98E /* Localizable.strings */; }; - E31E149806DD5D1DEEABD618BEFFD0A1 /* Data+zx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EC6C943326D5FB2E5953246A5761534 /* Data+zx.swift */; }; - E5453C6BBDE1590DE25A579C90132672 /* icon in Resources */ = {isa = PBXBuildFile; fileRef = 78CF5FBACB0DFEA2E03BC70D1833420E /* icon */; }; - E59BA9EC0BC233F1F7942C375E725E30 /* ZXKitLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 651334ABA8E1EAE0C1E8B90A91564D11 /* ZXKitLogger.swift */; }; - E87444DCDB53BC7FA5BEB0316E97E34F /* NFX.swift in Sources */ = {isa = PBXBuildFile; fileRef = 342AF2072D098E4581A9164B460C206E /* NFX.swift */; }; - E91451C6B1AFC1743B0E250ECF70AB60 /* ZXKitNameSpace.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81B06127C905895ADCC3BD98DEDCFA5F /* ZXKitNameSpace.swift */; }; - EB411C2A32D56A3BD66D64B58863D8D4 /* ZXKitLoggerWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 434BDBFC3DD1A54899173E94E3DCA060 /* ZXKitLoggerWindow.swift */; }; - EC4867F2D2D1D8ACB4818BD39B3DC6A8 /* netfox-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 3F4C1F93115EB09271891214991F3110 /* netfox-dummy.m */; }; - EDAD55A0CF4A8974E31E65D96BEECB65 /* LogContent.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4A28C9C8B9BFBB4278D7B59F26BB339 /* LogContent.swift */; }; - EE424ECE443C88A654B2CC271E9F4874 /* mz_strm_wzaes.h in Headers */ = {isa = PBXBuildFile; fileRef = AED94C2BF2AC5E200B0F1D7DF8984565 /* mz_strm_wzaes.h */; settings = {ATTRIBUTES = (Project, ); }; }; - EF9C00E340B33BA67D9CEF5A2262D15E /* mz_strm_zlib.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F8D58C0DE9A4BAD84D01E7C9080DB21 /* mz_strm_zlib.h */; settings = {ATTRIBUTES = (Project, ); }; }; - EFE936E5DBC6AEE0B47D92500218702C /* ZipArchive.h in Headers */ = {isa = PBXBuildFile; fileRef = B952D11F3D2744D7DDD7BC7AFAF0795C /* ZipArchive.h */; settings = {ATTRIBUTES = (Project, ); }; }; - F03B552BC07BF16BE61908F497B00EA4 /* CircleMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0445BAF27BC2AD7AB70C4AA9E5915BD5 /* CircleMenu.swift */; }; - F13F8025881A9406E3F8950108121C21 /* icon_close@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 21B26190117DF58D164F7A1D0FC07C97 /* icon_close@3x.png */; }; - F2586B8AE856A1B95C1D9487528F4316 /* CircleMenuLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0014AAD9C960D2894DB7A4C78E6394B /* CircleMenuLoader.swift */; }; - F306BDA46793118FD6E2ACCB664A851D /* icon_search.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C999CBA21A732E690E9D0A63A038FB7 /* icon_search.png */; }; - F554C88DBF2688DBFD67FCED2ADF9B20 /* icon_home@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 03BD8B6DD42BCDA27F5FDA183332097D /* icon_home@3x.png */; }; - F58D2474BED2F5B042B99FED2B4E08E6 /* icon_list@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = F60B875D6F88E7F0A1E06FC444B19EC5 /* icon_list@3x.png */; }; - FA7EFA6CCA3D70907B15CCE8E3A4FBEE /* NFXStatisticsController_iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = A988EBDCA654EDD83E916032FE6DE6A4 /* NFXStatisticsController_iOS.swift */; }; - FAA008B2FFD848AADD4AF1D16D927FB8 /* ZXKitCore-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E673EB92A59BEF4A646EC3FE4324E053 /* ZXKitCore-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - FAB8E7641AEBF9091B8E531F49959680 /* ZXKitLoggerItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A61197173FBCAA814732CCA8E9B5853 /* ZXKitLoggerItem.swift */; }; - FC40BD30290AD046940352504D98B79F /* ZXKitUtil-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6755DA97920CE51C5F4D276CD4A2EF94 /* ZXKitUtil-dummy.m */; }; - FC6E32A3291FE2E8E9E263C9DDD00DC4 /* ZXKitLogger-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4C4AE2673E47A49A58755A7CE3A3684D /* ZXKitLogger-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - FE8BF7C7018EF47E97426B7D135691A3 /* mz_strm_os_posix.c in Sources */ = {isa = PBXBuildFile; fileRef = E0620B1A753629B8854ED6BBFE7CE521 /* mz_strm_os_posix.c */; }; - FF3CE106F9C79B2E4E36BB1363A5EAAA /* ZXKitUtil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5744560F468CD1C3ED79CB3704B5FFAB /* ZXKitUtil.swift */; }; - FFA6093889C5E8B7FAAB30ABF1466681 /* Pods-netfox-zxkit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = BB501C722F1746B3F5A78D2964EB50A9 /* Pods-netfox-zxkit-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 001C53B02F1E6F7B06929538AAB1FB82 /* icon in Resources */ = {isa = PBXBuildFile; fileRef = 47BEF63EE9CFC08DF26783BCFAC0CE9B /* icon */; }; + 03A3C6313E9B3F808CE58B8E59C60A8B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */; }; + 08ED8E5BA7357DAC2996C7B5A0F6EC7C /* ZXKitNameSpace.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C70DE7EE591511158A4E9AB9E7A4CE3 /* ZXKitNameSpace.swift */; }; + 09736D3D1C5390DB6DAF488393D40A78 /* DDLoggerSwiftItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC0E6C9B6E9B6EFD527596842D4C0FA2 /* DDLoggerSwiftItem.swift */; }; + 09E4975783948DF1641A2DE03EA66752 /* icon_normal_back.png in Resources */ = {isa = PBXBuildFile; fileRef = 41BACB3302198FD24A48B2745EB4292E /* icon_normal_back.png */; }; + 0C5ACE8824F2B2D5AE02667D2635D85A /* icon_delete.png in Resources */ = {isa = PBXBuildFile; fileRef = 73C34578ECDADDB9C4A17E88ED3D7328 /* icon_delete.png */; }; + 0DED03A525B655785E432F7E24C5BF21 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 126D57BD316DBBF9E2BFDA3798A32C0A /* Localizable.strings */; }; + 0F023C7F77A647E12AF20829E08C7E3C /* icon_notice@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1D7850912350CD0EDAB0CAD68EEA2440 /* icon_notice@3x.png */; }; + 114BA7BC7E9F64931D9FC7014EBAF626 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */; }; + 120E1CA3C1EE913D4D066C2EF68D2039 /* DDKitSwiftUIConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79D6B9CD3217E71078FE9ED185F684C2 /* DDKitSwiftUIConfig.swift */; }; + 128CE09CD1B5963378F625E4C96C42FF /* NFXStatisticsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5769A36AB02048A6E87D4A3E4CC36B3A /* NFXStatisticsController.swift */; }; + 12F5490AE36448355C654A63081E9762 /* LogContent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9082466C07D0679C2576DDFDF7148132 /* LogContent.swift */; }; + 17BB984C1A815AB1D10B47C3F43B67B2 /* icon_decrypt.png in Resources */ = {isa = PBXBuildFile; fileRef = E123B0611AE70C3946F0FDA69D36B149 /* icon_decrypt.png */; }; + 18B854FBFCB94DF898AACD668BB92CB8 /* DDLoggerSwift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 201D2CC3B8ABFD37E3279660025FA5B8 /* DDLoggerSwift-dummy.m */; }; + 1A4D583D0B2C6D0C9F3F462690E111E2 /* Pods-DDKitSwift-Netfox-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 54E2CC6F99945DF20876CC021B099A3D /* Pods-DDKitSwift-Netfox-dummy.m */; }; + 201359490B59B16BF694C765175378E1 /* ShareTools.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0219D5BE736BE1759A92D1051EDA9848 /* ShareTools.swift */; }; + 20B9107E6BA7A5BE56A83EF349676453 /* icon_copy.png in Resources */ = {isa = PBXBuildFile; fileRef = 0C61C053758775B0896507D1B58C44B9 /* icon_copy.png */; }; + 26A29E1970F9BB29B3C8DF42C7892BD9 /* NFXHelper_iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 706EE7625BAD729B4FB16DCDE4A7374E /* NFXHelper_iOS.swift */; }; + 2787A0CBE60CCA254AA5F50DF1B58DC2 /* icon_scroll.png in Resources */ = {isa = PBXBuildFile; fileRef = 63C6593064932171C3E6757B3A88CAFA /* icon_scroll.png */; }; + 28055D0F24A20F539C6C15AA466BE031 /* icon_share.png in Resources */ = {isa = PBXBuildFile; fileRef = 056240688AEB2FCB751F21A88D189646 /* icon_share.png */; }; + 2CEC993669E1B2A01DEDE716B8287C68 /* NFXSettingsController_iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = D65B82196979481E614EE5023EA665FC /* NFXSettingsController_iOS.swift */; }; + 31212EE57AA39C409AF4C6D3AD801B1A /* NFXInfoController_iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52FB56BD2919B4E03A3C66522D27A334 /* NFXInfoController_iOS.swift */; }; + 333843F2B81DD9C44D52BA5C29F1B0EA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */; }; + 3574700CB4882DD22F2B6E45E071E01D /* NFXGenericBodyDetailsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEF8CB68E9A855267DAC138B65FA2A77 /* NFXGenericBodyDetailsController.swift */; }; + 370E838B47CBDD87FBD05AC13E1D04AB /* DDKitSwiftFloatWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93D2C5E9C0DA42D3399ADCAED8F23E9A /* DDKitSwiftFloatWindow.swift */; }; + 37538BAEC8D51EF8875FD1F739EF462D /* DDLoggerSwiftWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 701999FCFFC3A449FF1CE654ADB393BB /* DDLoggerSwiftWindow.swift */; }; + 3893B34BC9EB36854D2935F99E5B4C6A /* logger_logo@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 5BD6B450D72E01C4676D40BBFD5F1646 /* logger_logo@3x.png */; }; + 3C5BC46F1C38DD3514DDF734342057D4 /* DDKitSwift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 336A19806FCBF767899FDD8B5ADFF9F3 /* DDKitSwift-dummy.m */; }; + 3FF84735724680E08B32612DA7D62A73 /* icon_search.png in Resources */ = {isa = PBXBuildFile; fileRef = 84C1578B38ED2B5AF8E8CC6FF098D08D /* icon_search.png */; }; + 412A1DA62EFFE4B258C6C4CEEA29CF7B /* DDLoggerSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31318EAED43088B4F46A933A28C3AB39 /* DDLoggerSwift.swift */; }; + 4204E981117688B0E01EEA0F1FE87DAE /* netfox-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 36E4EEFA94D3D743E0DFA989C554CB6A /* netfox-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 424E31AB35E86EC69616999D7EB415B4 /* DDUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6685D443331DFF981500A9229927D96 /* DDUtils.swift */; }; + 451E76F6D175DCDAD93D8BB67B98AAFA /* DDKitSwift-DDKitSwift in Resources */ = {isa = PBXBuildFile; fileRef = 67832819087A20EE754DB49E95EE7861 /* DDKitSwift-DDKitSwift */; }; + 48481D11F19F6F4CAC62800613A49F27 /* NFXAssets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31554135E1CCDA52688C326F04180EEF /* NFXAssets.swift */; }; + 4DB7EB9E286B20E712282C9E72BD15CA /* CircleMenuLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8FCF009AD4EDB0B7D1D9543999594E5F /* CircleMenuLoader.swift */; }; + 51FA925C64834393625A3223D989CE8C /* String+zx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85EA5E90B0FECA37580C57BB84102ADB /* String+zx.swift */; }; + 53FAC2AF2EDAD14A4F23462250A1258A /* icon_exit.png in Resources */ = {isa = PBXBuildFile; fileRef = E7BE6C0ECAEF351C1B9C7B47DC5DB78E /* icon_exit.png */; }; + 55BCF3E6AF495AED09D1E4B856D7E38B /* NFXInfoController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42BC87197FBEAB8FC01BB0A8C1EA846F /* NFXInfoController.swift */; }; + 55FDC7B58B07D8819571D9173807E7F2 /* DDLoggerSwift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = ABB3A0741935FCB8DDDC05F53305D1C9 /* DDLoggerSwift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5815697429E348EC76907DC972098DB0 /* NFXAuthenticationChallengeSender.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3AEA1C8D3C72A23D084C539F8D61560F /* NFXAuthenticationChallengeSender.swift */; }; + 58D07C314EB9F7838A8CB3562B9767C2 /* NFXConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = F673D3217B86BD4A91331F26BF997F8E /* NFXConstants.swift */; }; + 5A7029A1C447BF42AAE2617BAC8013EE /* DDKitSwiftPluginCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DB0232721519874DFDF2B0B689DE36E /* DDKitSwiftPluginCollectionViewCell.swift */; }; + 5B552F961385EB6099F2D353796A0E4B /* DDUtils+AppStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A9D46A5C0EEF6ED39BEE374963B1D77 /* DDUtils+AppStore.swift */; }; + 5DA4B58516458CDC490BC4500A642DBF /* DDUtils-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 57D0D4AEEE40F76E88BB2881900BBCC1 /* DDUtils-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5F235E6537222412CDF4F02E86504A0E /* DDUtils+media.swift in Sources */ = {isa = PBXBuildFile; fileRef = 386AE9F9ADA2776500C6FB7FE3451AFC /* DDUtils+media.swift */; }; + 630DED2858BE9650CD2A915A1C22DFB4 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 405E28C29B602AE3C166700FD53FA4CE /* Localizable.strings */; }; + 65A927FF326179DB019E9A5F7342AEBE /* DDKitSwiftWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F0D35BBC6ECE7ADFA11B5958DDB8538 /* DDKitSwiftWindow.swift */; }; + 6843D71B21D5254619865415AAD423E4 /* icon_share@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 8123F4BA68B8D76199CF62874EF5E731 /* icon_share@3x.png */; }; + 691193D4939AF2BE59C3782E1D0BC81A /* NFXRawBodyDetailsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5AF25992F46DB90C2A566D21EC7E9BA /* NFXRawBodyDetailsController.swift */; }; + 6C3FEE68110A442207B58ADF13AA7692 /* icon_list@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 926126915C67CE944550CFC9DFDF26A8 /* icon_list@3x.png */; }; + 71C78906EF0D4CA4FAD5B80064572ADF /* DDKitSwiftCollectionViewHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64F5F1E895FEFE072AED3E956246EE16 /* DDKitSwiftCollectionViewHeaderView.swift */; }; + 7358B9EBDDC8C1A425EB5702739B4DA2 /* NFXURLDetailsControllerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2A0548EE71E05813D98D6858E362875 /* NFXURLDetailsControllerViewController.swift */; }; + 74229E1865DD1520975E777775B80BB1 /* NFXProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = F233BBB06B6ADF288BCB1AD34DFFA90E /* NFXProtocol.swift */; }; + 761C78E0E1256C52E8A351F9428FA902 /* NFXListCell_iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 427174D58B8BCDBF2CF24D7217A6464F /* NFXListCell_iOS.swift */; }; + 7A1A518B3A6F2CFC8B838FA72FE40D9F /* DDLoggerSwift-DDLoggerSwift in Resources */ = {isa = PBXBuildFile; fileRef = 6EE26D836377CA863AAAF9260E9EA901 /* DDLoggerSwift-DDLoggerSwift */; }; + 8338498A37A0E552818CB72FA9EDB996 /* NFXHTTPModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FD28C08421A4C12E041B334B2B14D51 /* NFXHTTPModel.swift */; }; + 89F571B4C02E64848D31EF02489C5CA8 /* icon_search@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 74257CD6172D2B28D7A16A55FA4A2651 /* icon_search@3x.png */; }; + 8A98F18D33F00763B6298C0C417C74F3 /* CircleMenuMaskView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6472B8943890130F6F59B9677157566A /* CircleMenuMaskView.swift */; }; + 8AB42E959E8F7F2B75841D73A507BAD6 /* NFXWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99C7843B5FBA1C8AA8D46E6286665759 /* NFXWindowController.swift */; }; + 8E415E6F9E8EE99BFBC05EC497755E27 /* icon_scale.png in Resources */ = {isa = PBXBuildFile; fileRef = FAB86EC400D67F829EFAE3CBA5C8E9DC /* icon_scale.png */; }; + 8EA402FC340EB88037F9406338AD15DC /* DDUtils+system.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF142FC8F3792D4D51F92CB0E34F4E3B /* DDUtils+system.swift */; }; + 9334E518B0185C5F6235BC843B7F8A27 /* NFXDetailsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7EACF54BF9400DD3CDF47A8DD3E0EC29 /* NFXDetailsController.swift */; }; + 95346730C7D6479FC75FF455331E24BE /* DDLoggerSwiftMenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA24EDD10CDAC472E3CCCDE1F864A73E /* DDLoggerSwiftMenuView.swift */; }; + 956183D18C6FE35A64982AD921D12965 /* icon in Resources */ = {isa = PBXBuildFile; fileRef = E04952BB5585CE353F71825760E87727 /* icon */; }; + 97A48E272D7569CBDFE64749C085EBC6 /* DDUtils-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C82EF2515BB22A58FFC2D38F59837F21 /* DDUtils-dummy.m */; }; + 98F88E980194DA8B065707DC184E0168 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */; }; + 9E67DB042F63A16C99481D9E55BAB5F0 /* Pods-DDKitSwift-Netfox-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 13ABB90B0639472FB477947B874BE7B7 /* Pods-DDKitSwift-Netfox-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9EF9F0D796C23E9C027BD0FA280F9A02 /* DDLoggerSwiftFloatWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2508750853E0D84C25BDCF252AE633 /* DDLoggerSwiftFloatWindow.swift */; }; + ABD88800C67B3F024F375AF80CD32050 /* localizable in Resources */ = {isa = PBXBuildFile; fileRef = C0839CCA2A3610A119F495175B901A9F /* localizable */; }; + AF3C21058B4F73F813DE8540D028C50B /* DDUtils+file.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90C27D79E9FEFDBC5BB4AF88D506BD0E /* DDUtils+file.swift */; }; + B03B90E5E0BC6B4141EEDC9DF05C0D98 /* DDLoggerSwiftTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CF483B4AE7D5B0DDFBA138D3EF70C58 /* DDLoggerSwiftTableViewCell.swift */; }; + B05C6FC0332B40E5092FFA97827C76C9 /* NFXListController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 755E8DF29A132232481804C5FF6A6082 /* NFXListController.swift */; }; + B20CB7C6AE8675F492417EE9367673B0 /* icon_back.png in Resources */ = {isa = PBXBuildFile; fileRef = 9522398E75699B8F92C8E7B22F8AEB98 /* icon_back.png */; }; + B529041E4C15D801791215F8E311FF47 /* NFXSettingsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BC8917C5BE7A44EC257E6AE77E3F8FE /* NFXSettingsController.swift */; }; + B7E59BAE98736C7B5671BA90708FDB36 /* DDUtils+UI.swift in Sources */ = {isa = PBXBuildFile; fileRef = B212042DC58FFE3B3DC9739C5A07E6F9 /* DDUtils+UI.swift */; }; + B85218C188A0342EC73ECEFD1CB43F8D /* NFXHTTPModelManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6779D113F799EA02A14574312505072 /* NFXHTTPModelManager.swift */; }; + B88E75160457951F03BA84516B672B05 /* NFXGenericController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36F7AECDE23A46A541C5EEC64492FA1D /* NFXGenericController.swift */; }; + B9198D8CC5C954ED55FD7E48C33E71E8 /* zx_logo@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = C7FB8F28DAFECFA2471C8CCFCBE1DC1E /* zx_logo@3x.png */; }; + BC9D5878308D1AF634B96676D045D94E /* icon_hide.png in Resources */ = {isa = PBXBuildFile; fileRef = 8EEADFFDEE3E8D9085ED581BC3C4D710 /* icon_hide.png */; }; + BCEA9245D650D5153C9A0FD9F18DD4AC /* NFXListController_iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A81A254014253D9175C08475A40E53C /* NFXListController_iOS.swift */; }; + BE39858D92EADCF62147048CFF475891 /* DDLoggerSwiftFilterTypeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29B810047C43CEF94DA7809FD775EFB0 /* DDLoggerSwiftFilterTypeView.swift */; }; + BEF71DF20B0FF6E934F4230D18488AE5 /* CircleMenuButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = C864001E1467FA961A145010360F6602 /* CircleMenuButton.swift */; }; + C687E17BF9D368A3ED5FDF9AF2220D6B /* UIView+zx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3FE020B715B1BD769CC0B5B63387588D /* UIView+zx.swift */; }; + C7FAD13BEABBE8881C3ED1DC425D69CC /* icon_setting@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = D0F7E70FF0D2601FA163E16387580672 /* icon_setting@3x.png */; }; + C814FA78E10C2A7881A53C735195AB36 /* icon_upload.png in Resources */ = {isa = PBXBuildFile; fileRef = 4C86CAD86944BC77FA34545A11846915 /* icon_upload.png */; }; + CA8C836F46378BD0691F7DAA8F1A953F /* DDKitSwiftPluginProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = F53FBFE7D18601718A92B905F36D4563 /* DDKitSwiftPluginProtocol.swift */; }; + CC244A6673E1B5BCD7B5D62C490BE9BB /* DDKitSwift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = AFB494D910A2E0F633928BCBFB998DA2 /* DDKitSwift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + CDC682591D694A428C41C498B3DCF23F /* HDSqliteTools.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5893C5CFAD84A494FDA109849E14883 /* HDSqliteTools.swift */; }; + D21459EB156B909DAB65DC64B8256C3B /* NFXHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83971684DD7CE36BFC05C1B3E098B4AD /* NFXHelper.swift */; }; + D3B2F3F87872B977EF8D896C11C1054C /* DDLoggerSwiftPickerWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27D398781691B300100F4DD3AB60ABD0 /* DDLoggerSwiftPickerWindow.swift */; }; + D477756D27AD85A8C3C5F169BE218B76 /* NFXDetailsController_iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40B53CD1D91ECF0CFF41BE3CAD375FB2 /* NFXDetailsController_iOS.swift */; }; + D6CAC22AFEF314B1400579B29AD53A5E /* DDLoggerSwift+ddkit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EDEE5E9C6483B4E2460600AFAE0AF6C /* DDLoggerSwift+ddkit.swift */; }; + D7EC5FF54630FE4D546D546E22304CD0 /* NFXImageBodyDetailsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A2E3A97B0A4837D98EB60B518B1E2A9 /* NFXImageBodyDetailsController.swift */; }; + DA3A3DEF9F34DABC617CFCF3D73D1B0B /* icon_close@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 8002E118F7807644DEBB4838706EF53D /* icon_close@3x.png */; }; + DB2A3917A9F8740716C6F59A24F1C6DC /* Data+zx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96BEB5E416825EDBA6D54EAEE81E37D9 /* Data+zx.swift */; }; + DCDF5533334DEF2A914FDCA3178F60F5 /* CircleMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = F74BECA5F2E098F9764F9716C789EC51 /* CircleMenu.swift */; }; + E2331C96A60F3314606257BDCB6361E0 /* localizable in Resources */ = {isa = PBXBuildFile; fileRef = 80E015C7CB963A6788ED89F8D1E7CDC1 /* localizable */; }; + E87444DCDB53BC7FA5BEB0316E97E34F /* NFX.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F9610380BB071F13D370CCEE50C129E /* NFX.swift */; }; + EC20F644497E4F82E3BDE3D21521A15A /* UIColor+zx.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C4313D25CA65C9DE70DA9F619A808EB /* UIColor+zx.swift */; }; + EC4867F2D2D1D8ACB4818BD39B3DC6A8 /* netfox-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 9E4BB3F5039575AF78B511CA0E6745DF /* netfox-dummy.m */; }; + EDBF9AAE6ABC9CEA76FD804A4115C0BD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */; }; + F08A271EF5295471985032F185352740 /* icon_analyse.png in Resources */ = {isa = PBXBuildFile; fileRef = CC2C47AFB8D5EE5B1BDA112AB1E9B7D0 /* icon_analyse.png */; }; + F2C7C9197264E699F13B36D0792FE830 /* UIImage+zx.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5829A7F278052B5713C341496635E15 /* UIImage+zx.swift */; }; + F7C1E38010A90BFF65F3A994C8BF3EA9 /* icon_home@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1D22933AA26C453D3FA9B4E04448E0AF /* icon_home@3x.png */; }; + F8F433E6546DADB088F363CEA1D00159 /* DDKitSwift.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93F39E7991DC5CD102FB510BD907F9D8 /* DDKitSwift.swift */; }; + FA7EFA6CCA3D70907B15CCE8E3A4FBEE /* NFXStatisticsController_iOS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73ED3FDB0D863DC1E0124EE06DEC60BA /* NFXStatisticsController_iOS.swift */; }; + FBFFA5B82CA7052BFE1950CB2B9FBA1C /* DDLoggerSwiftMenuCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 175D622A3C95BCB949B9B4F3D83483CE /* DDLoggerSwiftMenuCollectionViewCell.swift */; }; + FED7BC6B61F4BA6E7E394004C40EECE2 /* Date+zx.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6B53CA47A81F7D2C0100FE4EADD2A1D /* Date+zx.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 16104EB46856383FF325DF5FC9B1FDB5 /* PBXContainerItemProxy */ = { + 063289C66DED39B405DC4424D341A524 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = ACEAC673D122B792913296B416165FE0; - remoteInfo = "ZXKitLogger-ZXKitLogger"; + remoteGlobalIDString = A1166E0B033B5DCD8B18503328A162BD; + remoteInfo = DDLoggerSwift; }; - 1E88B8062081FC06F77B98D76FBAD779 /* PBXContainerItemProxy */ = { + 6BD1237CC209025430B84E2D25EA7C38 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = 33426EFE1931E100B59ABF41FD14377D; - remoteInfo = netfox; - }; - 2D72563CF32C5FDDFD702925626D158E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 6535447A49D8AE5353316E9D3CA44597; - remoteInfo = "ZXKitCore-ZXKitCore"; + remoteGlobalIDString = 763460C4E0B28EA6B8A750D8642AF267; + remoteInfo = DDUtils; }; - 4C743585DD7A6C2B7AFC69E8266EF700 /* PBXContainerItemProxy */ = { + 70EA67F8D329C3882B0061000D3E548A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = 4B09DDD2A3083E311C984F301582897A; - remoteInfo = ZXKitUtil; + remoteGlobalIDString = 763460C4E0B28EA6B8A750D8642AF267; + remoteInfo = DDUtils; }; - A10A7C1CC6567004C233144891A99D7B /* PBXContainerItemProxy */ = { + 7CA474E62CBFDD64798D5B2B74D62033 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = F60E38364AFF5E1349FF07415B944396; - remoteInfo = SSZipArchive; + remoteGlobalIDString = 3E903540BB2AEB597EFBFC8F5F01C33F; + remoteInfo = "DDKitSwift-DDKitSwift"; }; - A8102D0116307EFA6910F1407651115C /* PBXContainerItemProxy */ = { + B53840FA27357AAADE97ED84971EC664 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = 4B09DDD2A3083E311C984F301582897A; - remoteInfo = ZXKitUtil; + remoteGlobalIDString = 1199A23AE1EAA19934856C5359B5D5BE; + remoteInfo = DDKitSwift; }; - B875ED0027C7DE858969AAAC44B2E400 /* PBXContainerItemProxy */ = { + C4F88190644364F5BDDDB8EF5AA4773A /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = 4E2A67B4E83F0D031AD81CD755A5DB22; - remoteInfo = ZXKitLogger; + remoteGlobalIDString = A1166E0B033B5DCD8B18503328A162BD; + remoteInfo = DDLoggerSwift; }; - B9E2DAEDE9C2C554C1B314EA209B2B23 /* PBXContainerItemProxy */ = { + CE95AA5C1DF0E5D762D51BF2F96CCB30 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = 4E2A67B4E83F0D031AD81CD755A5DB22; - remoteInfo = ZXKitLogger; + remoteGlobalIDString = 763460C4E0B28EA6B8A750D8642AF267; + remoteInfo = DDUtils; }; - C24983E4A4371E0100FE3536AF850385 /* PBXContainerItemProxy */ = { + D683EF8D454617144AFBD0CEE8AEB6A2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = 23CC5B423FA68CF6FCACD593F1FEDCF6; - remoteInfo = ZXKitCore; + remoteGlobalIDString = 53280B0B690F632E21ADED6BA1A17543; + remoteInfo = "DDLoggerSwift-DDLoggerSwift"; }; - D8881B3C94FD15537DF2CB174DF428CF /* PBXContainerItemProxy */ = { + D8D958D56F63081B2F6662143613AA92 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = 4B09DDD2A3083E311C984F301582897A; - remoteInfo = ZXKitUtil; - }; - E74032BCAD243489C73BCA6F4339CFF7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; - proxyType = 1; - remoteGlobalIDString = F60E38364AFF5E1349FF07415B944396; - remoteInfo = SSZipArchive; + remoteGlobalIDString = 33426EFE1931E100B59ABF41FD14377D; + remoteInfo = netfox; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 0167BC2FFCAEB97A8605B52787F6A6E3 /* mz_strm_os.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mz_strm_os.h; path = SSZipArchive/minizip/mz_strm_os.h; sourceTree = ""; }; - 017F068828884D46521192547057BED8 /* NFXImageBodyDetailsController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXImageBodyDetailsController.swift; path = netfox/Core/NFXImageBodyDetailsController.swift; sourceTree = ""; }; - 029E633F96E0572A701C011B0C9C54D5 /* icon_normal_back.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = icon_normal_back.png; path = pod/assets/icon/icon_normal_back.png; sourceTree = ""; }; - 03BD8B6DD42BCDA27F5FDA183332097D /* icon_home@3x.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = "icon_home@3x.png"; path = "pod/assets/icon/icon_home@3x.png"; sourceTree = ""; }; - 0409EE68E5A615B1E57297F4E7EB073F /* icon_scale.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = icon_scale.png; path = pod/assets/icon/icon_scale.png; sourceTree = ""; }; - 0445BAF27BC2AD7AB70C4AA9E5915BD5 /* CircleMenu.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CircleMenu.swift; path = pod/menu/CircleMenu.swift; sourceTree = ""; }; - 091848F99E0718D86D9653EBFCEAAEF5 /* icon_back.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = icon_back.png; path = pod/assets/icon/icon_back.png; sourceTree = ""; }; - 0C8B6F37606052F053FE15C784F1F944 /* NFXListCell_iOS.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXListCell_iOS.swift; path = netfox/iOS/NFXListCell_iOS.swift; sourceTree = ""; }; - 0D341A77CD427A872FC7E8F5CDD9E3C6 /* Pods-netfox-zxkit */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = "Pods-netfox-zxkit"; path = Pods_netfox_zxkit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 0E060ED4B31F0DB72CD3188A20E12FC1 /* mz_compat.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mz_compat.h; path = SSZipArchive/minizip/mz_compat.h; sourceTree = ""; }; - 0F0AEFBC080BDE74B4233B23EC6C22D1 /* icon_share@3x.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = "icon_share@3x.png"; path = "pod/assets/icon/icon_share@3x.png"; sourceTree = ""; }; - 10A2068553EB876AE0F05EA4EFC3C4BB /* NFXListController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXListController.swift; path = netfox/Core/NFXListController.swift; sourceTree = ""; }; - 10A42749B05E4B6A7EA0CB3DD5EB4CCC /* mz_strm_mem.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mz_strm_mem.h; path = SSZipArchive/minizip/mz_strm_mem.h; sourceTree = ""; }; - 12277DBD9D8EBC869D96A71FDE6D8B5F /* NFXConstants.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXConstants.swift; path = netfox/Core/NFXConstants.swift; sourceTree = ""; }; - 14633C7D8F8BA0811391B1114AED9C93 /* ZXKitCore-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ZXKitCore-prefix.pch"; sourceTree = ""; }; - 1640BDE71BDD4279EC8FFF28DF51FE3C /* mz_strm_mem.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_strm_mem.c; path = SSZipArchive/minizip/mz_strm_mem.c; sourceTree = ""; }; - 17698F1F65B8DBE0535EA3C394937285 /* ZXKitLoggerMenuView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ZXKitLoggerMenuView.swift; path = pod/view/ZXKitLoggerMenuView.swift; sourceTree = ""; }; - 188AE37E6F5E5BF4F8718CAF1F4FD7FF /* NFXSettingsController_iOS.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXSettingsController_iOS.swift; path = netfox/iOS/NFXSettingsController_iOS.swift; sourceTree = ""; }; - 19B4CCFF6F020B12DD03BF84C2EC2D54 /* ZXKitCore */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = ZXKitCore; path = ZXKitCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 1B283D1C146640E56C639E31D6CCB12C /* ZXKitUtil+media.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ZXKitUtil+media.swift"; path = "pod/ZXKitUtil+media.swift"; sourceTree = ""; }; - 1C07E9EDC9A0214194D214BAE8788414 /* ZXKitFloatWindow.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ZXKitFloatWindow.swift; path = pod/ZXKitFloatWindow.swift; sourceTree = ""; }; - 1C889A2D3CD4893D5E3E5B1225DED48D /* mz_strm_pkcrypt.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mz_strm_pkcrypt.h; path = SSZipArchive/minizip/mz_strm_pkcrypt.h; sourceTree = ""; }; - 1F8D58C0DE9A4BAD84D01E7C9080DB21 /* mz_strm_zlib.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mz_strm_zlib.h; path = SSZipArchive/minizip/mz_strm_zlib.h; sourceTree = ""; }; - 211F54B496AD19C55EA45E2F2DF0D33F /* ResourceBundle-ZXKitCore-ZXKitCore-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ResourceBundle-ZXKitCore-ZXKitCore-Info.plist"; sourceTree = ""; }; - 2167A7D7ECBA03E92A72715E5D0910D7 /* NFXHelper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXHelper.swift; path = netfox/Core/NFXHelper.swift; sourceTree = ""; }; - 21B26190117DF58D164F7A1D0FC07C97 /* icon_close@3x.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = "icon_close@3x.png"; path = "pod/assets/icon/icon_close@3x.png"; sourceTree = ""; }; - 24C5CC8BCD63DD5B8F5FFFAE8AF9ED61 /* netfox-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "netfox-umbrella.h"; sourceTree = ""; }; - 274E0A1495A50CB474A40FEF9289E868 /* NFXDetailsController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXDetailsController.swift; path = netfox/Core/NFXDetailsController.swift; sourceTree = ""; }; - 276E0AF1306F1E93521E8085353F27C4 /* ZXKitPluginCollectionViewCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ZXKitPluginCollectionViewCell.swift; path = pod/ZXKitPluginCollectionViewCell.swift; sourceTree = ""; }; - 27F88506F1A8B0FDC2A9BEF148E6470F /* HDSqliteTools.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HDSqliteTools.swift; path = pod/HDSqliteTools.swift; sourceTree = ""; }; - 2C23EBF54AFABCFA0132B65C073F1EF0 /* ZXKitWindow.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ZXKitWindow.swift; path = pod/ZXKitWindow.swift; sourceTree = ""; }; - 2C54A44EDA63784147D07E86AAB3D9A3 /* mz_strm_wzaes.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_strm_wzaes.c; path = SSZipArchive/minizip/mz_strm_wzaes.c; sourceTree = ""; }; - 2CE25B5FEC019CD6F9D07196C58A1F08 /* NFXDetailsController_iOS.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXDetailsController_iOS.swift; path = netfox/iOS/NFXDetailsController_iOS.swift; sourceTree = ""; }; - 2D912DCBD4553B8C20167F3FFC64694C /* NFXSettingsController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXSettingsController.swift; path = netfox/Core/NFXSettingsController.swift; sourceTree = ""; }; - 2DD86A35A440A3D03F4341584B93EF64 /* ZXKitUtil */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = ZXKitUtil; path = ZXKitUtil.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 2EEDA1CDABECE662BA9346AEA4B9CEF9 /* Pods-netfox-zxkit-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-netfox-zxkit-acknowledgements.markdown"; sourceTree = ""; }; - 2F70AA1830A13D3821B0EAEC2EE80C26 /* mz_os.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_os.c; path = SSZipArchive/minizip/mz_os.c; sourceTree = ""; }; - 332ADAB8C86CD40E14F4A5A4274FD6DB /* ZXKitUtil+system.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ZXKitUtil+system.swift"; path = "pod/ZXKitUtil+system.swift"; sourceTree = ""; }; - 342AF2072D098E4581A9164B460C206E /* NFX.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFX.swift; path = netfox/Core/NFX.swift; sourceTree = ""; }; - 343FDDDDAF59AAA56D8FBE32990728A6 /* Localizable.strings */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.strings; name = Localizable.strings; path = en.lproj/Localizable.strings; sourceTree = ""; }; - 35F868145E5165003FE6ACEF121F2A31 /* SSZipArchive-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SSZipArchive-umbrella.h"; sourceTree = ""; }; - 368531A24D4173FFA9B0D83E67408C2C /* icon_exit.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = icon_exit.png; path = pod/assets/icon/icon_exit.png; sourceTree = ""; }; - 39C26435D949588A24FF90CB8D94BEB2 /* SSZipArchive.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SSZipArchive.h; path = SSZipArchive/SSZipArchive.h; sourceTree = ""; }; - 3A11A9F01B939E32EE3896A2878E0F8F /* zx_logo@3x.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = "zx_logo@3x.png"; path = "pod/assets/icon/zx_logo@3x.png"; sourceTree = ""; }; - 3CA96854097640C54AC3CAB5D2C6D991 /* mz_crypt_apple.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_crypt_apple.c; path = SSZipArchive/minizip/mz_crypt_apple.c; sourceTree = ""; }; - 3E4AFB1608515824864D0C9B0B85D8D3 /* ZXKitLogger */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = ZXKitLogger; path = ZXKitLogger.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 3E58941146F6E2C8C0C9E502189D8F10 /* ZXKitCore-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ZXKitCore-Info.plist"; sourceTree = ""; }; - 3F4C1F93115EB09271891214991F3110 /* netfox-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "netfox-dummy.m"; sourceTree = ""; }; - 434BDBFC3DD1A54899173E94E3DCA060 /* ZXKitLoggerWindow.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ZXKitLoggerWindow.swift; path = pod/ZXKitLoggerWindow.swift; sourceTree = ""; }; - 4383BA4FB69BA211D4A0988849EBCDC3 /* SSZipArchive-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "SSZipArchive-Info.plist"; sourceTree = ""; }; - 44989837B31F21C138F66624D96C1632 /* logger_logo@3x.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = "logger_logo@3x.png"; path = "pod/assets/icon/logger_logo@3x.png"; sourceTree = ""; }; - 48CC00B47B6B7E94C88C7BEB448C3171 /* NFXStatisticsController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXStatisticsController.swift; path = netfox/Core/NFXStatisticsController.swift; sourceTree = ""; }; - 4BC703A81196D6F5F8D3EF0BAB472E89 /* mz_zip_rw.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mz_zip_rw.h; path = SSZipArchive/minizip/mz_zip_rw.h; sourceTree = ""; }; - 4C4AE2673E47A49A58755A7CE3A3684D /* ZXKitLogger-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ZXKitLogger-umbrella.h"; sourceTree = ""; }; - 4C999CBA21A732E690E9D0A63A038FB7 /* icon_search.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = icon_search.png; path = pod/assets/icon/icon_search.png; sourceTree = ""; }; - 4CAF27289C0227B6047B8CEB45FB0D74 /* NFXURLDetailsControllerViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXURLDetailsControllerViewController.swift; path = netfox/iOS/NFXURLDetailsControllerViewController.swift; sourceTree = ""; }; - 4E8AD0AAA96B52A277AEB069DE0F84AF /* ZXKitUtil.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = ZXKitUtil.modulemap; sourceTree = ""; }; - 4FB6405D61298A835CF8B4F208DDEE95 /* mz_crypt.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mz_crypt.h; path = SSZipArchive/minizip/mz_crypt.h; sourceTree = ""; }; - 54AF4D974AB8C5D6DEC4107F214A5BB5 /* icon_hide.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = icon_hide.png; path = pod/assets/icon/icon_hide.png; sourceTree = ""; }; - 54E286FD39938F603C85ACC3F69410F0 /* Localizable.strings */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.strings; name = Localizable.strings; path = en.lproj/Localizable.strings; sourceTree = ""; }; - 5744560F468CD1C3ED79CB3704B5FFAB /* ZXKitUtil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ZXKitUtil.swift; path = pod/ZXKitUtil.swift; sourceTree = ""; }; - 59A3A18AA771E239753B8F5EEDD866A4 /* ZXKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ZXKit.swift; path = pod/ZXKit.swift; sourceTree = ""; }; - 5AB4D46949DB003E54107DA00A884FBB /* icon */ = {isa = PBXFileReference; includeInIndex = 1; name = icon; path = pod/assets/icon; sourceTree = ""; }; - 60A945577FDE796318DF59CE344F3FDF /* netfox.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = netfox.debug.xcconfig; sourceTree = ""; }; - 60D656E9A5BBD0AF042833FDA76049E7 /* mz_zip.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_zip.c; path = SSZipArchive/minizip/mz_zip.c; sourceTree = ""; }; - 634B12EA16374DEBFC2C54AE00E37B4E /* icon_upload.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = icon_upload.png; path = pod/assets/icon/icon_upload.png; sourceTree = ""; }; - 651334ABA8E1EAE0C1E8B90A91564D11 /* ZXKitLogger.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ZXKitLogger.swift; path = pod/ZXKitLogger.swift; sourceTree = ""; }; - 6616871FCB1AD9A871E643FBFD8BB508 /* mz_strm_buf.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_strm_buf.c; path = SSZipArchive/minizip/mz_strm_buf.c; sourceTree = ""; }; - 6754418E28E5D2477B6349618288B7F1 /* ResourceBundle-ZXKitLogger-ZXKitLogger-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ResourceBundle-ZXKitLogger-ZXKitLogger-Info.plist"; sourceTree = ""; }; - 6755DA97920CE51C5F4D276CD4A2EF94 /* ZXKitUtil-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "ZXKitUtil-dummy.m"; sourceTree = ""; }; - 68BCDC39105B20BE7FC85B7C0CDA03A6 /* Pods-netfox-zxkit.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-netfox-zxkit.release.xcconfig"; sourceTree = ""; }; - 6E8E794E96A7AABDBB802802D089E6E1 /* UIColor+zx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIColor+zx.swift"; path = "pod/extend/UIColor+zx.swift"; sourceTree = ""; }; - 747F1C5F8C2FD118A38E033392BD89DA /* ZXKitCore.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = ZXKitCore.modulemap; sourceTree = ""; }; - 7797C229A030A79ABD1513934B323707 /* ZXKitUtil.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = ZXKitUtil.debug.xcconfig; sourceTree = ""; }; - 782712DB3F2E5A8CF3F322D1DF9A8CB5 /* SSZipArchive-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SSZipArchive-dummy.m"; sourceTree = ""; }; - 78CF5FBACB0DFEA2E03BC70D1833420E /* icon */ = {isa = PBXFileReference; includeInIndex = 1; name = icon; path = pod/assets/icon; sourceTree = ""; }; - 79834805CC63935DA1B1D4CD6286C1E8 /* NFXAuthenticationChallengeSender.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXAuthenticationChallengeSender.swift; path = netfox/Core/NFXAuthenticationChallengeSender.swift; sourceTree = ""; }; - 7A61197173FBCAA814732CCA8E9B5853 /* ZXKitLoggerItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ZXKitLoggerItem.swift; path = pod/ZXKitLoggerItem.swift; sourceTree = ""; }; - 7AA31C6375F183EA6F51EA675FA57EEE /* ZXKitLogger-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ZXKitLogger-prefix.pch"; sourceTree = ""; }; - 7FC6274779E0A73FC8D5632C03C245FC /* ZXKitUtil+file.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ZXKitUtil+file.swift"; path = "pod/ZXKitUtil+file.swift"; sourceTree = ""; }; - 817CF017300A77F4A5662603CAA0FBFC /* NFXListController_iOS.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXListController_iOS.swift; path = netfox/iOS/NFXListController_iOS.swift; sourceTree = ""; }; - 81B06127C905895ADCC3BD98DEDCFA5F /* ZXKitNameSpace.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ZXKitNameSpace.swift; path = pod/extend/ZXKitNameSpace.swift; sourceTree = ""; }; - 8859EF41700E7E6B3F5AB9A8F837AAC7 /* NFXGenericBodyDetailsController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXGenericBodyDetailsController.swift; path = netfox/Core/NFXGenericBodyDetailsController.swift; sourceTree = ""; }; - 8A1C42BB0445A6105A6441032CAF8A42 /* mz_zip_rw.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_zip_rw.c; path = SSZipArchive/minizip/mz_zip_rw.c; sourceTree = ""; }; - 8A96FB16A9ACF544186F6AB332BFCD92 /* mz_strm_pkcrypt.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_strm_pkcrypt.c; path = SSZipArchive/minizip/mz_strm_pkcrypt.c; sourceTree = ""; }; - 8A9FC2777BA9139AB7A0A3A721416875 /* CircleMenuMaskView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CircleMenuMaskView.swift; path = pod/menu/CircleMenuMaskView.swift; sourceTree = ""; }; - 8BE674746D866EEF7B2DFA5752C5B3FE /* String+zx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+zx.swift"; path = "pod/extend/String+zx.swift"; sourceTree = ""; }; - 8D0BAC8A47751D93162C617C788E922F /* ZXKitUtil-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ZXKitUtil-umbrella.h"; sourceTree = ""; }; - 8E2BAEB2106BE699780B6F27D213EAC4 /* mz_crypt.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_crypt.c; path = SSZipArchive/minizip/mz_crypt.c; sourceTree = ""; }; - 8E70F20796A8FD8286FD42C73C90A710 /* CircleMenuButton.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CircleMenuButton.swift; path = pod/menu/CircleMenuButton/CircleMenuButton.swift; sourceTree = ""; }; - 8EC6C943326D5FB2E5953246A5761534 /* Data+zx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Data+zx.swift"; path = "pod/extend/Data+zx.swift"; sourceTree = ""; }; - 8F38D985BE628643645FFC19916D74FD /* Pods-netfox-zxkit-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-netfox-zxkit-acknowledgements.plist"; sourceTree = ""; }; - 9116634DAC397EA301AD468FD55F9F5B /* ZXKitCollectionViewHeaderView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ZXKitCollectionViewHeaderView.swift; path = pod/ZXKitCollectionViewHeaderView.swift; sourceTree = ""; }; - 91B23470DEB9A986332BEB5034234BC7 /* SSZipArchive */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = SSZipArchive; path = SSZipArchive.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 952925E838A0DE4D7BDC4EE54022633D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 96C7B862918F1432EFA5509AF30FE080 /* icon_search@3x.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = "icon_search@3x.png"; path = "pod/assets/icon/icon_search@3x.png"; sourceTree = ""; }; - 9778E083D83D02212FE72828609CBB7F /* SSZipArchive.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SSZipArchive.debug.xcconfig; sourceTree = ""; }; - 98E1E42D21D0672A33C5A17DB35CC55B /* localizable */ = {isa = PBXFileReference; includeInIndex = 1; name = localizable; path = pod/assets/localizable; sourceTree = ""; }; - 9A0385C4C19CC50137018FB831373EDC /* ZXKitLogger-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "ZXKitLogger-dummy.m"; sourceTree = ""; }; - 9C8A957F846B4AAD5F39C4ACBFF0B6B6 /* Localizable.strings */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.strings; name = Localizable.strings; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = ""; }; - 9D15A458909A3D897282FB39198E8A69 /* mz_os.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mz_os.h; path = SSZipArchive/minizip/mz_os.h; sourceTree = ""; }; + 0219D5BE736BE1759A92D1051EDA9848 /* ShareTools.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShareTools.swift; path = pod/extend/ShareTools.swift; sourceTree = ""; }; + 03AFBAA6AC01F15D173B46D34919A9FB /* netfox.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = netfox.release.xcconfig; sourceTree = ""; }; + 056240688AEB2FCB751F21A88D189646 /* icon_share.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = icon_share.png; path = pod/assets/icon/icon_share.png; sourceTree = ""; }; + 0C4313D25CA65C9DE70DA9F619A808EB /* UIColor+zx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIColor+zx.swift"; path = "pod/subspec/UI/UIColor+zx.swift"; sourceTree = ""; }; + 0C4D6BD725CE1DC9949F670FABC9DB9B /* DDUtils.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = DDUtils.modulemap; sourceTree = ""; }; + 0C61C053758775B0896507D1B58C44B9 /* icon_copy.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = icon_copy.png; path = pod/assets/icon/icon_copy.png; sourceTree = ""; }; + 0FD28C08421A4C12E041B334B2B14D51 /* NFXHTTPModel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXHTTPModel.swift; path = netfox/Core/NFXHTTPModel.swift; sourceTree = ""; }; + 13ABB90B0639472FB477947B874BE7B7 /* Pods-DDKitSwift-Netfox-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-DDKitSwift-Netfox-umbrella.h"; sourceTree = ""; }; + 165133718495D85C39D47A2E3BC16149 /* netfox.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = netfox.modulemap; sourceTree = ""; }; + 16F03F251D183FD9547930E13B603DBE /* Pods-DDKitSwift-Netfox-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-DDKitSwift-Netfox-acknowledgements.markdown"; sourceTree = ""; }; + 175D622A3C95BCB949B9B4F3D83483CE /* DDLoggerSwiftMenuCollectionViewCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DDLoggerSwiftMenuCollectionViewCell.swift; path = pod/view/DDLoggerSwiftMenuCollectionViewCell.swift; sourceTree = ""; }; + 1D22933AA26C453D3FA9B4E04448E0AF /* icon_home@3x.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = "icon_home@3x.png"; path = "pod/assets/icon/icon_home@3x.png"; sourceTree = ""; }; + 1D7850912350CD0EDAB0CAD68EEA2440 /* icon_notice@3x.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = "icon_notice@3x.png"; path = "pod/assets/icon/icon_notice@3x.png"; sourceTree = ""; }; + 1DB0232721519874DFDF2B0B689DE36E /* DDKitSwiftPluginCollectionViewCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DDKitSwiftPluginCollectionViewCell.swift; path = pod/DDKitSwiftPluginCollectionViewCell.swift; sourceTree = ""; }; + 201D2CC3B8ABFD37E3279660025FA5B8 /* DDLoggerSwift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "DDLoggerSwift-dummy.m"; sourceTree = ""; }; + 27D398781691B300100F4DD3AB60ABD0 /* DDLoggerSwiftPickerWindow.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DDLoggerSwiftPickerWindow.swift; path = pod/DDLoggerSwiftPickerWindow.swift; sourceTree = ""; }; + 29B810047C43CEF94DA7809FD775EFB0 /* DDLoggerSwiftFilterTypeView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DDLoggerSwiftFilterTypeView.swift; path = pod/view/DDLoggerSwiftFilterTypeView.swift; sourceTree = ""; }; + 31318EAED43088B4F46A933A28C3AB39 /* DDLoggerSwift.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DDLoggerSwift.swift; path = pod/DDLoggerSwift.swift; sourceTree = ""; }; + 31554135E1CCDA52688C326F04180EEF /* NFXAssets.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXAssets.swift; path = netfox/Core/NFXAssets.swift; sourceTree = ""; }; + 334ADB6A89487748EB4351AB44C2F231 /* DDKitSwift.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = DDKitSwift.debug.xcconfig; sourceTree = ""; }; + 336A19806FCBF767899FDD8B5ADFF9F3 /* DDKitSwift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "DDKitSwift-dummy.m"; sourceTree = ""; }; + 34965EAB35E1AA4044EA5DDEAD929411 /* Pods-DDKitSwift-Netfox-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-DDKitSwift-Netfox-acknowledgements.plist"; sourceTree = ""; }; + 36E4EEFA94D3D743E0DFA989C554CB6A /* netfox-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "netfox-umbrella.h"; sourceTree = ""; }; + 36F7AECDE23A46A541C5EEC64492FA1D /* NFXGenericController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXGenericController.swift; path = netfox/Core/NFXGenericController.swift; sourceTree = ""; }; + 381BE9550AA0AAB4E5C4FC8ED5F4D646 /* netfox-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "netfox-prefix.pch"; sourceTree = ""; }; + 386AE9F9ADA2776500C6FB7FE3451AFC /* DDUtils+media.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DDUtils+media.swift"; path = "pod/subspec/utils/DDUtils+media.swift"; sourceTree = ""; }; + 3A9D46A5C0EEF6ED39BEE374963B1D77 /* DDUtils+AppStore.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DDUtils+AppStore.swift"; path = "pod/subspec/UI/DDUtils+AppStore.swift"; sourceTree = ""; }; + 3AEA1C8D3C72A23D084C539F8D61560F /* NFXAuthenticationChallengeSender.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXAuthenticationChallengeSender.swift; path = netfox/Core/NFXAuthenticationChallengeSender.swift; sourceTree = ""; }; + 3C70DE7EE591511158A4E9AB9E7A4CE3 /* ZXKitNameSpace.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ZXKitNameSpace.swift; path = pod/ZXKitNameSpace.swift; sourceTree = ""; }; + 3FE020B715B1BD769CC0B5B63387588D /* UIView+zx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIView+zx.swift"; path = "pod/subspec/UI/UIView+zx.swift"; sourceTree = ""; }; + 3FFD005988118EF7155CDC5EC9F75943 /* ResourceBundle-DDKitSwift-DDKitSwift-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ResourceBundle-DDKitSwift-DDKitSwift-Info.plist"; sourceTree = ""; }; + 40B53CD1D91ECF0CFF41BE3CAD375FB2 /* NFXDetailsController_iOS.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXDetailsController_iOS.swift; path = netfox/iOS/NFXDetailsController_iOS.swift; sourceTree = ""; }; + 41BACB3302198FD24A48B2745EB4292E /* icon_normal_back.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = icon_normal_back.png; path = pod/assets/icon/icon_normal_back.png; sourceTree = ""; }; + 427174D58B8BCDBF2CF24D7217A6464F /* NFXListCell_iOS.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXListCell_iOS.swift; path = netfox/iOS/NFXListCell_iOS.swift; sourceTree = ""; }; + 42BC87197FBEAB8FC01BB0A8C1EA846F /* NFXInfoController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXInfoController.swift; path = netfox/Core/NFXInfoController.swift; sourceTree = ""; }; + 47BEF63EE9CFC08DF26783BCFAC0CE9B /* icon */ = {isa = PBXFileReference; includeInIndex = 1; name = icon; path = pod/assets/icon; sourceTree = ""; }; + 4B2508750853E0D84C25BDCF252AE633 /* DDLoggerSwiftFloatWindow.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DDLoggerSwiftFloatWindow.swift; path = pod/DDLoggerSwiftFloatWindow.swift; sourceTree = ""; }; + 4C0A2B89F7F0B06B4DFE6E95D5A373BF /* DDLoggerSwift.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = DDLoggerSwift.debug.xcconfig; sourceTree = ""; }; + 4C86CAD86944BC77FA34545A11846915 /* icon_upload.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = icon_upload.png; path = pod/assets/icon/icon_upload.png; sourceTree = ""; }; + 4CF483B4AE7D5B0DDFBA138D3EF70C58 /* DDLoggerSwiftTableViewCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DDLoggerSwiftTableViewCell.swift; path = pod/view/DDLoggerSwiftTableViewCell.swift; sourceTree = ""; }; + 4EDEE5E9C6483B4E2460600AFAE0AF6C /* DDLoggerSwift+ddkit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DDLoggerSwift+ddkit.swift"; path = "pod/extend/DDLoggerSwift+ddkit.swift"; sourceTree = ""; }; + 52FB56BD2919B4E03A3C66522D27A334 /* NFXInfoController_iOS.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXInfoController_iOS.swift; path = netfox/iOS/NFXInfoController_iOS.swift; sourceTree = ""; }; + 54E2CC6F99945DF20876CC021B099A3D /* Pods-DDKitSwift-Netfox-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-DDKitSwift-Netfox-dummy.m"; sourceTree = ""; }; + 5769A36AB02048A6E87D4A3E4CC36B3A /* NFXStatisticsController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXStatisticsController.swift; path = netfox/Core/NFXStatisticsController.swift; sourceTree = ""; }; + 57D0D4AEEE40F76E88BB2881900BBCC1 /* DDUtils-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "DDUtils-umbrella.h"; sourceTree = ""; }; + 5A81A254014253D9175C08475A40E53C /* NFXListController_iOS.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXListController_iOS.swift; path = netfox/iOS/NFXListController_iOS.swift; sourceTree = ""; }; + 5B80F735F4D2199CF8CFC9266CC21819 /* Localizable.strings */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.strings; name = Localizable.strings; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = ""; }; + 5BD2153FEE8B1FCD7FAFD9871F7B1EA8 /* Localizable.strings */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.strings; name = Localizable.strings; path = en.lproj/Localizable.strings; sourceTree = ""; }; + 5BD6B450D72E01C4676D40BBFD5F1646 /* logger_logo@3x.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = "logger_logo@3x.png"; path = "pod/assets/icon/logger_logo@3x.png"; sourceTree = ""; }; + 5C2EE2D7D9B8F6C0E2D44FE465167274 /* Pods-DDKitSwift-Netfox.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-DDKitSwift-Netfox.modulemap"; sourceTree = ""; }; + 5D53846CC170AC635C3AAC75376458F2 /* DDLoggerSwift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = DDLoggerSwift.modulemap; sourceTree = ""; }; + 63C6593064932171C3E6757B3A88CAFA /* icon_scroll.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = icon_scroll.png; path = pod/assets/icon/icon_scroll.png; sourceTree = ""; }; + 6472B8943890130F6F59B9677157566A /* CircleMenuMaskView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CircleMenuMaskView.swift; path = pod/menu/CircleMenuMaskView.swift; sourceTree = ""; }; + 64F5F1E895FEFE072AED3E956246EE16 /* DDKitSwiftCollectionViewHeaderView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DDKitSwiftCollectionViewHeaderView.swift; path = pod/DDKitSwiftCollectionViewHeaderView.swift; sourceTree = ""; }; + 67832819087A20EE754DB49E95EE7861 /* DDKitSwift-DDKitSwift */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = "DDKitSwift-DDKitSwift"; path = DDKitSwift.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; + 6EE26D836377CA863AAAF9260E9EA901 /* DDLoggerSwift-DDLoggerSwift */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = "DDLoggerSwift-DDLoggerSwift"; path = DDLoggerSwift.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; + 6F0D35BBC6ECE7ADFA11B5958DDB8538 /* DDKitSwiftWindow.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DDKitSwiftWindow.swift; path = pod/DDKitSwiftWindow.swift; sourceTree = ""; }; + 6F9610380BB071F13D370CCEE50C129E /* NFX.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFX.swift; path = netfox/Core/NFX.swift; sourceTree = ""; }; + 701999FCFFC3A449FF1CE654ADB393BB /* DDLoggerSwiftWindow.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DDLoggerSwiftWindow.swift; path = pod/DDLoggerSwiftWindow.swift; sourceTree = ""; }; + 706EE7625BAD729B4FB16DCDE4A7374E /* NFXHelper_iOS.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXHelper_iOS.swift; path = netfox/iOS/NFXHelper_iOS.swift; sourceTree = ""; }; + 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 73C34578ECDADDB9C4A17E88ED3D7328 /* icon_delete.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = icon_delete.png; path = pod/assets/icon/icon_delete.png; sourceTree = ""; }; + 73ED3FDB0D863DC1E0124EE06DEC60BA /* NFXStatisticsController_iOS.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXStatisticsController_iOS.swift; path = netfox/iOS/NFXStatisticsController_iOS.swift; sourceTree = ""; }; + 74257CD6172D2B28D7A16A55FA4A2651 /* icon_search@3x.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = "icon_search@3x.png"; path = "pod/assets/icon/icon_search@3x.png"; sourceTree = ""; }; + 755E8DF29A132232481804C5FF6A6082 /* NFXListController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXListController.swift; path = netfox/Core/NFXListController.swift; sourceTree = ""; }; + 79D6B9CD3217E71078FE9ED185F684C2 /* DDKitSwiftUIConfig.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DDKitSwiftUIConfig.swift; path = pod/DDKitSwiftUIConfig.swift; sourceTree = ""; }; + 7A53DEF5C53BD8D942FA71D283476D96 /* Pods-DDKitSwift-Netfox.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-DDKitSwift-Netfox.release.xcconfig"; sourceTree = ""; }; + 7EACF54BF9400DD3CDF47A8DD3E0EC29 /* NFXDetailsController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXDetailsController.swift; path = netfox/Core/NFXDetailsController.swift; sourceTree = ""; }; + 8002E118F7807644DEBB4838706EF53D /* icon_close@3x.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = "icon_close@3x.png"; path = "pod/assets/icon/icon_close@3x.png"; sourceTree = ""; }; + 807787D8F4F457841F3CF78C148FDA0C /* netfox.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = netfox.debug.xcconfig; sourceTree = ""; }; + 80E015C7CB963A6788ED89F8D1E7CDC1 /* localizable */ = {isa = PBXFileReference; includeInIndex = 1; name = localizable; path = pod/assets/localizable; sourceTree = ""; }; + 8123F4BA68B8D76199CF62874EF5E731 /* icon_share@3x.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = "icon_share@3x.png"; path = "pod/assets/icon/icon_share@3x.png"; sourceTree = ""; }; + 831A1873B788151B10851A4C7888E2E0 /* Localizable.strings */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.strings; name = Localizable.strings; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = ""; }; + 8324CA4C790A3D7719E7573DF61E66ED /* DDUtils-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "DDUtils-Info.plist"; sourceTree = ""; }; + 83971684DD7CE36BFC05C1B3E098B4AD /* NFXHelper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXHelper.swift; path = netfox/Core/NFXHelper.swift; sourceTree = ""; }; + 84C1578B38ED2B5AF8E8CC6FF098D08D /* icon_search.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = icon_search.png; path = pod/assets/icon/icon_search.png; sourceTree = ""; }; + 85EA5E90B0FECA37580C57BB84102ADB /* String+zx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+zx.swift"; path = "pod/subspec/utils/String+zx.swift"; sourceTree = ""; }; + 862EEF4075B8A9448F8F72AFDE91B6E4 /* DDUtils.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = DDUtils.release.xcconfig; sourceTree = ""; }; + 8A2E3A97B0A4837D98EB60B518B1E2A9 /* NFXImageBodyDetailsController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXImageBodyDetailsController.swift; path = netfox/Core/NFXImageBodyDetailsController.swift; sourceTree = ""; }; + 8A772792E1B991164F3F0802AA6B23D8 /* Pods-DDKitSwift-Netfox-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-DDKitSwift-Netfox-Info.plist"; sourceTree = ""; }; + 8EEADFFDEE3E8D9085ED581BC3C4D710 /* icon_hide.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = icon_hide.png; path = pod/assets/icon/icon_hide.png; sourceTree = ""; }; + 8FCF009AD4EDB0B7D1D9543999594E5F /* CircleMenuLoader.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CircleMenuLoader.swift; path = pod/menu/CircleMenuLoader/CircleMenuLoader.swift; sourceTree = ""; }; + 9082466C07D0679C2576DDFDF7148132 /* LogContent.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LogContent.swift; path = pod/LogContent.swift; sourceTree = ""; }; + 90C27D79E9FEFDBC5BB4AF88D506BD0E /* DDUtils+file.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DDUtils+file.swift"; path = "pod/subspec/utils/DDUtils+file.swift"; sourceTree = ""; }; + 926126915C67CE944550CFC9DFDF26A8 /* icon_list@3x.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = "icon_list@3x.png"; path = "pod/assets/icon/icon_list@3x.png"; sourceTree = ""; }; + 93D2C5E9C0DA42D3399ADCAED8F23E9A /* DDKitSwiftFloatWindow.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DDKitSwiftFloatWindow.swift; path = pod/DDKitSwiftFloatWindow.swift; sourceTree = ""; }; + 93F39E7991DC5CD102FB510BD907F9D8 /* DDKitSwift.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DDKitSwift.swift; path = pod/DDKitSwift.swift; sourceTree = ""; }; + 9522398E75699B8F92C8E7B22F8AEB98 /* icon_back.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = icon_back.png; path = pod/assets/icon/icon_back.png; sourceTree = ""; }; + 959883F42E278A48DBC97DF10A83D93C /* Pods-DDKitSwift-Netfox-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-DDKitSwift-Netfox-frameworks.sh"; sourceTree = ""; }; + 96BEB5E416825EDBA6D54EAEE81E37D9 /* Data+zx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Data+zx.swift"; path = "pod/subspec/utils/Data+zx.swift"; sourceTree = ""; }; + 99C7843B5FBA1C8AA8D46E6286665759 /* NFXWindowController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXWindowController.swift; path = netfox/Core/NFXWindowController.swift; sourceTree = ""; }; + 9B93E2E29DC3D3D735AD26EB0D98B913 /* ResourceBundle-DDLoggerSwift-DDLoggerSwift-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ResourceBundle-DDLoggerSwift-DDLoggerSwift-Info.plist"; sourceTree = ""; }; + 9BC8917C5BE7A44EC257E6AE77E3F8FE /* NFXSettingsController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXSettingsController.swift; path = netfox/Core/NFXSettingsController.swift; sourceTree = ""; }; 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 9E18053767C79AD8CCD929DBE7CEBC90 /* netfox.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = netfox.modulemap; sourceTree = ""; }; - 9EF6CEE0DCB6120D5CEE31D53ADDCA6D /* netfox-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "netfox-prefix.pch"; sourceTree = ""; }; - 9EFAC36F161CF07B614D3EED99BC166D /* ZXKitUtil-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ZXKitUtil-prefix.pch"; sourceTree = ""; }; - A3529439853A1B2F1213F5DF5EF32896 /* ZXKitLoggerTableViewCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ZXKitLoggerTableViewCell.swift; path = pod/view/ZXKitLoggerTableViewCell.swift; sourceTree = ""; }; - A4CCD4AD13ED57B9E203B2DE6851C780 /* NFXHTTPModel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXHTTPModel.swift; path = netfox/Core/NFXHTTPModel.swift; sourceTree = ""; }; - A638499C72C6B94C551C115E634766B0 /* NFXGenericController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXGenericController.swift; path = netfox/Core/NFXGenericController.swift; sourceTree = ""; }; - A70BCB1B0E798D3E6C42ECA3DCD83F0E /* ZXKitCore-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "ZXKitCore-dummy.m"; sourceTree = ""; }; - A78EEFA921DED75D30512BDC3C46AE1C /* ZXKitCore.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = ZXKitCore.debug.xcconfig; sourceTree = ""; }; - A7C580942DAF0C0022A328FAAEB735D6 /* ZXKitUtil+permission.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ZXKitUtil+permission.swift"; path = "pod/ZXKitUtil+permission.swift"; sourceTree = ""; }; - A95B25DE6C477B23C737B4D2D3383BAA /* Pods-netfox-zxkit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-netfox-zxkit.debug.xcconfig"; sourceTree = ""; }; - A988EBDCA654EDD83E916032FE6DE6A4 /* NFXStatisticsController_iOS.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXStatisticsController_iOS.swift; path = netfox/iOS/NFXStatisticsController_iOS.swift; sourceTree = ""; }; - A9BCDC2A1A7435D343CACC5270C07042 /* SSZipArchive.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = SSZipArchive.modulemap; sourceTree = ""; }; - A9DBAC7423E4273F050893669FE33511 /* ZXKitPluginProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ZXKitPluginProtocol.swift; path = pod/ZXKitPluginProtocol.swift; sourceTree = ""; }; - A9DF394F038B3ACB2A54D774F2920A7F /* ShareTools.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ShareTools.swift; path = pod/extend/ShareTools.swift; sourceTree = ""; }; - AAB97A4E2AE8E1AD66A6725365C16FF2 /* mz_zip.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mz_zip.h; path = SSZipArchive/minizip/mz_zip.h; sourceTree = ""; }; - AB1A37BF2D4F9925374BE267891E262E /* NFXInfoController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXInfoController.swift; path = netfox/Core/NFXInfoController.swift; sourceTree = ""; }; - AB9B7A95649E514F6C627962AEB3C025 /* NFXHTTPModelManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXHTTPModelManager.swift; path = netfox/Core/NFXHTTPModelManager.swift; sourceTree = ""; }; - AD30FB5567AEDB5C0A6FEA34912F38CB /* ZXKitUtil-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ZXKitUtil-Info.plist"; sourceTree = ""; }; - ADE1E1834230EB744D1A74FBAC9859D4 /* ZXKitLogger-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ZXKitLogger-Info.plist"; sourceTree = ""; }; - AED94C2BF2AC5E200B0F1D7DF8984565 /* mz_strm_wzaes.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mz_strm_wzaes.h; path = SSZipArchive/minizip/mz_strm_wzaes.h; sourceTree = ""; }; - AFAFFDB25C6393FF4BE608AB7905D9E3 /* mz_compat.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_compat.c; path = SSZipArchive/minizip/mz_compat.c; sourceTree = ""; }; - B07132CA0C13A5B494F6452B646363CC /* mz_strm_zlib.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_strm_zlib.c; path = SSZipArchive/minizip/mz_strm_zlib.c; sourceTree = ""; }; - B16609C5E98CFE978928A80BE0668C99 /* ZXKitLoggerPickerWindow.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ZXKitLoggerPickerWindow.swift; path = pod/ZXKitLoggerPickerWindow.swift; sourceTree = ""; }; - B35A411BBACDC273345A48D91F04E0EB /* ZXKitLogger.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = ZXKitLogger.release.xcconfig; sourceTree = ""; }; - B462C8B2CB78AE609523A787505C2EB4 /* ZXKitCore-ZXKitCore */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = "ZXKitCore-ZXKitCore"; path = ZXKitCore.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; - B4B6981A43830883B1BDC93114393E96 /* icon_decrypt.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = icon_decrypt.png; path = pod/assets/icon/icon_decrypt.png; sourceTree = ""; }; - B6B9DF479C5292C0C80DD88E6A766AE9 /* SSZipArchive.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SSZipArchive.release.xcconfig; sourceTree = ""; }; - B952D11F3D2744D7DDD7BC7AFAF0795C /* ZipArchive.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ZipArchive.h; path = SSZipArchive/include/ZipArchive.h; sourceTree = ""; }; - B956D807D1938ABCC287186984F25AF5 /* NFXRawBodyDetailsController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXRawBodyDetailsController.swift; path = netfox/iOS/NFXRawBodyDetailsController.swift; sourceTree = ""; }; - BB501C722F1746B3F5A78D2964EB50A9 /* Pods-netfox-zxkit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-netfox-zxkit-umbrella.h"; sourceTree = ""; }; - BC66DCCACE7A91FCC56283CAC44529FC /* localizable */ = {isa = PBXFileReference; includeInIndex = 1; name = localizable; path = pod/assets/localizable; sourceTree = ""; }; - BD92FA6D66C406E2C5910A79438B31FA /* ZXKitLogger.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = ZXKitLogger.modulemap; sourceTree = ""; }; - BD9624031211F7F2074962D4B7652C3E /* icon_analyse.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = icon_analyse.png; path = pod/assets/icon/icon_analyse.png; sourceTree = ""; }; - BE09C088CA2B9601D10FAB6247510D14 /* ZXKitLoggerFloatWindow.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ZXKitLoggerFloatWindow.swift; path = pod/ZXKitLoggerFloatWindow.swift; sourceTree = ""; }; + 9DFC099102FF065A521B1F74B9086BF4 /* DDLoggerSwift-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "DDLoggerSwift-Info.plist"; sourceTree = ""; }; + 9E4BB3F5039575AF78B511CA0E6745DF /* netfox-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "netfox-dummy.m"; sourceTree = ""; }; + A1AB1C655F510BAC78097D702985FDEB /* DDKitSwift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = DDKitSwift.modulemap; sourceTree = ""; }; + A36F32CB6299CC10F41F088DA7A156A6 /* DDKitSwift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "DDKitSwift-prefix.pch"; sourceTree = ""; }; + A6585F805DEA896E1D4CB3E912153345 /* Localizable.strings */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.strings; name = Localizable.strings; path = en.lproj/Localizable.strings; sourceTree = ""; }; + A662AA93F65F026CEAE95B259E357B97 /* DDKitSwift */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = DDKitSwift; path = DDKitSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + A6685D443331DFF981500A9229927D96 /* DDUtils.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DDUtils.swift; path = pod/DDUtils.swift; sourceTree = ""; }; + A6779D113F799EA02A14574312505072 /* NFXHTTPModelManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXHTTPModelManager.swift; path = netfox/Core/NFXHTTPModelManager.swift; sourceTree = ""; }; + ABB3A0741935FCB8DDDC05F53305D1C9 /* DDLoggerSwift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "DDLoggerSwift-umbrella.h"; sourceTree = ""; }; + AE255513E542A7635AA924C36C07E511 /* DDUtils */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = DDUtils; path = DDUtils.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + AFB494D910A2E0F633928BCBFB998DA2 /* DDKitSwift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "DDKitSwift-umbrella.h"; sourceTree = ""; }; + B212042DC58FFE3B3DC9739C5A07E6F9 /* DDUtils+UI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DDUtils+UI.swift"; path = "pod/subspec/UI/DDUtils+UI.swift"; sourceTree = ""; }; + B2A0548EE71E05813D98D6858E362875 /* NFXURLDetailsControllerViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXURLDetailsControllerViewController.swift; path = netfox/iOS/NFXURLDetailsControllerViewController.swift; sourceTree = ""; }; + B5829A7F278052B5713C341496635E15 /* UIImage+zx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIImage+zx.swift"; path = "pod/subspec/UI/UIImage+zx.swift"; sourceTree = ""; }; + B58C8653412829011660A33F5AA37D87 /* DDUtils-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "DDUtils-prefix.pch"; sourceTree = ""; }; BF1952EA0085A4CE36B4AE041BE60B82 /* netfox */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = netfox; path = netfox.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - BF6E5831221D11DEE5D47155071601FB /* Pods-netfox-zxkit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-netfox-zxkit.modulemap"; sourceTree = ""; }; - BFB24B963110B42C3AE74786F69A1503 /* NFXHelper_iOS.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXHelper_iOS.swift; path = netfox/iOS/NFXHelper_iOS.swift; sourceTree = ""; }; - C02060E2F4856A17AF6D68BA34F72DAA /* NFXAssets.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXAssets.swift; path = netfox/Core/NFXAssets.swift; sourceTree = ""; }; - C3B2A0B779CE31153B2C0D8A7F8DC7FE /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Security.framework; sourceTree = DEVELOPER_DIR; }; - C4A28C9C8B9BFBB4278D7B59F26BB339 /* LogContent.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LogContent.swift; path = pod/LogContent.swift; sourceTree = ""; }; - C55364A1D04AF0F94E5EFEF706385E2D /* Localizable.strings */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.strings; name = Localizable.strings; path = "zh-Hans.lproj/Localizable.strings"; sourceTree = ""; }; - C6E92A31E1513765C96481CDDFBD7FB0 /* mz_strm_split.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mz_strm_split.h; path = SSZipArchive/minizip/mz_strm_split.h; sourceTree = ""; }; - C89B168488EA718C8696E0AC7A3D48AA /* mz_strm_buf.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mz_strm_buf.h; path = SSZipArchive/minizip/mz_strm_buf.h; sourceTree = ""; }; - CA4BE550EB6EC2AC8786D323709F6846 /* netfox-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "netfox-Info.plist"; sourceTree = ""; }; - CA6CA96D2CA01114C98E1C56B5B4CA9B /* SSZipCommon.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SSZipCommon.h; path = SSZipArchive/SSZipCommon.h; sourceTree = ""; }; - CAB850F66F7AE765FD9C2ACF5391A5F0 /* ZXKitLogger-ZXKitLogger */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = "ZXKitLogger-ZXKitLogger"; path = ZXKitLogger.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; - CC42F0E4B2359061A95A3F08EE9FE7DB /* UIView+zx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIView+zx.swift"; path = "pod/extend/UIView+zx.swift"; sourceTree = ""; }; - CDF98797E13A9FD4929713BF87E21937 /* NFXProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXProtocol.swift; path = netfox/Core/NFXProtocol.swift; sourceTree = ""; }; - CE0D1741E29B6A59B724C43908975932 /* Pods-netfox-zxkit-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-netfox-zxkit-frameworks.sh"; sourceTree = ""; }; - CE6A77207EC469A2837E481E94EE4071 /* icon_copy.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = icon_copy.png; path = pod/assets/icon/icon_copy.png; sourceTree = ""; }; - CF5340F3216C178CFC00065D10AC9E0A /* ZXKitUtil.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = ZXKitUtil.release.xcconfig; sourceTree = ""; }; - D020C35D7E85FB2F96EA830C32CA3D2F /* icon_share.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = icon_share.png; path = pod/assets/icon/icon_share.png; sourceTree = ""; }; - D14B31C463642C2002F5EF5813A29D75 /* netfox.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = netfox.release.xcconfig; sourceTree = ""; }; - D665EBF11BEF4E0F65361906FEF6BE82 /* mz_strm_split.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_strm_split.c; path = SSZipArchive/minizip/mz_strm_split.c; sourceTree = ""; }; - D6DA2F60BE5545E729D04F578F897D33 /* icon_setting@3x.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = "icon_setting@3x.png"; path = "pod/assets/icon/icon_setting@3x.png"; sourceTree = ""; }; - D9E51FDB7DEE50523B9F4AFDC31FB313 /* ZXKitLoggerMenuCollectionViewCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ZXKitLoggerMenuCollectionViewCell.swift; path = pod/view/ZXKitLoggerMenuCollectionViewCell.swift; sourceTree = ""; }; - D9EB0A317A10F31E2920626E042626CC /* Pods-netfox-zxkit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-netfox-zxkit-dummy.m"; sourceTree = ""; }; - DA05AAD357FB2AFBB94D4C64DD7AAF03 /* SSZipArchive-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SSZipArchive-prefix.pch"; sourceTree = ""; }; - DC74D9E5ACA8C0CB1730F331FBF24BE4 /* icon_scroll.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = icon_scroll.png; path = pod/assets/icon/icon_scroll.png; sourceTree = ""; }; - DE0D7A5FDA759CEFE0512C2BF9D4B99D /* ZXKitLogger.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = ZXKitLogger.debug.xcconfig; sourceTree = ""; }; - DE596EFEDF3C76049AD75F22B36EB333 /* Date+zx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Date+zx.swift"; path = "pod/extend/Date+zx.swift"; sourceTree = ""; }; - DF9B9B967978F9B169E088D2DD21AFF9 /* mz.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mz.h; path = SSZipArchive/minizip/mz.h; sourceTree = ""; }; - E0620B1A753629B8854ED6BBFE7CE521 /* mz_strm_os_posix.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_strm_os_posix.c; path = SSZipArchive/minizip/mz_strm_os_posix.c; sourceTree = ""; }; - E4B44CAA13AEF830A6A02DF52528D135 /* NFXWindowController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXWindowController.swift; path = netfox/Core/NFXWindowController.swift; sourceTree = ""; }; - E673EB92A59BEF4A646EC3FE4324E053 /* ZXKitCore-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ZXKitCore-umbrella.h"; sourceTree = ""; }; - E8868F7CE2A80E2289A1190101CB98DD /* ZXKitLogger+zxkit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ZXKitLogger+zxkit.swift"; path = "pod/extend/ZXKitLogger+zxkit.swift"; sourceTree = ""; }; - E977D9049E28209DFE2393A399B97AB3 /* SSZipArchive.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = SSZipArchive.m; path = SSZipArchive/SSZipArchive.m; sourceTree = ""; }; - EA0CAD0A52E03214DCC5119528A3218A /* mz_strm.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_strm.c; path = SSZipArchive/minizip/mz_strm.c; sourceTree = ""; }; - EA12FE13077487215E0A9BF4741CEBD3 /* mz_strm.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mz_strm.h; path = SSZipArchive/minizip/mz_strm.h; sourceTree = ""; }; - ECEFB45C5B66A87D7F43FE57A48180D4 /* ZXKitUtil+UI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ZXKitUtil+UI.swift"; path = "pod/ZXKitUtil+UI.swift"; sourceTree = ""; }; - ED0B55FBDE604C9312C305C4A80D62F6 /* ZXKitCore.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = ZXKitCore.release.xcconfig; sourceTree = ""; }; - EE3C0E84979780B1653968C6094F534A /* NFXInfoController_iOS.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXInfoController_iOS.swift; path = netfox/iOS/NFXInfoController_iOS.swift; sourceTree = ""; }; - EF7F4FD5A359F07F53C2673A9360C1EA /* Pods-netfox-zxkit-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-netfox-zxkit-Info.plist"; sourceTree = ""; }; - F0014AAD9C960D2894DB7A4C78E6394B /* CircleMenuLoader.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CircleMenuLoader.swift; path = pod/menu/CircleMenuLoader/CircleMenuLoader.swift; sourceTree = ""; }; - F02DE7182DF39D0E171ACCA6E5EFF059 /* UIImage+zx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIImage+zx.swift"; path = "pod/extend/UIImage+zx.swift"; sourceTree = ""; }; - F105D6159B1EAADE8D9FF07DB1D6BB28 /* mz_os_posix.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_os_posix.c; path = SSZipArchive/minizip/mz_os_posix.c; sourceTree = ""; }; - F1C4849E990A59E7FF438F6E78C5AD77 /* ZXKitLoggerFilterTypeView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ZXKitLoggerFilterTypeView.swift; path = pod/view/ZXKitLoggerFilterTypeView.swift; sourceTree = ""; }; - F44A62B05E369692296F31B9CC5D3A4F /* icon_delete.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = icon_delete.png; path = pod/assets/icon/icon_delete.png; sourceTree = ""; }; - F5D64411657007EB6C16E41271465C11 /* icon_notice@3x.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = "icon_notice@3x.png"; path = "pod/assets/icon/icon_notice@3x.png"; sourceTree = ""; }; - F60B875D6F88E7F0A1E06FC444B19EC5 /* icon_list@3x.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = "icon_list@3x.png"; path = "pod/assets/icon/icon_list@3x.png"; sourceTree = ""; }; - F6BB30B18A1DDF52DE1A9056703699D2 /* ZXKitUIConfig.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ZXKitUIConfig.swift; path = pod/ZXKitUIConfig.swift; sourceTree = ""; }; + C0839CCA2A3610A119F495175B901A9F /* localizable */ = {isa = PBXFileReference; includeInIndex = 1; name = localizable; path = pod/assets/localizable; sourceTree = ""; }; + C7FB8F28DAFECFA2471C8CCFCBE1DC1E /* zx_logo@3x.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = "zx_logo@3x.png"; path = "pod/assets/icon/zx_logo@3x.png"; sourceTree = ""; }; + C82EF2515BB22A58FFC2D38F59837F21 /* DDUtils-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "DDUtils-dummy.m"; sourceTree = ""; }; + C864001E1467FA961A145010360F6602 /* CircleMenuButton.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CircleMenuButton.swift; path = pod/menu/CircleMenuButton/CircleMenuButton.swift; sourceTree = ""; }; + CC0E6C9B6E9B6EFD527596842D4C0FA2 /* DDLoggerSwiftItem.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DDLoggerSwiftItem.swift; path = pod/DDLoggerSwiftItem.swift; sourceTree = ""; }; + CC2C47AFB8D5EE5B1BDA112AB1E9B7D0 /* icon_analyse.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = icon_analyse.png; path = pod/assets/icon/icon_analyse.png; sourceTree = ""; }; + CCCB7A4F8EDB94C19B81DB6C5F91E2C7 /* DDLoggerSwift */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = DDLoggerSwift; path = DDLoggerSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D01D62E54B5B821D431A8D1E33DB8F56 /* DDKitSwift.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = DDKitSwift.release.xcconfig; sourceTree = ""; }; + D0F7E70FF0D2601FA163E16387580672 /* icon_setting@3x.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = "icon_setting@3x.png"; path = "pod/assets/icon/icon_setting@3x.png"; sourceTree = ""; }; + D5AF25992F46DB90C2A566D21EC7E9BA /* NFXRawBodyDetailsController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXRawBodyDetailsController.swift; path = netfox/iOS/NFXRawBodyDetailsController.swift; sourceTree = ""; }; + D65B82196979481E614EE5023EA665FC /* NFXSettingsController_iOS.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXSettingsController_iOS.swift; path = netfox/iOS/NFXSettingsController_iOS.swift; sourceTree = ""; }; + D95551B3B21BAEBEC0178BFDC587A8CC /* netfox-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "netfox-Info.plist"; sourceTree = ""; }; + DEBD0DFD1D9B3C2D9F2D0929F9B13526 /* DDUtils.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = DDUtils.debug.xcconfig; sourceTree = ""; }; + E04952BB5585CE353F71825760E87727 /* icon */ = {isa = PBXFileReference; includeInIndex = 1; name = icon; path = pod/assets/icon; sourceTree = ""; }; + E123B0611AE70C3946F0FDA69D36B149 /* icon_decrypt.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = icon_decrypt.png; path = pod/assets/icon/icon_decrypt.png; sourceTree = ""; }; + E44D1E95842399BC79465A632D9A1712 /* DDLoggerSwift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "DDLoggerSwift-prefix.pch"; sourceTree = ""; }; + E5893C5CFAD84A494FDA109849E14883 /* HDSqliteTools.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HDSqliteTools.swift; path = pod/HDSqliteTools.swift; sourceTree = ""; }; + E7BE6C0ECAEF351C1B9C7B47DC5DB78E /* icon_exit.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = icon_exit.png; path = pod/assets/icon/icon_exit.png; sourceTree = ""; }; + E93E89C96ABA91D487D8999A522D7D9D /* DDKitSwift-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "DDKitSwift-Info.plist"; sourceTree = ""; }; + EA24EDD10CDAC472E3CCCDE1F864A73E /* DDLoggerSwiftMenuView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DDLoggerSwiftMenuView.swift; path = pod/view/DDLoggerSwiftMenuView.swift; sourceTree = ""; }; + EEF8CB68E9A855267DAC138B65FA2A77 /* NFXGenericBodyDetailsController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXGenericBodyDetailsController.swift; path = netfox/Core/NFXGenericBodyDetailsController.swift; sourceTree = ""; }; + EF142FC8F3792D4D51F92CB0E34F4E3B /* DDUtils+system.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DDUtils+system.swift"; path = "pod/subspec/utils/DDUtils+system.swift"; sourceTree = ""; }; + F233BBB06B6ADF288BCB1AD34DFFA90E /* NFXProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXProtocol.swift; path = netfox/Core/NFXProtocol.swift; sourceTree = ""; }; + F23E9F67D4A3E52EE55BE056DE78A2E4 /* Pods-DDKitSwift-Netfox.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-DDKitSwift-Netfox.debug.xcconfig"; sourceTree = ""; }; + F2B4F7EF4C93EEC234C29F801C945069 /* DDLoggerSwift.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = DDLoggerSwift.release.xcconfig; sourceTree = ""; }; + F53FBFE7D18601718A92B905F36D4563 /* DDKitSwiftPluginProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DDKitSwiftPluginProtocol.swift; path = pod/DDKitSwiftPluginProtocol.swift; sourceTree = ""; }; + F673D3217B86BD4A91331F26BF997F8E /* NFXConstants.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NFXConstants.swift; path = netfox/Core/NFXConstants.swift; sourceTree = ""; }; + F6B53CA47A81F7D2C0100FE4EADD2A1D /* Date+zx.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Date+zx.swift"; path = "pod/subspec/utils/Date+zx.swift"; sourceTree = ""; }; + F74BECA5F2E098F9764F9716C789EC51 /* CircleMenu.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CircleMenu.swift; path = pod/menu/CircleMenu.swift; sourceTree = ""; }; + FAB86EC400D67F829EFAE3CBA5C8E9DC /* icon_scale.png */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = image.png; name = icon_scale.png; path = pod/assets/icon/icon_scale.png; sourceTree = ""; }; + FD05195679066FFDA4EA19DC77D050D4 /* Pods-DDKitSwift-Netfox */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = "Pods-DDKitSwift-Netfox"; path = Pods_DDKitSwift_Netfox.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 302AE5A6F4C25EF8BA8CD8097C971D7F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 56EB4E4C09AC74C3A762F6CFCB10A265 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 39DFBA7BB4179E994152A2D43716BF8F /* Frameworks */ = { + 395B53F633642DBF607B31B0846EBA2A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - D54A35F498ED731BD3F4E97FA95274C5 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -445,438 +343,386 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 6C9EE95D91963E25A2D9C4D867A90C8C /* Frameworks */ = { + 71B35DECF6B041DD83ADDF9A03E3DD42 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 2C6F7D2DA819D3131A280FFDD8C522DD /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 9361F55F3062E79AE547448A20FDAAC3 /* Frameworks */ = { + 8EDB86E830D8AF806870051827A0E877 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 10ECB321C6D50C57D6D863AB291E870D /* Foundation.framework in Frameworks */, + 114BA7BC7E9F64931D9FC7014EBAF626 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 9FDB39E6501464BE33386E25082B454B /* Frameworks */ = { + A4D4BA39B1327F65A603A221478B41DA /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + EDBF9AAE6ABC9CEA76FD804A4115C0BD /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - BD38B51A341D8CAA3A61E42A32E9F2C6 /* Frameworks */ = { + B6382EF7D855972A2B37A520FEA9D7AB /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 333843F2B81DD9C44D52BA5C29F1B0EA /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - D95EA27797B56D642F96334D2D40384C /* Frameworks */ = { + EEFC867658EC1660FC13A8D37929404A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - AF48F21F13058D4DA35F3BE185FE03D0 /* Foundation.framework in Frameworks */, - 0D87C4665F8AD43731710EBBD8CCFCF8 /* Security.framework in Frameworks */, + 98F88E980194DA8B065707DC184E0168 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 1628BF05B4CAFDCC3549A101F5A10A17 /* Frameworks */ = { + 0462C03C02E24F316AF05D6C4B89C774 /* DDUtils */ = { isa = PBXGroup; children = ( - 7CE426AC267333500FABE7BA0A5A42A0 /* iOS */, + 4E41150C34465DADA6D411A552C593CE /* core */, + 80526DE97455E927F89B371BF1EAFFBE /* Support Files */, + 619715FDFF9D8B91831283D38173C501 /* ui */, + 38DB1655C59DCB9A7A9A73FC1DA70384 /* utils */, ); - name = Frameworks; + name = DDUtils; + path = DDUtils; sourceTree = ""; }; - 16B96BA0B9A33AD06D4C725585CDEB1B /* core */ = { + 0E524581008B67FEC0530B4426CB3657 /* DDLoggerSwift */ = { isa = PBXGroup; children = ( - 8EC6C943326D5FB2E5953246A5761534 /* Data+zx.swift */, - DE596EFEDF3C76049AD75F22B36EB333 /* Date+zx.swift */, - 8BE674746D866EEF7B2DFA5752C5B3FE /* String+zx.swift */, - 6E8E794E96A7AABDBB802802D089E6E1 /* UIColor+zx.swift */, - F02DE7182DF39D0E171ACCA6E5EFF059 /* UIImage+zx.swift */, - CC42F0E4B2359061A95A3F08EE9FE7DB /* UIView+zx.swift */, - 81B06127C905895ADCC3BD98DEDCFA5F /* ZXKitNameSpace.swift */, - 5744560F468CD1C3ED79CB3704B5FFAB /* ZXKitUtil.swift */, - 7FC6274779E0A73FC8D5632C03C245FC /* ZXKitUtil+file.swift */, - 1B283D1C146640E56C639E31D6CCB12C /* ZXKitUtil+media.swift */, - A7C580942DAF0C0022A328FAAEB735D6 /* ZXKitUtil+permission.swift */, - 332ADAB8C86CD40E14F4A5A4274FD6DB /* ZXKitUtil+system.swift */, - ECEFB45C5B66A87D7F43FE57A48180D4 /* ZXKitUtil+UI.swift */, + 1625A8B18AA06739D852CF97A18CB16D /* core */, + 5B9A404DA58C2710883DCECA3FE248E0 /* Support Files */, ); - name = core; - sourceTree = ""; - }; - 18FA90B3EB2DE21BCD4C4674787E7F6E /* Pods-netfox-zxkit */ = { - isa = PBXGroup; - children = ( - BF6E5831221D11DEE5D47155071601FB /* Pods-netfox-zxkit.modulemap */, - 2EEDA1CDABECE662BA9346AEA4B9CEF9 /* Pods-netfox-zxkit-acknowledgements.markdown */, - 8F38D985BE628643645FFC19916D74FD /* Pods-netfox-zxkit-acknowledgements.plist */, - D9EB0A317A10F31E2920626E042626CC /* Pods-netfox-zxkit-dummy.m */, - CE0D1741E29B6A59B724C43908975932 /* Pods-netfox-zxkit-frameworks.sh */, - EF7F4FD5A359F07F53C2673A9360C1EA /* Pods-netfox-zxkit-Info.plist */, - BB501C722F1746B3F5A78D2964EB50A9 /* Pods-netfox-zxkit-umbrella.h */, - A95B25DE6C477B23C737B4D2D3383BAA /* Pods-netfox-zxkit.debug.xcconfig */, - 68BCDC39105B20BE7FC85B7C0CDA03A6 /* Pods-netfox-zxkit.release.xcconfig */, - ); - name = "Pods-netfox-zxkit"; - path = "Target Support Files/Pods-netfox-zxkit"; + name = DDLoggerSwift; + path = DDLoggerSwift; sourceTree = ""; }; - 28EE41ADAFF6FBDCD4E8CCEF6123F828 /* Pods */ = { + 1625A8B18AA06739D852CF97A18CB16D /* core */ = { isa = PBXGroup; children = ( - E76D0C66C30BCB6DEA50EBE91E3FACF0 /* netfox */, - A775FB11B04123768FC816236965486E /* SSZipArchive */, - 9F71FE2781A34B38986E50CBFD0BAA68 /* ZXKitCore */, - BD609DAC75F4C6B8AE9CCB14BA96E6C3 /* ZXKitLogger */, - 2E28C49F11C5DBC4764D42FF2D5585A8 /* ZXKitUtil */, + 31318EAED43088B4F46A933A28C3AB39 /* DDLoggerSwift.swift */, + 29B810047C43CEF94DA7809FD775EFB0 /* DDLoggerSwiftFilterTypeView.swift */, + 4B2508750853E0D84C25BDCF252AE633 /* DDLoggerSwiftFloatWindow.swift */, + CC0E6C9B6E9B6EFD527596842D4C0FA2 /* DDLoggerSwiftItem.swift */, + 175D622A3C95BCB949B9B4F3D83483CE /* DDLoggerSwiftMenuCollectionViewCell.swift */, + EA24EDD10CDAC472E3CCCDE1F864A73E /* DDLoggerSwiftMenuView.swift */, + 27D398781691B300100F4DD3AB60ABD0 /* DDLoggerSwiftPickerWindow.swift */, + 4CF483B4AE7D5B0DDFBA138D3EF70C58 /* DDLoggerSwiftTableViewCell.swift */, + 701999FCFFC3A449FF1CE654ADB393BB /* DDLoggerSwiftWindow.swift */, + E5893C5CFAD84A494FDA109849E14883 /* HDSqliteTools.swift */, + 9082466C07D0679C2576DDFDF7148132 /* LogContent.swift */, + 1A21205DF32124DAF16EFEE9140EE770 /* Resources */, ); - name = Pods; + name = core; sourceTree = ""; }; - 29CE616B1960F9B908DD5DD3AFF8A46A /* core */ = { + 1A21205DF32124DAF16EFEE9140EE770 /* Resources */ = { isa = PBXGroup; children = ( - 0445BAF27BC2AD7AB70C4AA9E5915BD5 /* CircleMenu.swift */, - 8E70F20796A8FD8286FD42C73C90A710 /* CircleMenuButton.swift */, - F0014AAD9C960D2894DB7A4C78E6394B /* CircleMenuLoader.swift */, - 8A9FC2777BA9139AB7A0A3A721416875 /* CircleMenuMaskView.swift */, - A9DF394F038B3ACB2A54D774F2920A7F /* ShareTools.swift */, - 59A3A18AA771E239753B8F5EEDD866A4 /* ZXKit.swift */, - 9116634DAC397EA301AD468FD55F9F5B /* ZXKitCollectionViewHeaderView.swift */, - 1C07E9EDC9A0214194D214BAE8788414 /* ZXKitFloatWindow.swift */, - E8868F7CE2A80E2289A1190101CB98DD /* ZXKitLogger+zxkit.swift */, - 276E0AF1306F1E93521E8085353F27C4 /* ZXKitPluginCollectionViewCell.swift */, - A9DBAC7423E4273F050893669FE33511 /* ZXKitPluginProtocol.swift */, - F6BB30B18A1DDF52DE1A9056703699D2 /* ZXKitUIConfig.swift */, - 2C23EBF54AFABCFA0132B65C073F1EF0 /* ZXKitWindow.swift */, - 45F23F70C3C43A5B78475D11D2DEF6A4 /* Resources */, + 47BEF63EE9CFC08DF26783BCFAC0CE9B /* icon */, + CC2C47AFB8D5EE5B1BDA112AB1E9B7D0 /* icon_analyse.png */, + 9522398E75699B8F92C8E7B22F8AEB98 /* icon_back.png */, + 0C61C053758775B0896507D1B58C44B9 /* icon_copy.png */, + E123B0611AE70C3946F0FDA69D36B149 /* icon_decrypt.png */, + 73C34578ECDADDB9C4A17E88ED3D7328 /* icon_delete.png */, + E7BE6C0ECAEF351C1B9C7B47DC5DB78E /* icon_exit.png */, + 8EEADFFDEE3E8D9085ED581BC3C4D710 /* icon_hide.png */, + 41BACB3302198FD24A48B2745EB4292E /* icon_normal_back.png */, + FAB86EC400D67F829EFAE3CBA5C8E9DC /* icon_scale.png */, + 63C6593064932171C3E6757B3A88CAFA /* icon_scroll.png */, + 84C1578B38ED2B5AF8E8CC6FF098D08D /* icon_search.png */, + 056240688AEB2FCB751F21A88D189646 /* icon_share.png */, + 4C86CAD86944BC77FA34545A11846915 /* icon_upload.png */, + C0839CCA2A3610A119F495175B901A9F /* localizable */, + 405E28C29B602AE3C166700FD53FA4CE /* Localizable.strings */, ); - name = core; + name = Resources; sourceTree = ""; }; - 2E28C49F11C5DBC4764D42FF2D5585A8 /* ZXKitUtil */ = { + 3859E5D95AB4AEB91586495CBF5DF032 /* Products */ = { isa = PBXGroup; children = ( - 16B96BA0B9A33AD06D4C725585CDEB1B /* core */, - D5DEAC5734798B5F587E8FA66FD38A47 /* Support Files */, + A662AA93F65F026CEAE95B259E357B97 /* DDKitSwift */, + 67832819087A20EE754DB49E95EE7861 /* DDKitSwift-DDKitSwift */, + CCCB7A4F8EDB94C19B81DB6C5F91E2C7 /* DDLoggerSwift */, + 6EE26D836377CA863AAAF9260E9EA901 /* DDLoggerSwift-DDLoggerSwift */, + AE255513E542A7635AA924C36C07E511 /* DDUtils */, + BF1952EA0085A4CE36B4AE041BE60B82 /* netfox */, + FD05195679066FFDA4EA19DC77D050D4 /* Pods-DDKitSwift-Netfox */, ); - name = ZXKitUtil; - path = ZXKitUtil; + name = Products; sourceTree = ""; }; - 3111B8257B52253676FD8B534FC0EF21 /* Support Files */ = { + 38DB1655C59DCB9A7A9A73FC1DA70384 /* utils */ = { isa = PBXGroup; children = ( - 6754418E28E5D2477B6349618288B7F1 /* ResourceBundle-ZXKitLogger-ZXKitLogger-Info.plist */, - BD92FA6D66C406E2C5910A79438B31FA /* ZXKitLogger.modulemap */, - 9A0385C4C19CC50137018FB831373EDC /* ZXKitLogger-dummy.m */, - ADE1E1834230EB744D1A74FBAC9859D4 /* ZXKitLogger-Info.plist */, - 7AA31C6375F183EA6F51EA675FA57EEE /* ZXKitLogger-prefix.pch */, - 4C4AE2673E47A49A58755A7CE3A3684D /* ZXKitLogger-umbrella.h */, - DE0D7A5FDA759CEFE0512C2BF9D4B99D /* ZXKitLogger.debug.xcconfig */, - B35A411BBACDC273345A48D91F04E0EB /* ZXKitLogger.release.xcconfig */, - ); - name = "Support Files"; - path = "../Target Support Files/ZXKitLogger"; + 96BEB5E416825EDBA6D54EAEE81E37D9 /* Data+zx.swift */, + F6B53CA47A81F7D2C0100FE4EADD2A1D /* Date+zx.swift */, + 90C27D79E9FEFDBC5BB4AF88D506BD0E /* DDUtils+file.swift */, + 386AE9F9ADA2776500C6FB7FE3451AFC /* DDUtils+media.swift */, + EF142FC8F3792D4D51F92CB0E34F4E3B /* DDUtils+system.swift */, + 85EA5E90B0FECA37580C57BB84102ADB /* String+zx.swift */, + ); + name = utils; sourceTree = ""; }; - 4403303D40C41E5E9EADBF099396D3FB /* core */ = { + 44DFD4B0CAF43A90A18A9428F931F847 /* netfox */ = { isa = PBXGroup; children = ( - 27F88506F1A8B0FDC2A9BEF148E6470F /* HDSqliteTools.swift */, - C4A28C9C8B9BFBB4278D7B59F26BB339 /* LogContent.swift */, - 651334ABA8E1EAE0C1E8B90A91564D11 /* ZXKitLogger.swift */, - F1C4849E990A59E7FF438F6E78C5AD77 /* ZXKitLoggerFilterTypeView.swift */, - BE09C088CA2B9601D10FAB6247510D14 /* ZXKitLoggerFloatWindow.swift */, - 7A61197173FBCAA814732CCA8E9B5853 /* ZXKitLoggerItem.swift */, - D9E51FDB7DEE50523B9F4AFDC31FB313 /* ZXKitLoggerMenuCollectionViewCell.swift */, - 17698F1F65B8DBE0535EA3C394937285 /* ZXKitLoggerMenuView.swift */, - B16609C5E98CFE978928A80BE0668C99 /* ZXKitLoggerPickerWindow.swift */, - A3529439853A1B2F1213F5DF5EF32896 /* ZXKitLoggerTableViewCell.swift */, - 434BDBFC3DD1A54899173E94E3DCA060 /* ZXKitLoggerWindow.swift */, - A6AB565B4081C52D81A256FE603FC048 /* Resources */, + 6F9610380BB071F13D370CCEE50C129E /* NFX.swift */, + 31554135E1CCDA52688C326F04180EEF /* NFXAssets.swift */, + 3AEA1C8D3C72A23D084C539F8D61560F /* NFXAuthenticationChallengeSender.swift */, + F673D3217B86BD4A91331F26BF997F8E /* NFXConstants.swift */, + 7EACF54BF9400DD3CDF47A8DD3E0EC29 /* NFXDetailsController.swift */, + 40B53CD1D91ECF0CFF41BE3CAD375FB2 /* NFXDetailsController_iOS.swift */, + EEF8CB68E9A855267DAC138B65FA2A77 /* NFXGenericBodyDetailsController.swift */, + 36F7AECDE23A46A541C5EEC64492FA1D /* NFXGenericController.swift */, + 83971684DD7CE36BFC05C1B3E098B4AD /* NFXHelper.swift */, + 706EE7625BAD729B4FB16DCDE4A7374E /* NFXHelper_iOS.swift */, + 0FD28C08421A4C12E041B334B2B14D51 /* NFXHTTPModel.swift */, + A6779D113F799EA02A14574312505072 /* NFXHTTPModelManager.swift */, + 8A2E3A97B0A4837D98EB60B518B1E2A9 /* NFXImageBodyDetailsController.swift */, + 42BC87197FBEAB8FC01BB0A8C1EA846F /* NFXInfoController.swift */, + 52FB56BD2919B4E03A3C66522D27A334 /* NFXInfoController_iOS.swift */, + 427174D58B8BCDBF2CF24D7217A6464F /* NFXListCell_iOS.swift */, + 755E8DF29A132232481804C5FF6A6082 /* NFXListController.swift */, + 5A81A254014253D9175C08475A40E53C /* NFXListController_iOS.swift */, + F233BBB06B6ADF288BCB1AD34DFFA90E /* NFXProtocol.swift */, + D5AF25992F46DB90C2A566D21EC7E9BA /* NFXRawBodyDetailsController.swift */, + 9BC8917C5BE7A44EC257E6AE77E3F8FE /* NFXSettingsController.swift */, + D65B82196979481E614EE5023EA665FC /* NFXSettingsController_iOS.swift */, + 5769A36AB02048A6E87D4A3E4CC36B3A /* NFXStatisticsController.swift */, + 73ED3FDB0D863DC1E0124EE06DEC60BA /* NFXStatisticsController_iOS.swift */, + B2A0548EE71E05813D98D6858E362875 /* NFXURLDetailsControllerViewController.swift */, + 99C7843B5FBA1C8AA8D46E6286665759 /* NFXWindowController.swift */, + 76F6621BD49256C6F3D0E934250BBD4D /* Support Files */, ); - name = core; + name = netfox; + path = netfox; sourceTree = ""; }; - 45F23F70C3C43A5B78475D11D2DEF6A4 /* Resources */ = { + 4E41150C34465DADA6D411A552C593CE /* core */ = { isa = PBXGroup; children = ( - 5AB4D46949DB003E54107DA00A884FBB /* icon */, - 21B26190117DF58D164F7A1D0FC07C97 /* icon_close@3x.png */, - 03BD8B6DD42BCDA27F5FDA183332097D /* icon_home@3x.png */, - F60B875D6F88E7F0A1E06FC444B19EC5 /* icon_list@3x.png */, - F5D64411657007EB6C16E41271465C11 /* icon_notice@3x.png */, - 96C7B862918F1432EFA5509AF30FE080 /* icon_search@3x.png */, - D6DA2F60BE5545E729D04F578F897D33 /* icon_setting@3x.png */, - 0F0AEFBC080BDE74B4233B23EC6C22D1 /* icon_share@3x.png */, - BC66DCCACE7A91FCC56283CAC44529FC /* localizable */, - 2EAB52A882FE1551521143CB9EFDA98E /* Localizable.strings */, - 44989837B31F21C138F66624D96C1632 /* logger_logo@3x.png */, - 3A11A9F01B939E32EE3896A2878E0F8F /* zx_logo@3x.png */, + A6685D443331DFF981500A9229927D96 /* DDUtils.swift */, + 3C70DE7EE591511158A4E9AB9E7A4CE3 /* ZXKitNameSpace.swift */, ); - name = Resources; + name = core; sourceTree = ""; }; - 7CE426AC267333500FABE7BA0A5A42A0 /* iOS */ = { + 578452D2E740E91742655AC8F1636D1F /* iOS */ = { isa = PBXGroup; children = ( - 952925E838A0DE4D7BDC4EE54022633D /* Foundation.framework */, - C3B2A0B779CE31153B2C0D8A7F8DC7FE /* Security.framework */, + 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */, ); name = iOS; sourceTree = ""; }; - 92D60074E62B7AE0E54ED59133B91434 /* Targets Support Files */ = { + 5B9A404DA58C2710883DCECA3FE248E0 /* Support Files */ = { isa = PBXGroup; children = ( - 18FA90B3EB2DE21BCD4C4674787E7F6E /* Pods-netfox-zxkit */, + 5D53846CC170AC635C3AAC75376458F2 /* DDLoggerSwift.modulemap */, + 201D2CC3B8ABFD37E3279660025FA5B8 /* DDLoggerSwift-dummy.m */, + 9DFC099102FF065A521B1F74B9086BF4 /* DDLoggerSwift-Info.plist */, + E44D1E95842399BC79465A632D9A1712 /* DDLoggerSwift-prefix.pch */, + ABB3A0741935FCB8DDDC05F53305D1C9 /* DDLoggerSwift-umbrella.h */, + 4C0A2B89F7F0B06B4DFE6E95D5A373BF /* DDLoggerSwift.debug.xcconfig */, + F2B4F7EF4C93EEC234C29F801C945069 /* DDLoggerSwift.release.xcconfig */, + 9B93E2E29DC3D3D735AD26EB0D98B913 /* ResourceBundle-DDLoggerSwift-DDLoggerSwift-Info.plist */, ); - name = "Targets Support Files"; + name = "Support Files"; + path = "../Target Support Files/DDLoggerSwift"; sourceTree = ""; }; - 9F71FE2781A34B38986E50CBFD0BAA68 /* ZXKitCore */ = { + 619715FDFF9D8B91831283D38173C501 /* ui */ = { isa = PBXGroup; children = ( - 29CE616B1960F9B908DD5DD3AFF8A46A /* core */, - C810C71BD6A6C1D9B4FE3791557358DF /* Support Files */, + 3A9D46A5C0EEF6ED39BEE374963B1D77 /* DDUtils+AppStore.swift */, + B212042DC58FFE3B3DC9739C5A07E6F9 /* DDUtils+UI.swift */, + 0C4313D25CA65C9DE70DA9F619A808EB /* UIColor+zx.swift */, + B5829A7F278052B5713C341496635E15 /* UIImage+zx.swift */, + 3FE020B715B1BD769CC0B5B63387588D /* UIView+zx.swift */, ); - name = ZXKitCore; - path = ZXKitCore; + name = ui; sourceTree = ""; }; - A2E626AAD21DAD57AE24D59A8BF20B1B /* Support Files */ = { + 76F6621BD49256C6F3D0E934250BBD4D /* Support Files */ = { isa = PBXGroup; children = ( - 9E18053767C79AD8CCD929DBE7CEBC90 /* netfox.modulemap */, - 3F4C1F93115EB09271891214991F3110 /* netfox-dummy.m */, - CA4BE550EB6EC2AC8786D323709F6846 /* netfox-Info.plist */, - 9EF6CEE0DCB6120D5CEE31D53ADDCA6D /* netfox-prefix.pch */, - 24C5CC8BCD63DD5B8F5FFFAE8AF9ED61 /* netfox-umbrella.h */, - 60A945577FDE796318DF59CE344F3FDF /* netfox.debug.xcconfig */, - D14B31C463642C2002F5EF5813A29D75 /* netfox.release.xcconfig */, + 165133718495D85C39D47A2E3BC16149 /* netfox.modulemap */, + 9E4BB3F5039575AF78B511CA0E6745DF /* netfox-dummy.m */, + D95551B3B21BAEBEC0178BFDC587A8CC /* netfox-Info.plist */, + 381BE9550AA0AAB4E5C4FC8ED5F4D646 /* netfox-prefix.pch */, + 36E4EEFA94D3D743E0DFA989C554CB6A /* netfox-umbrella.h */, + 807787D8F4F457841F3CF78C148FDA0C /* netfox.debug.xcconfig */, + 03AFBAA6AC01F15D173B46D34919A9FB /* netfox.release.xcconfig */, ); name = "Support Files"; path = "../Target Support Files/netfox"; sourceTree = ""; }; - A6AB565B4081C52D81A256FE603FC048 /* Resources */ = { + 77E8FA0F01E745A38547AD9E4C901DF2 /* Resources */ = { isa = PBXGroup; children = ( - 78CF5FBACB0DFEA2E03BC70D1833420E /* icon */, - BD9624031211F7F2074962D4B7652C3E /* icon_analyse.png */, - 091848F99E0718D86D9653EBFCEAAEF5 /* icon_back.png */, - CE6A77207EC469A2837E481E94EE4071 /* icon_copy.png */, - B4B6981A43830883B1BDC93114393E96 /* icon_decrypt.png */, - F44A62B05E369692296F31B9CC5D3A4F /* icon_delete.png */, - 368531A24D4173FFA9B0D83E67408C2C /* icon_exit.png */, - 54AF4D974AB8C5D6DEC4107F214A5BB5 /* icon_hide.png */, - 029E633F96E0572A701C011B0C9C54D5 /* icon_normal_back.png */, - 0409EE68E5A615B1E57297F4E7EB073F /* icon_scale.png */, - DC74D9E5ACA8C0CB1730F331FBF24BE4 /* icon_scroll.png */, - 4C999CBA21A732E690E9D0A63A038FB7 /* icon_search.png */, - D020C35D7E85FB2F96EA830C32CA3D2F /* icon_share.png */, - 634B12EA16374DEBFC2C54AE00E37B4E /* icon_upload.png */, - 98E1E42D21D0672A33C5A17DB35CC55B /* localizable */, - 63223FFF70CBA065817589C3612C267D /* Localizable.strings */, + E04952BB5585CE353F71825760E87727 /* icon */, + 8002E118F7807644DEBB4838706EF53D /* icon_close@3x.png */, + 1D22933AA26C453D3FA9B4E04448E0AF /* icon_home@3x.png */, + 926126915C67CE944550CFC9DFDF26A8 /* icon_list@3x.png */, + 1D7850912350CD0EDAB0CAD68EEA2440 /* icon_notice@3x.png */, + 74257CD6172D2B28D7A16A55FA4A2651 /* icon_search@3x.png */, + D0F7E70FF0D2601FA163E16387580672 /* icon_setting@3x.png */, + 8123F4BA68B8D76199CF62874EF5E731 /* icon_share@3x.png */, + 80E015C7CB963A6788ED89F8D1E7CDC1 /* localizable */, + 126D57BD316DBBF9E2BFDA3798A32C0A /* Localizable.strings */, + 5BD6B450D72E01C4676D40BBFD5F1646 /* logger_logo@3x.png */, + C7FB8F28DAFECFA2471C8CCFCBE1DC1E /* zx_logo@3x.png */, ); name = Resources; sourceTree = ""; }; - A775FB11B04123768FC816236965486E /* SSZipArchive */ = { + 80526DE97455E927F89B371BF1EAFFBE /* Support Files */ = { isa = PBXGroup; children = ( - DF9B9B967978F9B169E088D2DD21AFF9 /* mz.h */, - AFAFFDB25C6393FF4BE608AB7905D9E3 /* mz_compat.c */, - 0E060ED4B31F0DB72CD3188A20E12FC1 /* mz_compat.h */, - 8E2BAEB2106BE699780B6F27D213EAC4 /* mz_crypt.c */, - 4FB6405D61298A835CF8B4F208DDEE95 /* mz_crypt.h */, - 3CA96854097640C54AC3CAB5D2C6D991 /* mz_crypt_apple.c */, - 2F70AA1830A13D3821B0EAEC2EE80C26 /* mz_os.c */, - 9D15A458909A3D897282FB39198E8A69 /* mz_os.h */, - F105D6159B1EAADE8D9FF07DB1D6BB28 /* mz_os_posix.c */, - EA0CAD0A52E03214DCC5119528A3218A /* mz_strm.c */, - EA12FE13077487215E0A9BF4741CEBD3 /* mz_strm.h */, - 6616871FCB1AD9A871E643FBFD8BB508 /* mz_strm_buf.c */, - C89B168488EA718C8696E0AC7A3D48AA /* mz_strm_buf.h */, - 1640BDE71BDD4279EC8FFF28DF51FE3C /* mz_strm_mem.c */, - 10A42749B05E4B6A7EA0CB3DD5EB4CCC /* mz_strm_mem.h */, - 0167BC2FFCAEB97A8605B52787F6A6E3 /* mz_strm_os.h */, - E0620B1A753629B8854ED6BBFE7CE521 /* mz_strm_os_posix.c */, - 8A96FB16A9ACF544186F6AB332BFCD92 /* mz_strm_pkcrypt.c */, - 1C889A2D3CD4893D5E3E5B1225DED48D /* mz_strm_pkcrypt.h */, - D665EBF11BEF4E0F65361906FEF6BE82 /* mz_strm_split.c */, - C6E92A31E1513765C96481CDDFBD7FB0 /* mz_strm_split.h */, - 2C54A44EDA63784147D07E86AAB3D9A3 /* mz_strm_wzaes.c */, - AED94C2BF2AC5E200B0F1D7DF8984565 /* mz_strm_wzaes.h */, - B07132CA0C13A5B494F6452B646363CC /* mz_strm_zlib.c */, - 1F8D58C0DE9A4BAD84D01E7C9080DB21 /* mz_strm_zlib.h */, - 60D656E9A5BBD0AF042833FDA76049E7 /* mz_zip.c */, - AAB97A4E2AE8E1AD66A6725365C16FF2 /* mz_zip.h */, - 8A1C42BB0445A6105A6441032CAF8A42 /* mz_zip_rw.c */, - 4BC703A81196D6F5F8D3EF0BAB472E89 /* mz_zip_rw.h */, - 39C26435D949588A24FF90CB8D94BEB2 /* SSZipArchive.h */, - E977D9049E28209DFE2393A399B97AB3 /* SSZipArchive.m */, - CA6CA96D2CA01114C98E1C56B5B4CA9B /* SSZipCommon.h */, - B952D11F3D2744D7DDD7BC7AFAF0795C /* ZipArchive.h */, - CBBE145755056A0782BFABE1B35FD54A /* Support Files */, - ); - name = SSZipArchive; - path = SSZipArchive; + 0C4D6BD725CE1DC9949F670FABC9DB9B /* DDUtils.modulemap */, + C82EF2515BB22A58FFC2D38F59837F21 /* DDUtils-dummy.m */, + 8324CA4C790A3D7719E7573DF61E66ED /* DDUtils-Info.plist */, + B58C8653412829011660A33F5AA37D87 /* DDUtils-prefix.pch */, + 57D0D4AEEE40F76E88BB2881900BBCC1 /* DDUtils-umbrella.h */, + DEBD0DFD1D9B3C2D9F2D0929F9B13526 /* DDUtils.debug.xcconfig */, + 862EEF4075B8A9448F8F72AFDE91B6E4 /* DDUtils.release.xcconfig */, + ); + name = "Support Files"; + path = "../Target Support Files/DDUtils"; sourceTree = ""; }; - B6B19A7FB8E09A07ED80530BF5BFF7D0 /* Products */ = { + 8D3879BD55FEEF6DE558152CE7237E9B /* Targets Support Files */ = { isa = PBXGroup; children = ( - BF1952EA0085A4CE36B4AE041BE60B82 /* netfox */, - 0D341A77CD427A872FC7E8F5CDD9E3C6 /* Pods-netfox-zxkit */, - 91B23470DEB9A986332BEB5034234BC7 /* SSZipArchive */, - 19B4CCFF6F020B12DD03BF84C2EC2D54 /* ZXKitCore */, - B462C8B2CB78AE609523A787505C2EB4 /* ZXKitCore-ZXKitCore */, - 3E4AFB1608515824864D0C9B0B85D8D3 /* ZXKitLogger */, - CAB850F66F7AE765FD9C2ACF5391A5F0 /* ZXKitLogger-ZXKitLogger */, - 2DD86A35A440A3D03F4341584B93EF64 /* ZXKitUtil */, + BBC7D9E9A0271E669F7F4332D1328FDC /* Pods-DDKitSwift-Netfox */, ); - name = Products; + name = "Targets Support Files"; sourceTree = ""; }; - BD609DAC75F4C6B8AE9CCB14BA96E6C3 /* ZXKitLogger */ = { + AC15AFFBE3131C281D9F56516D93F95F /* Support Files */ = { isa = PBXGroup; children = ( - 4403303D40C41E5E9EADBF099396D3FB /* core */, - 3111B8257B52253676FD8B534FC0EF21 /* Support Files */, + A1AB1C655F510BAC78097D702985FDEB /* DDKitSwift.modulemap */, + 336A19806FCBF767899FDD8B5ADFF9F3 /* DDKitSwift-dummy.m */, + E93E89C96ABA91D487D8999A522D7D9D /* DDKitSwift-Info.plist */, + A36F32CB6299CC10F41F088DA7A156A6 /* DDKitSwift-prefix.pch */, + AFB494D910A2E0F633928BCBFB998DA2 /* DDKitSwift-umbrella.h */, + 334ADB6A89487748EB4351AB44C2F231 /* DDKitSwift.debug.xcconfig */, + D01D62E54B5B821D431A8D1E33DB8F56 /* DDKitSwift.release.xcconfig */, + 3FFD005988118EF7155CDC5EC9F75943 /* ResourceBundle-DDKitSwift-DDKitSwift-Info.plist */, ); - name = ZXKitLogger; - path = ZXKitLogger; + name = "Support Files"; + path = "../Target Support Files/DDKitSwift"; sourceTree = ""; }; - C810C71BD6A6C1D9B4FE3791557358DF /* Support Files */ = { + BBC7D9E9A0271E669F7F4332D1328FDC /* Pods-DDKitSwift-Netfox */ = { isa = PBXGroup; children = ( - 211F54B496AD19C55EA45E2F2DF0D33F /* ResourceBundle-ZXKitCore-ZXKitCore-Info.plist */, - 747F1C5F8C2FD118A38E033392BD89DA /* ZXKitCore.modulemap */, - A70BCB1B0E798D3E6C42ECA3DCD83F0E /* ZXKitCore-dummy.m */, - 3E58941146F6E2C8C0C9E502189D8F10 /* ZXKitCore-Info.plist */, - 14633C7D8F8BA0811391B1114AED9C93 /* ZXKitCore-prefix.pch */, - E673EB92A59BEF4A646EC3FE4324E053 /* ZXKitCore-umbrella.h */, - A78EEFA921DED75D30512BDC3C46AE1C /* ZXKitCore.debug.xcconfig */, - ED0B55FBDE604C9312C305C4A80D62F6 /* ZXKitCore.release.xcconfig */, + 5C2EE2D7D9B8F6C0E2D44FE465167274 /* Pods-DDKitSwift-Netfox.modulemap */, + 16F03F251D183FD9547930E13B603DBE /* Pods-DDKitSwift-Netfox-acknowledgements.markdown */, + 34965EAB35E1AA4044EA5DDEAD929411 /* Pods-DDKitSwift-Netfox-acknowledgements.plist */, + 54E2CC6F99945DF20876CC021B099A3D /* Pods-DDKitSwift-Netfox-dummy.m */, + 959883F42E278A48DBC97DF10A83D93C /* Pods-DDKitSwift-Netfox-frameworks.sh */, + 8A772792E1B991164F3F0802AA6B23D8 /* Pods-DDKitSwift-Netfox-Info.plist */, + 13ABB90B0639472FB477947B874BE7B7 /* Pods-DDKitSwift-Netfox-umbrella.h */, + F23E9F67D4A3E52EE55BE056DE78A2E4 /* Pods-DDKitSwift-Netfox.debug.xcconfig */, + 7A53DEF5C53BD8D942FA71D283476D96 /* Pods-DDKitSwift-Netfox.release.xcconfig */, + ); + name = "Pods-DDKitSwift-Netfox"; + path = "Target Support Files/Pods-DDKitSwift-Netfox"; + sourceTree = ""; + }; + CAA880ACB4A8E1CB75BCE635F37F775B /* Pods */ = { + isa = PBXGroup; + children = ( + F7285494309FEE89CCEAFDF5CBEA7885 /* DDKitSwift */, + 0E524581008B67FEC0530B4426CB3657 /* DDLoggerSwift */, + 0462C03C02E24F316AF05D6C4B89C774 /* DDUtils */, + 44DFD4B0CAF43A90A18A9428F931F847 /* netfox */, ); - name = "Support Files"; - path = "../Target Support Files/ZXKitCore"; + name = Pods; sourceTree = ""; }; - CBBE145755056A0782BFABE1B35FD54A /* Support Files */ = { + CE8C93AB7CE8DB78F823AD635CEF6C1C /* core */ = { isa = PBXGroup; children = ( - A9BCDC2A1A7435D343CACC5270C07042 /* SSZipArchive.modulemap */, - 782712DB3F2E5A8CF3F322D1DF9A8CB5 /* SSZipArchive-dummy.m */, - 4383BA4FB69BA211D4A0988849EBCDC3 /* SSZipArchive-Info.plist */, - DA05AAD357FB2AFBB94D4C64DD7AAF03 /* SSZipArchive-prefix.pch */, - 35F868145E5165003FE6ACEF121F2A31 /* SSZipArchive-umbrella.h */, - 9778E083D83D02212FE72828609CBB7F /* SSZipArchive.debug.xcconfig */, - B6B9DF479C5292C0C80DD88E6A766AE9 /* SSZipArchive.release.xcconfig */, + F74BECA5F2E098F9764F9716C789EC51 /* CircleMenu.swift */, + C864001E1467FA961A145010360F6602 /* CircleMenuButton.swift */, + 8FCF009AD4EDB0B7D1D9543999594E5F /* CircleMenuLoader.swift */, + 6472B8943890130F6F59B9677157566A /* CircleMenuMaskView.swift */, + 93F39E7991DC5CD102FB510BD907F9D8 /* DDKitSwift.swift */, + 64F5F1E895FEFE072AED3E956246EE16 /* DDKitSwiftCollectionViewHeaderView.swift */, + 93D2C5E9C0DA42D3399ADCAED8F23E9A /* DDKitSwiftFloatWindow.swift */, + 1DB0232721519874DFDF2B0B689DE36E /* DDKitSwiftPluginCollectionViewCell.swift */, + F53FBFE7D18601718A92B905F36D4563 /* DDKitSwiftPluginProtocol.swift */, + 79D6B9CD3217E71078FE9ED185F684C2 /* DDKitSwiftUIConfig.swift */, + 6F0D35BBC6ECE7ADFA11B5958DDB8538 /* DDKitSwiftWindow.swift */, + 4EDEE5E9C6483B4E2460600AFAE0AF6C /* DDLoggerSwift+ddkit.swift */, + 0219D5BE736BE1759A92D1051EDA9848 /* ShareTools.swift */, + 77E8FA0F01E745A38547AD9E4C901DF2 /* Resources */, ); - name = "Support Files"; - path = "../Target Support Files/SSZipArchive"; + name = core; sourceTree = ""; }; CF1408CF629C7361332E53B88F7BD30C = { isa = PBXGroup; children = ( 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, - 1628BF05B4CAFDCC3549A101F5A10A17 /* Frameworks */, - 28EE41ADAFF6FBDCD4E8CCEF6123F828 /* Pods */, - B6B19A7FB8E09A07ED80530BF5BFF7D0 /* Products */, - 92D60074E62B7AE0E54ED59133B91434 /* Targets Support Files */, + D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */, + CAA880ACB4A8E1CB75BCE635F37F775B /* Pods */, + 3859E5D95AB4AEB91586495CBF5DF032 /* Products */, + 8D3879BD55FEEF6DE558152CE7237E9B /* Targets Support Files */, ); sourceTree = ""; }; - D5DEAC5734798B5F587E8FA66FD38A47 /* Support Files */ = { + D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */ = { isa = PBXGroup; children = ( - 4E8AD0AAA96B52A277AEB069DE0F84AF /* ZXKitUtil.modulemap */, - 6755DA97920CE51C5F4D276CD4A2EF94 /* ZXKitUtil-dummy.m */, - AD30FB5567AEDB5C0A6FEA34912F38CB /* ZXKitUtil-Info.plist */, - 9EFAC36F161CF07B614D3EED99BC166D /* ZXKitUtil-prefix.pch */, - 8D0BAC8A47751D93162C617C788E922F /* ZXKitUtil-umbrella.h */, - 7797C229A030A79ABD1513934B323707 /* ZXKitUtil.debug.xcconfig */, - CF5340F3216C178CFC00065D10AC9E0A /* ZXKitUtil.release.xcconfig */, + 578452D2E740E91742655AC8F1636D1F /* iOS */, ); - name = "Support Files"; - path = "../Target Support Files/ZXKitUtil"; + name = Frameworks; sourceTree = ""; }; - E76D0C66C30BCB6DEA50EBE91E3FACF0 /* netfox */ = { + F7285494309FEE89CCEAFDF5CBEA7885 /* DDKitSwift */ = { isa = PBXGroup; children = ( - 342AF2072D098E4581A9164B460C206E /* NFX.swift */, - C02060E2F4856A17AF6D68BA34F72DAA /* NFXAssets.swift */, - 79834805CC63935DA1B1D4CD6286C1E8 /* NFXAuthenticationChallengeSender.swift */, - 12277DBD9D8EBC869D96A71FDE6D8B5F /* NFXConstants.swift */, - 274E0A1495A50CB474A40FEF9289E868 /* NFXDetailsController.swift */, - 2CE25B5FEC019CD6F9D07196C58A1F08 /* NFXDetailsController_iOS.swift */, - 8859EF41700E7E6B3F5AB9A8F837AAC7 /* NFXGenericBodyDetailsController.swift */, - A638499C72C6B94C551C115E634766B0 /* NFXGenericController.swift */, - 2167A7D7ECBA03E92A72715E5D0910D7 /* NFXHelper.swift */, - BFB24B963110B42C3AE74786F69A1503 /* NFXHelper_iOS.swift */, - A4CCD4AD13ED57B9E203B2DE6851C780 /* NFXHTTPModel.swift */, - AB9B7A95649E514F6C627962AEB3C025 /* NFXHTTPModelManager.swift */, - 017F068828884D46521192547057BED8 /* NFXImageBodyDetailsController.swift */, - AB1A37BF2D4F9925374BE267891E262E /* NFXInfoController.swift */, - EE3C0E84979780B1653968C6094F534A /* NFXInfoController_iOS.swift */, - 0C8B6F37606052F053FE15C784F1F944 /* NFXListCell_iOS.swift */, - 10A2068553EB876AE0F05EA4EFC3C4BB /* NFXListController.swift */, - 817CF017300A77F4A5662603CAA0FBFC /* NFXListController_iOS.swift */, - CDF98797E13A9FD4929713BF87E21937 /* NFXProtocol.swift */, - B956D807D1938ABCC287186984F25AF5 /* NFXRawBodyDetailsController.swift */, - 2D912DCBD4553B8C20167F3FFC64694C /* NFXSettingsController.swift */, - 188AE37E6F5E5BF4F8718CAF1F4FD7FF /* NFXSettingsController_iOS.swift */, - 48CC00B47B6B7E94C88C7BEB448C3171 /* NFXStatisticsController.swift */, - A988EBDCA654EDD83E916032FE6DE6A4 /* NFXStatisticsController_iOS.swift */, - 4CAF27289C0227B6047B8CEB45FB0D74 /* NFXURLDetailsControllerViewController.swift */, - E4B44CAA13AEF830A6A02DF52528D135 /* NFXWindowController.swift */, - A2E626AAD21DAD57AE24D59A8BF20B1B /* Support Files */, + CE8C93AB7CE8DB78F823AD635CEF6C1C /* core */, + AC15AFFBE3131C281D9F56516D93F95F /* Support Files */, ); - name = netfox; - path = netfox; + name = DDKitSwift; + path = DDKitSwift; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 0B2057F46AC515C3DA47F0D87F650E80 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - FAA008B2FFD848AADD4AF1D16D927FB8 /* ZXKitCore-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1905644E24479AD99A4CE1C637B097A9 /* Headers */ = { + 33CB81F74E508E8EB7464D8A2F66B476 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - FC6E32A3291FE2E8E9E263C9DDD00DC4 /* ZXKitLogger-umbrella.h in Headers */, + CC244A6673E1B5BCD7B5D62C490BE9BB /* DDKitSwift-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 54A768C0FB2E6AA56698394AF8E10B2F /* Headers */ = { + 4954C5557DDCEEBF4064DFB9801061BA /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - C624D207FC5B3D396C76BB01F592F9FC /* ZXKitUtil-umbrella.h in Headers */, + 9E67DB042F63A16C99481D9E55BAB5F0 /* Pods-DDKitSwift-Netfox-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -888,62 +734,44 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 89E31520F40028B3DEF16242504EB356 /* Headers */ = { + 9D02C927D068F25D2B89B6D2C5FF3541 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - FFA6093889C5E8B7FAAB30ABF1466681 /* Pods-netfox-zxkit-umbrella.h in Headers */, + 55FDC7B58B07D8819571D9173807E7F2 /* DDLoggerSwift-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - B54E98A0F78F689CE4DC8242F7B2A2DE /* Headers */ = { + D9D1D895D2C61592B9CC77FC789208F5 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 1C789E086190CB49AD3473DD4B26450B /* mz.h in Headers */, - BEF4CC97D88ADCD73B93AA179F7E1802 /* mz_compat.h in Headers */, - AAB0384853C90088036B7501CA8ACFE0 /* mz_crypt.h in Headers */, - 02AD91C5250ED7D91B06BEAC91A5E507 /* mz_os.h in Headers */, - A4F447FA7122B13300BD80CE080444F7 /* mz_strm.h in Headers */, - 90DF670DC21B9EFD8DFEFC5081073963 /* mz_strm_buf.h in Headers */, - 8AB091199F99F1C2E9E67030DAC50F6E /* mz_strm_mem.h in Headers */, - 0EF3774AC45C05C24674C6F390E4B571 /* mz_strm_os.h in Headers */, - 1BC5207ED5AA2B6956BB9CD10C71C1AA /* mz_strm_pkcrypt.h in Headers */, - 059332136CAAB8014F2099D6AC105162 /* mz_strm_split.h in Headers */, - EE424ECE443C88A654B2CC271E9F4874 /* mz_strm_wzaes.h in Headers */, - EF9C00E340B33BA67D9CEF5A2262D15E /* mz_strm_zlib.h in Headers */, - 7DB2C0596405DB863CF2B2A489AE2636 /* mz_zip.h in Headers */, - C30DB8F46569FBD4D1C7D7DA0E4B67EC /* mz_zip_rw.h in Headers */, - 30D23C352773401AE1389972956969C4 /* SSZipArchive.h in Headers */, - 7F58BE8838D03B2D5B30E68952FF1E4D /* SSZipArchive-umbrella.h in Headers */, - 534EDA976CDBE519C377D315BA3FD183 /* SSZipCommon.h in Headers */, - EFE936E5DBC6AEE0B47D92500218702C /* ZipArchive.h in Headers */, + 5DA4B58516458CDC490BC4500A642DBF /* DDUtils-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 23CC5B423FA68CF6FCACD593F1FEDCF6 /* ZXKitCore */ = { + 1199A23AE1EAA19934856C5359B5D5BE /* DDKitSwift */ = { isa = PBXNativeTarget; - buildConfigurationList = 4AD403A7B238D8FD35302B2895368B36 /* Build configuration list for PBXNativeTarget "ZXKitCore" */; + buildConfigurationList = 782C025FD9193633CEFCEAE3B7A1A3C4 /* Build configuration list for PBXNativeTarget "DDKitSwift" */; buildPhases = ( - 0B2057F46AC515C3DA47F0D87F650E80 /* Headers */, - E2C5DE6DA3FAAF0C6632D0595B9E1377 /* Sources */, - 9361F55F3062E79AE547448A20FDAAC3 /* Frameworks */, - E6EE406F2B548A517D324F85994C066C /* Resources */, + 33CB81F74E508E8EB7464D8A2F66B476 /* Headers */, + 42E89F2F44195475559833B4802E1875 /* Sources */, + EEFC867658EC1660FC13A8D37929404A /* Frameworks */, + 486572B29101F4834EA458ECBE71E300 /* Resources */, ); buildRules = ( ); dependencies = ( - 15935F67BA8BC4EF9CFE6C46B16A076D /* PBXTargetDependency */, - 54CA2279FB92C5ABE5C0009ED3020B5D /* PBXTargetDependency */, - 5594303355F4A2B9B544DBA33DA4BEC5 /* PBXTargetDependency */, - 6AF038CD2E6125DFDCA5B0AB8778F895 /* PBXTargetDependency */, - ); - name = ZXKitCore; - productName = ZXKitCore; - productReference = 19B4CCFF6F020B12DD03BF84C2EC2D54 /* ZXKitCore */; + F8C68D6B6EC5DA416A424731C31E983F /* PBXTargetDependency */, + 499168C2D206AB8862F185EECD5786E8 /* PBXTargetDependency */, + 758420EBDF4A8475D59BBC0311B6DA91 /* PBXTargetDependency */, + ); + name = DDKitSwift; + productName = DDKitSwift; + productReference = A662AA93F65F026CEAE95B259E357B97 /* DDKitSwift */; productType = "com.apple.product-type.framework"; }; 33426EFE1931E100B59ABF41FD14377D /* netfox */ = { @@ -964,117 +792,98 @@ productReference = BF1952EA0085A4CE36B4AE041BE60B82 /* netfox */; productType = "com.apple.product-type.framework"; }; - 4B09DDD2A3083E311C984F301582897A /* ZXKitUtil */ = { + 3E903540BB2AEB597EFBFC8F5F01C33F /* DDKitSwift-DDKitSwift */ = { isa = PBXNativeTarget; - buildConfigurationList = 795C4B6DD89DDDE5CE8E6FEA1380269B /* Build configuration list for PBXNativeTarget "ZXKitUtil" */; + buildConfigurationList = 5BC2AB396BDF3ABA7DBE568EA020B756 /* Build configuration list for PBXNativeTarget "DDKitSwift-DDKitSwift" */; buildPhases = ( - 54A768C0FB2E6AA56698394AF8E10B2F /* Headers */, - DA53D13876404909021E4A4681403955 /* Sources */, - 6C9EE95D91963E25A2D9C4D867A90C8C /* Frameworks */, - 66837B37E75A8528707514B09C8333BB /* Resources */, + D2F4AC59266BA14EF55A383B56D855B5 /* Sources */, + 71B35DECF6B041DD83ADDF9A03E3DD42 /* Frameworks */, + 2D1D408953CE767B9CCDAABBCE6147F6 /* Resources */, ); buildRules = ( ); dependencies = ( ); - name = ZXKitUtil; - productName = ZXKitUtil; - productReference = 2DD86A35A440A3D03F4341584B93EF64 /* ZXKitUtil */; - productType = "com.apple.product-type.framework"; + name = "DDKitSwift-DDKitSwift"; + productName = DDKitSwift; + productReference = 67832819087A20EE754DB49E95EE7861 /* DDKitSwift-DDKitSwift */; + productType = "com.apple.product-type.bundle"; }; - 4E2A67B4E83F0D031AD81CD755A5DB22 /* ZXKitLogger */ = { + 53280B0B690F632E21ADED6BA1A17543 /* DDLoggerSwift-DDLoggerSwift */ = { isa = PBXNativeTarget; - buildConfigurationList = 877BB8BDC13F7E47BBD597A43538486B /* Build configuration list for PBXNativeTarget "ZXKitLogger" */; + buildConfigurationList = C0C8400962C13C91AC15767D11310155 /* Build configuration list for PBXNativeTarget "DDLoggerSwift-DDLoggerSwift" */; buildPhases = ( - 1905644E24479AD99A4CE1C637B097A9 /* Headers */, - 634C675D73067C500E61F8AF0247ABA2 /* Sources */, - 39DFBA7BB4179E994152A2D43716BF8F /* Frameworks */, - 6C77C3C08FFD84A8E3796A2F123F2B70 /* Resources */, + 41A5CB43676128839F229426839F226C /* Sources */, + 395B53F633642DBF607B31B0846EBA2A /* Frameworks */, + 25012E6503C24A1651C0273AEE4B77A7 /* Resources */, ); buildRules = ( ); dependencies = ( - 5E2582499FE10E4B3C90F8D0C60653B1 /* PBXTargetDependency */, - 4B59F0A7D9BF1A286B4A6A7ADF7C8DB3 /* PBXTargetDependency */, ); - name = ZXKitLogger; - productName = ZXKitLogger; - productReference = 3E4AFB1608515824864D0C9B0B85D8D3 /* ZXKitLogger */; - productType = "com.apple.product-type.framework"; + name = "DDLoggerSwift-DDLoggerSwift"; + productName = DDLoggerSwift; + productReference = 6EE26D836377CA863AAAF9260E9EA901 /* DDLoggerSwift-DDLoggerSwift */; + productType = "com.apple.product-type.bundle"; }; - 51EF85AAF6BA8A8BFEA992FFA83149F2 /* Pods-netfox-zxkit */ = { + 5C350C6EDAB185BD9B5DE98D5E1E9023 /* Pods-DDKitSwift-Netfox */ = { isa = PBXNativeTarget; - buildConfigurationList = 3A9988FAC7397E039DFAD2205A3ED6CA /* Build configuration list for PBXNativeTarget "Pods-netfox-zxkit" */; + buildConfigurationList = 7EA072581558F1F045CED05C172C9E07 /* Build configuration list for PBXNativeTarget "Pods-DDKitSwift-Netfox" */; buildPhases = ( - 89E31520F40028B3DEF16242504EB356 /* Headers */, - EDE70F1B0102DC44DAF46C6E8752EA92 /* Sources */, - 302AE5A6F4C25EF8BA8CD8097C971D7F /* Frameworks */, - 84A9CE46B1F45B5E4213FEFD457E99F4 /* Resources */, + 4954C5557DDCEEBF4064DFB9801061BA /* Headers */, + 8495894C36FD4411926B8A5F9EB69A40 /* Sources */, + 8EDB86E830D8AF806870051827A0E877 /* Frameworks */, + 22D6671DF41B6D63D082E4878B138D54 /* Resources */, ); buildRules = ( ); dependencies = ( - 06AA64ED2FE0B3A704F8B2F3C9D4C05D /* PBXTargetDependency */, - E7D76283C58E68E9CD73316EF1539AB6 /* PBXTargetDependency */, - D4A048259D272A26D75FB691E3E57FD4 /* PBXTargetDependency */, - B642C33A803D86D19CFF42A47B2BA898 /* PBXTargetDependency */, - FCD46C1CE44C71E3C61271E3724B46CD /* PBXTargetDependency */, - ); - name = "Pods-netfox-zxkit"; - productName = Pods_netfox_zxkit; - productReference = 0D341A77CD427A872FC7E8F5CDD9E3C6 /* Pods-netfox-zxkit */; + 759A330E3F45805C9981ED583FD83612 /* PBXTargetDependency */, + 811FC1A52AA6AEDA853504301F23EFE1 /* PBXTargetDependency */, + ECC53906545636208556FF9A5E9C36C8 /* PBXTargetDependency */, + 6E5A1F7CB47283A7EBB4AFAD80FCB574 /* PBXTargetDependency */, + ); + name = "Pods-DDKitSwift-Netfox"; + productName = Pods_DDKitSwift_Netfox; + productReference = FD05195679066FFDA4EA19DC77D050D4 /* Pods-DDKitSwift-Netfox */; productType = "com.apple.product-type.framework"; }; - 6535447A49D8AE5353316E9D3CA44597 /* ZXKitCore-ZXKitCore */ = { - isa = PBXNativeTarget; - buildConfigurationList = B8F47D3DB8F2842A62511ECF83012000 /* Build configuration list for PBXNativeTarget "ZXKitCore-ZXKitCore" */; - buildPhases = ( - 757086D1CCE7BDBB08DF97A8FB4BE166 /* Sources */, - 9FDB39E6501464BE33386E25082B454B /* Frameworks */, - C4B1AF4CA02C0506A9B67AF9D461C6BA /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "ZXKitCore-ZXKitCore"; - productName = ZXKitCore; - productReference = B462C8B2CB78AE609523A787505C2EB4 /* ZXKitCore-ZXKitCore */; - productType = "com.apple.product-type.bundle"; - }; - ACEAC673D122B792913296B416165FE0 /* ZXKitLogger-ZXKitLogger */ = { + 763460C4E0B28EA6B8A750D8642AF267 /* DDUtils */ = { isa = PBXNativeTarget; - buildConfigurationList = BF805DA7F6D27E9CDA684BC435B00B1C /* Build configuration list for PBXNativeTarget "ZXKitLogger-ZXKitLogger" */; + buildConfigurationList = 5DF4DB76A8AFC1E2CF6E04A495FD9CF0 /* Build configuration list for PBXNativeTarget "DDUtils" */; buildPhases = ( - C08C2E1F8942D6D969711F54A9EE48F2 /* Sources */, - BD38B51A341D8CAA3A61E42A32E9F2C6 /* Frameworks */, - BF21C7BE02B8F2FC7D3499E48F7AFDD9 /* Resources */, + D9D1D895D2C61592B9CC77FC789208F5 /* Headers */, + AB7899660A7C777D8B53BD12FC402549 /* Sources */, + B6382EF7D855972A2B37A520FEA9D7AB /* Frameworks */, + 8FB3AABC37BB7C2C7886429BD581AA99 /* Resources */, ); buildRules = ( ); dependencies = ( ); - name = "ZXKitLogger-ZXKitLogger"; - productName = ZXKitLogger; - productReference = CAB850F66F7AE765FD9C2ACF5391A5F0 /* ZXKitLogger-ZXKitLogger */; - productType = "com.apple.product-type.bundle"; + name = DDUtils; + productName = DDUtils; + productReference = AE255513E542A7635AA924C36C07E511 /* DDUtils */; + productType = "com.apple.product-type.framework"; }; - F60E38364AFF5E1349FF07415B944396 /* SSZipArchive */ = { + A1166E0B033B5DCD8B18503328A162BD /* DDLoggerSwift */ = { isa = PBXNativeTarget; - buildConfigurationList = 5D0A1C5EC006615C1092F876C06EAF4D /* Build configuration list for PBXNativeTarget "SSZipArchive" */; + buildConfigurationList = 2B2E5916B7EF480DA49CBB92314F3B9D /* Build configuration list for PBXNativeTarget "DDLoggerSwift" */; buildPhases = ( - B54E98A0F78F689CE4DC8242F7B2A2DE /* Headers */, - 5B98828D7A514D1398027374EC0F2A4A /* Sources */, - D95EA27797B56D642F96334D2D40384C /* Frameworks */, - A66CA23A56A2FF4A3BDDEDD5B1558478 /* Resources */, + 9D02C927D068F25D2B89B6D2C5FF3541 /* Headers */, + 0A5BFB2D9A407C3651D69D5D900305A0 /* Sources */, + A4D4BA39B1327F65A603A221478B41DA /* Frameworks */, + 234E904F927CE06F81073928B0A91333 /* Resources */, ); buildRules = ( ); dependencies = ( + C1740BADF2D359D3B2679DE3C04AE537 /* PBXTargetDependency */, + CC84D799B9698AE1F63E14000F9BCEBF /* PBXTargetDependency */, ); - name = SSZipArchive; - productName = SSZipArchive; - productReference = 91B23470DEB9A986332BEB5034234BC7 /* SSZipArchive */; + name = DDLoggerSwift; + productName = DDLoggerSwift; + productReference = CCCB7A4F8EDB94C19B81DB6C5F91E2C7 /* DDLoggerSwift */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ @@ -1083,11 +892,11 @@ BFDFE7DC352907FC980B868725387E98 /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 1300; - LastUpgradeCheck = 1300; + LastSwiftUpdateCheck = 1500; + LastUpgradeCheck = 1500; }; buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; - compatibilityVersion = "Xcode 10.0"; + compatibilityVersion = "Xcode 12.0"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( @@ -1096,18 +905,17 @@ "zh-Hans", ); mainGroup = CF1408CF629C7361332E53B88F7BD30C; - productRefGroup = B6B19A7FB8E09A07ED80530BF5BFF7D0 /* Products */; + productRefGroup = 3859E5D95AB4AEB91586495CBF5DF032 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( + 1199A23AE1EAA19934856C5359B5D5BE /* DDKitSwift */, + 3E903540BB2AEB597EFBFC8F5F01C33F /* DDKitSwift-DDKitSwift */, + A1166E0B033B5DCD8B18503328A162BD /* DDLoggerSwift */, + 53280B0B690F632E21ADED6BA1A17543 /* DDLoggerSwift-DDLoggerSwift */, + 763460C4E0B28EA6B8A750D8642AF267 /* DDUtils */, 33426EFE1931E100B59ABF41FD14377D /* netfox */, - 51EF85AAF6BA8A8BFEA992FFA83149F2 /* Pods-netfox-zxkit */, - F60E38364AFF5E1349FF07415B944396 /* SSZipArchive */, - 23CC5B423FA68CF6FCACD593F1FEDCF6 /* ZXKitCore */, - 6535447A49D8AE5353316E9D3CA44597 /* ZXKitCore-ZXKitCore */, - 4E2A67B4E83F0D031AD81CD755A5DB22 /* ZXKitLogger */, - ACEAC673D122B792913296B416165FE0 /* ZXKitLogger-ZXKitLogger */, - 4B09DDD2A3083E311C984F301582897A /* ZXKitUtil */, + 5C350C6EDAB185BD9B5DE98D5E1E9023 /* Pods-DDKitSwift-Netfox */, ); }; /* End PBXProject section */ @@ -1120,88 +928,100 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 66837B37E75A8528707514B09C8333BB /* Resources */ = { + 22D6671DF41B6D63D082E4878B138D54 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - 6C77C3C08FFD84A8E3796A2F123F2B70 /* Resources */ = { + 234E904F927CE06F81073928B0A91333 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 65BBA1E423831C2A18FD4A39061DEA5F /* ZXKitLogger-ZXKitLogger in Resources */, + 7A1A518B3A6F2CFC8B838FA72FE40D9F /* DDLoggerSwift-DDLoggerSwift in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 84A9CE46B1F45B5E4213FEFD457E99F4 /* Resources */ = { + 25012E6503C24A1651C0273AEE4B77A7 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 001C53B02F1E6F7B06929538AAB1FB82 /* icon in Resources */, + F08A271EF5295471985032F185352740 /* icon_analyse.png in Resources */, + B20CB7C6AE8675F492417EE9367673B0 /* icon_back.png in Resources */, + 20B9107E6BA7A5BE56A83EF349676453 /* icon_copy.png in Resources */, + 17BB984C1A815AB1D10B47C3F43B67B2 /* icon_decrypt.png in Resources */, + 0C5ACE8824F2B2D5AE02667D2635D85A /* icon_delete.png in Resources */, + 53FAC2AF2EDAD14A4F23462250A1258A /* icon_exit.png in Resources */, + BC9D5878308D1AF634B96676D045D94E /* icon_hide.png in Resources */, + 09E4975783948DF1641A2DE03EA66752 /* icon_normal_back.png in Resources */, + 8E415E6F9E8EE99BFBC05EC497755E27 /* icon_scale.png in Resources */, + 2787A0CBE60CCA254AA5F50DF1B58DC2 /* icon_scroll.png in Resources */, + 3FF84735724680E08B32612DA7D62A73 /* icon_search.png in Resources */, + 28055D0F24A20F539C6C15AA466BE031 /* icon_share.png in Resources */, + C814FA78E10C2A7881A53C735195AB36 /* icon_upload.png in Resources */, + ABD88800C67B3F024F375AF80CD32050 /* localizable in Resources */, + 630DED2858BE9650CD2A915A1C22DFB4 /* Localizable.strings in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; - A66CA23A56A2FF4A3BDDEDD5B1558478 /* Resources */ = { + 2D1D408953CE767B9CCDAABBCE6147F6 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 956183D18C6FE35A64982AD921D12965 /* icon in Resources */, + DA3A3DEF9F34DABC617CFCF3D73D1B0B /* icon_close@3x.png in Resources */, + F7C1E38010A90BFF65F3A994C8BF3EA9 /* icon_home@3x.png in Resources */, + 6C3FEE68110A442207B58ADF13AA7692 /* icon_list@3x.png in Resources */, + 0F023C7F77A647E12AF20829E08C7E3C /* icon_notice@3x.png in Resources */, + 89F571B4C02E64848D31EF02489C5CA8 /* icon_search@3x.png in Resources */, + C7FAD13BEABBE8881C3ED1DC425D69CC /* icon_setting@3x.png in Resources */, + 6843D71B21D5254619865415AAD423E4 /* icon_share@3x.png in Resources */, + E2331C96A60F3314606257BDCB6361E0 /* localizable in Resources */, + 0DED03A525B655785E432F7E24C5BF21 /* Localizable.strings in Resources */, + 3893B34BC9EB36854D2935F99E5B4C6A /* logger_logo@3x.png in Resources */, + B9198D8CC5C954ED55FD7E48C33E71E8 /* zx_logo@3x.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; - BF21C7BE02B8F2FC7D3499E48F7AFDD9 /* Resources */ = { + 486572B29101F4834EA458ECBE71E300 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - E5453C6BBDE1590DE25A579C90132672 /* icon in Resources */, - BD8CD18F89F7E0B432C5F5B74F3A19FE /* icon_analyse.png in Resources */, - A641568B5A691790189CF5CCAE31A095 /* icon_back.png in Resources */, - 7FA25114C2DC7FF1B0009A0B7D5CB128 /* icon_copy.png in Resources */, - 6237B1C7B06E20BA4AE31200A29496EC /* icon_decrypt.png in Resources */, - E0A9B2E253914C7FA31DFD89FB296268 /* icon_delete.png in Resources */, - 02225BD133C0D7119C996482394BDCDC /* icon_exit.png in Resources */, - B221E27B4BE5ED1DAC9DC65A6E69149A /* icon_hide.png in Resources */, - 90CD4E17A446CE7F95013F4F3F093A8C /* icon_normal_back.png in Resources */, - 39973596540F6B4082E6DFAB718C18B9 /* icon_scale.png in Resources */, - 6E8A4AF7D7C29017C91D3E82912E103A /* icon_scroll.png in Resources */, - F306BDA46793118FD6E2ACCB664A851D /* icon_search.png in Resources */, - 5F650BC535E2D4A481E00793AB4FBBE4 /* icon_share.png in Resources */, - 2E6338BE7828FC84E3EB85A620927A9B /* icon_upload.png in Resources */, - 337895F7B33AAF44D36F9E19BEDED78F /* localizable in Resources */, - B9234355451A7887E6BEAE054B14A3FE /* Localizable.strings in Resources */, + 451E76F6D175DCDAD93D8BB67B98AAFA /* DDKitSwift-DDKitSwift in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; - C4B1AF4CA02C0506A9B67AF9D461C6BA /* Resources */ = { + 8FB3AABC37BB7C2C7886429BD581AA99 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 883D13CBF9BD500E11712C8B86039F8E /* icon in Resources */, - F13F8025881A9406E3F8950108121C21 /* icon_close@3x.png in Resources */, - F554C88DBF2688DBFD67FCED2ADF9B20 /* icon_home@3x.png in Resources */, - F58D2474BED2F5B042B99FED2B4E08E6 /* icon_list@3x.png in Resources */, - B2AC995AA58EEB36566CB335FE07864A /* icon_notice@3x.png in Resources */, - 10D146685A627FBB929EE24BB4ED9D0F /* icon_search@3x.png in Resources */, - 602488AC2AB6D13045BE08728C7C58F4 /* icon_setting@3x.png in Resources */, - 29E7BA0C815B632CBD0AE4E2BA23B590 /* icon_share@3x.png in Resources */, - A343DEAFC5468C7D1049BFC68E679FEC /* localizable in Resources */, - E1999227230CCDDDCC1BE6301CCD1494 /* Localizable.strings in Resources */, - 3D9E0C057077E23BCC7E26608928FFC1 /* logger_logo@3x.png in Resources */, - 9AE06BA381CC1DEF77E030A05FDFCB28 /* zx_logo@3x.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; - E6EE406F2B548A517D324F85994C066C /* Resources */ = { - isa = PBXResourcesBuildPhase; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 0A5BFB2D9A407C3651D69D5D900305A0 /* Sources */ = { + isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 799428161A5C657A5D66EA9F074865DD /* ZXKitCore-ZXKitCore in Resources */, + 412A1DA62EFFE4B258C6C4CEEA29CF7B /* DDLoggerSwift.swift in Sources */, + 18B854FBFCB94DF898AACD668BB92CB8 /* DDLoggerSwift-dummy.m in Sources */, + BE39858D92EADCF62147048CFF475891 /* DDLoggerSwiftFilterTypeView.swift in Sources */, + 9EF9F0D796C23E9C027BD0FA280F9A02 /* DDLoggerSwiftFloatWindow.swift in Sources */, + 09736D3D1C5390DB6DAF488393D40A78 /* DDLoggerSwiftItem.swift in Sources */, + FBFFA5B82CA7052BFE1950CB2B9FBA1C /* DDLoggerSwiftMenuCollectionViewCell.swift in Sources */, + 95346730C7D6479FC75FF455331E24BE /* DDLoggerSwiftMenuView.swift in Sources */, + D3B2F3F87872B977EF8D896C11C1054C /* DDLoggerSwiftPickerWindow.swift in Sources */, + B03B90E5E0BC6B4141EEDC9DF05C0D98 /* DDLoggerSwiftTableViewCell.swift in Sources */, + 37538BAEC8D51EF8875FD1F739EF462D /* DDLoggerSwiftWindow.swift in Sources */, + CDC682591D694A428C41C498B3DCF23F /* HDSqliteTools.swift in Sources */, + 12F5490AE36448355C654A63081E9762 /* LogContent.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ 1C26D5BA4615AB19B5D967FD06A2D1DA /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -1236,200 +1056,145 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 5B98828D7A514D1398027374EC0F2A4A /* Sources */ = { + 41A5CB43676128839F229426839F226C /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 138D5C92E017FCFC4671E77B7449EED9 /* mz_compat.c in Sources */, - C3D352F8B703F950FD32936D16968D12 /* mz_crypt.c in Sources */, - A87F265168F263F2BB4361361BF616DF /* mz_crypt_apple.c in Sources */, - 89AECD9F4931EA70C032C83AB105F415 /* mz_os.c in Sources */, - D9EED6FDF393033C942E5B2149E99B2F /* mz_os_posix.c in Sources */, - 8C4FBC2492C6DDE369B02AEE117ED2BF /* mz_strm.c in Sources */, - D3340EC887ADD4CCC83BF67712BC883A /* mz_strm_buf.c in Sources */, - 19FA9B07CD47A1A2A8299E63070210D2 /* mz_strm_mem.c in Sources */, - FE8BF7C7018EF47E97426B7D135691A3 /* mz_strm_os_posix.c in Sources */, - 38B9E9F82A988CAA21601B733C1E92B7 /* mz_strm_pkcrypt.c in Sources */, - 0AE196DA421B10CE8EADF7027554CD5B /* mz_strm_split.c in Sources */, - 255CB9700C81C0AACEF38F42E802272B /* mz_strm_wzaes.c in Sources */, - BDCCA4A9A781026F988E16D64945E358 /* mz_strm_zlib.c in Sources */, - 5F800E52E1FE0F1A5F624C09F5BF2FD6 /* mz_zip.c in Sources */, - 0C524450F5579F35CF05958F488670A4 /* mz_zip_rw.c in Sources */, - BB4782EE1267513C3BA8E6D226D245E5 /* SSZipArchive.m in Sources */, - 9D420997871F24FEB04C2A77D881E6C9 /* SSZipArchive-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 634C675D73067C500E61F8AF0247ABA2 /* Sources */ = { + 42E89F2F44195475559833B4802E1875 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - DC8486F58BD475093B0F6CE401FB0569 /* HDSqliteTools.swift in Sources */, - EDAD55A0CF4A8974E31E65D96BEECB65 /* LogContent.swift in Sources */, - E59BA9EC0BC233F1F7942C375E725E30 /* ZXKitLogger.swift in Sources */, - 9DE0DCF18BEC7CC5E732F99B8A3D3F63 /* ZXKitLogger-dummy.m in Sources */, - 91FC83B4D4780F46C25F62FDDF7A790F /* ZXKitLoggerFilterTypeView.swift in Sources */, - 7F1547D086DD32FA4F709A7D3E1DA97A /* ZXKitLoggerFloatWindow.swift in Sources */, - FAB8E7641AEBF9091B8E531F49959680 /* ZXKitLoggerItem.swift in Sources */, - 266B91BCD9BF5B8FD4087834D63F60D0 /* ZXKitLoggerMenuCollectionViewCell.swift in Sources */, - 143F776BF2DA6C9BC86C7D1A5026A588 /* ZXKitLoggerMenuView.swift in Sources */, - 7E4E2EC81D343AD40EA422F9B6D6F7ED /* ZXKitLoggerPickerWindow.swift in Sources */, - 4E36BCCAE751312F8E9F5144E15D06B4 /* ZXKitLoggerTableViewCell.swift in Sources */, - EB411C2A32D56A3BD66D64B58863D8D4 /* ZXKitLoggerWindow.swift in Sources */, + DCDF5533334DEF2A914FDCA3178F60F5 /* CircleMenu.swift in Sources */, + BEF71DF20B0FF6E934F4230D18488AE5 /* CircleMenuButton.swift in Sources */, + 4DB7EB9E286B20E712282C9E72BD15CA /* CircleMenuLoader.swift in Sources */, + 8A98F18D33F00763B6298C0C417C74F3 /* CircleMenuMaskView.swift in Sources */, + F8F433E6546DADB088F363CEA1D00159 /* DDKitSwift.swift in Sources */, + 3C5BC46F1C38DD3514DDF734342057D4 /* DDKitSwift-dummy.m in Sources */, + 71C78906EF0D4CA4FAD5B80064572ADF /* DDKitSwiftCollectionViewHeaderView.swift in Sources */, + 370E838B47CBDD87FBD05AC13E1D04AB /* DDKitSwiftFloatWindow.swift in Sources */, + 5A7029A1C447BF42AAE2617BAC8013EE /* DDKitSwiftPluginCollectionViewCell.swift in Sources */, + CA8C836F46378BD0691F7DAA8F1A953F /* DDKitSwiftPluginProtocol.swift in Sources */, + 120E1CA3C1EE913D4D066C2EF68D2039 /* DDKitSwiftUIConfig.swift in Sources */, + 65A927FF326179DB019E9A5F7342AEBE /* DDKitSwiftWindow.swift in Sources */, + D6CAC22AFEF314B1400579B29AD53A5E /* DDLoggerSwift+ddkit.swift in Sources */, + 201359490B59B16BF694C765175378E1 /* ShareTools.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 757086D1CCE7BDBB08DF97A8FB4BE166 /* Sources */ = { + 8495894C36FD4411926B8A5F9EB69A40 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 1A4D583D0B2C6D0C9F3F462690E111E2 /* Pods-DDKitSwift-Netfox-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - C08C2E1F8942D6D969711F54A9EE48F2 /* Sources */ = { + AB7899660A7C777D8B53BD12FC402549 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + DB2A3917A9F8740716C6F59A24F1C6DC /* Data+zx.swift in Sources */, + FED7BC6B61F4BA6E7E394004C40EECE2 /* Date+zx.swift in Sources */, + 424E31AB35E86EC69616999D7EB415B4 /* DDUtils.swift in Sources */, + 5B552F961385EB6099F2D353796A0E4B /* DDUtils+AppStore.swift in Sources */, + AF3C21058B4F73F813DE8540D028C50B /* DDUtils+file.swift in Sources */, + 5F235E6537222412CDF4F02E86504A0E /* DDUtils+media.swift in Sources */, + 8EA402FC340EB88037F9406338AD15DC /* DDUtils+system.swift in Sources */, + B7E59BAE98736C7B5671BA90708FDB36 /* DDUtils+UI.swift in Sources */, + 97A48E272D7569CBDFE64749C085EBC6 /* DDUtils-dummy.m in Sources */, + 51FA925C64834393625A3223D989CE8C /* String+zx.swift in Sources */, + EC20F644497E4F82E3BDE3D21521A15A /* UIColor+zx.swift in Sources */, + F2C7C9197264E699F13B36D0792FE830 /* UIImage+zx.swift in Sources */, + C687E17BF9D368A3ED5FDF9AF2220D6B /* UIView+zx.swift in Sources */, + 08ED8E5BA7357DAC2996C7B5A0F6EC7C /* ZXKitNameSpace.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - DA53D13876404909021E4A4681403955 /* Sources */ = { + D2F4AC59266BA14EF55A383B56D855B5 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - E31E149806DD5D1DEEABD618BEFFD0A1 /* Data+zx.swift in Sources */, - 27E4BD707CAF03DB3B807980BA0DBEEF /* Date+zx.swift in Sources */, - 9BE2265DFBE0E6C8940912BE438EE9FA /* String+zx.swift in Sources */, - 49FF3FA18363F510789526811404F3F1 /* UIColor+zx.swift in Sources */, - 192E0619D159E2AE88B64C76A12F646E /* UIImage+zx.swift in Sources */, - 83A27318DBE678133AF58B9B15CDB67D /* UIView+zx.swift in Sources */, - E91451C6B1AFC1743B0E250ECF70AB60 /* ZXKitNameSpace.swift in Sources */, - FF3CE106F9C79B2E4E36BB1363A5EAAA /* ZXKitUtil.swift in Sources */, - 6E9EDFEEF240398858948A473D762631 /* ZXKitUtil+file.swift in Sources */, - 296F4C9067AAAF2C9743ECD63587FBDD /* ZXKitUtil+media.swift in Sources */, - C265F97A777979D61333F2088A689BB4 /* ZXKitUtil+permission.swift in Sources */, - A2EEEEDC77C8D999FBA0640AEABC4EB2 /* ZXKitUtil+system.swift in Sources */, - 7472C16947AD3B45BEA7F1BA314229D4 /* ZXKitUtil+UI.swift in Sources */, - FC40BD30290AD046940352504D98B79F /* ZXKitUtil-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - E2C5DE6DA3FAAF0C6632D0595B9E1377 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - F03B552BC07BF16BE61908F497B00EA4 /* CircleMenu.swift in Sources */, - 396243FFDF538EF71B16A48C13261702 /* CircleMenuButton.swift in Sources */, - F2586B8AE856A1B95C1D9487528F4316 /* CircleMenuLoader.swift in Sources */, - 8B8BDF2551B0B94BBBB13E1772D50C3F /* CircleMenuMaskView.swift in Sources */, - 63A9B4B6687825051414E843330E07B2 /* ShareTools.swift in Sources */, - 4508F66BC08A1F32C26F0CD35EE9F397 /* ZXKit.swift in Sources */, - 6C72D16AAF1F2D3CA02DCF08BCF64120 /* ZXKitCollectionViewHeaderView.swift in Sources */, - 4C64EFB4FC53E130DD9B2DD3E1A6C42C /* ZXKitCore-dummy.m in Sources */, - 79D3CA2F2974532D6FAE85C14C8591DD /* ZXKitFloatWindow.swift in Sources */, - 6EDBF1B28EBFBE7BC81EE5EDEDDB7FA7 /* ZXKitLogger+zxkit.swift in Sources */, - 7D29143D343D8A86D3B0176E32755550 /* ZXKitPluginCollectionViewCell.swift in Sources */, - 83393F6B273883E849C8D4E4DC2921B9 /* ZXKitPluginProtocol.swift in Sources */, - 6EE6789633DEFBD624DE3896B5CDE779 /* ZXKitUIConfig.swift in Sources */, - B55F62B5825A84366334F2388EE104C8 /* ZXKitWindow.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - EDE70F1B0102DC44DAF46C6E8752EA92 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 9A8AA93E06A47DDA976BFC1E4C73AC18 /* Pods-netfox-zxkit-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 06AA64ED2FE0B3A704F8B2F3C9D4C05D /* PBXTargetDependency */ = { + 499168C2D206AB8862F185EECD5786E8 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = SSZipArchive; - target = F60E38364AFF5E1349FF07415B944396 /* SSZipArchive */; - targetProxy = A10A7C1CC6567004C233144891A99D7B /* PBXContainerItemProxy */; + name = DDLoggerSwift; + target = A1166E0B033B5DCD8B18503328A162BD /* DDLoggerSwift */; + targetProxy = C4F88190644364F5BDDDB8EF5AA4773A /* PBXContainerItemProxy */; }; - 15935F67BA8BC4EF9CFE6C46B16A076D /* PBXTargetDependency */ = { + 6E5A1F7CB47283A7EBB4AFAD80FCB574 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = SSZipArchive; - target = F60E38364AFF5E1349FF07415B944396 /* SSZipArchive */; - targetProxy = E74032BCAD243489C73BCA6F4339CFF7 /* PBXContainerItemProxy */; - }; - 4B59F0A7D9BF1A286B4A6A7ADF7C8DB3 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = ZXKitUtil; - target = 4B09DDD2A3083E311C984F301582897A /* ZXKitUtil */; - targetProxy = A8102D0116307EFA6910F1407651115C /* PBXContainerItemProxy */; - }; - 54CA2279FB92C5ABE5C0009ED3020B5D /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "ZXKitCore-ZXKitCore"; - target = 6535447A49D8AE5353316E9D3CA44597 /* ZXKitCore-ZXKitCore */; - targetProxy = 2D72563CF32C5FDDFD702925626D158E /* PBXContainerItemProxy */; + name = netfox; + target = 33426EFE1931E100B59ABF41FD14377D /* netfox */; + targetProxy = D8D958D56F63081B2F6662143613AA92 /* PBXContainerItemProxy */; }; - 5594303355F4A2B9B544DBA33DA4BEC5 /* PBXTargetDependency */ = { + 758420EBDF4A8475D59BBC0311B6DA91 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = ZXKitLogger; - target = 4E2A67B4E83F0D031AD81CD755A5DB22 /* ZXKitLogger */; - targetProxy = B875ED0027C7DE858969AAAC44B2E400 /* PBXContainerItemProxy */; + name = DDUtils; + target = 763460C4E0B28EA6B8A750D8642AF267 /* DDUtils */; + targetProxy = 70EA67F8D329C3882B0061000D3E548A /* PBXContainerItemProxy */; }; - 5E2582499FE10E4B3C90F8D0C60653B1 /* PBXTargetDependency */ = { + 759A330E3F45805C9981ED583FD83612 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = "ZXKitLogger-ZXKitLogger"; - target = ACEAC673D122B792913296B416165FE0 /* ZXKitLogger-ZXKitLogger */; - targetProxy = 16104EB46856383FF325DF5FC9B1FDB5 /* PBXContainerItemProxy */; + name = DDKitSwift; + target = 1199A23AE1EAA19934856C5359B5D5BE /* DDKitSwift */; + targetProxy = B53840FA27357AAADE97ED84971EC664 /* PBXContainerItemProxy */; }; - 6AF038CD2E6125DFDCA5B0AB8778F895 /* PBXTargetDependency */ = { + 811FC1A52AA6AEDA853504301F23EFE1 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = ZXKitUtil; - target = 4B09DDD2A3083E311C984F301582897A /* ZXKitUtil */; - targetProxy = 4C743585DD7A6C2B7AFC69E8266EF700 /* PBXContainerItemProxy */; + name = DDLoggerSwift; + target = A1166E0B033B5DCD8B18503328A162BD /* DDLoggerSwift */; + targetProxy = 063289C66DED39B405DC4424D341A524 /* PBXContainerItemProxy */; }; - B642C33A803D86D19CFF42A47B2BA898 /* PBXTargetDependency */ = { + C1740BADF2D359D3B2679DE3C04AE537 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = ZXKitUtil; - target = 4B09DDD2A3083E311C984F301582897A /* ZXKitUtil */; - targetProxy = D8881B3C94FD15537DF2CB174DF428CF /* PBXContainerItemProxy */; + name = "DDLoggerSwift-DDLoggerSwift"; + target = 53280B0B690F632E21ADED6BA1A17543 /* DDLoggerSwift-DDLoggerSwift */; + targetProxy = D683EF8D454617144AFBD0CEE8AEB6A2 /* PBXContainerItemProxy */; }; - D4A048259D272A26D75FB691E3E57FD4 /* PBXTargetDependency */ = { + CC84D799B9698AE1F63E14000F9BCEBF /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = ZXKitLogger; - target = 4E2A67B4E83F0D031AD81CD755A5DB22 /* ZXKitLogger */; - targetProxy = B9E2DAEDE9C2C554C1B314EA209B2B23 /* PBXContainerItemProxy */; + name = DDUtils; + target = 763460C4E0B28EA6B8A750D8642AF267 /* DDUtils */; + targetProxy = CE95AA5C1DF0E5D762D51BF2F96CCB30 /* PBXContainerItemProxy */; }; - E7D76283C58E68E9CD73316EF1539AB6 /* PBXTargetDependency */ = { + ECC53906545636208556FF9A5E9C36C8 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = ZXKitCore; - target = 23CC5B423FA68CF6FCACD593F1FEDCF6 /* ZXKitCore */; - targetProxy = C24983E4A4371E0100FE3536AF850385 /* PBXContainerItemProxy */; + name = DDUtils; + target = 763460C4E0B28EA6B8A750D8642AF267 /* DDUtils */; + targetProxy = 6BD1237CC209025430B84E2D25EA7C38 /* PBXContainerItemProxy */; }; - FCD46C1CE44C71E3C61271E3724B46CD /* PBXTargetDependency */ = { + F8C68D6B6EC5DA416A424731C31E983F /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = netfox; - target = 33426EFE1931E100B59ABF41FD14377D /* netfox */; - targetProxy = 1E88B8062081FC06F77B98D76FBAD779 /* PBXContainerItemProxy */; + name = "DDKitSwift-DDKitSwift"; + target = 3E903540BB2AEB597EFBFC8F5F01C33F /* DDKitSwift-DDKitSwift */; + targetProxy = 7CA474E62CBFDD64798D5B2B74D62033 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ - 2EAB52A882FE1551521143CB9EFDA98E /* Localizable.strings */ = { + 126D57BD316DBBF9E2BFDA3798A32C0A /* Localizable.strings */ = { isa = PBXVariantGroup; children = ( - 54E286FD39938F603C85ACC3F69410F0 /* Localizable.strings */, - 9C8A957F846B4AAD5F39C4ACBFF0B6B6 /* Localizable.strings */, + A6585F805DEA896E1D4CB3E912153345 /* Localizable.strings */, + 5B80F735F4D2199CF8CFC9266CC21819 /* Localizable.strings */, ); name = Localizable.strings; path = pod/assets/localizable; sourceTree = ""; }; - 63223FFF70CBA065817589C3612C267D /* Localizable.strings */ = { + 405E28C29B602AE3C166700FD53FA4CE /* Localizable.strings */ = { isa = PBXVariantGroup; children = ( - 343FDDDDAF59AAA56D8FBE32990728A6 /* Localizable.strings */, - C55364A1D04AF0F94E5EFEF706385E2D /* Localizable.strings */, + 5BD2153FEE8B1FCD7FAFD9871F7B1EA8 /* Localizable.strings */, + 831A1873B788151B10851A4C7888E2E0 /* Localizable.strings */, ); name = Localizable.strings; path = pod/assets/localizable; @@ -1438,25 +1203,9 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ - 1C03BDACF333B5975D9AA5DC723EA2B0 /* Debug */ = { + 3D37788D63E3A378958171CC4A498331 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A78EEFA921DED75D30512BDC3C46AE1C /* ZXKitCore.debug.xcconfig */; - buildSettings = { - CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/ZXKitCore"; - IBSC_MODULE = ZXKitCore; - INFOPLIST_FILE = "Target Support Files/ZXKitCore/ResourceBundle-ZXKitCore-ZXKitCore-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - PRODUCT_NAME = ZXKitCore; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - WRAPPER_EXTENSION = bundle; - }; - name = Debug; - }; - 2822802C23E868C60ECD015DA344A594 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7797C229A030A79ABD1513934B323707 /* ZXKitUtil.debug.xcconfig */; + baseConfigurationReference = 334ADB6A89487748EB4351AB44C2F231 /* DDKitSwift.debug.xcconfig */; buildSettings = { CLANG_ENABLE_OBJC_WEAK = NO; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -1467,8 +1216,8 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/ZXKitUtil/ZXKitUtil-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/ZXKitUtil/ZXKitUtil-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/DDKitSwift/DDKitSwift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/DDKitSwift/DDKitSwift-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -1476,9 +1225,9 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MODULEMAP_FILE = "Target Support Files/ZXKitUtil/ZXKitUtil.modulemap"; - PRODUCT_MODULE_NAME = ZXKitUtil; - PRODUCT_NAME = ZXKitUtil; + MODULEMAP_FILE = "Target Support Files/DDKitSwift/DDKitSwift.modulemap"; + PRODUCT_MODULE_NAME = DDKitSwift; + PRODUCT_NAME = DDKitSwift; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; @@ -1489,10 +1238,11 @@ }; name = Debug; }; - 2C1BC396B16AC139B33C334F5C58B7F2 /* Debug */ = { + 4E11CAB074A1EC483529B46E2BE7C9B8 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = DE0D7A5FDA759CEFE0512C2BF9D4B99D /* ZXKitLogger.debug.xcconfig */; + baseConfigurationReference = 7A53DEF5C53BD8D942FA71D283476D96 /* Pods-DDKitSwift-Netfox.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CLANG_ENABLE_OBJC_WEAK = NO; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -1502,67 +1252,55 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/ZXKitLogger/ZXKitLogger-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/ZXKitLogger/ZXKitLogger-Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 14.5; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MODULEMAP_FILE = "Target Support Files/ZXKitLogger/ZXKitLogger.modulemap"; - PRODUCT_MODULE_NAME = ZXKitLogger; - PRODUCT_NAME = ZXKitLogger; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; - }; - 2ED9A211220657AAA690036D045BBADC /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = ED0B55FBDE604C9312C305C4A80D62F6 /* ZXKitCore.release.xcconfig */; - buildSettings = { - CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/ZXKitCore"; - IBSC_MODULE = ZXKitCore; - INFOPLIST_FILE = "Target Support Files/ZXKitCore/ResourceBundle-ZXKitCore-ZXKitCore-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - PRODUCT_NAME = ZXKitCore; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - WRAPPER_EXTENSION = bundle; - }; name = Release; }; - 49FEA24A34B93E8FE7AAD4412E12F4ED /* Release */ = { + 54453CD4124A0B0FCE825F83159268DB /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B6B9DF479C5292C0C80DD88E6A766AE9 /* SSZipArchive.release.xcconfig */; + baseConfigurationReference = 862EEF4075B8A9448F8F72AFDE91B6E4 /* DDUtils.release.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/SSZipArchive/SSZipArchive-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/SSZipArchive/SSZipArchive-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/DDUtils/DDUtils-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/DDUtils/DDUtils-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MODULEMAP_FILE = "Target Support Files/SSZipArchive/SSZipArchive.modulemap"; - PRODUCT_MODULE_NAME = SSZipArchive; - PRODUCT_NAME = SSZipArchive; + MODULEMAP_FILE = "Target Support Files/DDUtils/DDUtils.modulemap"; + PRODUCT_MODULE_NAME = DDUtils; + PRODUCT_NAME = DDUtils; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; @@ -1574,47 +1312,26 @@ }; name = Release; }; - 4D629260BF28462233736C550D4B1997 /* Release */ = { + 5A34A7DAE815F6CEF63F5C02DF2D7E57 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 68BCDC39105B20BE7FC85B7C0CDA03A6 /* Pods-netfox-zxkit.release.xcconfig */; + baseConfigurationReference = F2B4F7EF4C93EEC234C29F801C945069 /* DDLoggerSwift.release.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 14.5; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + CODE_SIGNING_ALLOWED = NO; + CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/DDLoggerSwift"; + IBSC_MODULE = DDLoggerSwift; + INFOPLIST_FILE = "Target Support Files/DDLoggerSwift/ResourceBundle-DDLoggerSwift-DDLoggerSwift-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + PRODUCT_NAME = DDLoggerSwift; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; + WRAPPER_EXTENSION = bundle; }; name = Release; }; - 51C16A73DDA73995BB0F5A23A100C27D /* Release */ = { + 8535AB8FB540DD59F9F1BA26F261517B /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = CF5340F3216C178CFC00065D10AC9E0A /* ZXKitUtil.release.xcconfig */; + baseConfigurationReference = D01D62E54B5B821D431A8D1E33DB8F56 /* DDKitSwift.release.xcconfig */; buildSettings = { CLANG_ENABLE_OBJC_WEAK = NO; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -1625,8 +1342,8 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/ZXKitUtil/ZXKitUtil-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/ZXKitUtil/ZXKitUtil-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/DDKitSwift/DDKitSwift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/DDKitSwift/DDKitSwift-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -1634,9 +1351,9 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MODULEMAP_FILE = "Target Support Files/ZXKitUtil/ZXKitUtil.modulemap"; - PRODUCT_MODULE_NAME = ZXKitUtil; - PRODUCT_NAME = ZXKitUtil; + MODULEMAP_FILE = "Target Support Files/DDKitSwift/DDKitSwift.modulemap"; + PRODUCT_MODULE_NAME = DDKitSwift; + PRODUCT_NAME = DDKitSwift; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; @@ -1648,9 +1365,9 @@ }; name = Release; }; - 8D7FBCA2EA718A9B0791E5CC03ED16B2 /* Debug */ = { + 87C158839606500A9093EF9CDC1D8480 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A78EEFA921DED75D30512BDC3C46AE1C /* ZXKitCore.debug.xcconfig */; + baseConfigurationReference = F2B4F7EF4C93EEC234C29F801C945069 /* DDLoggerSwift.release.xcconfig */; buildSettings = { CLANG_ENABLE_OBJC_WEAK = NO; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -1661,8 +1378,8 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/ZXKitCore/ZXKitCore-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/ZXKitCore/ZXKitCore-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/DDLoggerSwift/DDLoggerSwift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/DDLoggerSwift/DDLoggerSwift-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -1670,93 +1387,58 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MODULEMAP_FILE = "Target Support Files/ZXKitCore/ZXKitCore.modulemap"; - PRODUCT_MODULE_NAME = ZXKitCore; - PRODUCT_NAME = ZXKitCore; + MODULEMAP_FILE = "Target Support Files/DDLoggerSwift/DDLoggerSwift.modulemap"; + PRODUCT_MODULE_NAME = DDLoggerSwift; + PRODUCT_NAME = DDLoggerSwift; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - A171C54169A135A5A9B47C770D72E592 /* Debug */ = { + 8BFDC2E62EAD7256E2A19E7892A32482 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9778E083D83D02212FE72828609CBB7F /* SSZipArchive.debug.xcconfig */; + baseConfigurationReference = 334ADB6A89487748EB4351AB44C2F231 /* DDKitSwift.debug.xcconfig */; buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/SSZipArchive/SSZipArchive-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/SSZipArchive/SSZipArchive-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MODULEMAP_FILE = "Target Support Files/SSZipArchive/SSZipArchive.modulemap"; - PRODUCT_MODULE_NAME = SSZipArchive; - PRODUCT_NAME = SSZipArchive; + CODE_SIGNING_ALLOWED = NO; + CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/DDKitSwift"; + IBSC_MODULE = DDKitSwift; + INFOPLIST_FILE = "Target Support Files/DDKitSwift/ResourceBundle-DDKitSwift-DDKitSwift-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + PRODUCT_NAME = DDKitSwift; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; + WRAPPER_EXTENSION = bundle; }; name = Debug; }; - AE07B634974EED3F602974871FC6A983 /* Release */ = { + B49D5DCD12E407891E8C33BB589EB045 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = ED0B55FBDE604C9312C305C4A80D62F6 /* ZXKitCore.release.xcconfig */; + baseConfigurationReference = D01D62E54B5B821D431A8D1E33DB8F56 /* DDKitSwift.release.xcconfig */; buildSettings = { - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/ZXKitCore/ZXKitCore-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/ZXKitCore/ZXKitCore-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + CODE_SIGNING_ALLOWED = NO; + CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/DDKitSwift"; + IBSC_MODULE = DDKitSwift; + INFOPLIST_FILE = "Target Support Files/DDKitSwift/ResourceBundle-DDKitSwift-DDKitSwift-Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 11.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MODULEMAP_FILE = "Target Support Files/ZXKitCore/ZXKitCore.modulemap"; - PRODUCT_MODULE_NAME = ZXKitCore; - PRODUCT_NAME = ZXKitCore; + PRODUCT_NAME = DDKitSwift; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; + WRAPPER_EXTENSION = bundle; }; name = Release; }; - B80FEA3B95987A27A2D0E88C4846C5B6 /* Debug */ = { + B677DB84EEC13379B7FA316C71EFD663 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A95B25DE6C477B23C737B4D2D3383BAA /* Pods-netfox-zxkit.debug.xcconfig */; + baseConfigurationReference = 4C0A2B89F7F0B06B4DFE6E95D5A373BF /* DDLoggerSwift.debug.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CLANG_ENABLE_OBJC_WEAK = NO; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -1766,23 +1448,22 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/DDLoggerSwift/DDLoggerSwift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/DDLoggerSwift/DDLoggerSwift-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 14.5; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + MODULEMAP_FILE = "Target Support Files/DDLoggerSwift/DDLoggerSwift.modulemap"; + PRODUCT_MODULE_NAME = DDLoggerSwift; + PRODUCT_NAME = DDLoggerSwift; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -1857,7 +1538,7 @@ }; BD05C31B9C4C10943E8FE140E37311A6 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 60A945577FDE796318DF59CE344F3FDF /* netfox.debug.xcconfig */; + baseConfigurationReference = 807787D8F4F457841F3CF78C148FDA0C /* netfox.debug.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -1889,58 +1570,6 @@ }; name = Debug; }; - C0005AB84367FC997C8F95793B151A78 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = B35A411BBACDC273345A48D91F04E0EB /* ZXKitLogger.release.xcconfig */; - buildSettings = { - CLANG_ENABLE_OBJC_WEAK = NO; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/ZXKitLogger/ZXKitLogger-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/ZXKitLogger/ZXKitLogger-Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - MODULEMAP_FILE = "Target Support Files/ZXKitLogger/ZXKitLogger.modulemap"; - PRODUCT_MODULE_NAME = ZXKitLogger; - PRODUCT_NAME = ZXKitLogger; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - C0678D7C0BE21C1DFA88DD8D249019D5 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = B35A411BBACDC273345A48D91F04E0EB /* ZXKitLogger.release.xcconfig */; - buildSettings = { - CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/ZXKitLogger"; - IBSC_MODULE = ZXKitLogger; - INFOPLIST_FILE = "Target Support Files/ZXKitLogger/ResourceBundle-ZXKitLogger-ZXKitLogger-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - PRODUCT_NAME = ZXKitLogger; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - WRAPPER_EXTENSION = bundle; - }; - name = Release; - }; C605C363CC9F26F9FF97DBB1D5C6E25C /* Release */ = { isa = XCBuildConfiguration; buildSettings = { @@ -2003,15 +1632,88 @@ }; name = Release; }; - E86769A4B1D1226D0D591DBC2B170FD9 /* Debug */ = { + CF9E55863B471586E95A1BD59E613EA4 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = DE0D7A5FDA759CEFE0512C2BF9D4B99D /* ZXKitLogger.debug.xcconfig */; + baseConfigurationReference = F23E9F67D4A3E52EE55BE056DE78A2E4 /* Pods-DDKitSwift-Netfox.debug.xcconfig */; buildSettings = { - CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/ZXKitLogger"; - IBSC_MODULE = ZXKitLogger; - INFOPLIST_FILE = "Target Support Files/ZXKitLogger/ResourceBundle-ZXKitLogger-ZXKitLogger-Info.plist"; + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CLANG_ENABLE_OBJC_WEAK = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 14.5; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + EDC3257106CD387EEC66FD6FF00E9A3C /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DEBD0DFD1D9B3C2D9F2D0929F9B13526 /* DDUtils.debug.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/DDUtils/DDUtils-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/DDUtils/DDUtils-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 11.0; - PRODUCT_NAME = ZXKitLogger; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MODULEMAP_FILE = "Target Support Files/DDUtils/DDUtils.modulemap"; + PRODUCT_MODULE_NAME = DDUtils; + PRODUCT_NAME = DDUtils; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + F89169DD954B089366A00A95CF8E4F59 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 4C0A2B89F7F0B06B4DFE6E95D5A373BF /* DDLoggerSwift.debug.xcconfig */; + buildSettings = { + CODE_SIGNING_ALLOWED = NO; + CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/DDLoggerSwift"; + IBSC_MODULE = DDLoggerSwift; + INFOPLIST_FILE = "Target Support Files/DDLoggerSwift/ResourceBundle-DDLoggerSwift-DDLoggerSwift-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + PRODUCT_NAME = DDLoggerSwift; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; @@ -2021,7 +1723,7 @@ }; FE417CB1982DDFAA8AD674217609A905 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D14B31C463642C2002F5EF5813A29D75 /* netfox.release.xcconfig */; + baseConfigurationReference = 03AFBAA6AC01F15D173B46D34919A9FB /* netfox.release.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -2066,11 +1768,11 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 3A9988FAC7397E039DFAD2205A3ED6CA /* Build configuration list for PBXNativeTarget "Pods-netfox-zxkit" */ = { + 2B2E5916B7EF480DA49CBB92314F3B9D /* Build configuration list for PBXNativeTarget "DDLoggerSwift" */ = { isa = XCConfigurationList; buildConfigurations = ( - B80FEA3B95987A27A2D0E88C4846C5B6 /* Debug */, - 4D629260BF28462233736C550D4B1997 /* Release */, + B677DB84EEC13379B7FA316C71EFD663 /* Debug */, + 87C158839606500A9093EF9CDC1D8480 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -2084,56 +1786,47 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 4AD403A7B238D8FD35302B2895368B36 /* Build configuration list for PBXNativeTarget "ZXKitCore" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 8D7FBCA2EA718A9B0791E5CC03ED16B2 /* Debug */, - AE07B634974EED3F602974871FC6A983 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 5D0A1C5EC006615C1092F876C06EAF4D /* Build configuration list for PBXNativeTarget "SSZipArchive" */ = { + 5BC2AB396BDF3ABA7DBE568EA020B756 /* Build configuration list for PBXNativeTarget "DDKitSwift-DDKitSwift" */ = { isa = XCConfigurationList; buildConfigurations = ( - A171C54169A135A5A9B47C770D72E592 /* Debug */, - 49FEA24A34B93E8FE7AAD4412E12F4ED /* Release */, + 8BFDC2E62EAD7256E2A19E7892A32482 /* Debug */, + B49D5DCD12E407891E8C33BB589EB045 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 795C4B6DD89DDDE5CE8E6FEA1380269B /* Build configuration list for PBXNativeTarget "ZXKitUtil" */ = { + 5DF4DB76A8AFC1E2CF6E04A495FD9CF0 /* Build configuration list for PBXNativeTarget "DDUtils" */ = { isa = XCConfigurationList; buildConfigurations = ( - 2822802C23E868C60ECD015DA344A594 /* Debug */, - 51C16A73DDA73995BB0F5A23A100C27D /* Release */, + EDC3257106CD387EEC66FD6FF00E9A3C /* Debug */, + 54453CD4124A0B0FCE825F83159268DB /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 877BB8BDC13F7E47BBD597A43538486B /* Build configuration list for PBXNativeTarget "ZXKitLogger" */ = { + 782C025FD9193633CEFCEAE3B7A1A3C4 /* Build configuration list for PBXNativeTarget "DDKitSwift" */ = { isa = XCConfigurationList; buildConfigurations = ( - 2C1BC396B16AC139B33C334F5C58B7F2 /* Debug */, - C0005AB84367FC997C8F95793B151A78 /* Release */, + 3D37788D63E3A378958171CC4A498331 /* Debug */, + 8535AB8FB540DD59F9F1BA26F261517B /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - B8F47D3DB8F2842A62511ECF83012000 /* Build configuration list for PBXNativeTarget "ZXKitCore-ZXKitCore" */ = { + 7EA072581558F1F045CED05C172C9E07 /* Build configuration list for PBXNativeTarget "Pods-DDKitSwift-Netfox" */ = { isa = XCConfigurationList; buildConfigurations = ( - 1C03BDACF333B5975D9AA5DC723EA2B0 /* Debug */, - 2ED9A211220657AAA690036D045BBADC /* Release */, + CF9E55863B471586E95A1BD59E613EA4 /* Debug */, + 4E11CAB074A1EC483529B46E2BE7C9B8 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - BF805DA7F6D27E9CDA684BC435B00B1C /* Build configuration list for PBXNativeTarget "ZXKitLogger-ZXKitLogger" */ = { + C0C8400962C13C91AC15767D11310155 /* Build configuration list for PBXNativeTarget "DDLoggerSwift-DDLoggerSwift" */ = { isa = XCConfigurationList; buildConfigurations = ( - E86769A4B1D1226D0D591DBC2B170FD9 /* Debug */, - C0678D7C0BE21C1DFA88DD8D249019D5 /* Release */, + F89169DD954B089366A00A95CF8E4F59 /* Debug */, + 5A34A7DAE815F6CEF63F5C02DF2D7E57 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/SSZipArchive.xcscheme b/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/DDKitSwift-DDKitSwift.xcscheme similarity index 89% rename from example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/SSZipArchive.xcscheme rename to example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/DDKitSwift-DDKitSwift.xcscheme index 08189f9..903999a 100644 --- a/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/SSZipArchive.xcscheme +++ b/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/DDKitSwift-DDKitSwift.xcscheme @@ -1,6 +1,6 @@ diff --git a/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/ZXKitCore.xcscheme b/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/DDKitSwift.xcscheme similarity index 90% rename from example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/ZXKitCore.xcscheme rename to example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/DDKitSwift.xcscheme index fcdddaf..7110480 100644 --- a/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/ZXKitCore.xcscheme +++ b/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/DDKitSwift.xcscheme @@ -1,6 +1,6 @@ diff --git a/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/Pods-netfox-zxkit.xcscheme b/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/DDLoggerSwift-DDLoggerSwift.xcscheme similarity index 89% rename from example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/Pods-netfox-zxkit.xcscheme rename to example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/DDLoggerSwift-DDLoggerSwift.xcscheme index b6e54d3..a3e8abf 100644 --- a/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/Pods-netfox-zxkit.xcscheme +++ b/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/DDLoggerSwift-DDLoggerSwift.xcscheme @@ -1,6 +1,6 @@ diff --git a/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/ZXKitLogger.xcscheme b/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/DDLoggerSwift.xcscheme similarity index 89% rename from example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/ZXKitLogger.xcscheme rename to example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/DDLoggerSwift.xcscheme index 896cd1d..6e6d3c7 100644 --- a/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/ZXKitLogger.xcscheme +++ b/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/DDLoggerSwift.xcscheme @@ -1,6 +1,6 @@ diff --git a/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/ZXKitUtil.xcscheme b/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/DDUtils.xcscheme similarity index 90% rename from example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/ZXKitUtil.xcscheme rename to example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/DDUtils.xcscheme index 66c31eb..5733668 100644 --- a/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/ZXKitUtil.xcscheme +++ b/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/DDUtils.xcscheme @@ -1,6 +1,6 @@ diff --git a/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/ZXKitCore-ZXKitCore.xcscheme b/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/Pods-DDKitSwift-Netfox.xcscheme similarity index 89% rename from example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/ZXKitCore-ZXKitCore.xcscheme rename to example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/Pods-DDKitSwift-Netfox.xcscheme index 4f9baf5..7116911 100644 --- a/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/ZXKitCore-ZXKitCore.xcscheme +++ b/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/Pods-DDKitSwift-Netfox.xcscheme @@ -1,6 +1,6 @@ diff --git a/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/ZXKitLogger-ZXKitLogger.xcscheme b/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/ZXKitLogger-ZXKitLogger.xcscheme deleted file mode 100644 index 953047b..0000000 --- a/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/ZXKitLogger-ZXKitLogger.xcscheme +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/netfox.xcscheme b/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/netfox.xcscheme index 13ddf38..f009dd1 100644 --- a/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/netfox.xcscheme +++ b/example/Pods/Pods.xcodeproj/xcuserdata/damon.xcuserdatad/xcschemes/netfox.xcscheme @@ -1,6 +1,6 @@ SchemeUserState - Pods-netfox-zxkit.xcscheme + DDKitSwift-DDKitSwift.xcscheme isShown orderHint 1 - SSZipArchive.xcscheme + DDKitSwift.xcscheme isShown orderHint - 2 - - ZXKitCore-ZXKitCore.xcscheme - - isShown - - orderHint - 4 + 0 - ZXKitCore.xcscheme + DDLoggerSwift-DDLoggerSwift.xcscheme isShown orderHint 3 - ZXKitLogger-ZXKitLogger.xcscheme + DDLoggerSwift.xcscheme isShown orderHint - 6 + 2 - ZXKitLogger.xcscheme + DDUtils.xcscheme isShown orderHint - 5 + 4 - ZXKitUtil.xcscheme + Pods-DDKitSwift-Netfox.xcscheme isShown orderHint - 7 + 6 netfox.xcscheme isShown orderHint - 0 + 5 SuppressBuildableAutocreation diff --git a/example/Pods/SSZipArchive/LICENSE.txt b/example/Pods/SSZipArchive/LICENSE.txt deleted file mode 100644 index 1cc4a4a..0000000 --- a/example/Pods/SSZipArchive/LICENSE.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013-2021, ZipArchive, https://github.com/ZipArchive - -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: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -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. diff --git a/example/Pods/SSZipArchive/README.md b/example/Pods/SSZipArchive/README.md deleted file mode 100644 index 7e038c3..0000000 --- a/example/Pods/SSZipArchive/README.md +++ /dev/null @@ -1,88 +0,0 @@ -[![CI](https://github.com/ZipArchive/ZipArchive/workflows/CI/badge.svg)](https://github.com/ZipArchive/ZipArchive/actions?query=workflow%3ACI) - -# SSZipArchive - -ZipArchive is a simple utility class for zipping and unzipping files on iOS, macOS and tvOS. - -- Unzip zip files; -- Unzip password protected zip files; -- Unzip AES encrypted zip files; -- Create zip files; -- Create large (> 4.3Gb) files; -- Create password protected zip files; -- Create AES encrypted zip files; -- Choose compression level; -- Zip-up NSData instances. (with a filename) - -## Installation and Setup - -*The main release branch is configured to support Objective-C and Swift 3+.* - -SSZipArchive works on Xcode 7 and above, iOS 9 and above, tvOS 9 and above, macOS 10.9 and above, watchOS 2 and above. - -### CocoaPods -In your Podfile: -`pod 'SSZipArchive'` - -You should define your minimum deployment target explicitly, like: -`platform :ios, '9.0'` - -Recommended CocoaPods version should be at least CocoaPods 1.7.5. - -### SPM -Add a Swift Package reference to https://github.com/ZipArchive/ZipArchive.git (SSZipArchive 2.4.2 and higher or master) - -### Carthage -In your Cartfile: -`github "ZipArchive/ZipArchive"` - -Note: We are no longer releasing a Carthage pre-built package as of 2.2.3. Developers are encouraged to build one themselves. - -### Manual - -1. Add the `SSZipArchive` and `minizip` folders to your project. -2. Add the `libz` and `libiconv` libraries to your target. -3. Add the `Security` framework to your target. -4. Add the following GCC_PREPROCESSOR_DEFINITIONS: `HAVE_INTTYPES_H HAVE_PKCRYPT HAVE_STDINT_H HAVE_WZAES HAVE_ZLIB $(inherited)`. - -SSZipArchive requires ARC. - -## Usage - -### Objective-C - -```objective-c - -//Import "#import " for SPM/Carthage, and "#import " for CocoaPods. - -// Create -[SSZipArchive createZipFileAtPath:zipPath withContentsOfDirectory:sampleDataPath]; - -// Unzip -[SSZipArchive unzipFileAtPath:zipPath toDestination:unzipPath]; -``` - -### Swift - -```swift -//Import "import ZipArchive" for SPM/Carthage, and "import SSZipArchive" for CocoaPods. - -// Create -SSZipArchive.createZipFileAtPath(zipPath, withContentsOfDirectory: sampleDataPath) - -// Unzip -SSZipArchive.unzipFileAtPath(zipPath, toDestination: unzipPath) -``` - -## License - -SSZipArchive is protected under the [MIT license](https://github.com/samsoffes/ssziparchive/raw/master/LICENSE) and our slightly modified version of [minizip-ng (formally minizip)](https://github.com/zlib-ng/minizip-ng) 3.0.2 is licensed under the [Zlib license](https://www.zlib.net/zlib_license.html). - -## Acknowledgments - -* Big thanks to *aish* for creating [ZipArchive](https://code.google.com/archive/p/ziparchive/). The project that inspired SSZipArchive. -* Thank you [@soffes](https://github.com/soffes) for the actual name of SSZipArchive. -* Thank you [@randomsequence](https://github.com/randomsequence) for implementing the creation support tech. -* Thank you [@johnezang](https://github.com/johnezang) for all his amazing help along the way. -* Thank you [@nmoinvaz](https://github.com/nmoinvaz) for minizip-ng (formally minizip), the core of ZipArchive. -* Thank you to [all the contributors](https://github.com/ZipArchive/ZipArchive/graphs/contributors). diff --git a/example/Pods/SSZipArchive/SSZipArchive/SSZipArchive.h b/example/Pods/SSZipArchive/SSZipArchive/SSZipArchive.h deleted file mode 100644 index 242b9a7..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/SSZipArchive.h +++ /dev/null @@ -1,165 +0,0 @@ -// -// SSZipArchive.h -// SSZipArchive -// -// Created by Sam Soffes on 7/21/10. -// - -#ifndef _SSZIPARCHIVE_H -#define _SSZIPARCHIVE_H - -#import - -#import "SSZipCommon.h" - -NS_ASSUME_NONNULL_BEGIN - -extern NSString *const SSZipArchiveErrorDomain; -typedef NS_ENUM(NSInteger, SSZipArchiveErrorCode) { - SSZipArchiveErrorCodeFailedOpenZipFile = -1, - SSZipArchiveErrorCodeFailedOpenFileInZip = -2, - SSZipArchiveErrorCodeFileInfoNotLoadable = -3, - SSZipArchiveErrorCodeFileContentNotReadable = -4, - SSZipArchiveErrorCodeFailedToWriteFile = -5, - SSZipArchiveErrorCodeInvalidArguments = -6, -}; - -@protocol SSZipArchiveDelegate; - -@interface SSZipArchive : NSObject - -// Password check -+ (BOOL)isFilePasswordProtectedAtPath:(NSString *)path; -+ (BOOL)isPasswordValidForArchiveAtPath:(NSString *)path password:(NSString *)pw error:(NSError * _Nullable * _Nullable)error NS_SWIFT_NOTHROW; - -// Total payload size -+ (NSNumber *)payloadSizeForArchiveAtPath:(NSString *)path error:(NSError **)error; - -// Unzip -+ (BOOL)unzipFileAtPath:(NSString *)path toDestination:(NSString *)destination; -+ (BOOL)unzipFileAtPath:(NSString *)path toDestination:(NSString *)destination delegate:(nullable id)delegate; - -+ (BOOL)unzipFileAtPath:(NSString *)path - toDestination:(NSString *)destination - overwrite:(BOOL)overwrite - password:(nullable NSString *)password - error:(NSError * *)error; - -+ (BOOL)unzipFileAtPath:(NSString *)path - toDestination:(NSString *)destination - overwrite:(BOOL)overwrite - password:(nullable NSString *)password - error:(NSError * *)error - delegate:(nullable id)delegate NS_REFINED_FOR_SWIFT; - -+ (BOOL)unzipFileAtPath:(NSString *)path - toDestination:(NSString *)destination - preserveAttributes:(BOOL)preserveAttributes - overwrite:(BOOL)overwrite - password:(nullable NSString *)password - error:(NSError * *)error - delegate:(nullable id)delegate; - -+ (BOOL)unzipFileAtPath:(NSString *)path - toDestination:(NSString *)destination - progressHandler:(void (^_Nullable)(NSString *entry, unz_file_info zipInfo, long entryNumber, long total))progressHandler - completionHandler:(void (^_Nullable)(NSString *path, BOOL succeeded, NSError * _Nullable error))completionHandler; - -+ (BOOL)unzipFileAtPath:(NSString *)path - toDestination:(NSString *)destination - overwrite:(BOOL)overwrite - password:(nullable NSString *)password - progressHandler:(void (^_Nullable)(NSString *entry, unz_file_info zipInfo, long entryNumber, long total))progressHandler - completionHandler:(void (^_Nullable)(NSString *path, BOOL succeeded, NSError * _Nullable error))completionHandler; - -+ (BOOL)unzipFileAtPath:(NSString *)path - toDestination:(NSString *)destination - preserveAttributes:(BOOL)preserveAttributes - overwrite:(BOOL)overwrite - nestedZipLevel:(NSInteger)nestedZipLevel - password:(nullable NSString *)password - error:(NSError **)error - delegate:(nullable id)delegate - progressHandler:(void (^_Nullable)(NSString *entry, unz_file_info zipInfo, long entryNumber, long total))progressHandler - completionHandler:(void (^_Nullable)(NSString *path, BOOL succeeded, NSError * _Nullable error))completionHandler; - -// Zip -// default compression level is Z_DEFAULT_COMPRESSION (from "zlib.h") -// keepParentDirectory: if YES, then unzipping will give `directoryName/fileName`. If NO, then unzipping will just give `fileName`. Default is NO. - -// without password -+ (BOOL)createZipFileAtPath:(NSString *)path withFilesAtPaths:(NSArray *)paths; -+ (BOOL)createZipFileAtPath:(NSString *)path withContentsOfDirectory:(NSString *)directoryPath; - -+ (BOOL)createZipFileAtPath:(NSString *)path withContentsOfDirectory:(NSString *)directoryPath keepParentDirectory:(BOOL)keepParentDirectory; - -// with optional password, default encryption is AES -// don't use AES if you need compatibility with native macOS unzip and Archive Utility -+ (BOOL)createZipFileAtPath:(NSString *)path withFilesAtPaths:(NSArray *)paths withPassword:(nullable NSString *)password; -+ (BOOL)createZipFileAtPath:(NSString *)path withFilesAtPaths:(NSArray *)paths withPassword:(nullable NSString *)password progressHandler:(void(^ _Nullable)(NSUInteger entryNumber, NSUInteger total))progressHandler; -+ (BOOL)createZipFileAtPath:(NSString *)path withContentsOfDirectory:(NSString *)directoryPath withPassword:(nullable NSString *)password; -+ (BOOL)createZipFileAtPath:(NSString *)path withContentsOfDirectory:(NSString *)directoryPath keepParentDirectory:(BOOL)keepParentDirectory withPassword:(nullable NSString *)password; -+ (BOOL)createZipFileAtPath:(NSString *)path - withContentsOfDirectory:(NSString *)directoryPath - keepParentDirectory:(BOOL)keepParentDirectory - withPassword:(nullable NSString *)password - andProgressHandler:(void(^ _Nullable)(NSUInteger entryNumber, NSUInteger total))progressHandler; -+ (BOOL)createZipFileAtPath:(NSString *)path - withContentsOfDirectory:(NSString *)directoryPath - keepParentDirectory:(BOOL)keepParentDirectory - compressionLevel:(int)compressionLevel - password:(nullable NSString *)password - AES:(BOOL)aes - progressHandler:(void(^ _Nullable)(NSUInteger entryNumber, NSUInteger total))progressHandler; -//suport symlink compress --file -+ (BOOL)createZipFileAtPath:(NSString *)path withFilesAtPaths:(NSArray *)paths withPassword:(nullable NSString *)password keepSymlinks:(BOOL)keeplinks; -//suport symlink compress --directory -+ (BOOL)createZipFileAtPath:(NSString *)path - withContentsOfDirectory:(NSString *)directoryPath - keepParentDirectory:(BOOL)keepParentDirectory - compressionLevel:(int)compressionLevel - password:(nullable NSString *)password - AES:(BOOL)aes - progressHandler:(void(^ _Nullable)(NSUInteger entryNumber, NSUInteger total))progressHandler - keepSymlinks:(BOOL)keeplinks; - -- (instancetype)init NS_UNAVAILABLE; -- (instancetype)initWithPath:(NSString *)path NS_DESIGNATED_INITIALIZER; -- (BOOL)open; -- (BOOL)openForAppending; - -/// write empty folder -- (BOOL)writeFolderAtPath:(NSString *)path withFolderName:(NSString *)folderName withPassword:(nullable NSString *)password; -/// write file -- (BOOL)writeFile:(NSString *)path withPassword:(nullable NSString *)password; -- (BOOL)writeFileAtPath:(NSString *)path withFileName:(nullable NSString *)fileName withPassword:(nullable NSString *)password; -- (BOOL)writeFileAtPath:(NSString *)path withFileName:(nullable NSString *)fileName compressionLevel:(int)compressionLevel password:(nullable NSString *)password AES:(BOOL)aes; -///write symlink files -- (BOOL)writeSymlinkFileAtPath:(NSString *)path withFileName:(nullable NSString *)fileName compressionLevel:(int)compressionLevel password:(nullable NSString *)password AES:(BOOL)aes; -/// write data -- (BOOL)writeData:(NSData *)data filename:(nullable NSString *)filename withPassword:(nullable NSString *)password; -- (BOOL)writeData:(NSData *)data filename:(nullable NSString *)filename compressionLevel:(int)compressionLevel password:(nullable NSString *)password AES:(BOOL)aes; - -- (BOOL)close; - -@end - -@protocol SSZipArchiveDelegate - -@optional - -- (void)zipArchiveWillUnzipArchiveAtPath:(NSString *)path zipInfo:(unz_global_info)zipInfo; -- (void)zipArchiveDidUnzipArchiveAtPath:(NSString *)path zipInfo:(unz_global_info)zipInfo unzippedPath:(NSString *)unzippedPath; - -- (BOOL)zipArchiveShouldUnzipFileAtIndex:(NSInteger)fileIndex totalFiles:(NSInteger)totalFiles archivePath:(NSString *)archivePath fileInfo:(unz_file_info)fileInfo; -- (void)zipArchiveWillUnzipFileAtIndex:(NSInteger)fileIndex totalFiles:(NSInteger)totalFiles archivePath:(NSString *)archivePath fileInfo:(unz_file_info)fileInfo; -- (void)zipArchiveDidUnzipFileAtIndex:(NSInteger)fileIndex totalFiles:(NSInteger)totalFiles archivePath:(NSString *)archivePath fileInfo:(unz_file_info)fileInfo; -- (void)zipArchiveDidUnzipFileAtIndex:(NSInteger)fileIndex totalFiles:(NSInteger)totalFiles archivePath:(NSString *)archivePath unzippedFilePath:(NSString *)unzippedFilePath; - -- (void)zipArchiveProgressEvent:(unsigned long long)loaded total:(unsigned long long)total; - -@end - -NS_ASSUME_NONNULL_END - -#endif /* _SSZIPARCHIVE_H */ diff --git a/example/Pods/SSZipArchive/SSZipArchive/SSZipArchive.m b/example/Pods/SSZipArchive/SSZipArchive/SSZipArchive.m deleted file mode 100644 index 7184d10..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/SSZipArchive.m +++ /dev/null @@ -1,1433 +0,0 @@ -// -// SSZipArchive.m -// SSZipArchive -// -// Created by Sam Soffes on 7/21/10. -// - -#import "SSZipArchive.h" -#include "minizip/mz_compat.h" -#include "minizip/mz_zip.h" -#include "minizip/mz_os.h" -#include -#include - -NSString *const SSZipArchiveErrorDomain = @"SSZipArchiveErrorDomain"; - -#define CHUNK 16384 - -int _zipOpenEntry(zipFile entry, NSString *name, const zip_fileinfo *zipfi, int level, NSString *password, BOOL aes); -BOOL _fileIsSymbolicLink(const unz_file_info *fileInfo); - -#ifndef API_AVAILABLE -// Xcode 7- compatibility -#define API_AVAILABLE(...) -#endif - -@interface NSData(SSZipArchive) -- (NSString *)_base64RFC4648 API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0)); -- (NSString *)_hexString; -@end - -@interface NSString (SSZipArchive) -- (NSString *)_sanitizedPath; -@end - -@interface SSZipArchive () -- (instancetype)init NS_DESIGNATED_INITIALIZER; -@end - -@implementation SSZipArchive -{ - /// path for zip file - NSString *_path; - zipFile _zip; -} - -#pragma mark - Password check - -+ (BOOL)isFilePasswordProtectedAtPath:(NSString *)path { - // Begin opening - zipFile zip = unzOpen(path.fileSystemRepresentation); - if (zip == NULL) { - return NO; - } - - BOOL passwordProtected = NO; - int ret = unzGoToFirstFile(zip); - if (ret == UNZ_OK) { - do { - ret = unzOpenCurrentFile(zip); - if (ret != UNZ_OK) { - // attempting with an arbitrary password to workaround `unzOpenCurrentFile` limitation on AES encrypted files - ret = unzOpenCurrentFilePassword(zip, ""); - unzCloseCurrentFile(zip); - if (ret == UNZ_OK || ret == MZ_PASSWORD_ERROR) { - passwordProtected = YES; - } - break; - } - unz_file_info fileInfo = {}; - ret = unzGetCurrentFileInfo(zip, &fileInfo, NULL, 0, NULL, 0, NULL, 0); - unzCloseCurrentFile(zip); - if (ret != UNZ_OK) { - break; - } else if ((fileInfo.flag & MZ_ZIP_FLAG_ENCRYPTED) == 1) { - passwordProtected = YES; - break; - } - - ret = unzGoToNextFile(zip); - } while (ret == UNZ_OK); - } - - unzClose(zip); - return passwordProtected; -} - -+ (BOOL)isPasswordValidForArchiveAtPath:(NSString *)path password:(NSString *)pw error:(NSError **)error { - if (error) { - *error = nil; - } - - zipFile zip = unzOpen(path.fileSystemRepresentation); - if (zip == NULL) { - if (error) { - *error = [NSError errorWithDomain:SSZipArchiveErrorDomain - code:SSZipArchiveErrorCodeFailedOpenZipFile - userInfo:@{NSLocalizedDescriptionKey: @"failed to open zip file"}]; - } - return NO; - } - - // Initialize passwordValid to YES (No password required) - BOOL passwordValid = YES; - int ret = unzGoToFirstFile(zip); - if (ret == UNZ_OK) { - do { - if (pw.length == 0) { - ret = unzOpenCurrentFile(zip); - } else { - ret = unzOpenCurrentFilePassword(zip, [pw cStringUsingEncoding:NSUTF8StringEncoding]); - } - if (ret != UNZ_OK) { - if (ret != MZ_PASSWORD_ERROR) { - if (error) { - *error = [NSError errorWithDomain:SSZipArchiveErrorDomain - code:SSZipArchiveErrorCodeFailedOpenFileInZip - userInfo:@{NSLocalizedDescriptionKey: @"failed to open file in zip archive"}]; - } - } - passwordValid = NO; - break; - } - unz_file_info fileInfo = {}; - ret = unzGetCurrentFileInfo(zip, &fileInfo, NULL, 0, NULL, 0, NULL, 0); - if (ret != UNZ_OK) { - if (error) { - *error = [NSError errorWithDomain:SSZipArchiveErrorDomain - code:SSZipArchiveErrorCodeFileInfoNotLoadable - userInfo:@{NSLocalizedDescriptionKey: @"failed to retrieve info for file"}]; - } - passwordValid = NO; - break; - } else if ((fileInfo.flag & 1) == 1) { - unsigned char buffer[10] = {0}; - int readBytes = unzReadCurrentFile(zip, buffer, (unsigned)MIN(10UL,fileInfo.uncompressed_size)); - if (readBytes < 0) { - // Let's assume error Z_DATA_ERROR is caused by an invalid password - // Let's assume other errors are caused by Content Not Readable - if (readBytes != Z_DATA_ERROR) { - if (error) { - *error = [NSError errorWithDomain:SSZipArchiveErrorDomain - code:SSZipArchiveErrorCodeFileContentNotReadable - userInfo:@{NSLocalizedDescriptionKey: @"failed to read contents of file entry"}]; - } - } - passwordValid = NO; - break; - } - passwordValid = YES; - break; - } - - unzCloseCurrentFile(zip); - ret = unzGoToNextFile(zip); - } while (ret == UNZ_OK); - } - - unzClose(zip); - return passwordValid; -} - -+ (NSNumber *)payloadSizeForArchiveAtPath:(NSString *)path error:(NSError **)error { - if (error) { - *error = nil; - } - - zipFile zip = unzOpen(path.fileSystemRepresentation); - if (zip == NULL) { - if (error) { - *error = [NSError errorWithDomain:SSZipArchiveErrorDomain - code:SSZipArchiveErrorCodeFailedOpenZipFile - userInfo:@{NSLocalizedDescriptionKey: @"failed to open zip file"}]; - } - return @0; - } - - unsigned long long totalSize = 0; - int ret = unzGoToFirstFile(zip); - if (ret == UNZ_OK) { - do { - ret = unzOpenCurrentFile(zip); - if (ret != UNZ_OK) { - if (error) { - *error = [NSError errorWithDomain:SSZipArchiveErrorDomain - code:SSZipArchiveErrorCodeFailedOpenFileInZip - userInfo:@{NSLocalizedDescriptionKey: @"failed to open file in zip archive"}]; - } - break; - } - unz_file_info fileInfo = {}; - ret = unzGetCurrentFileInfo(zip, &fileInfo, NULL, 0, NULL, 0, NULL, 0); - if (ret != UNZ_OK) { - if (error) { - *error = [NSError errorWithDomain:SSZipArchiveErrorDomain - code:SSZipArchiveErrorCodeFileInfoNotLoadable - userInfo:@{NSLocalizedDescriptionKey: @"failed to retrieve info for file"}]; - } - break; - } - - totalSize += fileInfo.uncompressed_size; - - unzCloseCurrentFile(zip); - ret = unzGoToNextFile(zip); - } while (ret == UNZ_OK); - } - - unzClose(zip); - - return [NSNumber numberWithUnsignedLongLong:totalSize]; -} - -#pragma mark - Unzipping - -+ (BOOL)unzipFileAtPath:(NSString *)path toDestination:(NSString *)destination -{ - return [self unzipFileAtPath:path toDestination:destination delegate:nil]; -} - -+ (BOOL)unzipFileAtPath:(NSString *)path toDestination:(NSString *)destination overwrite:(BOOL)overwrite password:(nullable NSString *)password error:(NSError **)error -{ - return [self unzipFileAtPath:path toDestination:destination preserveAttributes:YES overwrite:overwrite password:password error:error delegate:nil progressHandler:nil completionHandler:nil]; -} - -+ (BOOL)unzipFileAtPath:(NSString *)path toDestination:(NSString *)destination delegate:(nullable id)delegate -{ - return [self unzipFileAtPath:path toDestination:destination preserveAttributes:YES overwrite:YES password:nil error:nil delegate:delegate progressHandler:nil completionHandler:nil]; -} - -+ (BOOL)unzipFileAtPath:(NSString *)path - toDestination:(NSString *)destination - overwrite:(BOOL)overwrite - password:(nullable NSString *)password - error:(NSError **)error - delegate:(nullable id)delegate -{ - return [self unzipFileAtPath:path toDestination:destination preserveAttributes:YES overwrite:overwrite password:password error:error delegate:delegate progressHandler:nil completionHandler:nil]; -} - -+ (BOOL)unzipFileAtPath:(NSString *)path - toDestination:(NSString *)destination - overwrite:(BOOL)overwrite - password:(NSString *)password - progressHandler:(void (^)(NSString *entry, unz_file_info zipInfo, long entryNumber, long total))progressHandler - completionHandler:(void (^)(NSString *path, BOOL succeeded, NSError * _Nullable error))completionHandler -{ - return [self unzipFileAtPath:path toDestination:destination preserveAttributes:YES overwrite:overwrite password:password error:nil delegate:nil progressHandler:progressHandler completionHandler:completionHandler]; -} - -+ (BOOL)unzipFileAtPath:(NSString *)path - toDestination:(NSString *)destination - progressHandler:(void (^_Nullable)(NSString *entry, unz_file_info zipInfo, long entryNumber, long total))progressHandler - completionHandler:(void (^_Nullable)(NSString *path, BOOL succeeded, NSError * _Nullable error))completionHandler -{ - return [self unzipFileAtPath:path toDestination:destination preserveAttributes:YES overwrite:YES password:nil error:nil delegate:nil progressHandler:progressHandler completionHandler:completionHandler]; -} - -+ (BOOL)unzipFileAtPath:(NSString *)path - toDestination:(NSString *)destination - preserveAttributes:(BOOL)preserveAttributes - overwrite:(BOOL)overwrite - password:(nullable NSString *)password - error:(NSError * *)error - delegate:(nullable id)delegate -{ - return [self unzipFileAtPath:path toDestination:destination preserveAttributes:preserveAttributes overwrite:overwrite password:password error:error delegate:delegate progressHandler:nil completionHandler:nil]; -} - -+ (BOOL)unzipFileAtPath:(NSString *)path - toDestination:(NSString *)destination - preserveAttributes:(BOOL)preserveAttributes - overwrite:(BOOL)overwrite - password:(nullable NSString *)password - error:(NSError **)error - delegate:(nullable id)delegate - progressHandler:(void (^_Nullable)(NSString *entry, unz_file_info zipInfo, long entryNumber, long total))progressHandler - completionHandler:(void (^_Nullable)(NSString *path, BOOL succeeded, NSError * _Nullable error))completionHandler -{ - return [self unzipFileAtPath:path toDestination:destination preserveAttributes:preserveAttributes overwrite:overwrite nestedZipLevel:0 password:password error:error delegate:delegate progressHandler:progressHandler completionHandler:completionHandler]; -} - -+ (BOOL)unzipFileAtPath:(NSString *)path - toDestination:(NSString *)destination - preserveAttributes:(BOOL)preserveAttributes - overwrite:(BOOL)overwrite - nestedZipLevel:(NSInteger)nestedZipLevel - password:(nullable NSString *)password - error:(NSError **)error - delegate:(nullable id)delegate - progressHandler:(void (^_Nullable)(NSString *entry, unz_file_info zipInfo, long entryNumber, long total))progressHandler - completionHandler:(void (^_Nullable)(NSString *path, BOOL succeeded, NSError * _Nullable error))completionHandler -{ - // Guard against empty strings - if (path.length == 0 || destination.length == 0) - { - NSDictionary *userInfo = @{NSLocalizedDescriptionKey: @"received invalid argument(s)"}; - NSError *err = [NSError errorWithDomain:SSZipArchiveErrorDomain code:SSZipArchiveErrorCodeInvalidArguments userInfo:userInfo]; - if (error) - { - *error = err; - } - if (completionHandler) - { - completionHandler(nil, NO, err); - } - return NO; - } - - // Begin opening - zipFile zip = unzOpen(path.fileSystemRepresentation); - if (zip == NULL) - { - NSDictionary *userInfo = @{NSLocalizedDescriptionKey: @"failed to open zip file"}; - NSError *err = [NSError errorWithDomain:SSZipArchiveErrorDomain code:SSZipArchiveErrorCodeFailedOpenZipFile userInfo:userInfo]; - if (error) - { - *error = err; - } - if (completionHandler) - { - completionHandler(nil, NO, err); - } - return NO; - } - - NSDictionary * fileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:path error:nil]; - unsigned long long fileSize = [[fileAttributes objectForKey:NSFileSize] unsignedLongLongValue]; - unsigned long long currentPosition = 0; - - unz_global_info globalInfo = {}; - unzGetGlobalInfo(zip, &globalInfo); - - // Begin unzipping - int ret = 0; - ret = unzGoToFirstFile(zip); - if (ret != UNZ_OK && ret != MZ_END_OF_LIST) - { - NSDictionary *userInfo = @{NSLocalizedDescriptionKey: @"failed to open first file in zip file"}; - NSError *err = [NSError errorWithDomain:SSZipArchiveErrorDomain code:SSZipArchiveErrorCodeFailedOpenFileInZip userInfo:userInfo]; - if (error) - { - *error = err; - } - if (completionHandler) - { - completionHandler(nil, NO, err); - } - unzClose(zip); - return NO; - } - - BOOL success = YES; - BOOL canceled = NO; - int crc_ret = 0; - unsigned char buffer[4096] = {0}; - NSFileManager *fileManager = [NSFileManager defaultManager]; - NSMutableArray *directoriesModificationDates = [[NSMutableArray alloc] init]; - - // Message delegate - if ([delegate respondsToSelector:@selector(zipArchiveWillUnzipArchiveAtPath:zipInfo:)]) { - [delegate zipArchiveWillUnzipArchiveAtPath:path zipInfo:globalInfo]; - } - if ([delegate respondsToSelector:@selector(zipArchiveProgressEvent:total:)]) { - [delegate zipArchiveProgressEvent:currentPosition total:fileSize]; - } - - NSInteger currentFileNumber = -1; - NSError *unzippingError; - do { - currentFileNumber++; - if (ret == MZ_END_OF_LIST) { - break; - } - @autoreleasepool { - if (password.length == 0) { - ret = unzOpenCurrentFile(zip); - } else { - ret = unzOpenCurrentFilePassword(zip, [password cStringUsingEncoding:NSUTF8StringEncoding]); - } - - if (ret != UNZ_OK) { - unzippingError = [NSError errorWithDomain:@"SSZipArchiveErrorDomain" code:SSZipArchiveErrorCodeFailedOpenFileInZip userInfo:@{NSLocalizedDescriptionKey: @"failed to open file in zip file"}]; - success = NO; - break; - } - - // Reading data and write to file - unz_file_info fileInfo; - memset(&fileInfo, 0, sizeof(unz_file_info)); - - ret = unzGetCurrentFileInfo(zip, &fileInfo, NULL, 0, NULL, 0, NULL, 0); - if (ret != UNZ_OK) { - unzippingError = [NSError errorWithDomain:@"SSZipArchiveErrorDomain" code:SSZipArchiveErrorCodeFileInfoNotLoadable userInfo:@{NSLocalizedDescriptionKey: @"failed to retrieve info for file"}]; - success = NO; - unzCloseCurrentFile(zip); - break; - } - - currentPosition += fileInfo.compressed_size; - - // Message delegate - if ([delegate respondsToSelector:@selector(zipArchiveShouldUnzipFileAtIndex:totalFiles:archivePath:fileInfo:)]) { - if (![delegate zipArchiveShouldUnzipFileAtIndex:currentFileNumber - totalFiles:(NSInteger)globalInfo.number_entry - archivePath:path - fileInfo:fileInfo]) { - success = NO; - canceled = YES; - break; - } - } - if ([delegate respondsToSelector:@selector(zipArchiveWillUnzipFileAtIndex:totalFiles:archivePath:fileInfo:)]) { - [delegate zipArchiveWillUnzipFileAtIndex:currentFileNumber totalFiles:(NSInteger)globalInfo.number_entry - archivePath:path fileInfo:fileInfo]; - } - if ([delegate respondsToSelector:@selector(zipArchiveProgressEvent:total:)]) { - [delegate zipArchiveProgressEvent:(NSInteger)currentPosition total:(NSInteger)fileSize]; - } - - char *filename = (char *)malloc(fileInfo.size_filename + 1); - if (filename == NULL) - { - success = NO; - break; - } - - unzGetCurrentFileInfo(zip, &fileInfo, filename, fileInfo.size_filename + 1, NULL, 0, NULL, 0); - filename[fileInfo.size_filename] = '\0'; - - BOOL fileIsSymbolicLink = _fileIsSymbolicLink(&fileInfo); - - NSString * strPath = [SSZipArchive _filenameStringWithCString:filename - version_made_by:fileInfo.version - general_purpose_flag:fileInfo.flag - size:fileInfo.size_filename]; - if ([strPath hasPrefix:@"__MACOSX/"]) { - // ignoring resource forks: https://superuser.com/questions/104500/what-is-macosx-folder - unzCloseCurrentFile(zip); - ret = unzGoToNextFile(zip); - free(filename); - continue; - } - - // Check if it contains directory - BOOL isDirectory = NO; - if (filename[fileInfo.size_filename-1] == '/' || filename[fileInfo.size_filename-1] == '\\') { - isDirectory = YES; - } - free(filename); - - // Sanitize paths in the file name. - strPath = [strPath _sanitizedPath]; - if (!strPath.length) { - // if filename data is unsalvageable, we default to currentFileNumber - strPath = @(currentFileNumber).stringValue; - } - - NSString *fullPath = [destination stringByAppendingPathComponent:strPath]; - NSError *err = nil; - NSDictionary *directoryAttr; - if (preserveAttributes) { - NSDate *modDate = [[self class] _dateWithMSDOSFormat:(UInt32)fileInfo.mz_dos_date]; - directoryAttr = @{NSFileCreationDate: modDate, NSFileModificationDate: modDate}; - [directoriesModificationDates addObject: @{@"path": fullPath, @"modDate": modDate}]; - } - if (isDirectory) { - [fileManager createDirectoryAtPath:fullPath withIntermediateDirectories:YES attributes:directoryAttr error:&err]; - } else { - [fileManager createDirectoryAtPath:fullPath.stringByDeletingLastPathComponent withIntermediateDirectories:YES attributes:directoryAttr error:&err]; - } - if (err != nil) { - if ([err.domain isEqualToString:NSCocoaErrorDomain] && - err.code == 640) { - unzippingError = err; - unzCloseCurrentFile(zip); - success = NO; - break; - } - NSLog(@"[SSZipArchive] Error: %@", err.localizedDescription); - } - - if ([fileManager fileExistsAtPath:fullPath] && !isDirectory && !overwrite) { - //FIXME: couldBe CRC Check? - unzCloseCurrentFile(zip); - ret = unzGoToNextFile(zip); - continue; - } - - if (isDirectory && !fileIsSymbolicLink) { - // nothing to read/write for a directory - } else if (!fileIsSymbolicLink) { - // ensure we are not creating stale file entries - int readBytes = unzReadCurrentFile(zip, buffer, 4096); - if (readBytes >= 0) { - FILE *fp = fopen(fullPath.fileSystemRepresentation, "wb"); - while (fp) { - if (readBytes > 0) { - if (0 == fwrite(buffer, readBytes, 1, fp)) { - if (ferror(fp)) { - NSString *message = [NSString stringWithFormat:@"Failed to write file (check your free space)"]; - NSLog(@"[SSZipArchive] %@", message); - success = NO; - unzippingError = [NSError errorWithDomain:@"SSZipArchiveErrorDomain" code:SSZipArchiveErrorCodeFailedToWriteFile userInfo:@{NSLocalizedDescriptionKey: message}]; - break; - } - } - } else { - break; - } - readBytes = unzReadCurrentFile(zip, buffer, 4096); - if (readBytes < 0) { - // Let's assume error Z_DATA_ERROR is caused by an invalid password - // Let's assume other errors are caused by Content Not Readable - success = NO; - } - } - - if (fp) { - fclose(fp); - - if (nestedZipLevel - && [fullPath.pathExtension.lowercaseString isEqualToString:@"zip"] - && [self unzipFileAtPath:fullPath - toDestination:fullPath.stringByDeletingLastPathComponent - preserveAttributes:preserveAttributes - overwrite:overwrite - nestedZipLevel:nestedZipLevel - 1 - password:password - error:nil - delegate:nil - progressHandler:nil - completionHandler:nil]) { - [directoriesModificationDates removeLastObject]; - [[NSFileManager defaultManager] removeItemAtPath:fullPath error:nil]; - } else if (preserveAttributes) { - - // Set the original datetime property - if (fileInfo.mz_dos_date != 0) { - NSDate *orgDate = [[self class] _dateWithMSDOSFormat:(UInt32)fileInfo.mz_dos_date]; - NSDictionary *attr = @{NSFileModificationDate: orgDate}; - - if (attr) { - if (![fileManager setAttributes:attr ofItemAtPath:fullPath error:nil]) { - // Can't set attributes - NSLog(@"[SSZipArchive] Failed to set attributes - whilst setting modification date"); - } - } - } - - // Set the original permissions on the file (+read/write to solve #293) - uLong permissions = fileInfo.external_fa >> 16 | 0b110000000; - if (permissions != 0) { - // Store it into a NSNumber - NSNumber *permissionsValue = @(permissions); - - // Retrieve any existing attributes - NSMutableDictionary *attrs = [[NSMutableDictionary alloc] initWithDictionary:[fileManager attributesOfItemAtPath:fullPath error:nil]]; - - // Set the value in the attributes dict - [attrs setObject:permissionsValue forKey:NSFilePosixPermissions]; - - // Update attributes - if (![fileManager setAttributes:attrs ofItemAtPath:fullPath error:nil]) { - // Unable to set the permissions attribute - NSLog(@"[SSZipArchive] Failed to set attributes - whilst setting permissions"); - } - } - } - } - else - { - // if we couldn't open file descriptor we can validate global errno to see the reason - int errnoSave = errno; - BOOL isSeriousError = NO; - switch (errnoSave) { - case EISDIR: - // Is a directory - // assumed case - break; - - case ENOSPC: - case EMFILE: - // No space left on device - // or - // Too many open files - isSeriousError = YES; - break; - - default: - // ignore case - // Just log the error - { - NSError *errorObject = [NSError errorWithDomain:NSPOSIXErrorDomain - code:errnoSave - userInfo:nil]; - NSLog(@"[SSZipArchive] Failed to open file on unzipping.(%@)", errorObject); - } - break; - } - - if (isSeriousError) { - // serious case - unzippingError = [NSError errorWithDomain:NSPOSIXErrorDomain - code:errnoSave - userInfo:nil]; - unzCloseCurrentFile(zip); - // Log the error - NSLog(@"[SSZipArchive] Failed to open file on unzipping.(%@)", unzippingError); - - // Break unzipping - success = NO; - break; - } - } - } else { - // Let's assume error Z_DATA_ERROR is caused by an invalid password - // Let's assume other errors are caused by Content Not Readable - success = NO; - break; - } - } - else - { - // Assemble the path for the symbolic link - NSMutableString *destinationPath = [NSMutableString string]; - int bytesRead = 0; - while ((bytesRead = unzReadCurrentFile(zip, buffer, 4096)) > 0) - { - buffer[bytesRead] = 0; - [destinationPath appendString:@((const char *)buffer)]; - } - if (bytesRead < 0) { - // Let's assume error Z_DATA_ERROR is caused by an invalid password - // Let's assume other errors are caused by Content Not Readable - success = NO; - break; - } - - // Check if the symlink exists and delete it if we're overwriting - if (overwrite) - { - if ([fileManager fileExistsAtPath:fullPath]) - { - NSError *localError = nil; - BOOL removeSuccess = [fileManager removeItemAtPath:fullPath error:&localError]; - if (!removeSuccess) - { - NSString *message = [NSString stringWithFormat:@"Failed to delete existing symbolic link at \"%@\"", localError.localizedDescription]; - NSLog(@"[SSZipArchive] %@", message); - success = NO; - unzippingError = [NSError errorWithDomain:SSZipArchiveErrorDomain code:localError.code userInfo:@{NSLocalizedDescriptionKey: message}]; - } - } - } - - // Create the symbolic link (making sure it stays relative if it was relative before) - int symlinkError = symlink([destinationPath cStringUsingEncoding:NSUTF8StringEncoding], - [fullPath cStringUsingEncoding:NSUTF8StringEncoding]); - - if (symlinkError != 0) - { - // Bubble the error up to the completion handler - NSString *message = [NSString stringWithFormat:@"Failed to create symbolic link at \"%@\" to \"%@\" - symlink() error code: %d", fullPath, destinationPath, errno]; - NSLog(@"[SSZipArchive] %@", message); - success = NO; - unzippingError = [NSError errorWithDomain:NSPOSIXErrorDomain code:symlinkError userInfo:@{NSLocalizedDescriptionKey: message}]; - } - } - - crc_ret = unzCloseCurrentFile(zip); - if (crc_ret == MZ_CRC_ERROR) { - // CRC ERROR - success = NO; - break; - } - ret = unzGoToNextFile(zip); - - // Message delegate - if ([delegate respondsToSelector:@selector(zipArchiveDidUnzipFileAtIndex:totalFiles:archivePath:fileInfo:)]) { - [delegate zipArchiveDidUnzipFileAtIndex:currentFileNumber totalFiles:(NSInteger)globalInfo.number_entry - archivePath:path fileInfo:fileInfo]; - } else if ([delegate respondsToSelector: @selector(zipArchiveDidUnzipFileAtIndex:totalFiles:archivePath:unzippedFilePath:)]) { - [delegate zipArchiveDidUnzipFileAtIndex: currentFileNumber totalFiles: (NSInteger)globalInfo.number_entry - archivePath:path unzippedFilePath: fullPath]; - } - - if (progressHandler) - { - progressHandler(strPath, fileInfo, currentFileNumber, globalInfo.number_entry); - } - } - } while (ret == UNZ_OK && success); - - // Close - unzClose(zip); - - // The process of decompressing the .zip archive causes the modification times on the folders - // to be set to the present time. So, when we are done, they need to be explicitly set. - // set the modification date on all of the directories. - if (success && preserveAttributes) { - NSError * err = nil; - for (NSDictionary * d in directoriesModificationDates) { - if (![[NSFileManager defaultManager] setAttributes:@{NSFileModificationDate: [d objectForKey:@"modDate"]} ofItemAtPath:[d objectForKey:@"path"] error:&err]) { - NSLog(@"[SSZipArchive] Set attributes failed for directory: %@.", [d objectForKey:@"path"]); - } - if (err) { - NSLog(@"[SSZipArchive] Error setting directory file modification date attribute: %@", err.localizedDescription); - } - } - } - - // Message delegate - if (success && [delegate respondsToSelector:@selector(zipArchiveDidUnzipArchiveAtPath:zipInfo:unzippedPath:)]) { - [delegate zipArchiveDidUnzipArchiveAtPath:path zipInfo:globalInfo unzippedPath:destination]; - } - // final progress event = 100% - if (!canceled && [delegate respondsToSelector:@selector(zipArchiveProgressEvent:total:)]) { - [delegate zipArchiveProgressEvent:fileSize total:fileSize]; - } - - NSError *retErr = nil; - if (crc_ret == MZ_CRC_ERROR) - { - NSDictionary *userInfo = @{NSLocalizedDescriptionKey: @"crc check failed for file"}; - retErr = [NSError errorWithDomain:SSZipArchiveErrorDomain code:SSZipArchiveErrorCodeFileInfoNotLoadable userInfo:userInfo]; - } - - if (error) { - if (unzippingError) { - *error = unzippingError; - } - else { - *error = retErr; - } - } - if (completionHandler) - { - if (unzippingError) { - completionHandler(path, success, unzippingError); - } - else - { - completionHandler(path, success, retErr); - } - } - return success; -} - -#pragma mark - Zipping -+ (BOOL)createZipFileAtPath:(NSString *)path withFilesAtPaths:(NSArray *)paths -{ - return [SSZipArchive createZipFileAtPath:path withFilesAtPaths:paths withPassword:nil]; -} -+ (BOOL)createZipFileAtPath:(NSString *)path withContentsOfDirectory:(NSString *)directoryPath { - return [SSZipArchive createZipFileAtPath:path withContentsOfDirectory:directoryPath withPassword:nil]; -} - -+ (BOOL)createZipFileAtPath:(NSString *)path withContentsOfDirectory:(NSString *)directoryPath keepParentDirectory:(BOOL)keepParentDirectory { - return [SSZipArchive createZipFileAtPath:path withContentsOfDirectory:directoryPath keepParentDirectory:keepParentDirectory withPassword:nil]; -} - -+ (BOOL)createZipFileAtPath:(NSString *)path withFilesAtPaths:(NSArray *)paths withPassword:(NSString *)password { - return [self createZipFileAtPath:path withFilesAtPaths:paths withPassword:password progressHandler:nil]; -} - -+ (BOOL)createZipFileAtPath:(NSString *)path withFilesAtPaths:(NSArray *)paths withPassword:(NSString *)password progressHandler:(void(^ _Nullable)(NSUInteger entryNumber, NSUInteger total))progressHandler -{ - SSZipArchive *zipArchive = [[SSZipArchive alloc] initWithPath:path]; - BOOL success = [zipArchive open]; - if (success) { - NSUInteger total = paths.count, complete = 0; - for (NSString *filePath in paths) { - success &= [zipArchive writeFile:filePath withPassword:password]; - if (progressHandler) { - complete++; - progressHandler(complete, total); - } - } - success &= [zipArchive close]; - } - return success; -} - -+ (BOOL)createZipFileAtPath:(NSString *)path withContentsOfDirectory:(NSString *)directoryPath withPassword:(nullable NSString *)password { - return [SSZipArchive createZipFileAtPath:path withContentsOfDirectory:directoryPath keepParentDirectory:NO withPassword:password]; -} - - -+ (BOOL)createZipFileAtPath:(NSString *)path withContentsOfDirectory:(NSString *)directoryPath keepParentDirectory:(BOOL)keepParentDirectory withPassword:(nullable NSString *)password { - return [SSZipArchive createZipFileAtPath:path - withContentsOfDirectory:directoryPath - keepParentDirectory:keepParentDirectory - withPassword:password - andProgressHandler:nil - ]; -} - -+ (BOOL)createZipFileAtPath:(NSString *)path - withContentsOfDirectory:(NSString *)directoryPath - keepParentDirectory:(BOOL)keepParentDirectory - withPassword:(nullable NSString *)password - andProgressHandler:(void(^ _Nullable)(NSUInteger entryNumber, NSUInteger total))progressHandler { - return [self createZipFileAtPath:path withContentsOfDirectory:directoryPath keepParentDirectory:keepParentDirectory compressionLevel:Z_DEFAULT_COMPRESSION password:password AES:YES progressHandler:progressHandler]; -} - -+ (BOOL)createZipFileAtPath:(NSString *)path - withContentsOfDirectory:(NSString *)directoryPath - keepParentDirectory:(BOOL)keepParentDirectory - compressionLevel:(int)compressionLevel - password:(nullable NSString *)password - AES:(BOOL)aes - progressHandler:(void(^ _Nullable)(NSUInteger entryNumber, NSUInteger total))progressHandler { - - SSZipArchive *zipArchive = [[SSZipArchive alloc] initWithPath:path]; - BOOL success = [zipArchive open]; - if (success) { - // use a local fileManager (queue/thread compatibility) - NSFileManager *fileManager = [[NSFileManager alloc] init]; - NSDirectoryEnumerator *dirEnumerator = [fileManager enumeratorAtPath:directoryPath]; - NSArray *allObjects = dirEnumerator.allObjects; - NSUInteger total = allObjects.count, complete = 0; - if (keepParentDirectory && !total) { - allObjects = @[@""]; - total = 1; - } - for (__strong NSString *fileName in allObjects) { - NSString *fullFilePath = [directoryPath stringByAppendingPathComponent:fileName]; - if ([fullFilePath isEqualToString:path]) { - NSLog(@"[SSZipArchive] the archive path and the file path: %@ are the same, which is forbidden.", fullFilePath); - continue; - } - - if (keepParentDirectory) { - fileName = [directoryPath.lastPathComponent stringByAppendingPathComponent:fileName]; - } - - BOOL isDir; - [fileManager fileExistsAtPath:fullFilePath isDirectory:&isDir]; - if (!isDir) { - // file - success &= [zipArchive writeFileAtPath:fullFilePath withFileName:fileName compressionLevel:compressionLevel password:password AES:aes]; - } else { - // directory - if (![fileManager enumeratorAtPath:fullFilePath].nextObject) { - // empty directory - success &= [zipArchive writeFolderAtPath:fullFilePath withFolderName:fileName withPassword:password]; - } - } - if (progressHandler) { - complete++; - progressHandler(complete, total); - } - } - success &= [zipArchive close]; - } - return success; -} - -+ (BOOL)createZipFileAtPath:(NSString *)path withFilesAtPaths:(NSArray *)paths withPassword:(nullable NSString *)password keepSymlinks:(BOOL)keeplinks { - if (!keeplinks) { - return [SSZipArchive createZipFileAtPath:path withFilesAtPaths:paths withPassword:password]; - } else { - SSZipArchive *zipArchive = [[SSZipArchive alloc] initWithPath:path]; - BOOL success = [zipArchive open]; - if (success) { - for (NSString *filePath in paths) { - //is symlink - if (mz_os_is_symlink(filePath.fileSystemRepresentation) == MZ_OK) { - success &= [zipArchive writeSymlinkFileAtPath:filePath withFileName:nil compressionLevel:Z_DEFAULT_COMPRESSION password:password AES:YES]; - } else { - success &= [zipArchive writeFile:filePath withPassword:password]; - } - } - success &= [zipArchive close]; - } - return success; - } -} - -+ (BOOL)createZipFileAtPath:(NSString *)path - withContentsOfDirectory:(NSString *)directoryPath - keepParentDirectory:(BOOL)keepParentDirectory - compressionLevel:(int)compressionLevel - password:(nullable NSString *)password - AES:(BOOL)aes - progressHandler:(void(^ _Nullable)(NSUInteger entryNumber, NSUInteger total))progressHandler - keepSymlinks:(BOOL)keeplinks { - if (!keeplinks) { - return [SSZipArchive createZipFileAtPath:path - withContentsOfDirectory:directoryPath - keepParentDirectory:keepParentDirectory - compressionLevel:compressionLevel - password:password - AES:aes - progressHandler:progressHandler]; - } else { - SSZipArchive *zipArchive = [[SSZipArchive alloc] initWithPath:path]; - BOOL success = [zipArchive open]; - if (success) { - // use a local fileManager (queue/thread compatibility) - NSFileManager *fileManager = [[NSFileManager alloc] init]; - NSDirectoryEnumerator *dirEnumerator = [fileManager enumeratorAtPath:directoryPath]; - NSArray *allObjects = dirEnumerator.allObjects; - NSUInteger total = allObjects.count, complete = 0; - if (keepParentDirectory && !total) { - allObjects = @[@""]; - total = 1; - } - for (__strong NSString *fileName in allObjects) { - NSString *fullFilePath = [directoryPath stringByAppendingPathComponent:fileName]; - - if (keepParentDirectory) { - fileName = [directoryPath.lastPathComponent stringByAppendingPathComponent:fileName]; - } - //is symlink - BOOL isSymlink = NO; - if (mz_os_is_symlink(fullFilePath.fileSystemRepresentation) == MZ_OK) - isSymlink = YES; - BOOL isDir; - [fileManager fileExistsAtPath:fullFilePath isDirectory:&isDir]; - if (!isDir || isSymlink) { - // file or symlink - if (!isSymlink) { - success &= [zipArchive writeFileAtPath:fullFilePath withFileName:fileName compressionLevel:compressionLevel password:password AES:aes]; - } else { - success &= [zipArchive writeSymlinkFileAtPath:fullFilePath withFileName:fileName compressionLevel:compressionLevel password:password AES:aes]; - } - } else { - // directory - if (![fileManager enumeratorAtPath:fullFilePath].nextObject) { - // empty directory - success &= [zipArchive writeFolderAtPath:fullFilePath withFolderName:fileName withPassword:password]; - } - } - if (progressHandler) { - complete++; - progressHandler(complete, total); - } - } - success &= [zipArchive close]; - } - return success; - } -} - -- (BOOL)writeSymlinkFileAtPath:(NSString *)path withFileName:(nullable NSString *)fileName compressionLevel:(int)compressionLevel password:(nullable NSString *)password AES:(BOOL)aes -{ - NSAssert((_zip != NULL), @"Attempting to write to an archive which was never opened"); - //read symlink - char link_path[1024]; - int32_t err = MZ_OK; - err = mz_os_read_symlink(path.fileSystemRepresentation, link_path, sizeof(link_path)); - if (err != MZ_OK) { - NSLog(@"[SSZipArchive] Failed to read sylink"); - return NO; - } - - if (!fileName) { - fileName = path.lastPathComponent; - } - - zip_fileinfo zipInfo = {}; - [SSZipArchive zipInfo:&zipInfo setAttributesOfItemAtPath:path]; - - //unpdate zipInfo.external_fa - uint32_t target_attrib = 0; - uint32_t src_attrib = 0; - uint32_t src_sys = 0; - mz_os_get_file_attribs(path.fileSystemRepresentation, &src_attrib); - src_sys = MZ_HOST_SYSTEM(MZ_VERSION_MADEBY); - - if ((src_sys != MZ_HOST_SYSTEM_MSDOS) && (src_sys != MZ_HOST_SYSTEM_WINDOWS_NTFS)) { - /* High bytes are OS specific attributes, low byte is always DOS attributes */ - if (mz_zip_attrib_convert(src_sys, src_attrib, MZ_HOST_SYSTEM_MSDOS, &target_attrib) == MZ_OK) - zipInfo.external_fa = target_attrib; - zipInfo.external_fa |= (src_attrib << 16); - } else { - zipInfo.external_fa = src_attrib; - } - - uint16_t version_madeby = 3 << 8;//UNIX - int error = zipOpenNewFileInZip5(_zip, fileName.fileSystemRepresentation, &zipInfo, NULL, 0, NULL, 0, NULL, Z_DEFLATED, compressionLevel, 0, -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, password.UTF8String, aes, version_madeby, 0, 0); - zipWriteInFileInZip(_zip, link_path, (uint32_t)strlen(link_path)); - zipCloseFileInZip(_zip); - return error == ZIP_OK; -} - -// disabling `init` because designated initializer is `initWithPath:` -- (instancetype)init { @throw nil; } - -// designated initializer -- (instancetype)initWithPath:(NSString *)path -{ - if ((self = [super init])) { - _path = [path copy]; - } - return self; -} - - -- (BOOL)open -{ - NSAssert((_zip == NULL), @"Attempting to open an archive which is already open"); - _zip = zipOpen(_path.fileSystemRepresentation, APPEND_STATUS_CREATE); - return (NULL != _zip); -} - -- (BOOL)openForAppending -{ - NSAssert((_zip == NULL), @"Attempting to open an archive which is already open"); - _zip = zipOpen(_path.fileSystemRepresentation, APPEND_STATUS_ADDINZIP); - return (NULL != _zip); -} - -- (BOOL)writeFolderAtPath:(NSString *)path withFolderName:(NSString *)folderName withPassword:(nullable NSString *)password -{ - NSAssert((_zip != NULL), @"Attempting to write to an archive which was never opened"); - - zip_fileinfo zipInfo = {}; - - [SSZipArchive zipInfo:&zipInfo setAttributesOfItemAtPath:path]; - - int error = _zipOpenEntry(_zip, [folderName stringByAppendingString:@"/"], &zipInfo, Z_NO_COMPRESSION, password, NO); - const void *buffer = NULL; - zipWriteInFileInZip(_zip, buffer, 0); - zipCloseFileInZip(_zip); - return error == ZIP_OK; -} - -- (BOOL)writeFile:(NSString *)path withPassword:(nullable NSString *)password -{ - return [self writeFileAtPath:path withFileName:nil withPassword:password]; -} - -- (BOOL)writeFileAtPath:(NSString *)path withFileName:(nullable NSString *)fileName withPassword:(nullable NSString *)password -{ - return [self writeFileAtPath:path withFileName:fileName compressionLevel:Z_DEFAULT_COMPRESSION password:password AES:YES]; -} - -// supports writing files with logical folder/directory structure -// *path* is the absolute path of the file that will be compressed -// *fileName* is the relative name of the file how it is stored within the zip e.g. /folder/subfolder/text1.txt -- (BOOL)writeFileAtPath:(NSString *)path withFileName:(nullable NSString *)fileName compressionLevel:(int)compressionLevel password:(nullable NSString *)password AES:(BOOL)aes -{ - NSAssert((_zip != NULL), @"Attempting to write to an archive which was never opened"); - - FILE *input = fopen(path.fileSystemRepresentation, "r"); - if (NULL == input) { - return NO; - } - - if (!fileName) { - fileName = path.lastPathComponent; - } - - zip_fileinfo zipInfo = {}; - - [SSZipArchive zipInfo:&zipInfo setAttributesOfItemAtPath:path]; - - void *buffer = malloc(CHUNK); - if (buffer == NULL) - { - fclose(input); - return NO; - } - - int error = _zipOpenEntry(_zip, fileName, &zipInfo, compressionLevel, password, aes); - - while (!feof(input) && !ferror(input)) - { - unsigned int len = (unsigned int) fread(buffer, 1, CHUNK, input); - zipWriteInFileInZip(_zip, buffer, len); - } - - zipCloseFileInZip(_zip); - free(buffer); - fclose(input); - return error == ZIP_OK; -} - -- (BOOL)writeData:(NSData *)data filename:(nullable NSString *)filename withPassword:(nullable NSString *)password -{ - return [self writeData:data filename:filename compressionLevel:Z_DEFAULT_COMPRESSION password:password AES:YES]; -} - -- (BOOL)writeData:(NSData *)data filename:(nullable NSString *)filename compressionLevel:(int)compressionLevel password:(nullable NSString *)password AES:(BOOL)aes -{ - if (!_zip) { - return NO; - } - if (!data) { - return NO; - } - zip_fileinfo zipInfo = {}; - [SSZipArchive zipInfo:&zipInfo setDate:[NSDate date]]; - - int error = _zipOpenEntry(_zip, filename, &zipInfo, compressionLevel, password, aes); - - zipWriteInFileInZip(_zip, data.bytes, (unsigned int)data.length); - - zipCloseFileInZip(_zip); - return error == ZIP_OK; -} - -- (BOOL)close -{ - NSAssert((_zip != NULL), @"[SSZipArchive] Attempting to close an archive which was never opened"); - int error = zipClose(_zip, NULL); - _zip = nil; - return error == ZIP_OK; -} - -#pragma mark - Private - -+ (NSString *)_filenameStringWithCString:(const char *)filename - version_made_by:(uint16_t)version_made_by - general_purpose_flag:(uint16_t)flag - size:(uint16_t)size_filename { - - // Respect Language encoding flag only reading filename as UTF-8 when this is set - // when file entry created on dos system. - // - // https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT - // Bit 11: Language encoding flag (EFS). If this bit is set, - // the filename and comment fields for this file - // MUST be encoded using UTF-8. (see APPENDIX D) - uint16_t made_by = version_made_by >> 8; - BOOL made_on_dos = made_by == 0; - BOOL languageEncoding = (flag & (1 << 11)) != 0; - if (!languageEncoding && made_on_dos) { - // APPNOTE.TXT D.1: - // D.2 If general purpose bit 11 is unset, the file name and comment should conform - // to the original ZIP character encoding. If general purpose bit 11 is set, the - // filename and comment must support The Unicode Standard, Version 4.1.0 or - // greater using the character encoding form defined by the UTF-8 storage - // specification. The Unicode Standard is published by the The Unicode - // Consortium (www.unicode.org). UTF-8 encoded data stored within ZIP files - // is expected to not include a byte order mark (BOM). - - // Code Page 437 corresponds to kCFStringEncodingDOSLatinUS - NSStringEncoding encoding = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingDOSLatinUS); - NSString* strPath = [NSString stringWithCString:filename encoding:encoding]; - if (strPath) { - return strPath; - } - } - - // attempting unicode encoding - NSString * strPath = @(filename); - if (strPath) { - return strPath; - } - - // if filename is non-unicode, detect and transform Encoding - NSData *data = [NSData dataWithBytes:(const void *)filename length:sizeof(unsigned char) * size_filename]; -// Testing availability of @available (https://stackoverflow.com/a/46927445/1033581) -#if __clang_major__ < 9 - // Xcode 8- - if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber10_9_2) { -#else - // Xcode 9+ - if (@available(macOS 10.10, iOS 8.0, watchOS 2.0, tvOS 9.0, *)) { -#endif - // supported encodings are in [NSString availableStringEncodings] - [NSString stringEncodingForData:data encodingOptions:nil convertedString:&strPath usedLossyConversion:nil]; - } else { - // fallback to a simple manual detect for macOS 10.9 or older - NSArray *encodings = @[@(kCFStringEncodingGB_18030_2000), @(kCFStringEncodingShiftJIS)]; - for (NSNumber *encoding in encodings) { - strPath = [NSString stringWithCString:filename encoding:(NSStringEncoding)CFStringConvertEncodingToNSStringEncoding(encoding.unsignedIntValue)]; - if (strPath) { - break; - } - } - } - if (strPath) { - return strPath; - } - - // if filename encoding is non-detected, we default to something based on data - // _hexString is more readable than _base64RFC4648 for debugging unknown encodings - strPath = [data _hexString]; - return strPath; -} - -+ (void)zipInfo:(zip_fileinfo *)zipInfo setAttributesOfItemAtPath:(NSString *)path -{ - NSDictionary *attr = [[NSFileManager defaultManager] attributesOfItemAtPath:path error: nil]; - if (attr) - { - NSDate *fileDate = (NSDate *)[attr objectForKey:NSFileModificationDate]; - if (fileDate) - { - [self zipInfo:zipInfo setDate:fileDate]; - } - - // Write permissions into the external attributes, for details on this see here: https://unix.stackexchange.com/a/14727 - // Get the permissions value from the files attributes - NSNumber *permissionsValue = (NSNumber *)[attr objectForKey:NSFilePosixPermissions]; - if (permissionsValue != nil) { - // Get the short value for the permissions - short permissionsShort = permissionsValue.shortValue; - - // Convert this into an octal by adding 010000, 010000 being the flag for a regular file - NSInteger permissionsOctal = 0100000 + permissionsShort; - - // Convert this into a long value - uLong permissionsLong = @(permissionsOctal).unsignedLongValue; - - // Store this into the external file attributes once it has been shifted 16 places left to form part of the second from last byte - - // Casted back to an unsigned int to match type of external_fa in minizip - zipInfo->external_fa = (unsigned int)(permissionsLong << 16L); - } - } -} - -+ (void)zipInfo:(zip_fileinfo *)zipInfo setDate:(NSDate *)date -{ - NSCalendar *currentCalendar = SSZipArchive._gregorian; - NSCalendarUnit flags = NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitDay | NSCalendarUnitHour | NSCalendarUnitMinute | NSCalendarUnitSecond; - NSDateComponents *components = [currentCalendar components:flags fromDate:date]; - struct tm tmz_date; - tmz_date.tm_sec = (unsigned int)components.second; - tmz_date.tm_min = (unsigned int)components.minute; - tmz_date.tm_hour = (unsigned int)components.hour; - tmz_date.tm_mday = (unsigned int)components.day; - // ISO/IEC 9899 struct tm is 0-indexed for January but NSDateComponents for gregorianCalendar is 1-indexed for January - tmz_date.tm_mon = (unsigned int)components.month - 1; - // ISO/IEC 9899 struct tm is 0-indexed for AD 1900 but NSDateComponents for gregorianCalendar is 1-indexed for AD 1 - tmz_date.tm_year = (unsigned int)components.year - 1900; - zipInfo->mz_dos_date = mz_zip_tm_to_dosdate(&tmz_date); -} - -+ (NSCalendar *)_gregorian -{ - static NSCalendar *gregorian; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian]; - }); - - return gregorian; -} - -// Format from http://newsgroups.derkeiler.com/Archive/Comp/comp.os.msdos.programmer/2009-04/msg00060.html -// Two consecutive words, or a longword, YYYYYYYMMMMDDDDD hhhhhmmmmmmsssss -// YYYYYYY is years from 1980 = 0 -// sssss is (seconds/2). -// -// 3658 = 0011 0110 0101 1000 = 0011011 0010 11000 = 27 2 24 = 2007-02-24 -// 7423 = 0111 0100 0010 0011 - 01110 100001 00011 = 14 33 3 = 14:33:06 -+ (NSDate *)_dateWithMSDOSFormat:(UInt32)msdosDateTime -{ - // the whole `_dateWithMSDOSFormat:` method is equivalent but faster than this one line, - // essentially because `mktime` is slow: - //NSDate *date = [NSDate dateWithTimeIntervalSince1970:dosdate_to_time_t(msdosDateTime)]; - static const UInt32 kYearMask = 0xFE000000; - static const UInt32 kMonthMask = 0x1E00000; - static const UInt32 kDayMask = 0x1F0000; - static const UInt32 kHourMask = 0xF800; - static const UInt32 kMinuteMask = 0x7E0; - static const UInt32 kSecondMask = 0x1F; - - NSAssert(0xFFFFFFFF == (kYearMask | kMonthMask | kDayMask | kHourMask | kMinuteMask | kSecondMask), @"[SSZipArchive] MSDOS date masks don't add up"); - - NSDateComponents *components = [[NSDateComponents alloc] init]; - components.year = 1980 + ((msdosDateTime & kYearMask) >> 25); - components.month = (msdosDateTime & kMonthMask) >> 21; - components.day = (msdosDateTime & kDayMask) >> 16; - components.hour = (msdosDateTime & kHourMask) >> 11; - components.minute = (msdosDateTime & kMinuteMask) >> 5; - components.second = (msdosDateTime & kSecondMask) * 2; - - NSDate *date = [self._gregorian dateFromComponents:components]; - return date; -} - -@end - -int _zipOpenEntry(zipFile entry, NSString *name, const zip_fileinfo *zipfi, int level, NSString *password, BOOL aes) -{ - // https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT - uint16_t made_on_darwin = 19 << 8; - //MZ_ZIP_FLAG_UTF8 - uint16_t flag_base = 1 << 11; - return zipOpenNewFileInZip5(entry, name.fileSystemRepresentation, zipfi, NULL, 0, NULL, 0, NULL, Z_DEFLATED, level, 0, -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, password.UTF8String, aes, made_on_darwin, flag_base, 1); -} - -#pragma mark - Private tools for file info - -BOOL _fileIsSymbolicLink(const unz_file_info *fileInfo) -{ - // - // Determine whether this is a symbolic link: - // - File is stored with 'version made by' value of UNIX (3), - // as per https://www.pkware.com/documents/casestudies/APPNOTE.TXT - // in the upper byte of the version field. - // - BSD4.4 st_mode constants are stored in the high 16 bits of the - // external file attributes (defacto standard, verified against libarchive) - // - // The original constants can be found here: - // https://minnie.tuhs.org/cgi-bin/utree.pl?file=4.4BSD/usr/include/sys/stat.h - // - const uLong ZipUNIXVersion = 3; - const uLong BSD_SFMT = 0170000; - const uLong BSD_IFLNK = 0120000; - - BOOL fileIsSymbolicLink = ((fileInfo->version >> 8) == ZipUNIXVersion) && BSD_IFLNK == (BSD_SFMT & (fileInfo->external_fa >> 16)); - return fileIsSymbolicLink; -} - -#pragma mark - Private tools for unreadable encodings - -@implementation NSData (SSZipArchive) - -// `base64EncodedStringWithOptions` uses a base64 alphabet with '+' and '/'. -// we got those alternatives to make it compatible with filenames: https://en.wikipedia.org/wiki/Base64 -// * modified Base64 encoding for IMAP mailbox names (RFC 3501): uses '+' and ',' -// * modified Base64 for URL and filenames (RFC 4648): uses '-' and '_' -- (NSString *)_base64RFC4648 -{ - NSString *strName = [self base64EncodedStringWithOptions:0]; - strName = [strName stringByReplacingOccurrencesOfString:@"+" withString:@"-"]; - strName = [strName stringByReplacingOccurrencesOfString:@"/" withString:@"_"]; - return strName; -} - -// initWithBytesNoCopy from NSProgrammer, Jan 25 '12: https://stackoverflow.com/a/9009321/1033581 -// hexChars from Peter, Aug 19 '14: https://stackoverflow.com/a/25378464/1033581 -// not implemented as too lengthy: a potential mapping improvement from Moose, Nov 3 '15: https://stackoverflow.com/a/33501154/1033581 -- (NSString *)_hexString -{ - const char *hexChars = "0123456789ABCDEF"; - NSUInteger length = self.length; - const unsigned char *bytes = self.bytes; - char *chars = malloc(length * 2); - if (chars == NULL) { - // we directly raise an exception instead of using NSAssert to make sure assertion is not disabled as this is irrecoverable - [NSException raise:@"NSInternalInconsistencyException" format:@"failed malloc" arguments:nil]; - return nil; - } - char *s = chars; - NSUInteger i = length; - while (i--) { - *s++ = hexChars[*bytes >> 4]; - *s++ = hexChars[*bytes & 0xF]; - bytes++; - } - NSString *str = [[NSString alloc] initWithBytesNoCopy:chars - length:length * 2 - encoding:NSASCIIStringEncoding - freeWhenDone:YES]; - return str; -} - -@end - -#pragma mark Private tools for security - -@implementation NSString (SSZipArchive) - -// One implementation alternative would be to use the algorithm found at mz_path_resolve from https://github.com/nmoinvaz/minizip/blob/dev/mz_os.c, -// but making sure to work with unichar values and not ascii values to avoid breaking Unicode characters containing 2E ('.') or 2F ('/') in their decomposition -/// Sanitize path traversal characters to prevent directory backtracking. Ignoring these characters mimicks the default behavior of the Unarchiving tool on macOS. -- (NSString *)_sanitizedPath -{ - // Change Windows paths to Unix paths: https://en.wikipedia.org/wiki/Path_(computing) - // Possible improvement: only do this if the archive was created on a non-Unix system - NSString *strPath = [self stringByReplacingOccurrencesOfString:@"\\" withString:@"/"]; - - // Percent-encode file path (where path is defined by https://tools.ietf.org/html/rfc8089) - // The key part is to allow characters "." and "/" and disallow "%". - // CharacterSet.urlPathAllowed seems to do the job -#if (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 || __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 || __WATCH_OS_VERSION_MIN_REQUIRED >= 20000 || __TV_OS_VERSION_MIN_REQUIRED >= 90000) - strPath = [strPath stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLPathAllowedCharacterSet]; -#else - // Testing availability of @available (https://stackoverflow.com/a/46927445/1033581) -#if __clang_major__ < 9 - // Xcode 8- - if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber10_8_4) { -#else - // Xcode 9+ - if (@available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, *)) { -#endif - strPath = [strPath stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLPathAllowedCharacterSet]; - } else { - strPath = [strPath stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; - } -#endif - - // `NSString.stringByAddingPercentEncodingWithAllowedCharacters:` may theorically fail: https://stackoverflow.com/questions/33558933/ - // But because we auto-detect encoding using `NSString.stringEncodingForData:encodingOptions:convertedString:usedLossyConversion:`, - // we likely already prevent UTF-16, UTF-32 and invalid Unicode in the form of unpaired surrogate chars: https://stackoverflow.com/questions/53043876/ - // To be on the safe side, we will still perform a guard check. - if (strPath == nil) { - return nil; - } - - // Add scheme "file:///" to support sanitation on names with a colon like "file:a/../../../usr/bin" - strPath = [@"file:///" stringByAppendingString:strPath]; - - // Sanitize path traversal characters to prevent directory backtracking. Ignoring these characters mimicks the default behavior of the Unarchiving tool on macOS. - // "../../../../../../../../../../../tmp/test.txt" -> "tmp/test.txt" - // "a/b/../c.txt" -> "a/c.txt" - strPath = [NSURL URLWithString:strPath].standardizedURL.absoluteString; - - // Remove the "file:///" scheme - strPath = [strPath substringFromIndex:8]; - - // Remove the percent-encoding -#if (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 || __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 || __WATCH_OS_VERSION_MIN_REQUIRED >= 20000 || __TV_OS_VERSION_MIN_REQUIRED >= 90000) - strPath = strPath.stringByRemovingPercentEncoding; -#else - // Testing availability of @available (https://stackoverflow.com/a/46927445/1033581) -#if __clang_major__ < 9 - // Xcode 8- - if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber10_8_4) { -#else - // Xcode 9+ - if (@available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, *)) { -#endif - strPath = strPath.stringByRemovingPercentEncoding; - } else { - strPath = [strPath stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; - } -#endif - - return strPath; -} - -@end diff --git a/example/Pods/SSZipArchive/SSZipArchive/SSZipCommon.h b/example/Pods/SSZipArchive/SSZipArchive/SSZipCommon.h deleted file mode 100644 index 78fa282..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/SSZipCommon.h +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef SSZipCommon -#define SSZipCommon - -// typedefs moved from mz_compat.h to here for public access - -/* unz_global_info structure contain global data about the ZIPfile - These data comes from the end of central dir */ -typedef struct unz_global_info64_s -{ - uint64_t number_entry; /* total number of entries in the central dir on this disk */ - uint32_t number_disk_with_CD; /* number the the disk with central dir, used for spanning ZIP */ - uint16_t size_comment; /* size of the global comment of the zipfile */ -} unz_global_info64; - -typedef struct unz_global_info_s -{ - uint32_t number_entry; /* total number of entries in the central dir on this disk */ - uint32_t number_disk_with_CD; /* number the the disk with central dir, used for spanning ZIP */ - uint16_t size_comment; /* size of the global comment of the zipfile */ -} unz_global_info; - -/* unz_file_info contain information about a file in the zipfile */ -/* https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT */ -typedef struct unz_file_info64_s -{ - uint16_t version; /* version made by 2 bytes */ - uint16_t version_needed; /* version needed to extract 2 bytes */ - uint16_t flag; /* general purpose bit flag 2 bytes */ - uint16_t compression_method; /* compression method 2 bytes */ - uint32_t dos_date; /* last mod file date in Dos fmt 4 bytes */ - uint32_t crc; /* crc-32 4 bytes */ - uint64_t compressed_size; /* compressed size 8 bytes */ - uint64_t uncompressed_size; /* uncompressed size 8 bytes */ - uint16_t size_filename; /* filename length 2 bytes */ - uint16_t size_file_extra; /* extra field length 2 bytes */ - uint16_t size_file_comment; /* file comment length 2 bytes */ - - uint32_t disk_num_start; /* disk number start 4 bytes */ - uint16_t internal_fa; /* internal file attributes 2 bytes */ - uint32_t external_fa; /* external file attributes 4 bytes */ - - uint64_t disk_offset; - - uint16_t size_file_extra_internal; -} unz_file_info64; - -typedef struct unz_file_info_s -{ - uint16_t version; /* version made by 2 bytes */ - uint16_t version_needed; /* version needed to extract 2 bytes */ - uint16_t flag; /* general purpose bit flag 2 bytes */ - uint16_t compression_method; /* compression method 2 bytes */ - uint32_t dos_date; /* last mod file date in Dos fmt 4 bytes */ - uint32_t crc; /* crc-32 4 bytes */ - uint32_t compressed_size; /* compressed size 4 bytes */ - uint32_t uncompressed_size; /* uncompressed size 4 bytes */ - uint16_t size_filename; /* filename length 2 bytes */ - uint16_t size_file_extra; /* extra field length 2 bytes */ - uint16_t size_file_comment; /* file comment length 2 bytes */ - - uint16_t disk_num_start; /* disk number start 2 bytes */ - uint16_t internal_fa; /* internal file attributes 2 bytes */ - uint32_t external_fa; /* external file attributes 4 bytes */ - - uint64_t disk_offset; -} unz_file_info; - -#endif diff --git a/example/Pods/SSZipArchive/SSZipArchive/include/ZipArchive.h b/example/Pods/SSZipArchive/SSZipArchive/include/ZipArchive.h deleted file mode 100644 index e81fc9b..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/include/ZipArchive.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// ZipArchive.h -// ZipArchive -// -// Created by Serhii Mumriak on 12/1/15. -// - -#import - -//! Project version number for ZipArchive. -FOUNDATION_EXPORT double ZipArchiveVersionNumber; - -//! Project version string for ZipArchive. -FOUNDATION_EXPORT const unsigned char ZipArchiveVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import - -// This is to account for the many different ways this library gets imported. -#if __has_include() -#import -#elif __has_include("../SSZipArchive.h") -#import "../SSZipArchive.h" -#else -#import "SSZipArchive.h" -#endif diff --git a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz.h b/example/Pods/SSZipArchive/SSZipArchive/minizip/mz.h deleted file mode 100644 index 82a14a2..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz.h +++ /dev/null @@ -1,274 +0,0 @@ -/* mz.h -- Errors codes, zip flags and magic - part of the minizip-ng project - - Copyright (C) 2010-2021 Nathan Moinvaziri - https://github.com/zlib-ng/minizip-ng - - This program is distributed under the terms of the same license as zlib. - See the accompanying LICENSE file for the full text of the license. -*/ - -#ifndef MZ_H -#define MZ_H - -/***************************************************************************/ - -/* MZ_VERSION */ -#define MZ_VERSION ("3.0.4") -#define MZ_VERSION_BUILD (030004) - -/* MZ_ERROR */ -#define MZ_OK (0) /* zlib */ -#define MZ_STREAM_ERROR (-1) /* zlib */ -#define MZ_DATA_ERROR (-3) /* zlib */ -#define MZ_MEM_ERROR (-4) /* zlib */ -#define MZ_BUF_ERROR (-5) /* zlib */ -#define MZ_VERSION_ERROR (-6) /* zlib */ - -#define MZ_END_OF_LIST (-100) -#define MZ_END_OF_STREAM (-101) - -#define MZ_PARAM_ERROR (-102) -#define MZ_FORMAT_ERROR (-103) -#define MZ_INTERNAL_ERROR (-104) -#define MZ_CRC_ERROR (-105) -#define MZ_CRYPT_ERROR (-106) -#define MZ_EXIST_ERROR (-107) -#define MZ_PASSWORD_ERROR (-108) -#define MZ_SUPPORT_ERROR (-109) -#define MZ_HASH_ERROR (-110) -#define MZ_OPEN_ERROR (-111) -#define MZ_CLOSE_ERROR (-112) -#define MZ_SEEK_ERROR (-113) -#define MZ_TELL_ERROR (-114) -#define MZ_READ_ERROR (-115) -#define MZ_WRITE_ERROR (-116) -#define MZ_SIGN_ERROR (-117) -#define MZ_SYMLINK_ERROR (-118) - -/* MZ_OPEN */ -#define MZ_OPEN_MODE_READ (0x01) -#define MZ_OPEN_MODE_WRITE (0x02) -#define MZ_OPEN_MODE_READWRITE (MZ_OPEN_MODE_READ | MZ_OPEN_MODE_WRITE) -#define MZ_OPEN_MODE_APPEND (0x04) -#define MZ_OPEN_MODE_CREATE (0x08) -#define MZ_OPEN_MODE_EXISTING (0x10) - -/* MZ_SEEK */ -#define MZ_SEEK_SET (0) -#define MZ_SEEK_CUR (1) -#define MZ_SEEK_END (2) - -/* MZ_COMPRESS */ -#define MZ_COMPRESS_METHOD_STORE (0) -#define MZ_COMPRESS_METHOD_DEFLATE (8) -#define MZ_COMPRESS_METHOD_BZIP2 (12) -#define MZ_COMPRESS_METHOD_LZMA (14) -#define MZ_COMPRESS_METHOD_ZSTD (93) -#define MZ_COMPRESS_METHOD_XZ (95) -#define MZ_COMPRESS_METHOD_AES (99) - -#define MZ_COMPRESS_LEVEL_DEFAULT (-1) -#define MZ_COMPRESS_LEVEL_FAST (2) -#define MZ_COMPRESS_LEVEL_NORMAL (6) -#define MZ_COMPRESS_LEVEL_BEST (9) - -/* MZ_ZIP_FLAG */ -#define MZ_ZIP_FLAG_ENCRYPTED (1 << 0) -#define MZ_ZIP_FLAG_LZMA_EOS_MARKER (1 << 1) -#define MZ_ZIP_FLAG_DEFLATE_MAX (1 << 1) -#define MZ_ZIP_FLAG_DEFLATE_NORMAL (0) -#define MZ_ZIP_FLAG_DEFLATE_FAST (1 << 2) -#define MZ_ZIP_FLAG_DEFLATE_SUPER_FAST (MZ_ZIP_FLAG_DEFLATE_FAST | \ - MZ_ZIP_FLAG_DEFLATE_MAX) -#define MZ_ZIP_FLAG_DATA_DESCRIPTOR (1 << 3) -#define MZ_ZIP_FLAG_UTF8 (1 << 11) -#define MZ_ZIP_FLAG_MASK_LOCAL_INFO (1 << 13) - -/* MZ_ZIP_EXTENSION */ -#define MZ_ZIP_EXTENSION_ZIP64 (0x0001) -#define MZ_ZIP_EXTENSION_NTFS (0x000a) -#define MZ_ZIP_EXTENSION_AES (0x9901) -#define MZ_ZIP_EXTENSION_UNIX1 (0x000d) -#define MZ_ZIP_EXTENSION_SIGN (0x10c5) -#define MZ_ZIP_EXTENSION_HASH (0x1a51) -#define MZ_ZIP_EXTENSION_CDCD (0xcdcd) - -/* MZ_ZIP64 */ -#define MZ_ZIP64_AUTO (0) -#define MZ_ZIP64_FORCE (1) -#define MZ_ZIP64_DISABLE (2) - -/* MZ_HOST_SYSTEM */ -#define MZ_HOST_SYSTEM(VERSION_MADEBY) ((uint8_t)(VERSION_MADEBY >> 8)) -#define MZ_HOST_SYSTEM_MSDOS (0) -#define MZ_HOST_SYSTEM_UNIX (3) -#define MZ_HOST_SYSTEM_WINDOWS_NTFS (10) -#define MZ_HOST_SYSTEM_RISCOS (13) -#define MZ_HOST_SYSTEM_OSX_DARWIN (19) - -/* MZ_PKCRYPT */ -#define MZ_PKCRYPT_HEADER_SIZE (12) - -/* MZ_AES */ -#define MZ_AES_VERSION (1) -#define MZ_AES_ENCRYPTION_MODE_128 (0x01) -#define MZ_AES_ENCRYPTION_MODE_192 (0x02) -#define MZ_AES_ENCRYPTION_MODE_256 (0x03) -#define MZ_AES_KEY_LENGTH(MODE) (8 * (MODE & 3) + 8) -#define MZ_AES_KEY_LENGTH_MAX (32) -#define MZ_AES_BLOCK_SIZE (16) -#define MZ_AES_HEADER_SIZE(MODE) ((4 * (MODE & 3) + 4) + 2) -#define MZ_AES_FOOTER_SIZE (10) - -/* MZ_HASH */ -#define MZ_HASH_MD5 (10) -#define MZ_HASH_MD5_SIZE (16) -#define MZ_HASH_SHA1 (20) -#define MZ_HASH_SHA1_SIZE (20) -#define MZ_HASH_SHA256 (23) -#define MZ_HASH_SHA256_SIZE (32) -#define MZ_HASH_MAX_SIZE (256) - -/* MZ_ENCODING */ -#define MZ_ENCODING_CODEPAGE_437 (437) -#define MZ_ENCODING_CODEPAGE_932 (932) -#define MZ_ENCODING_CODEPAGE_936 (936) -#define MZ_ENCODING_CODEPAGE_950 (950) -#define MZ_ENCODING_UTF8 (65001) - -/* MZ_UTILITY */ -#define MZ_UNUSED(SYMBOL) ((void)SYMBOL) - -#ifndef MZ_CUSTOM_ALLOC -#define MZ_ALLOC(SIZE) (malloc((SIZE))) -#endif -#ifndef MZ_CUSTOM_FREE -#define MZ_FREE(PTR) (free(PTR)) -#endif - -#if defined(_WIN32) && defined(MZ_EXPORTS) -#define MZ_EXPORT __declspec(dllexport) -#else -#define MZ_EXPORT -#endif - -/***************************************************************************/ - -#include /* size_t, NULL, malloc */ -#include /* time_t, time() */ -#include /* memset, strncpy, strlen */ -#include - -#if defined(HAVE_STDINT_H) -# include -#elif defined(__has_include) -# if __has_include() -# include -# endif -#endif - -#ifndef INT8_MAX -typedef signed char int8_t; -#endif -#ifndef INT16_MAX -typedef short int16_t; -#endif -#ifndef INT32_MAX -typedef int int32_t; -#endif -#ifndef INT64_MAX -typedef long long int64_t; -#endif -#ifndef UINT8_MAX -typedef unsigned char uint8_t; -#endif -#ifndef UINT16_MAX -typedef unsigned short uint16_t; -#endif -#ifndef UINT32_MAX -typedef unsigned int uint32_t; -#endif -#ifndef UINT64_MAX -typedef unsigned long long uint64_t; -#endif - -#if defined(HAVE_INTTYPES_H) -# include -#elif defined(__has_include) -# if __has_include() -# include -# endif -#endif - -#ifndef PRId8 -# define PRId8 "hhd" -#endif -#ifndef PRIu8 -# define PRIu8 "hhu" -#endif -#ifndef PRIx8 -# define PRIx8 "hhx" -#endif -#ifndef PRId16 -# define PRId16 "hd" -#endif -#ifndef PRIu16 -# define PRIu16 "hu" -#endif -#ifndef PRIx16 -# define PRIx16 "hx" -#endif -#ifndef PRId32 -# define PRId32 "d" -#endif -#ifndef PRIu32 -# define PRIu32 "u" -#endif -#ifndef PRIx32 -# define PRIx32 "x" -#endif -#if ULONG_MAX == 0xfffffffful -# ifndef PRId64 -# define PRId64 "ld" -# endif -# ifndef PRIu64 -# define PRIu64 "lu" -# endif -# ifndef PRIx64 -# define PRIx64 "lx" -# endif -#else -# ifndef PRId64 -# define PRId64 "lld" -# endif -# ifndef PRIu64 -# define PRIu64 "llu" -# endif -# ifndef PRIx64 -# define PRIx64 "llx" -# endif -#endif - -#ifndef INT16_MAX -# define INT16_MAX 32767 -#endif -#ifndef INT32_MAX -# define INT32_MAX 2147483647L -#endif -#ifndef INT64_MAX -# define INT64_MAX 9223372036854775807LL -#endif -#ifndef UINT16_MAX -# define UINT16_MAX 65535U -#endif -#ifndef UINT32_MAX -# define UINT32_MAX 4294967295UL -#endif -#ifndef UINT64_MAX -# define UINT64_MAX 18446744073709551615ULL -#endif - -/***************************************************************************/ - -#endif diff --git a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_compat.c b/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_compat.c deleted file mode 100644 index 759e30b..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_compat.c +++ /dev/null @@ -1,991 +0,0 @@ -/* mz_compat.c -- Backwards compatible interface for older versions - Version 2.8.9, July 4, 2019 - part of the MiniZip project - - Copyright (C) 2010-2019 Nathan Moinvaziri - https://github.com/nmoinvaz/minizip - Copyright (C) 1998-2010 Gilles Vollant - https://www.winimage.com/zLibDll/minizip.html - - This program is distributed under the terms of the same license as zlib. - See the accompanying LICENSE file for the full text of the license. -*/ - - -#include "mz.h" -#include "mz_os.h" -#include "mz_strm.h" -#include "mz_strm_mem.h" -#include "mz_strm_os.h" -#include "mz_strm_zlib.h" -#include "mz_zip.h" - -#include /* SEEK */ - -#include "mz_compat.h" - -/***************************************************************************/ - -typedef struct mz_compat_s { - void *stream; - void *handle; - uint64_t entry_index; - int64_t entry_pos; - int64_t total_out; -} mz_compat; - -/***************************************************************************/ - -static int32_t zipConvertAppendToStreamMode(int append) -{ - int32_t mode = MZ_OPEN_MODE_WRITE; - switch (append) - { - case APPEND_STATUS_CREATE: - mode |= MZ_OPEN_MODE_CREATE; - break; - case APPEND_STATUS_CREATEAFTER: - mode |= MZ_OPEN_MODE_CREATE | MZ_OPEN_MODE_APPEND; - break; - case APPEND_STATUS_ADDINZIP: - mode |= MZ_OPEN_MODE_READ | MZ_OPEN_MODE_APPEND; - break; - } - return mode; -} - -zipFile zipOpen(const char *path, int append) -{ - zlib_filefunc64_def pzlib = mz_stream_os_get_interface(); - return zipOpen2(path, append, NULL, &pzlib); -} - -zipFile zipOpen64(const void *path, int append) -{ - zlib_filefunc64_def pzlib = mz_stream_os_get_interface(); - return zipOpen2(path, append, NULL, &pzlib); -} - -zipFile zipOpen2(const char *path, int append, const char **globalcomment, - zlib_filefunc_def *pzlib_filefunc_def) -{ - return zipOpen2_64(path, append, globalcomment, pzlib_filefunc_def); -} - -zipFile zipOpen2_64(const void *path, int append, const char **globalcomment, - zlib_filefunc64_def *pzlib_filefunc_def) -{ - zipFile zip = NULL; - int32_t mode = zipConvertAppendToStreamMode(append); - void *stream = NULL; - - if (pzlib_filefunc_def) - { - if (mz_stream_create(&stream, (mz_stream_vtbl *)*pzlib_filefunc_def) == NULL) - return NULL; - } - else - { - if (mz_stream_os_create(&stream) == NULL) - return NULL; - } - - if (mz_stream_open(stream, path, mode) != MZ_OK) - { - mz_stream_delete(&stream); - return NULL; - } - - zip = zipOpen_MZ(stream, append, globalcomment); - - if (zip == NULL) - { - mz_stream_delete(&stream); - return NULL; - } - - return zip; -} - -zipFile zipOpen_MZ(void *stream, int append, const char **globalcomment) -{ - mz_compat *compat = NULL; - int32_t err = MZ_OK; - int32_t mode = zipConvertAppendToStreamMode(append); - void *handle = NULL; - - mz_zip_create(&handle); - err = mz_zip_open(handle, stream, mode); - - if (err != MZ_OK) - { - mz_zip_delete(&handle); - return NULL; - } - - if (globalcomment != NULL) - mz_zip_get_comment(handle, globalcomment); - - compat = (mz_compat *)MZ_ALLOC(sizeof(mz_compat)); - if (compat != NULL) - { - compat->handle = handle; - compat->stream = stream; - } - else - { - mz_zip_delete(&handle); - } - - return (zipFile)compat; -} - -int zipOpenNewFileInZip5(zipFile file, const char *filename, const zip_fileinfo *zipfi, - const void *extrafield_local, uint16_t size_extrafield_local, const void *extrafield_global, - uint16_t size_extrafield_global, const char *comment, uint16_t compression_method, int level, - int raw, int windowBits, int memLevel, int strategy, const char *password, - signed char aes, uint16_t version_madeby, uint16_t flag_base, int zip64) -{ - mz_compat *compat = (mz_compat *)file; - mz_zip_file file_info; - uint64_t dos_date = 0; - - MZ_UNUSED(strategy); - MZ_UNUSED(memLevel); - MZ_UNUSED(windowBits); - MZ_UNUSED(size_extrafield_local); - MZ_UNUSED(extrafield_local); - - if (compat == NULL) - return ZIP_PARAMERROR; - - memset(&file_info, 0, sizeof(file_info)); - - if (zipfi != NULL) - { - if (zipfi->mz_dos_date != 0) - dos_date = zipfi->mz_dos_date; - else - dos_date = mz_zip_tm_to_dosdate(&zipfi->tmz_date); - - file_info.modified_date = mz_zip_dosdate_to_time_t(dos_date); - file_info.external_fa = zipfi->external_fa; - file_info.internal_fa = zipfi->internal_fa; - } - - if (filename == NULL) - filename = "-"; - - file_info.compression_method = compression_method; - file_info.filename = filename; - /* file_info.extrafield_local = extrafield_local; */ - /* file_info.extrafield_local_size = size_extrafield_local; */ - file_info.extrafield = extrafield_global; - file_info.extrafield_size = size_extrafield_global; - file_info.version_madeby = version_madeby; - file_info.comment = comment; - file_info.flag = flag_base; - if (zip64) - file_info.zip64 = MZ_ZIP64_FORCE; - else - file_info.zip64 = MZ_ZIP64_DISABLE; -#ifdef HAVE_WZAES - if ((aes && password != NULL) || (raw && (file_info.flag & MZ_ZIP_FLAG_ENCRYPTED))) - file_info.aes_version = MZ_AES_VERSION; -#endif - - return mz_zip_entry_write_open(compat->handle, &file_info, (int16_t)level, (uint8_t)raw, password); -} - -int zipWriteInFileInZip(zipFile file, const void *buf, uint32_t len) -{ - mz_compat *compat = (mz_compat *)file; - int32_t written = 0; - if (compat == NULL || len >= INT32_MAX) - return ZIP_PARAMERROR; - written = mz_zip_entry_write(compat->handle, buf, (int32_t)len); - if ((written < 0) || ((uint32_t)written != len)) - return ZIP_ERRNO; - return ZIP_OK; -} - -int zipCloseFileInZipRaw(zipFile file, uint32_t uncompressed_size, uint32_t crc32) -{ - return zipCloseFileInZipRaw64(file, uncompressed_size, crc32); -} - -int zipCloseFileInZipRaw64(zipFile file, int64_t uncompressed_size, uint32_t crc32) -{ - mz_compat *compat = (mz_compat *)file; - if (compat == NULL) - return ZIP_PARAMERROR; - return mz_zip_entry_close_raw(compat->handle, uncompressed_size, crc32); -} - -int zipCloseFileInZip(zipFile file) -{ - return zipCloseFileInZip64(file); -} - -int zipCloseFileInZip64(zipFile file) -{ - mz_compat *compat = (mz_compat *)file; - if (compat == NULL) - return ZIP_PARAMERROR; - return mz_zip_entry_close(compat->handle); -} - -int zipClose(zipFile file, const char *global_comment) -{ - return zipClose_64(file, global_comment); -} - -int zipClose_64(zipFile file, const char *global_comment) -{ - return zipClose2_64(file, global_comment, MZ_VERSION_MADEBY); -} - -int zipClose2_64(zipFile file, const char *global_comment, uint16_t version_madeby) -{ - mz_compat *compat = (mz_compat *)file; - int32_t err = MZ_OK; - - if (compat->handle != NULL) - err = zipClose2_MZ(file, global_comment, version_madeby); - - if (compat->stream != NULL) - { - mz_stream_close(compat->stream); - mz_stream_delete(&compat->stream); - } - - MZ_FREE(compat); - - return err; -} - -/* Only closes the zip handle, does not close the stream */ -int zipClose_MZ(zipFile file, const char *global_comment) -{ - return zipClose2_MZ(file, global_comment, MZ_VERSION_MADEBY); -} - -/* Only closes the zip handle, does not close the stream */ -int zipClose2_MZ(zipFile file, const char *global_comment, uint16_t version_madeby) -{ - mz_compat *compat = (mz_compat *)file; - int32_t err = MZ_OK; - - if (compat == NULL) - return ZIP_PARAMERROR; - if (compat->handle == NULL) - return err; - - if (global_comment != NULL) - mz_zip_set_comment(compat->handle, global_comment); - - mz_zip_set_version_madeby(compat->handle, version_madeby); - err = mz_zip_close(compat->handle); - mz_zip_delete(&compat->handle); - - return err; -} - -void* zipGetStream(zipFile file) -{ - mz_compat *compat = (mz_compat *)file; - if (compat == NULL) - return NULL; - return (void *)compat->stream; -} - -/***************************************************************************/ - -unzFile unzOpen(const char *path) -{ - return unzOpen64(path); -} - -unzFile unzOpen64(const void *path) -{ - zlib_filefunc64_def pzlib = mz_stream_os_get_interface(); - return unzOpen2(path, &pzlib); -} - -unzFile unzOpen2(const char *path, zlib_filefunc_def *pzlib_filefunc_def) -{ - return unzOpen2_64(path, pzlib_filefunc_def); -} - -unzFile unzOpen2_64(const void *path, zlib_filefunc64_def *pzlib_filefunc_def) -{ - unzFile unz = NULL; - void *stream = NULL; - - if (pzlib_filefunc_def) - { - if (mz_stream_create(&stream, (mz_stream_vtbl *)*pzlib_filefunc_def) == NULL) - return NULL; - } - else - { - if (mz_stream_os_create(&stream) == NULL) - return NULL; - } - - if (mz_stream_open(stream, path, MZ_OPEN_MODE_READ) != MZ_OK) - { - mz_stream_delete(&stream); - return NULL; - } - - unz = unzOpen_MZ(stream); - if (unz == NULL) - { - mz_stream_delete(&stream); - return NULL; - } - return unz; -} - -unzFile unzOpen_MZ(void *stream) -{ - mz_compat *compat = NULL; - int32_t err = MZ_OK; - void *handle = NULL; - - mz_zip_create(&handle); - err = mz_zip_open(handle, stream, MZ_OPEN_MODE_READ); - - if (err != MZ_OK) - { - mz_zip_delete(&handle); - return NULL; - } - - compat = (mz_compat *)MZ_ALLOC(sizeof(mz_compat)); - if (compat != NULL) - { - compat->handle = handle; - compat->stream = stream; - - mz_zip_goto_first_entry(compat->handle); - } - else - { - mz_zip_delete(&handle); - } - - return (unzFile)compat; -} - -int unzClose(unzFile file) -{ - mz_compat *compat = (mz_compat *)file; - int32_t err = MZ_OK; - - if (compat == NULL) - return UNZ_PARAMERROR; - - if (compat->handle != NULL) - err = unzClose_MZ(file); - - if (compat->stream != NULL) - { - mz_stream_close(compat->stream); - mz_stream_delete(&compat->stream); - } - - MZ_FREE(compat); - - return err; -} - -/* Only closes the zip handle, does not close the stream */ -int unzClose_MZ(unzFile file) -{ - mz_compat *compat = (mz_compat *)file; - int32_t err = MZ_OK; - - if (compat == NULL) - return UNZ_PARAMERROR; - - err = mz_zip_close(compat->handle); - mz_zip_delete(&compat->handle); - - return err; -} - -int unzGetGlobalInfo(unzFile file, unz_global_info* pglobal_info32) -{ - mz_compat *compat = (mz_compat *)file; - unz_global_info64 global_info64; - int32_t err = MZ_OK; - - memset(pglobal_info32, 0, sizeof(unz_global_info)); - if (compat == NULL) - return UNZ_PARAMERROR; - - err = unzGetGlobalInfo64(file, &global_info64); - if (err == MZ_OK) - { - pglobal_info32->number_entry = (uint32_t)global_info64.number_entry; - pglobal_info32->size_comment = global_info64.size_comment; - pglobal_info32->number_disk_with_CD = global_info64.number_disk_with_CD; - } - return err; -} - -int unzGetGlobalInfo64(unzFile file, unz_global_info64 *pglobal_info) -{ - mz_compat *compat = (mz_compat *)file; - const char *comment_ptr = NULL; - int32_t err = MZ_OK; - - memset(pglobal_info, 0, sizeof(unz_global_info64)); - if (compat == NULL) - return UNZ_PARAMERROR; - err = mz_zip_get_comment(compat->handle, &comment_ptr); - if (err == MZ_OK) - pglobal_info->size_comment = (uint16_t)strlen(comment_ptr); - if ((err == MZ_OK) || (err == MZ_EXIST_ERROR)) - err = mz_zip_get_number_entry(compat->handle, &pglobal_info->number_entry); - if (err == MZ_OK) - err = mz_zip_get_disk_number_with_cd(compat->handle, &pglobal_info->number_disk_with_CD); - return err; -} - -int unzGetGlobalComment(unzFile file, char *comment, uint16_t comment_size) -{ - mz_compat *compat = (mz_compat *)file; - const char *comment_ptr = NULL; - int32_t err = MZ_OK; - - if (comment == NULL || comment_size == 0) - return UNZ_PARAMERROR; - err = mz_zip_get_comment(compat->handle, &comment_ptr); - if (err == MZ_OK) - { - strncpy(comment, comment_ptr, comment_size - 1); - comment[comment_size - 1] = 0; - } - return err; -} - -int unzOpenCurrentFile3(unzFile file, int *method, int *level, int raw, const char *password) -{ - mz_compat *compat = (mz_compat *)file; - mz_zip_file *file_info = NULL; - int32_t err = MZ_OK; - void *stream = NULL; - - if (compat == NULL) - return UNZ_PARAMERROR; - if (method != NULL) - *method = 0; - if (level != NULL) - *level = 0; - - compat->total_out = 0; - err = mz_zip_entry_read_open(compat->handle, (uint8_t)raw, password); - if (err == MZ_OK) - err = mz_zip_entry_get_info(compat->handle, &file_info); - if (err == MZ_OK) - { - if (method != NULL) - { - *method = file_info->compression_method; - } - - if (level != NULL) - { - *level = 6; - switch (file_info->flag & 0x06) - { - case MZ_ZIP_FLAG_DEFLATE_SUPER_FAST: - *level = 1; - break; - case MZ_ZIP_FLAG_DEFLATE_FAST: - *level = 2; - break; - case MZ_ZIP_FLAG_DEFLATE_MAX: - *level = 9; - break; - } - } - } - if (err == MZ_OK) - err = mz_zip_get_stream(compat->handle, &stream); - if (err == MZ_OK) - compat->entry_pos = mz_stream_tell(stream); - return err; -} - -int unzOpenCurrentFile(unzFile file) -{ - return unzOpenCurrentFile3(file, NULL, NULL, 0, NULL); -} - -int unzOpenCurrentFilePassword(unzFile file, const char *password) -{ - return unzOpenCurrentFile3(file, NULL, NULL, 0, password); -} - -int unzOpenCurrentFile2(unzFile file, int *method, int *level, int raw) -{ - return unzOpenCurrentFile3(file, method, level, raw, NULL); -} - -int unzReadCurrentFile(unzFile file, void *buf, uint32_t len) -{ - mz_compat *compat = (mz_compat *)file; - int32_t err = MZ_OK; - if (compat == NULL || len >= INT32_MAX) - return UNZ_PARAMERROR; - err = mz_zip_entry_read(compat->handle, buf, (int32_t)len); - if (err > 0) - compat->total_out += (uint32_t)err; - return err; -} - -int unzCloseCurrentFile(unzFile file) -{ - mz_compat *compat = (mz_compat *)file; - int32_t err = MZ_OK; - if (compat == NULL) - return UNZ_PARAMERROR; - err = mz_zip_entry_close(compat->handle); - return err; -} - -int unzGetCurrentFileInfo(unzFile file, unz_file_info *pfile_info, char *filename, - uint16_t filename_size, void *extrafield, uint16_t extrafield_size, char *comment, uint16_t comment_size) -{ - mz_compat *compat = (mz_compat *)file; - mz_zip_file *file_info = NULL; - uint16_t bytes_to_copy = 0; - int32_t err = MZ_OK; - - if (compat == NULL) - return UNZ_PARAMERROR; - - err = mz_zip_entry_get_info(compat->handle, &file_info); - - if ((err == MZ_OK) && (pfile_info != NULL)) - { - pfile_info->version = file_info->version_madeby; - pfile_info->version_needed = file_info->version_needed; - pfile_info->flag = file_info->flag; - pfile_info->compression_method = file_info->compression_method; - pfile_info->mz_dos_date = mz_zip_time_t_to_dos_date(file_info->modified_date); - //mz_zip_time_t_to_tm(file_info->modified_date, &pfile_info->tmu_date); - //pfile_info->tmu_date.tm_year += 1900; - pfile_info->crc = file_info->crc; - - pfile_info->size_filename = file_info->filename_size; - pfile_info->size_file_extra = file_info->extrafield_size; - pfile_info->size_file_comment = file_info->comment_size; - - pfile_info->disk_num_start = (uint16_t)file_info->disk_number; - pfile_info->internal_fa = file_info->internal_fa; - pfile_info->external_fa = file_info->external_fa; - - pfile_info->compressed_size = (uint32_t)file_info->compressed_size; - pfile_info->uncompressed_size = (uint32_t)file_info->uncompressed_size; - - if (filename_size > 0 && filename != NULL && file_info->filename != NULL) - { - bytes_to_copy = filename_size; - if (bytes_to_copy > file_info->filename_size) - bytes_to_copy = file_info->filename_size; - memcpy(filename, file_info->filename, bytes_to_copy); - if (bytes_to_copy < filename_size) - filename[bytes_to_copy] = 0; - } - if (extrafield_size > 0 && extrafield != NULL) - { - bytes_to_copy = extrafield_size; - if (bytes_to_copy > file_info->extrafield_size) - bytes_to_copy = file_info->extrafield_size; - memcpy(extrafield, file_info->extrafield, bytes_to_copy); - } - if (comment_size > 0 && comment != NULL && file_info->comment != NULL) - { - bytes_to_copy = comment_size; - if (bytes_to_copy > file_info->comment_size) - bytes_to_copy = file_info->comment_size; - memcpy(comment, file_info->comment, bytes_to_copy); - if (bytes_to_copy < comment_size) - comment[bytes_to_copy] = 0; - } - } - return err; -} - -int unzGetCurrentFileInfo64(unzFile file, unz_file_info64 * pfile_info, char *filename, - uint16_t filename_size, void *extrafield, uint16_t extrafield_size, char *comment, uint16_t comment_size) -{ - mz_compat *compat = (mz_compat *)file; - mz_zip_file *file_info = NULL; - uint16_t bytes_to_copy = 0; - int32_t err = MZ_OK; - - if (compat == NULL) - return UNZ_PARAMERROR; - - err = mz_zip_entry_get_info(compat->handle, &file_info); - - if ((err == MZ_OK) && (pfile_info != NULL)) - { - pfile_info->version = file_info->version_madeby; - pfile_info->version_needed = file_info->version_needed; - pfile_info->flag = file_info->flag; - pfile_info->compression_method = file_info->compression_method; - pfile_info->mz_dos_date = mz_zip_time_t_to_dos_date(file_info->modified_date); - //mz_zip_time_t_to_tm(file_info->modified_date, &pfile_info->tmu_date); - //pfile_info->tmu_date.tm_year += 1900; - pfile_info->crc = file_info->crc; - - pfile_info->size_filename = file_info->filename_size; - pfile_info->size_file_extra = file_info->extrafield_size; - pfile_info->size_file_comment = file_info->comment_size; - - pfile_info->disk_num_start = file_info->disk_number; - pfile_info->internal_fa = file_info->internal_fa; - pfile_info->external_fa = file_info->external_fa; - - pfile_info->compressed_size = (uint64_t)file_info->compressed_size; - pfile_info->uncompressed_size = (uint64_t)file_info->uncompressed_size; - - if (filename_size > 0 && filename != NULL && file_info->filename != NULL) - { - bytes_to_copy = filename_size; - if (bytes_to_copy > file_info->filename_size) - bytes_to_copy = file_info->filename_size; - memcpy(filename, file_info->filename, bytes_to_copy); - if (bytes_to_copy < filename_size) - filename[bytes_to_copy] = 0; - } - - if (extrafield_size > 0 && extrafield != NULL) - { - bytes_to_copy = extrafield_size; - if (bytes_to_copy > file_info->extrafield_size) - bytes_to_copy = file_info->extrafield_size; - memcpy(extrafield, file_info->extrafield, bytes_to_copy); - } - - if (comment_size > 0 && comment != NULL && file_info->comment != NULL) - { - bytes_to_copy = comment_size; - if (bytes_to_copy > file_info->comment_size) - bytes_to_copy = file_info->comment_size; - memcpy(comment, file_info->comment, bytes_to_copy); - if (bytes_to_copy < comment_size) - comment[bytes_to_copy] = 0; - } - } - return err; -} - -int unzGoToFirstFile(unzFile file) -{ - mz_compat *compat = (mz_compat *)file; - if (compat == NULL) - return UNZ_PARAMERROR; - compat->entry_index = 0; - return mz_zip_goto_first_entry(compat->handle); -} - -int unzGoToNextFile(unzFile file) -{ - mz_compat *compat = (mz_compat *)file; - int32_t err = MZ_OK; - if (compat == NULL) - return UNZ_PARAMERROR; - err = mz_zip_goto_next_entry(compat->handle); - if (err != MZ_END_OF_LIST) - compat->entry_index += 1; - return err; -} - -int unzLocateFile(unzFile file, const char *filename, unzFileNameComparer filename_compare_func) -{ - mz_compat *compat = (mz_compat *)file; - mz_zip_file *file_info = NULL; - uint64_t preserve_index = 0; - int32_t err = MZ_OK; - int32_t result = 0; - - if (compat == NULL) - return UNZ_PARAMERROR; - - preserve_index = compat->entry_index; - - err = mz_zip_goto_first_entry(compat->handle); - while (err == MZ_OK) - { - err = mz_zip_entry_get_info(compat->handle, &file_info); - if (err != MZ_OK) - break; - - if (filename_compare_func != NULL) - result = filename_compare_func(file, filename, file_info->filename); - else - result = strcmp(filename, file_info->filename); - - if (result == 0) - return MZ_OK; - - err = mz_zip_goto_next_entry(compat->handle); - } - - compat->entry_index = preserve_index; - return err; -} - -/***************************************************************************/ - -int unzGetFilePos(unzFile file, unz_file_pos *file_pos) -{ - mz_compat *compat = (mz_compat *)file; - int32_t offset = 0; - - if (compat == NULL || file_pos == NULL) - return UNZ_PARAMERROR; - - offset = unzGetOffset(file); - if (offset < 0) - return offset; - - file_pos->pos_in_zip_directory = (uint32_t)offset; - file_pos->num_of_file = (uint32_t)compat->entry_index; - return MZ_OK; -} - -int unzGoToFilePos(unzFile file, unz_file_pos *file_pos) -{ - mz_compat *compat = (mz_compat *)file; - unz64_file_pos file_pos64; - - if (compat == NULL || file_pos == NULL) - return UNZ_PARAMERROR; - - file_pos64.pos_in_zip_directory = file_pos->pos_in_zip_directory; - file_pos64.num_of_file = file_pos->num_of_file; - - return unzGoToFilePos64(file, &file_pos64); -} - -int unzGetFilePos64(unzFile file, unz64_file_pos *file_pos) -{ - mz_compat *compat = (mz_compat *)file; - int64_t offset = 0; - - if (compat == NULL || file_pos == NULL) - return UNZ_PARAMERROR; - - offset = unzGetOffset64(file); - if (offset < 0) - return (int)offset; - - file_pos->pos_in_zip_directory = offset; - file_pos->num_of_file = compat->entry_index; - return UNZ_OK; -} - -int unzGoToFilePos64(unzFile file, const unz64_file_pos *file_pos) -{ - mz_compat *compat = (mz_compat *)file; - int32_t err = MZ_OK; - - if (compat == NULL || file_pos == NULL) - return UNZ_PARAMERROR; - - err = mz_zip_goto_entry(compat->handle, file_pos->pos_in_zip_directory); - if (err == MZ_OK) - compat->entry_index = file_pos->num_of_file; - return err; -} - -int32_t unzGetOffset(unzFile file) -{ - return (int32_t)unzGetOffset64(file); -} - -int64_t unzGetOffset64(unzFile file) -{ - mz_compat *compat = (mz_compat *)file; - if (compat == NULL) - return UNZ_PARAMERROR; - return mz_zip_get_entry(compat->handle); -} - -int unzSetOffset(unzFile file, uint32_t pos) -{ - return unzSetOffset64(file, pos); -} - -int unzSetOffset64(unzFile file, int64_t pos) -{ - mz_compat *compat = (mz_compat *)file; - if (compat == NULL) - return UNZ_PARAMERROR; - return (int)mz_zip_goto_entry(compat->handle, pos); -} - -int unzGetLocalExtrafield(unzFile file, void *buf, unsigned int len) -{ - mz_compat *compat = (mz_compat *)file; - mz_zip_file *file_info = NULL; - int32_t err = MZ_OK; - int32_t bytes_to_copy = 0; - - if (compat == NULL || buf == NULL || len >= INT32_MAX) - return UNZ_PARAMERROR; - - err = mz_zip_entry_get_local_info(compat->handle, &file_info); - if (err != MZ_OK) - return err; - - bytes_to_copy = (int32_t)len; - if (bytes_to_copy > file_info->extrafield_size) - bytes_to_copy = file_info->extrafield_size; - - memcpy(buf, file_info->extrafield, bytes_to_copy); - return MZ_OK; -} - -int64_t unztell(unzFile file) -{ - mz_compat *compat = (mz_compat *)file; - if (compat == NULL) - return UNZ_PARAMERROR; - return (int64_t)compat->total_out; -} - -int32_t unzTell(unzFile file) -{ - mz_compat *compat = (mz_compat *)file; - if (compat == NULL) - return UNZ_PARAMERROR; - return (int32_t)compat->total_out; -} - -int64_t unzTell64(unzFile file) -{ - mz_compat *compat = (mz_compat *)file; - if (compat == NULL) - return UNZ_PARAMERROR; - return (int64_t)compat->total_out; -} - -int unzSeek(unzFile file, int32_t offset, int origin) -{ - return unzSeek64(file, offset, origin); -} - -int unzSeek64(unzFile file, int64_t offset, int origin) -{ - mz_compat *compat = (mz_compat *)file; - mz_zip_file *file_info = NULL; - int64_t position = 0; - int32_t err = MZ_OK; - void *stream = NULL; - - if (compat == NULL) - return UNZ_PARAMERROR; - err = mz_zip_entry_get_info(compat->handle, &file_info); - if (err != MZ_OK) - return err; - if (file_info->compression_method != MZ_COMPRESS_METHOD_STORE) - return UNZ_ERRNO; - - if (origin == SEEK_SET) - position = offset; - else if (origin == SEEK_CUR) - position = compat->total_out + offset; - else if (origin == SEEK_END) - position = (int64_t)file_info->compressed_size + offset; - else - return UNZ_PARAMERROR; - - if (position > (int64_t)file_info->compressed_size) - return UNZ_PARAMERROR; - - err = mz_zip_get_stream(compat->handle, &stream); - if (err == MZ_OK) - err = mz_stream_seek(stream, compat->entry_pos + position, MZ_SEEK_SET); - if (err == MZ_OK) - compat->total_out = position; - return err; -} - -int unzEndOfFile(unzFile file) -{ - mz_compat *compat = (mz_compat *)file; - mz_zip_file *file_info = NULL; - int32_t err = MZ_OK; - - if (compat == NULL) - return UNZ_PARAMERROR; - err = mz_zip_entry_get_info(compat->handle, &file_info); - if (err != MZ_OK) - return err; - if (compat->total_out == (int64_t)file_info->uncompressed_size) - return 1; - return 0; -} - -void* unzGetStream(unzFile file) -{ - mz_compat *compat = (mz_compat *)file; - if (compat == NULL) - return NULL; - return (void *)compat->stream; -} - -/***************************************************************************/ - -void fill_fopen_filefunc(zlib_filefunc_def *pzlib_filefunc_def) -{ - if (pzlib_filefunc_def != NULL) - *pzlib_filefunc_def = mz_stream_os_get_interface(); -} - -void fill_fopen64_filefunc(zlib_filefunc64_def *pzlib_filefunc_def) -{ - if (pzlib_filefunc_def != NULL) - *pzlib_filefunc_def = mz_stream_os_get_interface(); -} - -void fill_win32_filefunc(zlib_filefunc_def *pzlib_filefunc_def) -{ - if (pzlib_filefunc_def != NULL) - *pzlib_filefunc_def = mz_stream_os_get_interface(); -} - -void fill_win32_filefunc64(zlib_filefunc64_def *pzlib_filefunc_def) -{ - if (pzlib_filefunc_def != NULL) - *pzlib_filefunc_def = mz_stream_os_get_interface(); -} - -void fill_win32_filefunc64A(zlib_filefunc64_def *pzlib_filefunc_def) -{ - if (pzlib_filefunc_def != NULL) - *pzlib_filefunc_def = mz_stream_os_get_interface(); -} - -void fill_win32_filefunc64W(zlib_filefunc64_def *pzlib_filefunc_def) -{ - /* NOTE: You should no longer pass in widechar string to open function */ - if (pzlib_filefunc_def != NULL) - *pzlib_filefunc_def = mz_stream_os_get_interface(); -} - -void fill_memory_filefunc(zlib_filefunc_def *pzlib_filefunc_def) -{ - if (pzlib_filefunc_def != NULL) - *pzlib_filefunc_def = mz_stream_mem_get_interface(); -} diff --git a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_compat.h b/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_compat.h deleted file mode 100644 index 3253eb9..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_compat.h +++ /dev/null @@ -1,250 +0,0 @@ -/* mz_compat.h -- Backwards compatible interface for older versions - Version 2.8.6, April 8, 2019 - part of the MiniZip project - - Copyright (C) 2010-2019 Nathan Moinvaziri - https://github.com/nmoinvaz/minizip - Copyright (C) 1998-2010 Gilles Vollant - https://www.winimage.com/zLibDll/minizip.html - - This program is distributed under the terms of the same license as zlib. - See the accompanying LICENSE file for the full text of the license. -*/ - -#ifndef MZ_COMPAT_H -#define MZ_COMPAT_H - -#include "mz.h" -#include "../SSZipCommon.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/***************************************************************************/ - -#if defined(HAVE_ZLIB) && defined(MAX_MEM_LEVEL) -#ifndef DEF_MEM_LEVEL -# if MAX_MEM_LEVEL >= 8 -# define DEF_MEM_LEVEL 8 -# else -# define DEF_MEM_LEVEL MAX_MEM_LEVEL -# endif -#endif -#endif -#ifndef MAX_WBITS -#define MAX_WBITS 15 -#endif -#ifndef DEF_MEM_LEVEL -#define DEF_MEM_LEVEL 8 -#endif - -#ifndef ZEXPORT -# define ZEXPORT MZ_EXPORT -#endif - -/***************************************************************************/ - -#if defined(STRICTZIP) || defined(STRICTZIPUNZIP) -/* like the STRICT of WIN32, we define a pointer that cannot be converted - from (void*) without cast */ -typedef struct TagzipFile__ { int unused; } zip_file__; -typedef zip_file__ *zipFile; -#else -typedef void *zipFile; -#endif - -/***************************************************************************/ - -typedef void *zlib_filefunc_def; -typedef void *zlib_filefunc64_def; -typedef const char *zipcharpc; - -typedef struct tm tm_unz; -typedef struct tm tm_zip; - -typedef uint64_t ZPOS64_T; - -/***************************************************************************/ - -// ZipArchive 2.x uses dos_date -#define MZ_COMPAT_VERSION 120 - -#if MZ_COMPAT_VERSION <= 110 -#define mz_dos_date dosDate -#else -#define mz_dos_date dos_date -#endif - -typedef struct -{ - uint32_t mz_dos_date; - struct tm tmz_date; - uint16_t internal_fa; /* internal file attributes 2 bytes */ - uint32_t external_fa; /* external file attributes 4 bytes */ -} zip_fileinfo; - -/***************************************************************************/ - -#define ZIP_OK (0) -#define ZIP_EOF (0) -#define ZIP_ERRNO (-1) -#define ZIP_PARAMERROR (-102) -#define ZIP_BADZIPFILE (-103) -#define ZIP_INTERNALERROR (-104) - -#define Z_BZIP2ED (12) - -#define APPEND_STATUS_CREATE (0) -#define APPEND_STATUS_CREATEAFTER (1) -#define APPEND_STATUS_ADDINZIP (2) - -/***************************************************************************/ -/* Writing a zip file */ - -ZEXPORT zipFile zipOpen(const char *path, int append); -ZEXPORT zipFile zipOpen64(const void *path, int append); -ZEXPORT zipFile zipOpen2(const char *path, int append, const char **globalcomment, - zlib_filefunc_def *pzlib_filefunc_def); -ZEXPORT zipFile zipOpen2_64(const void *path, int append, const char **globalcomment, - zlib_filefunc64_def *pzlib_filefunc_def); - zipFile zipOpen_MZ(void *stream, int append, const char **globalcomment); - -ZEXPORT int zipOpenNewFileInZip5(zipFile file, const char *filename, const zip_fileinfo *zipfi, - const void *extrafield_local, uint16_t size_extrafield_local, const void *extrafield_global, - uint16_t size_extrafield_global, const char *comment, uint16_t compression_method, int level, - int raw, int windowBits, int memLevel, int strategy, const char *password, - signed char aes, uint16_t version_madeby, uint16_t flag_base, int zip64); - -ZEXPORT int zipWriteInFileInZip(zipFile file, const void *buf, uint32_t len); - -ZEXPORT int zipCloseFileInZipRaw(zipFile file, uint32_t uncompressed_size, uint32_t crc32); -ZEXPORT int zipCloseFileInZipRaw64(zipFile file, int64_t uncompressed_size, uint32_t crc32); -ZEXPORT int zipCloseFileInZip(zipFile file); -ZEXPORT int zipCloseFileInZip64(zipFile file); - -ZEXPORT int zipClose(zipFile file, const char *global_comment); -ZEXPORT int zipClose_64(zipFile file, const char *global_comment); -ZEXPORT int zipClose2_64(zipFile file, const char *global_comment, uint16_t version_madeby); - int zipClose_MZ(zipFile file, const char *global_comment); - int zipClose2_MZ(zipFile file, const char *global_comment, uint16_t version_madeby); -ZEXPORT void* zipGetStream(zipFile file); - -/***************************************************************************/ - -#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP) -/* like the STRICT of WIN32, we define a pointer that cannot be converted - from (void*) without cast */ -typedef struct TagunzFile__ { int unused; } unz_file__; -typedef unz_file__ *unzFile; -#else -typedef void *unzFile; -#endif - -/***************************************************************************/ - -#define UNZ_OK (0) -#define UNZ_END_OF_LIST_OF_FILE (-100) -#define UNZ_ERRNO (-1) -#define UNZ_EOF (0) -#define UNZ_PARAMERROR (-102) -#define UNZ_BADZIPFILE (-103) -#define UNZ_INTERNALERROR (-104) -#define UNZ_CRCERROR (-105) -#define UNZ_BADPASSWORD (-106) - -/***************************************************************************/ - -typedef int (*unzFileNameComparer)(unzFile file, const char *filename1, const char *filename2); -typedef int (*unzIteratorFunction)(unzFile file); -typedef int (*unzIteratorFunction2)(unzFile file, unz_file_info64 *pfile_info, char *filename, - uint16_t filename_size, void *extrafield, uint16_t extrafield_size, char *comment, - uint16_t comment_size); - -/***************************************************************************/ -/* Reading a zip file */ - -ZEXPORT unzFile unzOpen(const char *path); -ZEXPORT unzFile unzOpen64(const void *path); -ZEXPORT unzFile unzOpen2(const char *path, zlib_filefunc_def *pzlib_filefunc_def); -ZEXPORT unzFile unzOpen2_64(const void *path, zlib_filefunc64_def *pzlib_filefunc_def); - unzFile unzOpen_MZ(void *stream); - -ZEXPORT int unzClose(unzFile file); - int unzClose_MZ(unzFile file); - -ZEXPORT int unzGetGlobalInfo(unzFile file, unz_global_info* pglobal_info32); -ZEXPORT int unzGetGlobalInfo64(unzFile file, unz_global_info64 *pglobal_info); -ZEXPORT int unzGetGlobalComment(unzFile file, char *comment, uint16_t comment_size); - -ZEXPORT int unzOpenCurrentFile(unzFile file); -ZEXPORT int unzOpenCurrentFilePassword(unzFile file, const char *password); -ZEXPORT int unzOpenCurrentFile2(unzFile file, int *method, int *level, int raw); -ZEXPORT int unzOpenCurrentFile3(unzFile file, int *method, int *level, int raw, const char *password); -ZEXPORT int unzReadCurrentFile(unzFile file, void *buf, uint32_t len); -ZEXPORT int unzCloseCurrentFile(unzFile file); - - -ZEXPORT int unzGetCurrentFileInfo(unzFile file, unz_file_info *pfile_info, char *filename, - uint16_t filename_size, void *extrafield, uint16_t extrafield_size, char *comment, - uint16_t comment_size); -ZEXPORT int unzGetCurrentFileInfo64(unzFile file, unz_file_info64 * pfile_info, char *filename, - uint16_t filename_size, void *extrafield, uint16_t extrafield_size, char *comment, - uint16_t comment_size); - -ZEXPORT int unzGoToFirstFile(unzFile file); -ZEXPORT int unzGoToNextFile(unzFile file); -ZEXPORT int unzLocateFile(unzFile file, const char *filename, unzFileNameComparer filename_compare_func); - -ZEXPORT int unzGetLocalExtrafield(unzFile file, void *buf, unsigned int len); - -/***************************************************************************/ -/* Raw access to zip file */ - -typedef struct unz_file_pos_s -{ - uint32_t pos_in_zip_directory; /* offset in zip file directory */ - uint32_t num_of_file; /* # of file */ -} unz_file_pos; - -ZEXPORT int unzGetFilePos(unzFile file, unz_file_pos *file_pos); -ZEXPORT int unzGoToFilePos(unzFile file, unz_file_pos *file_pos); - -typedef struct unz64_file_pos_s -{ - int64_t pos_in_zip_directory; /* offset in zip file directory */ - uint64_t num_of_file; /* # of file */ -} unz64_file_pos; - -ZEXPORT int unzGetFilePos64(unzFile file, unz64_file_pos *file_pos); -ZEXPORT int unzGoToFilePos64(unzFile file, const unz64_file_pos *file_pos); - -ZEXPORT int64_t unzGetOffset64(unzFile file); -ZEXPORT int32_t unzGetOffset(unzFile file); -ZEXPORT int unzSetOffset64(unzFile file, int64_t pos); -ZEXPORT int unzSetOffset(unzFile file, uint32_t pos); -ZEXPORT int64_t unztell(unzFile file); -ZEXPORT int32_t unzTell(unzFile file); -ZEXPORT int64_t unzTell64(unzFile file); -ZEXPORT int unzSeek(unzFile file, int32_t offset, int origin); -ZEXPORT int unzSeek64(unzFile file, int64_t offset, int origin); -ZEXPORT int unzEndOfFile(unzFile file); -ZEXPORT void* unzGetStream(unzFile file); - -/***************************************************************************/ - -ZEXPORT void fill_fopen_filefunc(zlib_filefunc_def *pzlib_filefunc_def); -ZEXPORT void fill_fopen64_filefunc(zlib_filefunc64_def *pzlib_filefunc_def); -ZEXPORT void fill_win32_filefunc(zlib_filefunc_def *pzlib_filefunc_def); -ZEXPORT void fill_win32_filefunc64(zlib_filefunc64_def *pzlib_filefunc_def); -ZEXPORT void fill_win32_filefunc64A(zlib_filefunc64_def *pzlib_filefunc_def); -ZEXPORT void fill_win32_filefunc64W(zlib_filefunc64_def *pzlib_filefunc_def); -ZEXPORT void fill_memory_filefunc(zlib_filefunc_def *pzlib_filefunc_def); - -/***************************************************************************/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_crypt.c b/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_crypt.c deleted file mode 100644 index dd2cd42..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_crypt.c +++ /dev/null @@ -1,196 +0,0 @@ -/* mz_crypt.c -- Crypto/hash functions - part of the minizip-ng project - - Copyright (C) 2010-2021 Nathan Moinvaziri - https://github.com/zlib-ng/minizip-ng - - This program is distributed under the terms of the same license as zlib. - See the accompanying LICENSE file for the full text of the license. -*/ - - -#include "mz.h" -#include "mz_os.h" -#include "mz_crypt.h" - -#if defined(HAVE_ZLIB) -# include "zlib.h" -# if defined(ZLIBNG_VERNUM) && !defined(ZLIB_COMPAT) -# include "zlib-ng.h" -# endif -#elif defined(HAVE_LZMA) -# include "lzma.h" -#endif - -/***************************************************************************/ -/* Define z_crc_t in zlib 1.2.5 and less or if using zlib-ng */ - -#if defined(HAVE_ZLIB) && defined(ZLIBNG_VERNUM) -# if defined(ZLIB_COMPAT) -# define ZLIB_PREFIX(x) x -# else -# define ZLIB_PREFIX(x) zng_ ## x -# endif - typedef uint32_t z_crc_t; -#elif defined(HAVE_ZLIB) -# define ZLIB_PREFIX(x) x -# if (ZLIB_VERNUM < 0x1270) - typedef unsigned long z_crc_t; -# endif -#endif - -/***************************************************************************/ - -#if defined(MZ_ZIP_NO_CRYPTO) -int32_t mz_crypt_rand(uint8_t *buf, int32_t size) { - return mz_os_rand(buf, size); -} -#endif - -uint32_t mz_crypt_crc32_update(uint32_t value, const uint8_t *buf, int32_t size) { -#if defined(HAVE_ZLIB) - return (uint32_t)ZLIB_PREFIX(crc32)((z_crc_t)value, buf, (uInt)size); -#elif defined(HAVE_LZMA) - return (uint32_t)lzma_crc32(buf, (size_t)size, (uint32_t)value); -#else - static uint32_t crc32_table[256] = { - 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, - 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, - 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, - 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, - 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, - 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, - 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, - 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, - 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, - 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, - 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106, - 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, - 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, - 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, - 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, - 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, - 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, - 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, - 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, - 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, - 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, - 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, - 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84, - 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, - 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, - 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, - 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e, - 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, - 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, - 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, - 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, - 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, - 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, - 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, - 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, - 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, - 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, - 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, - 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, - 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, - 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, - 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, - 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d - }; - value = ~value; - - while (size > 0) { - value = (value >> 8) ^ crc32_table[(value ^ *buf) & 0xFF]; - - buf += 1; - size -= 1; - } - - return ~value; -#endif -} - -#if defined(HAVE_WZAES) -int32_t mz_crypt_pbkdf2(uint8_t *password, int32_t password_length, uint8_t *salt, - int32_t salt_length, int32_t iteration_count, uint8_t *key, int32_t key_length) { - void *hmac1 = NULL; - void *hmac2 = NULL; - void *hmac3 = NULL; - int32_t err = MZ_OK; - uint16_t i = 0; - uint16_t j = 0; - uint16_t k = 0; - uint16_t block_count = 0; - uint8_t uu[MZ_HASH_SHA1_SIZE]; - uint8_t ux[MZ_HASH_SHA1_SIZE]; - - if (password == NULL || salt == NULL || key == NULL) - return MZ_PARAM_ERROR; - - memset(key, 0, key_length); - - mz_crypt_hmac_create(&hmac1); - mz_crypt_hmac_create(&hmac2); - mz_crypt_hmac_create(&hmac3); - - mz_crypt_hmac_set_algorithm(hmac1, MZ_HASH_SHA1); - mz_crypt_hmac_set_algorithm(hmac2, MZ_HASH_SHA1); - mz_crypt_hmac_set_algorithm(hmac3, MZ_HASH_SHA1); - - err = mz_crypt_hmac_init(hmac1, password, password_length); - if (err == MZ_OK) - err = mz_crypt_hmac_init(hmac2, password, password_length); - if (err == MZ_OK) - err = mz_crypt_hmac_update(hmac2, salt, salt_length); - - block_count = 1 + ((uint16_t)key_length - 1) / MZ_HASH_SHA1_SIZE; - - for (i = 0; (err == MZ_OK) && (i < block_count); i += 1) { - memset(ux, 0, sizeof(ux)); - - err = mz_crypt_hmac_copy(hmac2, hmac3); - if (err != MZ_OK) - break; - - uu[0] = (uint8_t)((i + 1) >> 24); - uu[1] = (uint8_t)((i + 1) >> 16); - uu[2] = (uint8_t)((i + 1) >> 8); - uu[3] = (uint8_t)(i + 1); - - for (j = 0, k = 4; j < iteration_count; j += 1) { - err = mz_crypt_hmac_update(hmac3, uu, k); - if (err == MZ_OK) - err = mz_crypt_hmac_end(hmac3, uu, sizeof(uu)); - if (err != MZ_OK) - break; - - for(k = 0; k < MZ_HASH_SHA1_SIZE; k += 1) - ux[k] ^= uu[k]; - - err = mz_crypt_hmac_copy(hmac1, hmac3); - if (err != MZ_OK) - break; - } - - if (err != MZ_OK) - break; - - j = 0; - k = i * MZ_HASH_SHA1_SIZE; - - while (j < MZ_HASH_SHA1_SIZE && k < key_length) - key[k++] = ux[j++]; - } - - /* hmac3 uses the same provider as hmac2, so it must be deleted - before the context is destroyed. */ - mz_crypt_hmac_delete(&hmac3); - mz_crypt_hmac_delete(&hmac1); - mz_crypt_hmac_delete(&hmac2); - - return err; -} -#endif - -/***************************************************************************/ diff --git a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_crypt.h b/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_crypt.h deleted file mode 100644 index 59a193c..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_crypt.h +++ /dev/null @@ -1,65 +0,0 @@ -/* mz_crypt.h -- Crypto/hash functions - part of the minizip-ng project - - Copyright (C) 2010-2021 Nathan Moinvaziri - https://github.com/zlib-ng/minizip-ng - - This program is distributed under the terms of the same license as zlib. - See the accompanying LICENSE file for the full text of the license. -*/ - -#ifndef MZ_CRYPT_H -#define MZ_CRYPT_H - -#ifdef __cplusplus -extern "C" { -#endif - -/***************************************************************************/ - -uint32_t mz_crypt_crc32_update(uint32_t value, const uint8_t *buf, int32_t size); - -int32_t mz_crypt_pbkdf2(uint8_t *password, int32_t password_length, uint8_t *salt, - int32_t salt_length, int32_t iteration_count, uint8_t *key, int32_t key_length); - -/***************************************************************************/ - -int32_t mz_crypt_rand(uint8_t *buf, int32_t size); - -void mz_crypt_sha_reset(void *handle); -int32_t mz_crypt_sha_begin(void *handle); -int32_t mz_crypt_sha_update(void *handle, const void *buf, int32_t size); -int32_t mz_crypt_sha_end(void *handle, uint8_t *digest, int32_t digest_size); -void mz_crypt_sha_set_algorithm(void *handle, uint16_t algorithm); -void* mz_crypt_sha_create(void **handle); -void mz_crypt_sha_delete(void **handle); - -void mz_crypt_aes_reset(void *handle); -int32_t mz_crypt_aes_encrypt(void *handle, uint8_t *buf, int32_t size); -int32_t mz_crypt_aes_decrypt(void *handle, uint8_t *buf, int32_t size); -int32_t mz_crypt_aes_set_encrypt_key(void *handle, const void *key, int32_t key_length); -int32_t mz_crypt_aes_set_decrypt_key(void *handle, const void *key, int32_t key_length); -void mz_crypt_aes_set_mode(void *handle, int32_t mode); -void* mz_crypt_aes_create(void **handle); -void mz_crypt_aes_delete(void **handle); - -void mz_crypt_hmac_reset(void *handle); -int32_t mz_crypt_hmac_init(void *handle, const void *key, int32_t key_length); -int32_t mz_crypt_hmac_update(void *handle, const void *buf, int32_t size); -int32_t mz_crypt_hmac_end(void *handle, uint8_t *digest, int32_t digest_size); -int32_t mz_crypt_hmac_copy(void *src_handle, void *target_handle); -void mz_crypt_hmac_set_algorithm(void *handle, uint16_t algorithm); -void* mz_crypt_hmac_create(void **handle); -void mz_crypt_hmac_delete(void **handle); - -int32_t mz_crypt_sign(uint8_t *message, int32_t message_size, uint8_t *cert_data, int32_t cert_data_size, - const char *cert_pwd, uint8_t **signature, int32_t *signature_size); -int32_t mz_crypt_sign_verify(uint8_t *message, int32_t message_size, uint8_t *signature, int32_t signature_size); - -/***************************************************************************/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_crypt_apple.c b/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_crypt_apple.c deleted file mode 100644 index 4519753..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_crypt_apple.c +++ /dev/null @@ -1,487 +0,0 @@ -/* mz_crypt_apple.c -- Crypto/hash functions for Apple - part of the minizip-ng project - - Copyright (C) 2010-2021 Nathan Moinvaziri - https://github.com/zlib-ng/minizip-ng - - This program is distributed under the terms of the same license as zlib. - See the accompanying LICENSE file for the full text of the license. -*/ - - -#include "mz.h" - -#include -#include -#include -#include -#include -#include - -/***************************************************************************/ - -int32_t mz_crypt_rand(uint8_t *buf, int32_t size) { - if (SecRandomCopyBytes(kSecRandomDefault, size, buf) != errSecSuccess) - return 0; - return size; -} - -/***************************************************************************/ - -typedef struct mz_crypt_sha_s { - CC_SHA1_CTX ctx1; - CC_SHA256_CTX ctx256; - int32_t error; - int32_t initialized; - uint16_t algorithm; -} mz_crypt_sha; - -/***************************************************************************/ - -void mz_crypt_sha_reset(void *handle) { - mz_crypt_sha *sha = (mz_crypt_sha *)handle; - - sha->error = 0; - sha->initialized = 0; -} - -int32_t mz_crypt_sha_begin(void *handle) { - mz_crypt_sha *sha = (mz_crypt_sha *)handle; - - if (sha == NULL) - return MZ_PARAM_ERROR; - - mz_crypt_sha_reset(handle); - - if (sha->algorithm == MZ_HASH_SHA1) - sha->error = CC_SHA1_Init(&sha->ctx1); - else if (sha->algorithm == MZ_HASH_SHA256) - sha->error = CC_SHA256_Init(&sha->ctx256); - else - return MZ_PARAM_ERROR; - - if (!sha->error) - return MZ_HASH_ERROR; - - sha->initialized = 1; - return MZ_OK; -} - -int32_t mz_crypt_sha_update(void *handle, const void *buf, int32_t size) { - mz_crypt_sha *sha = (mz_crypt_sha *)handle; - - if (sha == NULL || buf == NULL || !sha->initialized) - return MZ_PARAM_ERROR; - - if (sha->algorithm == MZ_HASH_SHA1) - sha->error = CC_SHA1_Update(&sha->ctx1, buf, size); - else - sha->error = CC_SHA256_Update(&sha->ctx256, buf, size); - - if (!sha->error) - return MZ_HASH_ERROR; - - return size; -} - -int32_t mz_crypt_sha_end(void *handle, uint8_t *digest, int32_t digest_size) { - mz_crypt_sha *sha = (mz_crypt_sha *)handle; - - if (sha == NULL || digest == NULL || !sha->initialized) - return MZ_PARAM_ERROR; - - if (sha->algorithm == MZ_HASH_SHA1) { - if (digest_size < MZ_HASH_SHA1_SIZE) - return MZ_BUF_ERROR; - sha->error = CC_SHA1_Final(digest, &sha->ctx1); - } else { - if (digest_size < MZ_HASH_SHA256_SIZE) - return MZ_BUF_ERROR; - sha->error = CC_SHA256_Final(digest, &sha->ctx256); - } - - if (!sha->error) - return MZ_HASH_ERROR; - - return MZ_OK; -} - -void mz_crypt_sha_set_algorithm(void *handle, uint16_t algorithm) { - mz_crypt_sha *sha = (mz_crypt_sha *)handle; - sha->algorithm = algorithm; -} - -void *mz_crypt_sha_create(void **handle) { - mz_crypt_sha *sha = NULL; - - sha = (mz_crypt_sha *)MZ_ALLOC(sizeof(mz_crypt_sha)); - if (sha != NULL) { - memset(sha, 0, sizeof(mz_crypt_sha)); - sha->algorithm = MZ_HASH_SHA256; - } - if (handle != NULL) - *handle = sha; - - return sha; -} - -void mz_crypt_sha_delete(void **handle) { - mz_crypt_sha *sha = NULL; - if (handle == NULL) - return; - sha = (mz_crypt_sha *)*handle; - if (sha != NULL) { - mz_crypt_sha_reset(*handle); - MZ_FREE(sha); - } - *handle = NULL; -} - -/***************************************************************************/ - -typedef struct mz_crypt_aes_s { - CCCryptorRef crypt; - int32_t mode; - int32_t error; -} mz_crypt_aes; - -/***************************************************************************/ - -void mz_crypt_aes_reset(void *handle) { - mz_crypt_aes *aes = (mz_crypt_aes *)handle; - - if (aes->crypt != NULL) - CCCryptorRelease(aes->crypt); - aes->crypt = NULL; -} - -int32_t mz_crypt_aes_encrypt(void *handle, uint8_t *buf, int32_t size) { - mz_crypt_aes *aes = (mz_crypt_aes *)handle; - size_t data_moved = 0; - - if (aes == NULL || buf == NULL) - return MZ_PARAM_ERROR; - if (size != MZ_AES_BLOCK_SIZE) - return MZ_PARAM_ERROR; - - aes->error = CCCryptorUpdate(aes->crypt, buf, size, buf, size, &data_moved); - - if (aes->error != kCCSuccess) - return MZ_HASH_ERROR; - - return size; -} - -int32_t mz_crypt_aes_decrypt(void *handle, uint8_t *buf, int32_t size) { - mz_crypt_aes *aes = (mz_crypt_aes *)handle; - size_t data_moved = 0; - - if (aes == NULL || buf == NULL) - return MZ_PARAM_ERROR; - if (size != MZ_AES_BLOCK_SIZE) - return MZ_PARAM_ERROR; - - aes->error = CCCryptorUpdate(aes->crypt, buf, size, buf, size, &data_moved); - - if (aes->error != kCCSuccess) - return MZ_HASH_ERROR; - - return size; -} - -int32_t mz_crypt_aes_set_encrypt_key(void *handle, const void *key, int32_t key_length) { - mz_crypt_aes *aes = (mz_crypt_aes *)handle; - - - if (aes == NULL || key == NULL || key_length == 0) - return MZ_PARAM_ERROR; - - mz_crypt_aes_reset(handle); - - aes->error = CCCryptorCreate(kCCEncrypt, kCCAlgorithmAES, kCCOptionECBMode, - key, key_length, NULL, &aes->crypt); - - if (aes->error != kCCSuccess) - return MZ_HASH_ERROR; - - return MZ_OK; -} - -int32_t mz_crypt_aes_set_decrypt_key(void *handle, const void *key, int32_t key_length) { - mz_crypt_aes *aes = (mz_crypt_aes *)handle; - - - if (aes == NULL || key == NULL || key_length == 0) - return MZ_PARAM_ERROR; - - mz_crypt_aes_reset(handle); - - aes->error = CCCryptorCreate(kCCDecrypt, kCCAlgorithmAES, kCCOptionECBMode, - key, key_length, NULL, &aes->crypt); - - if (aes->error != kCCSuccess) - return MZ_HASH_ERROR; - - return MZ_OK; -} - -void mz_crypt_aes_set_mode(void *handle, int32_t mode) { - mz_crypt_aes *aes = (mz_crypt_aes *)handle; - aes->mode = mode; -} - -void *mz_crypt_aes_create(void **handle) { - mz_crypt_aes *aes = NULL; - - aes = (mz_crypt_aes *)MZ_ALLOC(sizeof(mz_crypt_aes)); - if (aes != NULL) - memset(aes, 0, sizeof(mz_crypt_aes)); - if (handle != NULL) - *handle = aes; - - return aes; -} - -void mz_crypt_aes_delete(void **handle) { - mz_crypt_aes *aes = NULL; - if (handle == NULL) - return; - aes = (mz_crypt_aes *)*handle; - if (aes != NULL) { - mz_crypt_aes_reset(*handle); - MZ_FREE(aes); - } - *handle = NULL; -} - -/***************************************************************************/ - -typedef struct mz_crypt_hmac_s { - CCHmacContext ctx; - int32_t initialized; - int32_t error; - uint16_t algorithm; -} mz_crypt_hmac; - -/***************************************************************************/ - -static void mz_crypt_hmac_free(void *handle) { - mz_crypt_hmac *hmac = (mz_crypt_hmac *)handle; - memset(&hmac->ctx, 0, sizeof(hmac->ctx)); -} - -void mz_crypt_hmac_reset(void *handle) { - mz_crypt_hmac *hmac = (mz_crypt_hmac *)handle; - mz_crypt_hmac_free(handle); - hmac->error = 0; -} - -int32_t mz_crypt_hmac_init(void *handle, const void *key, int32_t key_length) { - mz_crypt_hmac *hmac = (mz_crypt_hmac *)handle; - CCHmacAlgorithm algorithm = 0; - - if (hmac == NULL || key == NULL) - return MZ_PARAM_ERROR; - - mz_crypt_hmac_reset(handle); - - if (hmac->algorithm == MZ_HASH_SHA1) - algorithm = kCCHmacAlgSHA1; - else if (hmac->algorithm == MZ_HASH_SHA256) - algorithm = kCCHmacAlgSHA256; - else - return MZ_PARAM_ERROR; - - CCHmacInit(&hmac->ctx, algorithm, key, key_length); - return MZ_OK; -} - -int32_t mz_crypt_hmac_update(void *handle, const void *buf, int32_t size) { - mz_crypt_hmac *hmac = (mz_crypt_hmac *)handle; - - if (hmac == NULL || buf == NULL) - return MZ_PARAM_ERROR; - - CCHmacUpdate(&hmac->ctx, buf, size); - return MZ_OK; -} - -int32_t mz_crypt_hmac_end(void *handle, uint8_t *digest, int32_t digest_size) { - mz_crypt_hmac *hmac = (mz_crypt_hmac *)handle; - - if (hmac == NULL || digest == NULL) - return MZ_PARAM_ERROR; - - if (hmac->algorithm == MZ_HASH_SHA1) { - if (digest_size < MZ_HASH_SHA1_SIZE) - return MZ_BUF_ERROR; - CCHmacFinal(&hmac->ctx, digest); - } else { - if (digest_size < MZ_HASH_SHA256_SIZE) - return MZ_BUF_ERROR; - CCHmacFinal(&hmac->ctx, digest); - } - - return MZ_OK; -} - -void mz_crypt_hmac_set_algorithm(void *handle, uint16_t algorithm) { - mz_crypt_hmac *hmac = (mz_crypt_hmac *)handle; - hmac->algorithm = algorithm; -} - -int32_t mz_crypt_hmac_copy(void *src_handle, void *target_handle) { - mz_crypt_hmac *source = (mz_crypt_hmac *)src_handle; - mz_crypt_hmac *target = (mz_crypt_hmac *)target_handle; - - if (source == NULL || target == NULL) - return MZ_PARAM_ERROR; - - memcpy(&target->ctx, &source->ctx, sizeof(CCHmacContext)); - return MZ_OK; -} - -void *mz_crypt_hmac_create(void **handle) { - mz_crypt_hmac *hmac = NULL; - - hmac = (mz_crypt_hmac *)MZ_ALLOC(sizeof(mz_crypt_hmac)); - if (hmac != NULL) { - memset(hmac, 0, sizeof(mz_crypt_hmac)); - hmac->algorithm = MZ_HASH_SHA256; - } - if (handle != NULL) - *handle = hmac; - - return hmac; -} - -void mz_crypt_hmac_delete(void **handle) { - mz_crypt_hmac *hmac = NULL; - if (handle == NULL) - return; - hmac = (mz_crypt_hmac *)*handle; - if (hmac != NULL) { - mz_crypt_hmac_free(*handle); - MZ_FREE(hmac); - } - *handle = NULL; -} - -/***************************************************************************/ - -#if defined(MZ_ZIP_SIGNING) -int32_t mz_crypt_sign(uint8_t *message, int32_t message_size, uint8_t *cert_data, int32_t cert_data_size, - const char *cert_pwd, uint8_t **signature, int32_t *signature_size) { - CFStringRef password_ref = NULL; - CFDictionaryRef options_dict = NULL; - CFDictionaryRef identity_trust = NULL; - CFDataRef signature_out = NULL; - CFDataRef pkcs12_data = NULL; - CFArrayRef items = 0; - SecIdentityRef identity = NULL; - SecTrustRef trust = NULL; - OSStatus status = noErr; - const void *options_key[2] = { kSecImportExportPassphrase, kSecReturnRef }; - const void *options_values[2] = { 0, kCFBooleanTrue }; - int32_t err = MZ_SIGN_ERROR; - - - if (message == NULL || cert_data == NULL || signature == NULL || signature_size == NULL) - return MZ_PARAM_ERROR; - - *signature = NULL; - *signature_size = 0; - - password_ref = CFStringCreateWithCString(0, cert_pwd, kCFStringEncodingUTF8); - options_values[0] = password_ref; - - options_dict = CFDictionaryCreate(0, options_key, options_values, 2, 0, 0); - if (options_dict) - pkcs12_data = CFDataCreate(0, cert_data, cert_data_size); - if (pkcs12_data) - status = SecPKCS12Import(pkcs12_data, options_dict, &items); - if (status == noErr) - identity_trust = CFArrayGetValueAtIndex(items, 0); - if (identity_trust) - identity = (SecIdentityRef)CFDictionaryGetValue(identity_trust, kSecImportItemIdentity); - if (identity) - trust = (SecTrustRef)CFDictionaryGetValue(identity_trust, kSecImportItemTrust); - if (trust) { - status = CMSEncodeContent(identity, NULL, NULL, FALSE, 0, message, message_size, &signature_out); - - if (status == errSecSuccess) { - *signature_size = CFDataGetLength(signature_out); - *signature = (uint8_t *)MZ_ALLOC(*signature_size); - - memcpy(*signature, CFDataGetBytePtr(signature_out), *signature_size); - - err = MZ_OK; - } - } - - if (signature_out) - CFRelease(signature_out); - if (items) - CFRelease(items); - if (pkcs12_data) - CFRelease(pkcs12_data); - if (options_dict) - CFRelease(options_dict); - if (password_ref) - CFRelease(password_ref); - - return err; -} - -int32_t mz_crypt_sign_verify(uint8_t *message, int32_t message_size, uint8_t *signature, int32_t signature_size) { - CMSDecoderRef decoder = NULL; - CMSSignerStatus signer_status = 0; - CFDataRef message_out = NULL; - SecPolicyRef trust_policy = NULL; - OSStatus status = noErr; - OSStatus verify_status = noErr; - size_t signer_count = 0; - size_t i = 0; - int32_t err = MZ_SIGN_ERROR; - - if (message == NULL || signature == NULL) - return MZ_PARAM_ERROR; - - status = CMSDecoderCreate(&decoder); - if (status == errSecSuccess) - status = CMSDecoderUpdateMessage(decoder, signature, signature_size); - if (status == errSecSuccess) - status = CMSDecoderFinalizeMessage(decoder); - if (status == errSecSuccess) - trust_policy = SecPolicyCreateBasicX509(); - - if (status == errSecSuccess && trust_policy) { - CMSDecoderGetNumSigners(decoder, &signer_count); - if (signer_count > 0) - err = MZ_OK; - for (i = 0; i < signer_count; i += 1) { - status = CMSDecoderCopySignerStatus(decoder, i, trust_policy, TRUE, &signer_status, NULL, &verify_status); - if (status != errSecSuccess || verify_status != 0 || signer_status != kCMSSignerValid) { - err = MZ_SIGN_ERROR; - break; - } - } - } - - if (err == MZ_OK) { - status = CMSDecoderCopyContent(decoder, &message_out); - if ((status != errSecSuccess) || - (CFDataGetLength(message_out) != message_size) || - (memcmp(message, CFDataGetBytePtr(message_out), message_size) != 0)) - err = MZ_SIGN_ERROR; - } - - if (trust_policy) - CFRelease(trust_policy); - if (decoder) - CFRelease(decoder); - - return err; -} - -#endif diff --git a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_os.c b/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_os.c deleted file mode 100644 index f96befe..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_os.c +++ /dev/null @@ -1,354 +0,0 @@ -/* mz_os.c -- System functions - part of the minizip-ng project - - Copyright (C) 2010-2021 Nathan Moinvaziri - https://github.com/zlib-ng/minizip-ng - Copyright (C) 1998-2010 Gilles Vollant - https://www.winimage.com/zLibDll/minizip.html - - This program is distributed under the terms of the same license as zlib. - See the accompanying LICENSE file for the full text of the license. -*/ - -#include "mz.h" -#include "mz_crypt.h" -#include "mz_os.h" -#include "mz_strm.h" -#include "mz_strm_os.h" - -#include /* tolower */ - -/***************************************************************************/ - -int32_t mz_path_combine(char *path, const char *join, int32_t max_path) { - int32_t path_len = 0; - - if (path == NULL || join == NULL || max_path == 0) - return MZ_PARAM_ERROR; - - path_len = (int32_t)strlen(path); - - if (path_len == 0) { - strncpy(path, join, max_path - 1); - path[max_path - 1] = 0; - } else { - mz_path_append_slash(path, max_path, MZ_PATH_SLASH_PLATFORM); - strncat(path, join, max_path - path_len); - } - - return MZ_OK; -} - -int32_t mz_path_append_slash(char *path, int32_t max_path, char slash) { - int32_t path_len = (int32_t)strlen(path); - if ((path_len + 2) >= max_path) - return MZ_BUF_ERROR; - if (path[path_len - 1] != '\\' && path[path_len - 1] != '/') { - path[path_len] = slash; - path[path_len + 1] = 0; - } - return MZ_OK; -} - -int32_t mz_path_remove_slash(char *path) { - int32_t path_len = (int32_t)strlen(path); - while (path_len > 0) { - if (path[path_len - 1] == '\\' || path[path_len - 1] == '/') - path[path_len - 1] = 0; - else - break; - - path_len -= 1; - } - return MZ_OK; -} - -int32_t mz_path_has_slash(const char *path) { - int32_t path_len = (int32_t)strlen(path); - if (path[path_len - 1] != '\\' && path[path_len - 1] != '/') - return MZ_EXIST_ERROR; - return MZ_OK; -} - -int32_t mz_path_convert_slashes(char *path, char slash) { - int32_t i = 0; - - for (i = 0; i < (int32_t)strlen(path); i += 1) { - if (path[i] == '\\' || path[i] == '/') - path[i] = slash; - } - return MZ_OK; -} - -int32_t mz_path_compare_wc(const char *path, const char *wildcard, uint8_t ignore_case) { - while (*path != 0) { - switch (*wildcard) { - case '*': - - if (*(wildcard + 1) == 0) - return MZ_OK; - - while (*path != 0) { - if (mz_path_compare_wc(path, (wildcard + 1), ignore_case) == MZ_OK) - return MZ_OK; - - path += 1; - } - - return MZ_EXIST_ERROR; - - default: - /* Ignore differences in path slashes on platforms */ - if ((*path == '\\' && *wildcard == '/') || (*path == '/' && *wildcard == '\\')) - break; - - if (ignore_case) { - if (tolower(*path) != tolower(*wildcard)) - return MZ_EXIST_ERROR; - } else { - if (*path != *wildcard) - return MZ_EXIST_ERROR; - } - - break; - } - - path += 1; - wildcard += 1; - } - - if ((*wildcard != 0) && (*wildcard != '*')) - return MZ_EXIST_ERROR; - - return MZ_OK; -} - -int32_t mz_path_resolve(const char *path, char *output, int32_t max_output) { - const char *source = path; - const char *check = output; - char *target = output; - - - if (max_output <= 0) - return MZ_PARAM_ERROR; - - while (*source != 0 && max_output > 1) { - check = source; - if ((*check == '\\') || (*check == '/')) - check += 1; - - if ((source == path) || (target == output) || (check != source)) { - /* Skip double paths */ - if ((*check == '\\') || (*check == '/')) { - source += 1; - continue; - } - if (*check == '.') { - check += 1; - - /* Remove . if at end of string and not at the beginning */ - if ((*check == 0) && (source != path && target != output)) { - /* Copy last slash */ - *target = *source; - target += 1; - max_output -= 1; - source += (check - source); - continue; - } - /* Remove . if not at end of string */ - else if ((*check == '\\') || (*check == '/')) { - source += (check - source); - /* Skip slash if at beginning of string */ - if (target == output && *source != 0) - source += 1; - continue; - } - /* Go to parent directory .. */ - else if (*check == '.') { - check += 1; - if ((*check == 0) || (*check == '\\' || *check == '/')) { - source += (check - source); - - /* Search backwards for previous slash */ - if (target != output) { - target -= 1; - do { - if ((*target == '\\') || (*target == '/')) - break; - - target -= 1; - max_output += 1; - } while (target > output); - } - - if ((target == output) && (*source != 0)) - source += 1; - if ((*target == '\\' || *target == '/') && (*source == 0)) - target += 1; - - *target = 0; - continue; - } - } - } - } - - *target = *source; - - source += 1; - target += 1; - max_output -= 1; - } - - *target = 0; - - if (*path == 0) - return MZ_INTERNAL_ERROR; - - return MZ_OK; -} - -int32_t mz_path_remove_filename(char *path) { - char *path_ptr = NULL; - - if (path == NULL) - return MZ_PARAM_ERROR; - - path_ptr = path + strlen(path) - 1; - - while (path_ptr > path) { - if ((*path_ptr == '/') || (*path_ptr == '\\')) { - *path_ptr = 0; - break; - } - - path_ptr -= 1; - } - - if (path_ptr == path) - *path_ptr = 0; - - return MZ_OK; -} - -int32_t mz_path_remove_extension(char *path) { - char *path_ptr = NULL; - - if (path == NULL) - return MZ_PARAM_ERROR; - - path_ptr = path + strlen(path) - 1; - - while (path_ptr > path) { - if ((*path_ptr == '/') || (*path_ptr == '\\')) - break; - if (*path_ptr == '.') { - *path_ptr = 0; - break; - } - - path_ptr -= 1; - } - - if (path_ptr == path) - *path_ptr = 0; - - return MZ_OK; -} - -int32_t mz_path_get_filename(const char *path, const char **filename) { - const char *match = NULL; - - if (path == NULL || filename == NULL) - return MZ_PARAM_ERROR; - - *filename = NULL; - - for (match = path; *match != 0; match += 1) { - if ((*match == '\\') || (*match == '/')) - *filename = match + 1; - } - - if (*filename == NULL) - return MZ_EXIST_ERROR; - - return MZ_OK; -} - -int32_t mz_dir_make(const char *path) { - int32_t err = MZ_OK; - int16_t len = 0; - char *current_dir = NULL; - char *match = NULL; - char hold = 0; - - - len = (int16_t)strlen(path); - if (len <= 0) - return 0; - - current_dir = (char *)MZ_ALLOC((uint16_t)len + 1); - if (current_dir == NULL) - return MZ_MEM_ERROR; - - strcpy(current_dir, path); - mz_path_remove_slash(current_dir); - - err = mz_os_make_dir(current_dir); - if (err != MZ_OK) { - match = current_dir + 1; - while (1) { - while (*match != 0 && *match != '\\' && *match != '/') - match += 1; - hold = *match; - *match = 0; - - err = mz_os_make_dir(current_dir); - if (err != MZ_OK) - break; - if (hold == 0) - break; - - *match = hold; - match += 1; - } - } - - MZ_FREE(current_dir); - return err; -} - -int32_t mz_file_get_crc(const char *path, uint32_t *result_crc) { - void *stream = NULL; - uint32_t crc32 = 0; - int32_t read = 0; - int32_t err = MZ_OK; - uint8_t buf[16384]; - - mz_stream_os_create(&stream); - - err = mz_stream_os_open(stream, path, MZ_OPEN_MODE_READ); - - if (err == MZ_OK) { - do { - read = mz_stream_os_read(stream, buf, sizeof(buf)); - - if (read < 0) { - err = read; - break; - } - - crc32 = mz_crypt_crc32_update(crc32, buf, read); - } while ((err == MZ_OK) && (read > 0)); - - mz_stream_os_close(stream); - } - - *result_crc = crc32; - - mz_stream_os_delete(&stream); - - return err; -} - -/***************************************************************************/ diff --git a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_os.h b/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_os.h deleted file mode 100644 index b3e2a58..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_os.h +++ /dev/null @@ -1,175 +0,0 @@ -/* mz_os.h -- System functions - part of the minizip-ng project - - Copyright (C) 2010-2021 Nathan Moinvaziri - https://github.com/zlib-ng/minizip-ng - - This program is distributed under the terms of the same license as zlib. - See the accompanying LICENSE file for the full text of the license. -*/ - -#ifndef MZ_OS_H -#define MZ_OS_H - -#ifdef __cplusplus -extern "C" { -#endif - -/***************************************************************************/ - -#if defined(__APPLE__) -# define MZ_VERSION_MADEBY_HOST_SYSTEM (MZ_HOST_SYSTEM_OSX_DARWIN) -#elif defined(__riscos__) -# define MZ_VERSION_MADEBY_HOST_SYSTEM (MZ_HOST_SYSTEM_RISCOS) -#elif defined(_WIN32) -# define MZ_VERSION_MADEBY_HOST_SYSTEM (MZ_HOST_SYSTEM_WINDOWS_NTFS) -#else -# define MZ_VERSION_MADEBY_HOST_SYSTEM (MZ_HOST_SYSTEM_UNIX) -#endif - -#if defined(HAVE_LZMA) || defined(HAVE_LIBCOMP) -# define MZ_VERSION_MADEBY_ZIP_VERSION (63) -#elif defined(HAVE_WZAES) -# define MZ_VERSION_MADEBY_ZIP_VERSION (51) -#elif defined(HAVE_BZIP2) -# define MZ_VERSION_MADEBY_ZIP_VERSION (46) -#else -# define MZ_VERSION_MADEBY_ZIP_VERSION (45) -#endif - -#define MZ_VERSION_MADEBY ((MZ_VERSION_MADEBY_HOST_SYSTEM << 8) | \ - (MZ_VERSION_MADEBY_ZIP_VERSION)) - -#define MZ_PATH_SLASH_UNIX ('/') -#if defined(_WIN32) -# define MZ_PATH_SLASH_PLATFORM ('\\') -#else -# define MZ_PATH_SLASH_PLATFORM (MZ_PATH_SLASH_UNIX) -#endif - -/***************************************************************************/ - -#if defined(_WIN32) -struct dirent { - char d_name[256]; -}; -typedef void* DIR; -#else -#include -#endif - -/***************************************************************************/ -/* Shared functions */ - -int32_t mz_path_combine(char *path, const char *join, int32_t max_path); -/* Combines two paths */ - -int32_t mz_path_append_slash(char *path, int32_t max_path, char slash); -/* Appends a path slash on to the end of the path */ - -int32_t mz_path_remove_slash(char *path); -/* Removes a path slash from the end of the path */ - -int32_t mz_path_has_slash(const char *path); -/* Returns whether or not the path ends with slash */ - -int32_t mz_path_convert_slashes(char *path, char slash); -/* Converts the slashes in a path */ - -int32_t mz_path_compare_wc(const char *path, const char *wildcard, uint8_t ignore_case); -/* Compare two paths with wildcard */ - -int32_t mz_path_resolve(const char *path, char *target, int32_t max_target); -/* Resolves path */ - -int32_t mz_path_remove_filename(char *path); -/* Remove the filename from a path */ - -int32_t mz_path_remove_extension(char *path); -/* Remove the extension from a path */ - -int32_t mz_path_get_filename(const char *path, const char **filename); -/* Get the filename from a path */ - -int32_t mz_dir_make(const char *path); -/* Creates a directory recursively */ - -int32_t mz_file_get_crc(const char *path, uint32_t *result_crc); -/* Gets the crc32 hash of a file */ - -/***************************************************************************/ -/* Platform specific functions */ - -wchar_t *mz_os_unicode_string_create(const char *string, int32_t encoding); -/* Create unicode string from a utf8 string */ - -void mz_os_unicode_string_delete(wchar_t **string); -/* Delete a unicode string that was created */ - -uint8_t *mz_os_utf8_string_create(const char *string, int32_t encoding); -/* Create a utf8 string from a string with another encoding */ - -void mz_os_utf8_string_delete(uint8_t **string); -/* Delete a utf8 string that was created */ - -int32_t mz_os_rand(uint8_t *buf, int32_t size); -/* Random number generator (not cryptographically secure) */ - -int32_t mz_os_rename(const char *source_path, const char *target_path); -/* Rename a file */ - -int32_t mz_os_unlink(const char *path); -/* Delete an existing file */ - -int32_t mz_os_file_exists(const char *path); -/* Check to see if a file exists */ - -int64_t mz_os_get_file_size(const char *path); -/* Gets the length of a file */ - -int32_t mz_os_get_file_date(const char *path, time_t *modified_date, time_t *accessed_date, time_t *creation_date); -/* Gets a file's modified, access, and creation dates if supported */ - -int32_t mz_os_set_file_date(const char *path, time_t modified_date, time_t accessed_date, time_t creation_date); -/* Sets a file's modified, access, and creation dates if supported */ - -int32_t mz_os_get_file_attribs(const char *path, uint32_t *attributes); -/* Gets a file's attributes */ - -int32_t mz_os_set_file_attribs(const char *path, uint32_t attributes); -/* Sets a file's attributes */ - -int32_t mz_os_make_dir(const char *path); -/* Recursively creates a directory */ - -DIR* mz_os_open_dir(const char *path); -/* Opens a directory for listing */ -struct -dirent* mz_os_read_dir(DIR *dir); -/* Reads a directory listing entry */ - -int32_t mz_os_close_dir(DIR *dir); -/* Closes a directory that has been opened for listing */ - -int32_t mz_os_is_dir(const char *path); -/* Checks to see if path is a directory */ - -int32_t mz_os_is_symlink(const char *path); -/* Checks to see if path is a symbolic link */ - -int32_t mz_os_make_symlink(const char *path, const char *target_path); -/* Creates a symbolic link pointing to a target */ - -int32_t mz_os_read_symlink(const char *path, char *target_path, int32_t max_target_path); -/* Gets the target path for a symbolic link */ - -uint64_t mz_os_ms_time(void); -/* Gets the time in milliseconds */ - -/***************************************************************************/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_os_posix.c b/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_os_posix.c deleted file mode 100644 index 576943d..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_os_posix.c +++ /dev/null @@ -1,367 +0,0 @@ -/* mz_os_posix.c -- System functions for posix - part of the minizip-ng project - - Copyright (C) 2010-2021 Nathan Moinvaziri - https://github.com/zlib-ng/minizip-ng - - This program is distributed under the terms of the same license as zlib. - See the accompanying LICENSE file for the full text of the license. -*/ - -#include "mz.h" -#include "mz_strm.h" -#include "mz_os.h" - -#include /* rename */ -#include -#if defined(HAVE_ICONV) -#include -#endif - -#include -#include - -#ifndef _WIN32 -# include -# include -#endif -#if defined(__APPLE__) -# include -# include -#endif - -#if defined(HAVE_GETRANDOM) -# include -#endif -#if defined(HAVE_LIBBSD) -# include -# ifndef __u_char_defined - typedef unsigned char u_char; -# endif -# include /* arc4random_buf */ -#endif - -/***************************************************************************/ - -#if defined(HAVE_ICONV) -uint8_t *mz_os_utf8_string_create(const char *string, int32_t encoding) { - iconv_t cd; - const char *from_encoding = NULL; - size_t result = 0; - size_t string_length = 0; - size_t string_utf8_size = 0; - uint8_t *string_utf8 = NULL; - uint8_t *string_utf8_ptr = NULL; - - if (string == NULL) - return NULL; - - if (encoding == MZ_ENCODING_CODEPAGE_437) - from_encoding = "CP437"; - else if (encoding == MZ_ENCODING_CODEPAGE_932) - from_encoding = "CP932"; - else if (encoding == MZ_ENCODING_CODEPAGE_936) - from_encoding = "CP936"; - else if (encoding == MZ_ENCODING_CODEPAGE_950) - from_encoding = "CP950"; - else if (encoding == MZ_ENCODING_UTF8) - from_encoding = "UTF-8"; - else - return NULL; - - cd = iconv_open("UTF-8", from_encoding); - if (cd == (iconv_t)-1) - return NULL; - - string_length = strlen(string); - string_utf8_size = string_length * 2; - string_utf8 = (uint8_t *)MZ_ALLOC((int32_t)(string_utf8_size + 1)); - string_utf8_ptr = string_utf8; - - if (string_utf8) { - memset(string_utf8, 0, string_utf8_size + 1); - - result = iconv(cd, (char **)&string, &string_length, - (char **)&string_utf8_ptr, &string_utf8_size); - } - - iconv_close(cd); - - if (result == (size_t)-1) { - MZ_FREE(string_utf8); - string_utf8 = NULL; - } - - return string_utf8; -} -#else -uint8_t *mz_os_utf8_string_create(const char *string, int32_t encoding) { - size_t string_length = 0; - uint8_t *string_copy = NULL; - - string_length = strlen(string); - string_copy = (uint8_t *)MZ_ALLOC((int32_t)(string_length + 1)); - strncpy((char *)string_copy, string, string_length); - string_copy[string_length] = 0; - - return string_copy; -} -#endif - -void mz_os_utf8_string_delete(uint8_t **string) { - if (string != NULL) { - MZ_FREE(*string); - *string = NULL; - } -} - -/***************************************************************************/ - -#if defined(HAVE_ARC4RANDOM_BUF) -int32_t mz_os_rand(uint8_t *buf, int32_t size) { - if (size < 0) - return 0; - arc4random_buf(buf, (uint32_t)size); - return size; -} -#elif defined(HAVE_ARC4RANDOM) -int32_t mz_os_rand(uint8_t *buf, int32_t size) { - int32_t left = size; - for (; left > 2; left -= 3, buf += 3) { - uint32_t val = arc4random(); - - buf[0] = (val) & 0xFF; - buf[1] = (val >> 8) & 0xFF; - buf[2] = (val >> 16) & 0xFF; - } - for (; left > 0; left--, buf++) { - *buf = arc4random() & 0xFF; - } - return size - left; -} -#elif defined(HAVE_GETRANDOM) -int32_t mz_os_rand(uint8_t *buf, int32_t size) { - int32_t left = size; - int32_t written = 0; - - while (left > 0) { - written = getrandom(buf, left, 0); - if (written < 0) - return MZ_INTERNAL_ERROR; - - buf += written; - left -= written; - } - return size - left; -} -#else -int32_t mz_os_rand(uint8_t *buf, int32_t size) { - static unsigned calls = 0; - int32_t i = 0; - - /* Ensure different random header each time */ - if (++calls == 1) { - #define PI_SEED 3141592654UL - srand((unsigned)(time(NULL) ^ PI_SEED)); - } - - while (i < size) - buf[i++] = (rand() >> 7) & 0xff; - - return size; -} -#endif - -int32_t mz_os_rename(const char *source_path, const char *target_path) { - if (rename(source_path, target_path) == -1) - return MZ_EXIST_ERROR; - - return MZ_OK; -} - -int32_t mz_os_unlink(const char *path) { - if (unlink(path) == -1) - return MZ_EXIST_ERROR; - - return MZ_OK; -} - -int32_t mz_os_file_exists(const char *path) { - struct stat path_stat; - - memset(&path_stat, 0, sizeof(path_stat)); - if (stat(path, &path_stat) == 0) - return MZ_OK; - return MZ_EXIST_ERROR; -} - -int64_t mz_os_get_file_size(const char *path) { - struct stat path_stat; - - memset(&path_stat, 0, sizeof(path_stat)); - if (stat(path, &path_stat) == 0) { - /* Stat returns size taken up by directory entry, so return 0 */ - if (S_ISDIR(path_stat.st_mode)) - return 0; - - return path_stat.st_size; - } - - return 0; -} - -int32_t mz_os_get_file_date(const char *path, time_t *modified_date, time_t *accessed_date, time_t *creation_date) { - struct stat path_stat; - char *name = NULL; - size_t len = 0; - int32_t err = MZ_INTERNAL_ERROR; - - memset(&path_stat, 0, sizeof(path_stat)); - - if (strcmp(path, "-") != 0) { - /* Not all systems allow stat'ing a file with / appended */ - len = strlen(path); - name = (char *)malloc(len + 1); - strncpy(name, path, len + 1); - mz_path_remove_slash(name); - - if (stat(name, &path_stat) == 0) { - if (modified_date != NULL) - *modified_date = path_stat.st_mtime; - if (accessed_date != NULL) - *accessed_date = path_stat.st_atime; - /* Creation date not supported */ - if (creation_date != NULL) - *creation_date = 0; - - err = MZ_OK; - } - - free(name); - } - - return err; -} - -int32_t mz_os_set_file_date(const char *path, time_t modified_date, time_t accessed_date, time_t creation_date) { - struct utimbuf ut; - - ut.actime = accessed_date; - ut.modtime = modified_date; - - /* Creation date not supported */ - MZ_UNUSED(creation_date); - - if (utime(path, &ut) != 0) - return MZ_INTERNAL_ERROR; - - return MZ_OK; -} - -int32_t mz_os_get_file_attribs(const char *path, uint32_t *attributes) { - struct stat path_stat; - int32_t err = MZ_OK; - - memset(&path_stat, 0, sizeof(path_stat)); - if (lstat(path, &path_stat) == -1) - err = MZ_INTERNAL_ERROR; - *attributes = path_stat.st_mode; - return err; -} - -int32_t mz_os_set_file_attribs(const char *path, uint32_t attributes) { - int32_t err = MZ_OK; - - if (chmod(path, (mode_t)attributes) == -1) - err = MZ_INTERNAL_ERROR; - - return err; -} - -int32_t mz_os_make_dir(const char *path) { - int32_t err = 0; - - err = mkdir(path, 0755); - - if (err != 0 && errno != EEXIST) - return MZ_INTERNAL_ERROR; - - return MZ_OK; -} - -DIR* mz_os_open_dir(const char *path) { - return opendir(path); -} - -struct dirent* mz_os_read_dir(DIR *dir) { - if (dir == NULL) - return NULL; - return readdir(dir); -} - -int32_t mz_os_close_dir(DIR *dir) { - if (dir == NULL) - return MZ_PARAM_ERROR; - if (closedir(dir) == -1) - return MZ_INTERNAL_ERROR; - return MZ_OK; -} - -int32_t mz_os_is_dir(const char *path) { - struct stat path_stat; - - memset(&path_stat, 0, sizeof(path_stat)); - stat(path, &path_stat); - if (S_ISDIR(path_stat.st_mode)) - return MZ_OK; - - return MZ_EXIST_ERROR; -} - -int32_t mz_os_is_symlink(const char *path) { - struct stat path_stat; - - memset(&path_stat, 0, sizeof(path_stat)); - lstat(path, &path_stat); - if (S_ISLNK(path_stat.st_mode)) - return MZ_OK; - - return MZ_EXIST_ERROR; -} - -int32_t mz_os_make_symlink(const char *path, const char *target_path) { - if (symlink(target_path, path) != 0) - return MZ_INTERNAL_ERROR; - return MZ_OK; -} - -int32_t mz_os_read_symlink(const char *path, char *target_path, int32_t max_target_path) { - size_t length = 0; - - length = (size_t)readlink(path, target_path, max_target_path - 1); - if (length == (size_t)-1) - return MZ_EXIST_ERROR; - - target_path[length] = 0; - return MZ_OK; -} - -uint64_t mz_os_ms_time(void) { - struct timespec ts; - -#if defined(__APPLE__) - clock_serv_t cclock; - mach_timespec_t mts; - - host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock); - clock_get_time(cclock, &mts); - mach_port_deallocate(mach_task_self(), cclock); - - ts.tv_sec = mts.tv_sec; - ts.tv_nsec = mts.tv_nsec; -#else - clock_gettime(CLOCK_MONOTONIC, &ts); -#endif - - return ((uint64_t)ts.tv_sec * 1000) + ((uint64_t)ts.tv_nsec / 1000000); -} diff --git a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm.c b/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm.c deleted file mode 100644 index da7d587..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm.c +++ /dev/null @@ -1,560 +0,0 @@ -/* mz_strm.c -- Stream interface - part of the minizip-ng project - - Copyright (C) 2010-2021 Nathan Moinvaziri - https://github.com/zlib-ng/minizip-ng - - This program is distributed under the terms of the same license as zlib. - See the accompanying LICENSE file for the full text of the license. -*/ - -#include "mz.h" -#include "mz_strm.h" - -/***************************************************************************/ - -#define MZ_STREAM_FIND_SIZE (1024) - -/***************************************************************************/ - -int32_t mz_stream_open(void *stream, const char *path, int32_t mode) { - mz_stream *strm = (mz_stream *)stream; - if (strm == NULL || strm->vtbl == NULL || strm->vtbl->open == NULL) - return MZ_STREAM_ERROR; - return strm->vtbl->open(strm, path, mode); -} - -int32_t mz_stream_is_open(void *stream) { - mz_stream *strm = (mz_stream *)stream; - if (strm == NULL || strm->vtbl == NULL || strm->vtbl->is_open == NULL) - return MZ_STREAM_ERROR; - return strm->vtbl->is_open(strm); -} - -int32_t mz_stream_read(void *stream, void *buf, int32_t size) { - mz_stream *strm = (mz_stream *)stream; - if (strm == NULL || strm->vtbl == NULL || strm->vtbl->read == NULL) - return MZ_PARAM_ERROR; - if (mz_stream_is_open(stream) != MZ_OK) - return MZ_STREAM_ERROR; - return strm->vtbl->read(strm, buf, size); -} - -static int32_t mz_stream_read_value(void *stream, uint64_t *value, int32_t len) { - uint8_t buf[8]; - int32_t n = 0; - int32_t i = 0; - - *value = 0; - if (mz_stream_read(stream, buf, len) == len) { - for (n = 0; n < len; n += 1, i += 8) - *value += ((uint64_t)buf[n]) << i; - } else if (mz_stream_error(stream)) - return MZ_STREAM_ERROR; - else - return MZ_END_OF_STREAM; - - return MZ_OK; -} - -int32_t mz_stream_read_uint8(void *stream, uint8_t *value) { - int32_t err = MZ_OK; - uint64_t value64 = 0; - - *value = 0; - err = mz_stream_read_value(stream, &value64, sizeof(uint8_t)); - if (err == MZ_OK) - *value = (uint8_t)value64; - return err; -} - -int32_t mz_stream_read_uint16(void *stream, uint16_t *value) { - int32_t err = MZ_OK; - uint64_t value64 = 0; - - *value = 0; - err = mz_stream_read_value(stream, &value64, sizeof(uint16_t)); - if (err == MZ_OK) - *value = (uint16_t)value64; - return err; -} - -int32_t mz_stream_read_uint32(void *stream, uint32_t *value) { - int32_t err = MZ_OK; - uint64_t value64 = 0; - - *value = 0; - err = mz_stream_read_value(stream, &value64, sizeof(uint32_t)); - if (err == MZ_OK) - *value = (uint32_t)value64; - return err; -} - -int32_t mz_stream_read_int64(void *stream, int64_t *value) { - return mz_stream_read_value(stream, (uint64_t *)value, sizeof(uint64_t)); -} - -int32_t mz_stream_read_uint64(void *stream, uint64_t *value) { - return mz_stream_read_value(stream, value, sizeof(uint64_t)); -} - -int32_t mz_stream_write(void *stream, const void *buf, int32_t size) { - mz_stream *strm = (mz_stream *)stream; - if (size == 0) - return size; - if (strm == NULL || strm->vtbl == NULL || strm->vtbl->write == NULL) - return MZ_PARAM_ERROR; - if (mz_stream_is_open(stream) != MZ_OK) - return MZ_STREAM_ERROR; - return strm->vtbl->write(strm, buf, size); -} - -static int32_t mz_stream_write_value(void *stream, uint64_t value, int32_t len) { - uint8_t buf[8]; - int32_t n = 0; - - for (n = 0; n < len; n += 1) { - buf[n] = (uint8_t)(value & 0xff); - value >>= 8; - } - - if (value != 0) { - /* Data overflow - hack for ZIP64 (X Roche) */ - for (n = 0; n < len; n += 1) - buf[n] = 0xff; - } - - if (mz_stream_write(stream, buf, len) != len) - return MZ_STREAM_ERROR; - - return MZ_OK; -} - -int32_t mz_stream_write_uint8(void *stream, uint8_t value) { - return mz_stream_write_value(stream, value, sizeof(uint8_t)); -} - -int32_t mz_stream_write_uint16(void *stream, uint16_t value) { - return mz_stream_write_value(stream, value, sizeof(uint16_t)); -} - -int32_t mz_stream_write_uint32(void *stream, uint32_t value) { - return mz_stream_write_value(stream, value, sizeof(uint32_t)); -} - -int32_t mz_stream_write_int64(void *stream, int64_t value) { - return mz_stream_write_value(stream, (uint64_t)value, sizeof(uint64_t)); -} - -int32_t mz_stream_write_uint64(void *stream, uint64_t value) { - return mz_stream_write_value(stream, value, sizeof(uint64_t)); -} - -int32_t mz_stream_copy(void *target, void *source, int32_t len) { - return mz_stream_copy_stream(target, NULL, source, NULL, len); -} - -int32_t mz_stream_copy_to_end(void *target, void *source) { - return mz_stream_copy_stream_to_end(target, NULL, source, NULL); -} - -int32_t mz_stream_copy_stream(void *target, mz_stream_write_cb write_cb, void *source, - mz_stream_read_cb read_cb, int32_t len) { - uint8_t buf[16384]; - int32_t bytes_to_copy = 0; - int32_t read = 0; - int32_t written = 0; - - if (write_cb == NULL) - write_cb = mz_stream_write; - if (read_cb == NULL) - read_cb = mz_stream_read; - - while (len > 0) { - bytes_to_copy = len; - if (bytes_to_copy > (int32_t)sizeof(buf)) - bytes_to_copy = sizeof(buf); - read = read_cb(source, buf, bytes_to_copy); - if (read <= 0) - return MZ_STREAM_ERROR; - written = write_cb(target, buf, read); - if (written != read) - return MZ_STREAM_ERROR; - len -= read; - } - - return MZ_OK; -} - -int32_t mz_stream_copy_stream_to_end(void *target, mz_stream_write_cb write_cb, void *source, - mz_stream_read_cb read_cb) { - uint8_t buf[16384]; - int32_t read = 0; - int32_t written = 0; - - if (write_cb == NULL) - write_cb = mz_stream_write; - if (read_cb == NULL) - read_cb = mz_stream_read; - - read = read_cb(source, buf, sizeof(buf)); - while (read > 0) { - written = write_cb(target, buf, read); - if (written != read) - return MZ_STREAM_ERROR; - read = read_cb(source, buf, sizeof(buf)); - } - - if (read < 0) - return MZ_STREAM_ERROR; - - return MZ_OK; -} - -int64_t mz_stream_tell(void *stream) { - mz_stream *strm = (mz_stream *)stream; - if (strm == NULL || strm->vtbl == NULL || strm->vtbl->tell == NULL) - return MZ_PARAM_ERROR; - if (mz_stream_is_open(stream) != MZ_OK) - return MZ_STREAM_ERROR; - return strm->vtbl->tell(strm); -} - -int32_t mz_stream_seek(void *stream, int64_t offset, int32_t origin) { - mz_stream *strm = (mz_stream *)stream; - if (strm == NULL || strm->vtbl == NULL || strm->vtbl->seek == NULL) - return MZ_PARAM_ERROR; - if (mz_stream_is_open(stream) != MZ_OK) - return MZ_STREAM_ERROR; - if (origin == MZ_SEEK_SET && offset < 0) - return MZ_SEEK_ERROR; - return strm->vtbl->seek(strm, offset, origin); -} - -int32_t mz_stream_find(void *stream, const void *find, int32_t find_size, int64_t max_seek, int64_t *position) { - uint8_t buf[MZ_STREAM_FIND_SIZE]; - int32_t buf_pos = 0; - int32_t read_size = sizeof(buf); - int32_t read = 0; - int64_t read_pos = 0; - int64_t start_pos = 0; - int64_t disk_pos = 0; - int32_t i = 0; - uint8_t first = 1; - int32_t err = MZ_OK; - - if (stream == NULL || find == NULL || position == NULL) - return MZ_PARAM_ERROR; - if (find_size < 0 || find_size >= (int32_t)sizeof(buf)) - return MZ_PARAM_ERROR; - - *position = -1; - - start_pos = mz_stream_tell(stream); - - while (read_pos < max_seek) { - if (read_size > (int32_t)(max_seek - read_pos - buf_pos) && (max_seek - read_pos - buf_pos) < (int64_t)sizeof(buf)) - read_size = (int32_t)(max_seek - read_pos - buf_pos); - - read = mz_stream_read(stream, buf + buf_pos, read_size); - if ((read <= 0) || (read + buf_pos < find_size)) - break; - - for (i = 0; i <= read + buf_pos - find_size; i += 1) { - if (memcmp(&buf[i], find, find_size) != 0) - continue; - - disk_pos = mz_stream_tell(stream); - - /* Seek to position on disk where the data was found */ - err = mz_stream_seek(stream, disk_pos - ((int64_t)read + buf_pos - i), MZ_SEEK_SET); - if (err != MZ_OK) - return MZ_EXIST_ERROR; - - *position = start_pos + read_pos + i; - return MZ_OK; - } - - if (first) { - read -= find_size; - read_size -= find_size; - buf_pos = find_size; - first = 0; - } - - memmove(buf, buf + read, find_size); - read_pos += read; - } - - return MZ_EXIST_ERROR; -} - -int32_t mz_stream_find_reverse(void *stream, const void *find, int32_t find_size, int64_t max_seek, int64_t *position) { - uint8_t buf[MZ_STREAM_FIND_SIZE]; - int32_t buf_pos = 0; - int32_t read_size = MZ_STREAM_FIND_SIZE; - int64_t read_pos = 0; - int32_t read = 0; - int64_t start_pos = 0; - int64_t disk_pos = 0; - uint8_t first = 1; - int32_t i = 0; - int32_t err = MZ_OK; - - if (stream == NULL || find == NULL || position == NULL) - return MZ_PARAM_ERROR; - if (find_size < 0 || find_size >= (int32_t)sizeof(buf)) - return MZ_PARAM_ERROR; - - *position = -1; - - start_pos = mz_stream_tell(stream); - - while (read_pos < max_seek) { - if (read_size > (int32_t)(max_seek - read_pos) && (max_seek - read_pos) < (int64_t)sizeof(buf)) - read_size = (int32_t)(max_seek - read_pos); - - if (mz_stream_seek(stream, start_pos - (read_pos + read_size), MZ_SEEK_SET) != MZ_OK) - break; - read = mz_stream_read(stream, buf, read_size); - if ((read <= 0) || (read + buf_pos < find_size)) - break; - if (read + buf_pos < MZ_STREAM_FIND_SIZE) - memmove(buf + MZ_STREAM_FIND_SIZE - (read + buf_pos), buf, read); - - for (i = find_size; i <= (read + buf_pos); i += 1) { - if (memcmp(&buf[MZ_STREAM_FIND_SIZE - i], find, find_size) != 0) - continue; - - disk_pos = mz_stream_tell(stream); - - /* Seek to position on disk where the data was found */ - err = mz_stream_seek(stream, disk_pos + buf_pos - i, MZ_SEEK_SET); - if (err != MZ_OK) - return MZ_EXIST_ERROR; - - *position = start_pos - (read_pos - buf_pos + i); - return MZ_OK; - } - - if (first) { - read -= find_size; - read_size -= find_size; - buf_pos = find_size; - first = 0; - } - - if (read == 0) - break; - - memmove(buf + read_size, buf, find_size); - read_pos += read; - } - - return MZ_EXIST_ERROR; -} - -int32_t mz_stream_close(void *stream) { - mz_stream *strm = (mz_stream *)stream; - if (strm == NULL || strm->vtbl == NULL || strm->vtbl->close == NULL) - return MZ_PARAM_ERROR; - if (mz_stream_is_open(stream) != MZ_OK) - return MZ_STREAM_ERROR; - return strm->vtbl->close(strm); -} - -int32_t mz_stream_error(void *stream) { - mz_stream *strm = (mz_stream *)stream; - if (strm == NULL || strm->vtbl == NULL || strm->vtbl->error == NULL) - return MZ_PARAM_ERROR; - return strm->vtbl->error(strm); -} - -int32_t mz_stream_set_base(void *stream, void *base) { - mz_stream *strm = (mz_stream *)stream; - strm->base = (mz_stream *)base; - return MZ_OK; -} - -void* mz_stream_get_interface(void *stream) { - mz_stream *strm = (mz_stream *)stream; - if (strm == NULL || strm->vtbl == NULL) - return NULL; - return (void *)strm->vtbl; -} - -int32_t mz_stream_get_prop_int64(void *stream, int32_t prop, int64_t *value) { - mz_stream *strm = (mz_stream *)stream; - if (strm == NULL || strm->vtbl == NULL || strm->vtbl->get_prop_int64 == NULL) - return MZ_PARAM_ERROR; - return strm->vtbl->get_prop_int64(stream, prop, value); -} - -int32_t mz_stream_set_prop_int64(void *stream, int32_t prop, int64_t value) { - mz_stream *strm = (mz_stream *)stream; - if (strm == NULL || strm->vtbl == NULL || strm->vtbl->set_prop_int64 == NULL) - return MZ_PARAM_ERROR; - return strm->vtbl->set_prop_int64(stream, prop, value); -} - -void *mz_stream_create(void **stream, mz_stream_vtbl *vtbl) { - if (stream == NULL) - return NULL; - if (vtbl == NULL || vtbl->create == NULL) - return NULL; - return vtbl->create(stream); -} - -void mz_stream_delete(void **stream) { - mz_stream *strm = NULL; - if (stream == NULL) - return; - strm = (mz_stream *)*stream; - if (strm != NULL && strm->vtbl != NULL && strm->vtbl->destroy != NULL) - strm->vtbl->destroy(stream); - *stream = NULL; -} - -/***************************************************************************/ - -typedef struct mz_stream_raw_s { - mz_stream stream; - int64_t total_in; - int64_t total_out; - int64_t max_total_in; -} mz_stream_raw; - -/***************************************************************************/ - -int32_t mz_stream_raw_open(void *stream, const char *path, int32_t mode) { - MZ_UNUSED(stream); - MZ_UNUSED(path); - MZ_UNUSED(mode); - - return MZ_OK; -} - -int32_t mz_stream_raw_is_open(void *stream) { - mz_stream_raw *raw = (mz_stream_raw *)stream; - return mz_stream_is_open(raw->stream.base); -} - -int32_t mz_stream_raw_read(void *stream, void *buf, int32_t size) { - mz_stream_raw *raw = (mz_stream_raw *)stream; - int32_t bytes_to_read = size; - int32_t read = 0; - - if (raw->max_total_in > 0) { - if ((int64_t)bytes_to_read > (raw->max_total_in - raw->total_in)) - bytes_to_read = (int32_t)(raw->max_total_in - raw->total_in); - } - - read = mz_stream_read(raw->stream.base, buf, bytes_to_read); - - if (read > 0) { - raw->total_in += read; - raw->total_out += read; - } - - return read; -} - -int32_t mz_stream_raw_write(void *stream, const void *buf, int32_t size) { - mz_stream_raw *raw = (mz_stream_raw *)stream; - int32_t written = 0; - - written = mz_stream_write(raw->stream.base, buf, size); - - if (written > 0) { - raw->total_out += written; - raw->total_in += written; - } - - return written; -} - -int64_t mz_stream_raw_tell(void *stream) { - mz_stream_raw *raw = (mz_stream_raw *)stream; - return mz_stream_tell(raw->stream.base); -} - -int32_t mz_stream_raw_seek(void *stream, int64_t offset, int32_t origin) { - mz_stream_raw *raw = (mz_stream_raw *)stream; - return mz_stream_seek(raw->stream.base, offset, origin); -} - -int32_t mz_stream_raw_close(void *stream) { - MZ_UNUSED(stream); - return MZ_OK; -} - -int32_t mz_stream_raw_error(void *stream) { - mz_stream_raw *raw = (mz_stream_raw *)stream; - return mz_stream_error(raw->stream.base); -} - -int32_t mz_stream_raw_get_prop_int64(void *stream, int32_t prop, int64_t *value) { - mz_stream_raw *raw = (mz_stream_raw *)stream; - switch (prop) { - case MZ_STREAM_PROP_TOTAL_IN: - *value = raw->total_in; - return MZ_OK; - case MZ_STREAM_PROP_TOTAL_OUT: - *value = raw->total_out; - return MZ_OK; - } - return MZ_EXIST_ERROR; -} - -int32_t mz_stream_raw_set_prop_int64(void *stream, int32_t prop, int64_t value) { - mz_stream_raw *raw = (mz_stream_raw *)stream; - switch (prop) { - case MZ_STREAM_PROP_TOTAL_IN_MAX: - raw->max_total_in = value; - return MZ_OK; - } - return MZ_EXIST_ERROR; -} - -/***************************************************************************/ - -static mz_stream_vtbl mz_stream_raw_vtbl = { - mz_stream_raw_open, - mz_stream_raw_is_open, - mz_stream_raw_read, - mz_stream_raw_write, - mz_stream_raw_tell, - mz_stream_raw_seek, - mz_stream_raw_close, - mz_stream_raw_error, - mz_stream_raw_create, - mz_stream_raw_delete, - mz_stream_raw_get_prop_int64, - mz_stream_raw_set_prop_int64 -}; - -/***************************************************************************/ - -void *mz_stream_raw_create(void **stream) { - mz_stream_raw *raw = NULL; - - raw = (mz_stream_raw *)MZ_ALLOC(sizeof(mz_stream_raw)); - if (raw != NULL) { - memset(raw, 0, sizeof(mz_stream_raw)); - raw->stream.vtbl = &mz_stream_raw_vtbl; - } - if (stream != NULL) - *stream = raw; - - return raw; -} - -void mz_stream_raw_delete(void **stream) { - mz_stream_raw *raw = NULL; - if (stream == NULL) - return; - raw = (mz_stream_raw *)*stream; - if (raw != NULL) - MZ_FREE(raw); - *stream = NULL; -} diff --git a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm.h b/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm.h deleted file mode 100644 index 8b0027c..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm.h +++ /dev/null @@ -1,132 +0,0 @@ -/* mz_strm.h -- Stream interface - part of the minizip-ng project - - Copyright (C) 2010-2021 Nathan Moinvaziri - https://github.com/zlib-ng/minizip-ng - - This program is distributed under the terms of the same license as zlib. - See the accompanying LICENSE file for the full text of the license. -*/ - -#ifndef MZ_STREAM_H -#define MZ_STREAM_H - -#ifdef __cplusplus -extern "C" { -#endif - -/***************************************************************************/ - -#define MZ_STREAM_PROP_TOTAL_IN (1) -#define MZ_STREAM_PROP_TOTAL_IN_MAX (2) -#define MZ_STREAM_PROP_TOTAL_OUT (3) -#define MZ_STREAM_PROP_TOTAL_OUT_MAX (4) -#define MZ_STREAM_PROP_HEADER_SIZE (5) -#define MZ_STREAM_PROP_FOOTER_SIZE (6) -#define MZ_STREAM_PROP_DISK_SIZE (7) -#define MZ_STREAM_PROP_DISK_NUMBER (8) -#define MZ_STREAM_PROP_COMPRESS_LEVEL (9) -#define MZ_STREAM_PROP_COMPRESS_METHOD (10) -#define MZ_STREAM_PROP_COMPRESS_WINDOW (11) - -/***************************************************************************/ - -typedef int32_t (*mz_stream_open_cb) (void *stream, const char *path, int32_t mode); -typedef int32_t (*mz_stream_is_open_cb) (void *stream); -typedef int32_t (*mz_stream_read_cb) (void *stream, void *buf, int32_t size); -typedef int32_t (*mz_stream_write_cb) (void *stream, const void *buf, int32_t size); -typedef int64_t (*mz_stream_tell_cb) (void *stream); -typedef int32_t (*mz_stream_seek_cb) (void *stream, int64_t offset, int32_t origin); -typedef int32_t (*mz_stream_close_cb) (void *stream); -typedef int32_t (*mz_stream_error_cb) (void *stream); -typedef void* (*mz_stream_create_cb) (void **stream); -typedef void (*mz_stream_destroy_cb) (void **stream); - -typedef int32_t (*mz_stream_get_prop_int64_cb) (void *stream, int32_t prop, int64_t *value); -typedef int32_t (*mz_stream_set_prop_int64_cb) (void *stream, int32_t prop, int64_t value); - -typedef int32_t (*mz_stream_find_cb) (void *stream, const void *find, int32_t find_size, - int64_t max_seek, int64_t *position); - -/***************************************************************************/ - -typedef struct mz_stream_vtbl_s { - mz_stream_open_cb open; - mz_stream_is_open_cb is_open; - mz_stream_read_cb read; - mz_stream_write_cb write; - mz_stream_tell_cb tell; - mz_stream_seek_cb seek; - mz_stream_close_cb close; - mz_stream_error_cb error; - mz_stream_create_cb create; - mz_stream_destroy_cb destroy; - - mz_stream_get_prop_int64_cb get_prop_int64; - mz_stream_set_prop_int64_cb set_prop_int64; -} mz_stream_vtbl; - -typedef struct mz_stream_s { - mz_stream_vtbl *vtbl; - struct mz_stream_s *base; -} mz_stream; - -/***************************************************************************/ - -int32_t mz_stream_open(void *stream, const char *path, int32_t mode); -int32_t mz_stream_is_open(void *stream); -int32_t mz_stream_read(void *stream, void *buf, int32_t size); -int32_t mz_stream_read_uint8(void *stream, uint8_t *value); -int32_t mz_stream_read_uint16(void *stream, uint16_t *value); -int32_t mz_stream_read_uint32(void *stream, uint32_t *value); -int32_t mz_stream_read_int64(void *stream, int64_t *value); -int32_t mz_stream_read_uint64(void *stream, uint64_t *value); -int32_t mz_stream_write(void *stream, const void *buf, int32_t size); -int32_t mz_stream_write_uint8(void *stream, uint8_t value); -int32_t mz_stream_write_uint16(void *stream, uint16_t value); -int32_t mz_stream_write_uint32(void *stream, uint32_t value); -int32_t mz_stream_write_int64(void *stream, int64_t value); -int32_t mz_stream_write_uint64(void *stream, uint64_t value); -int32_t mz_stream_copy(void *target, void *source, int32_t len); -int32_t mz_stream_copy_to_end(void *target, void *source); -int32_t mz_stream_copy_stream(void *target, mz_stream_write_cb write_cb, void *source, mz_stream_read_cb read_cb, int32_t len); -int32_t mz_stream_copy_stream_to_end(void *target, mz_stream_write_cb write_cb, void *source, mz_stream_read_cb read_cb); -int64_t mz_stream_tell(void *stream); -int32_t mz_stream_seek(void *stream, int64_t offset, int32_t origin); -int32_t mz_stream_find(void *stream, const void *find, int32_t find_size, int64_t max_seek, int64_t *position); -int32_t mz_stream_find_reverse(void *stream, const void *find, int32_t find_size, int64_t max_seek, int64_t *position); -int32_t mz_stream_close(void *stream); -int32_t mz_stream_error(void *stream); - -int32_t mz_stream_set_base(void *stream, void *base); -void* mz_stream_get_interface(void *stream); -int32_t mz_stream_get_prop_int64(void *stream, int32_t prop, int64_t *value); -int32_t mz_stream_set_prop_int64(void *stream, int32_t prop, int64_t value); - -void* mz_stream_create(void **stream, mz_stream_vtbl *vtbl); -void mz_stream_delete(void **stream); - -/***************************************************************************/ - -int32_t mz_stream_raw_open(void *stream, const char *filename, int32_t mode); -int32_t mz_stream_raw_is_open(void *stream); -int32_t mz_stream_raw_read(void *stream, void *buf, int32_t size); -int32_t mz_stream_raw_write(void *stream, const void *buf, int32_t size); -int64_t mz_stream_raw_tell(void *stream); -int32_t mz_stream_raw_seek(void *stream, int64_t offset, int32_t origin); -int32_t mz_stream_raw_close(void *stream); -int32_t mz_stream_raw_error(void *stream); - -int32_t mz_stream_raw_get_prop_int64(void *stream, int32_t prop, int64_t *value); -int32_t mz_stream_raw_set_prop_int64(void *stream, int32_t prop, int64_t value); - -void* mz_stream_raw_create(void **stream); -void mz_stream_raw_delete(void **stream); - -/***************************************************************************/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_buf.c b/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_buf.c deleted file mode 100644 index 1dfdfdf..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_buf.c +++ /dev/null @@ -1,385 +0,0 @@ -/* mz_strm_buf.c -- Stream for buffering reads/writes - part of the minizip-ng project - - This version of ioapi is designed to buffer IO. - - Copyright (C) 2010-2021 Nathan Moinvaziri - https://github.com/zlib-ng/minizip-ng - - This program is distributed under the terms of the same license as zlib. - See the accompanying LICENSE file for the full text of the license. -*/ - -#include "mz.h" -#include "mz_strm.h" -#include "mz_strm_buf.h" - -/***************************************************************************/ - -static mz_stream_vtbl mz_stream_buffered_vtbl = { - mz_stream_buffered_open, - mz_stream_buffered_is_open, - mz_stream_buffered_read, - mz_stream_buffered_write, - mz_stream_buffered_tell, - mz_stream_buffered_seek, - mz_stream_buffered_close, - mz_stream_buffered_error, - mz_stream_buffered_create, - mz_stream_buffered_delete, - NULL, - NULL -}; - -/***************************************************************************/ - -typedef struct mz_stream_buffered_s { - mz_stream stream; - int32_t error; - char readbuf[INT16_MAX]; - int32_t readbuf_len; - int32_t readbuf_pos; - int32_t readbuf_hits; - int32_t readbuf_misses; - char writebuf[INT16_MAX]; - int32_t writebuf_len; - int32_t writebuf_pos; - int32_t writebuf_hits; - int32_t writebuf_misses; - int64_t position; -} mz_stream_buffered; - -/***************************************************************************/ - -#if 0 -# define mz_stream_buffered_print printf -#else -# define mz_stream_buffered_print(fmt,...) -#endif - -/***************************************************************************/ - -static int32_t mz_stream_buffered_reset(void *stream) { - mz_stream_buffered *buffered = (mz_stream_buffered *)stream; - - buffered->readbuf_len = 0; - buffered->readbuf_pos = 0; - buffered->writebuf_len = 0; - buffered->writebuf_pos = 0; - buffered->position = 0; - - return MZ_OK; -} - -int32_t mz_stream_buffered_open(void *stream, const char *path, int32_t mode) { - mz_stream_buffered *buffered = (mz_stream_buffered *)stream; - mz_stream_buffered_print("Buffered - Open (mode %" PRId32 ")\n", mode); - mz_stream_buffered_reset(buffered); - return mz_stream_open(buffered->stream.base, path, mode); -} - -int32_t mz_stream_buffered_is_open(void *stream) { - mz_stream_buffered *buffered = (mz_stream_buffered *)stream; - return mz_stream_is_open(buffered->stream.base); -} - -static int32_t mz_stream_buffered_flush(void *stream, int32_t *written) { - mz_stream_buffered *buffered = (mz_stream_buffered *)stream; - int32_t total_bytes_written = 0; - int32_t bytes_to_write = buffered->writebuf_len; - int32_t bytes_left_to_write = buffered->writebuf_len; - int32_t bytes_written = 0; - - *written = 0; - - while (bytes_left_to_write > 0) { - bytes_written = mz_stream_write(buffered->stream.base, - buffered->writebuf + (bytes_to_write - bytes_left_to_write), bytes_left_to_write); - - if (bytes_written != bytes_left_to_write) - return MZ_WRITE_ERROR; - - buffered->writebuf_misses += 1; - - mz_stream_buffered_print("Buffered - Write flush (%" PRId32 ":%" PRId32 " len %" PRId32 ")\n", - bytes_to_write, bytes_left_to_write, buffered->writebuf_len); - - total_bytes_written += bytes_written; - bytes_left_to_write -= bytes_written; - buffered->position += bytes_written; - } - - buffered->writebuf_len = 0; - buffered->writebuf_pos = 0; - - *written = total_bytes_written; - return MZ_OK; -} - -int32_t mz_stream_buffered_read(void *stream, void *buf, int32_t size) { - mz_stream_buffered *buffered = (mz_stream_buffered *)stream; - int32_t buf_len = 0; - int32_t bytes_to_read = 0; - int32_t bytes_to_copy = 0; - int32_t bytes_left_to_read = size; - int32_t bytes_read = 0; - int32_t bytes_flushed = 0; - - mz_stream_buffered_print("Buffered - Read (size %" PRId32 " pos %" PRId64 ")\n", size, buffered->position); - - if (buffered->writebuf_len > 0) { - int64_t position = buffered->position + buffered->writebuf_pos - - mz_stream_buffered_print("Buffered - Switch from write to read, flushing (pos %" PRId64 ")\n", position); - - mz_stream_buffered_flush(stream, &bytes_flushed); - mz_stream_buffered_seek(stream, position, MZ_SEEK_SET); - } - - while (bytes_left_to_read > 0) { - if ((buffered->readbuf_len == 0) || (buffered->readbuf_pos == buffered->readbuf_len)) { - if (buffered->readbuf_len == sizeof(buffered->readbuf)) { - buffered->readbuf_pos = 0; - buffered->readbuf_len = 0; - } - - bytes_to_read = (int32_t)sizeof(buffered->readbuf) - (buffered->readbuf_len - buffered->readbuf_pos); - bytes_read = mz_stream_read(buffered->stream.base, buffered->readbuf + buffered->readbuf_pos, bytes_to_read); - if (bytes_read < 0) - return bytes_read; - - buffered->readbuf_misses += 1; - buffered->readbuf_len += bytes_read; - buffered->position += bytes_read; - - mz_stream_buffered_print("Buffered - Filled (read %" PRId32 "/%" PRId32 " buf %" PRId32 ":%" PRId32 " pos %" PRId64 ")\n", - bytes_read, bytes_to_read, buffered->readbuf_pos, buffered->readbuf_len, buffered->position); - - if (bytes_read == 0) - break; - } - - if ((buffered->readbuf_len - buffered->readbuf_pos) > 0) { - bytes_to_copy = buffered->readbuf_len - buffered->readbuf_pos; - if (bytes_to_copy > bytes_left_to_read) - bytes_to_copy = bytes_left_to_read; - - memcpy((char *)buf + buf_len, buffered->readbuf + buffered->readbuf_pos, bytes_to_copy); - - buf_len += bytes_to_copy; - bytes_left_to_read -= bytes_to_copy; - - buffered->readbuf_hits += 1; - buffered->readbuf_pos += bytes_to_copy; - - mz_stream_buffered_print("Buffered - Emptied (copied %" PRId32 " remaining %" PRId32 " buf %" PRId32 ":%" PRId32 " pos %" PRId64 ")\n", - bytes_to_copy, bytes_left_to_read, buffered->readbuf_pos, buffered->readbuf_len, buffered->position); - } - } - - return size - bytes_left_to_read; -} - -int32_t mz_stream_buffered_write(void *stream, const void *buf, int32_t size) { - mz_stream_buffered *buffered = (mz_stream_buffered *)stream; - int32_t bytes_to_write = size; - int32_t bytes_left_to_write = size; - int32_t bytes_to_copy = 0; - int32_t bytes_used = 0; - int32_t bytes_flushed = 0; - int32_t err = MZ_OK; - - - mz_stream_buffered_print("Buffered - Write (size %" PRId32 " len %" PRId32 " pos %" PRId64 ")\n", - size, buffered->writebuf_len, buffered->position); - - if (buffered->readbuf_len > 0) { - buffered->position -= buffered->readbuf_len; - buffered->position += buffered->readbuf_pos; - - buffered->readbuf_len = 0; - buffered->readbuf_pos = 0; - - mz_stream_buffered_print("Buffered - Switch from read to write (pos %" PRId64 ")\n", buffered->position); - - err = mz_stream_seek(buffered->stream.base, buffered->position, MZ_SEEK_SET); - if (err != MZ_OK) - return err; - } - - while (bytes_left_to_write > 0) { - bytes_used = buffered->writebuf_len; - if (bytes_used > buffered->writebuf_pos) - bytes_used = buffered->writebuf_pos; - bytes_to_copy = (int32_t)sizeof(buffered->writebuf) - bytes_used; - if (bytes_to_copy > bytes_left_to_write) - bytes_to_copy = bytes_left_to_write; - - if (bytes_to_copy == 0) { - err = mz_stream_buffered_flush(stream, &bytes_flushed); - if (err != MZ_OK) - return err; - if (bytes_flushed == 0) - return 0; - - continue; - } - - memcpy(buffered->writebuf + buffered->writebuf_pos, - (const char *)buf + (bytes_to_write - bytes_left_to_write), bytes_to_copy); - - mz_stream_buffered_print("Buffered - Write copy (remaining %" PRId32 " write %" PRId32 ":%" PRId32 " len %" PRId32 ")\n", - bytes_to_copy, bytes_to_write, bytes_left_to_write, buffered->writebuf_len); - - bytes_left_to_write -= bytes_to_copy; - - buffered->writebuf_pos += bytes_to_copy; - buffered->writebuf_hits += 1; - if (buffered->writebuf_pos > buffered->writebuf_len) - buffered->writebuf_len += buffered->writebuf_pos - buffered->writebuf_len; - } - - return size - bytes_left_to_write; -} - -int64_t mz_stream_buffered_tell(void *stream) { - mz_stream_buffered *buffered = (mz_stream_buffered *)stream; - int64_t position = mz_stream_tell(buffered->stream.base); - - buffered->position = position; - - mz_stream_buffered_print("Buffered - Tell (pos %" PRId64 " readpos %" PRId32 " writepos %" PRId32 ")\n", - buffered->position, buffered->readbuf_pos, buffered->writebuf_pos); - - if (buffered->readbuf_len > 0) - position -= ((int64_t)buffered->readbuf_len - buffered->readbuf_pos); - if (buffered->writebuf_len > 0) - position += buffered->writebuf_pos; - return position; -} - -int32_t mz_stream_buffered_seek(void *stream, int64_t offset, int32_t origin) { - mz_stream_buffered *buffered = (mz_stream_buffered *)stream; - int32_t bytes_flushed = 0; - int32_t err = MZ_OK; - - mz_stream_buffered_print("Buffered - Seek (origin %" PRId32 " offset %" PRId64 " pos %" PRId64 ")\n", - origin, offset, buffered->position); - - switch (origin) { - case MZ_SEEK_SET: - - if ((buffered->readbuf_len > 0) && (offset < buffered->position) && - (offset >= buffered->position - buffered->readbuf_len)) { - buffered->readbuf_pos = (int32_t)(offset - (buffered->position - buffered->readbuf_len)); - return MZ_OK; - } - if (buffered->writebuf_len > 0) { - if ((offset >= buffered->position) && (offset <= buffered->position + buffered->writebuf_len)) { - buffered->writebuf_pos = (int32_t)(offset - buffered->position); - return MZ_OK; - } - } - - err = mz_stream_buffered_flush(stream, &bytes_flushed); - if (err != MZ_OK) - return err; - - buffered->position = offset; - break; - - case MZ_SEEK_CUR: - - if (buffered->readbuf_len > 0) { - if (offset <= ((int64_t)buffered->readbuf_len - buffered->readbuf_pos)) { - buffered->readbuf_pos += (uint32_t)offset; - return MZ_OK; - } - offset -= ((int64_t)buffered->readbuf_len - buffered->readbuf_pos); - buffered->position += offset; - } - if (buffered->writebuf_len > 0) { - if (offset <= ((int64_t)buffered->writebuf_len - buffered->writebuf_pos)) { - buffered->writebuf_pos += (uint32_t)offset; - return MZ_OK; - } - /* offset -= (buffered->writebuf_len - buffered->writebuf_pos); */ - } - - err = mz_stream_buffered_flush(stream, &bytes_flushed); - if (err != MZ_OK) - return err; - - break; - - case MZ_SEEK_END: - - if (buffered->writebuf_len > 0) { - buffered->writebuf_pos = buffered->writebuf_len; - return MZ_OK; - } - break; - } - - buffered->readbuf_len = 0; - buffered->readbuf_pos = 0; - buffered->writebuf_len = 0; - buffered->writebuf_pos = 0; - - return mz_stream_seek(buffered->stream.base, offset, origin); -} - -int32_t mz_stream_buffered_close(void *stream) { - mz_stream_buffered *buffered = (mz_stream_buffered *)stream; - int32_t bytes_flushed = 0; - - mz_stream_buffered_flush(stream, &bytes_flushed); - mz_stream_buffered_print("Buffered - Close (flushed %" PRId32 ")\n", bytes_flushed); - - if (buffered->readbuf_hits + buffered->readbuf_misses > 0) { - mz_stream_buffered_print("Buffered - Read efficiency %.02f%%\n", - (buffered->readbuf_hits / ((float)buffered->readbuf_hits + buffered->readbuf_misses)) * 100); - } - - if (buffered->writebuf_hits + buffered->writebuf_misses > 0) { - mz_stream_buffered_print("Buffered - Write efficiency %.02f%%\n", - (buffered->writebuf_hits / ((float)buffered->writebuf_hits + buffered->writebuf_misses)) * 100); - } - - mz_stream_buffered_reset(buffered); - - return mz_stream_close(buffered->stream.base); -} - -int32_t mz_stream_buffered_error(void *stream) { - mz_stream_buffered *buffered = (mz_stream_buffered *)stream; - return mz_stream_error(buffered->stream.base); -} - -void *mz_stream_buffered_create(void **stream) { - mz_stream_buffered *buffered = NULL; - - buffered = (mz_stream_buffered *)MZ_ALLOC(sizeof(mz_stream_buffered)); - if (buffered != NULL) { - memset(buffered, 0, sizeof(mz_stream_buffered)); - buffered->stream.vtbl = &mz_stream_buffered_vtbl; - } - if (stream != NULL) - *stream = buffered; - - return buffered; -} - -void mz_stream_buffered_delete(void **stream) { - mz_stream_buffered *buffered = NULL; - if (stream == NULL) - return; - buffered = (mz_stream_buffered *)*stream; - if (buffered != NULL) - MZ_FREE(buffered); - *stream = NULL; -} - -void *mz_stream_buffered_get_interface(void) { - return (void *)&mz_stream_buffered_vtbl; -} diff --git a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_buf.h b/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_buf.h deleted file mode 100644 index b71e6e4..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_buf.h +++ /dev/null @@ -1,42 +0,0 @@ -/* mz_strm_buf.h -- Stream for buffering reads/writes - part of the minizip-ng project - - This version of ioapi is designed to buffer IO. - - Copyright (C) 2010-2021 Nathan Moinvaziri - https://github.com/zlib-ng/minizip-ng - - This program is distributed under the terms of the same license as zlib. - See the accompanying LICENSE file for the full text of the license. -*/ - -#ifndef MZ_STREAM_BUFFERED_H -#define MZ_STREAM_BUFFERED_H - -#ifdef __cplusplus -extern "C" { -#endif - -/***************************************************************************/ - -int32_t mz_stream_buffered_open(void *stream, const char *path, int32_t mode); -int32_t mz_stream_buffered_is_open(void *stream); -int32_t mz_stream_buffered_read(void *stream, void *buf, int32_t size); -int32_t mz_stream_buffered_write(void *stream, const void *buf, int32_t size); -int64_t mz_stream_buffered_tell(void *stream); -int32_t mz_stream_buffered_seek(void *stream, int64_t offset, int32_t origin); -int32_t mz_stream_buffered_close(void *stream); -int32_t mz_stream_buffered_error(void *stream); - -void* mz_stream_buffered_create(void **stream); -void mz_stream_buffered_delete(void **stream); - -void* mz_stream_buffered_get_interface(void); - -/***************************************************************************/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_mem.c b/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_mem.c deleted file mode 100644 index f4a882d..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_mem.c +++ /dev/null @@ -1,272 +0,0 @@ -/* mz_strm_mem.c -- Stream for memory access - part of the minizip-ng project - - This interface is designed to access memory rather than files. - We do use a region of memory to put data in to and take it out of. - - Based on Unzip ioapi.c version 0.22, May 19th, 2003 - - Copyright (C) 2010-2021 Nathan Moinvaziri - https://github.com/zlib-ng/minizip-ng - Copyright (C) 2003 Justin Fletcher - Copyright (C) 1998-2003 Gilles Vollant - https://www.winimage.com/zLibDll/minizip.html - - This program is distributed under the terms of the same license as zlib. - See the accompanying LICENSE file for the full text of the license. -*/ - - -#include "mz.h" -#include "mz_strm.h" -#include "mz_strm_mem.h" - -/***************************************************************************/ - -static mz_stream_vtbl mz_stream_mem_vtbl = { - mz_stream_mem_open, - mz_stream_mem_is_open, - mz_stream_mem_read, - mz_stream_mem_write, - mz_stream_mem_tell, - mz_stream_mem_seek, - mz_stream_mem_close, - mz_stream_mem_error, - mz_stream_mem_create, - mz_stream_mem_delete, - NULL, - NULL -}; - -/***************************************************************************/ - -typedef struct mz_stream_mem_s { - mz_stream stream; - int32_t mode; - uint8_t *buffer; /* Memory buffer pointer */ - int32_t size; /* Size of the memory buffer */ - int32_t limit; /* Furthest we've written */ - int32_t position; /* Current position in the memory */ - int32_t grow_size; /* Size to grow when full */ -} mz_stream_mem; - -/***************************************************************************/ - -static int32_t mz_stream_mem_set_size(void *stream, int32_t size) { - mz_stream_mem *mem = (mz_stream_mem *)stream; - int32_t new_size = size; - uint8_t *new_buf = NULL; - - - new_buf = (uint8_t *)MZ_ALLOC((uint32_t)new_size); - if (new_buf == NULL) - return MZ_BUF_ERROR; - - if (mem->buffer) { - memcpy(new_buf, mem->buffer, mem->size); - MZ_FREE(mem->buffer); - } - - mem->buffer = new_buf; - mem->size = new_size; - return MZ_OK; -} - -int32_t mz_stream_mem_open(void *stream, const char *path, int32_t mode) { - mz_stream_mem *mem = (mz_stream_mem *)stream; - int32_t err = MZ_OK; - - MZ_UNUSED(path); - - mem->mode = mode; - mem->limit = 0; - mem->position = 0; - - if (mem->mode & MZ_OPEN_MODE_CREATE) - err = mz_stream_mem_set_size(stream, mem->grow_size); - else - mem->limit = mem->size; - - return err; -} - -int32_t mz_stream_mem_is_open(void *stream) { - mz_stream_mem *mem = (mz_stream_mem *)stream; - if (mem->buffer == NULL) - return MZ_OPEN_ERROR; - return MZ_OK; -} - -int32_t mz_stream_mem_read(void *stream, void *buf, int32_t size) { - mz_stream_mem *mem = (mz_stream_mem *)stream; - - if (size > mem->size - mem->position) - size = mem->size - mem->position; - if (mem->position + size > mem->limit) - size = mem->limit - mem->position; - - if (size <= 0) - return 0; - - memcpy(buf, mem->buffer + mem->position, size); - mem->position += size; - - return size; -} - -int32_t mz_stream_mem_write(void *stream, const void *buf, int32_t size) { - mz_stream_mem *mem = (mz_stream_mem *)stream; - int32_t new_size = 0; - int32_t err = MZ_OK; - - if (size == 0) - return size; - - if (size > mem->size - mem->position) { - if (mem->mode & MZ_OPEN_MODE_CREATE) { - new_size = mem->size; - if (size < mem->grow_size) - new_size += mem->grow_size; - else - new_size += size; - - err = mz_stream_mem_set_size(stream, new_size); - if (err != MZ_OK) - return err; - } else { - size = mem->size - mem->position; - } - } - - memcpy(mem->buffer + mem->position, buf, size); - - mem->position += size; - if (mem->position > mem->limit) - mem->limit = mem->position; - - return size; -} - -int64_t mz_stream_mem_tell(void *stream) { - mz_stream_mem *mem = (mz_stream_mem *)stream; - return mem->position; -} - -int32_t mz_stream_mem_seek(void *stream, int64_t offset, int32_t origin) { - mz_stream_mem *mem = (mz_stream_mem *)stream; - int64_t new_pos = 0; - int32_t err = MZ_OK; - - switch (origin) { - case MZ_SEEK_CUR: - new_pos = mem->position + offset; - break; - case MZ_SEEK_END: - new_pos = mem->limit + offset; - break; - case MZ_SEEK_SET: - new_pos = offset; - break; - default: - return MZ_SEEK_ERROR; - } - - if (new_pos > mem->size) { - if ((mem->mode & MZ_OPEN_MODE_CREATE) == 0) - return MZ_SEEK_ERROR; - - err = mz_stream_mem_set_size(stream, (int32_t)new_pos); - if (err != MZ_OK) - return err; - } else if (new_pos < 0) { - return MZ_SEEK_ERROR; - } - - mem->position = (int32_t)new_pos; - return MZ_OK; -} - -int32_t mz_stream_mem_close(void *stream) { - MZ_UNUSED(stream); - - /* We never return errors */ - return MZ_OK; -} - -int32_t mz_stream_mem_error(void *stream) { - MZ_UNUSED(stream); - - /* We never return errors */ - return MZ_OK; -} - -void mz_stream_mem_set_buffer(void *stream, void *buf, int32_t size) { - mz_stream_mem *mem = (mz_stream_mem *)stream; - mem->buffer = (uint8_t *)buf; - mem->size = size; - mem->limit = size; -} - -int32_t mz_stream_mem_get_buffer(void *stream, const void **buf) { - return mz_stream_mem_get_buffer_at(stream, 0, buf); -} - -int32_t mz_stream_mem_get_buffer_at(void *stream, int64_t position, const void **buf) { - mz_stream_mem *mem = (mz_stream_mem *)stream; - if (buf == NULL || position < 0 || mem->size < position || mem->buffer == NULL) - return MZ_SEEK_ERROR; - *buf = mem->buffer + position; - return MZ_OK; -} - -int32_t mz_stream_mem_get_buffer_at_current(void *stream, const void **buf) { - mz_stream_mem *mem = (mz_stream_mem *)stream; - return mz_stream_mem_get_buffer_at(stream, mem->position, buf); -} - -void mz_stream_mem_get_buffer_length(void *stream, int32_t *length) { - mz_stream_mem *mem = (mz_stream_mem *)stream; - *length = mem->limit; -} - -void mz_stream_mem_set_buffer_limit(void *stream, int32_t limit) { - mz_stream_mem *mem = (mz_stream_mem *)stream; - mem->limit = limit; -} - -void mz_stream_mem_set_grow_size(void *stream, int32_t grow_size) { - mz_stream_mem *mem = (mz_stream_mem *)stream; - mem->grow_size = grow_size; -} - -void *mz_stream_mem_create(void **stream) { - mz_stream_mem *mem = NULL; - - mem = (mz_stream_mem *)MZ_ALLOC(sizeof(mz_stream_mem)); - if (mem != NULL) { - memset(mem, 0, sizeof(mz_stream_mem)); - mem->stream.vtbl = &mz_stream_mem_vtbl; - mem->grow_size = 4096; - } - if (stream != NULL) - *stream = mem; - - return mem; -} - -void mz_stream_mem_delete(void **stream) { - mz_stream_mem *mem = NULL; - if (stream == NULL) - return; - mem = (mz_stream_mem *)*stream; - if (mem != NULL) { - if ((mem->mode & MZ_OPEN_MODE_CREATE) && (mem->buffer != NULL)) - MZ_FREE(mem->buffer); - MZ_FREE(mem); - } - *stream = NULL; -} - -void *mz_stream_mem_get_interface(void) { - return (void *)&mz_stream_mem_vtbl; -} diff --git a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_mem.h b/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_mem.h deleted file mode 100644 index 5bfa13d..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_mem.h +++ /dev/null @@ -1,48 +0,0 @@ -/* mz_strm_mem.h -- Stream for memory access - part of the minizip-ng project - - Copyright (C) 2010-2021 Nathan Moinvaziri - https://github.com/zlib-ng/minizip-ng - - This program is distributed under the terms of the same license as zlib. - See the accompanying LICENSE file for the full text of the license. -*/ - -#ifndef MZ_STREAM_MEM_H -#define MZ_STREAM_MEM_H - -#ifdef __cplusplus -extern "C" { -#endif - -/***************************************************************************/ - -int32_t mz_stream_mem_open(void *stream, const char *filename, int32_t mode); -int32_t mz_stream_mem_is_open(void *stream); -int32_t mz_stream_mem_read(void *stream, void *buf, int32_t size); -int32_t mz_stream_mem_write(void *stream, const void *buf, int32_t size); -int64_t mz_stream_mem_tell(void *stream); -int32_t mz_stream_mem_seek(void *stream, int64_t offset, int32_t origin); -int32_t mz_stream_mem_close(void *stream); -int32_t mz_stream_mem_error(void *stream); - -void mz_stream_mem_set_buffer(void *stream, void *buf, int32_t size); -int32_t mz_stream_mem_get_buffer(void *stream, const void **buf); -int32_t mz_stream_mem_get_buffer_at(void *stream, int64_t position, const void **buf); -int32_t mz_stream_mem_get_buffer_at_current(void *stream, const void **buf); -void mz_stream_mem_get_buffer_length(void *stream, int32_t *length); -void mz_stream_mem_set_buffer_limit(void *stream, int32_t limit); -void mz_stream_mem_set_grow_size(void *stream, int32_t grow_size); - -void* mz_stream_mem_create(void **stream); -void mz_stream_mem_delete(void **stream); - -void* mz_stream_mem_get_interface(void); - -/***************************************************************************/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_os.h b/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_os.h deleted file mode 100644 index 614e255..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_os.h +++ /dev/null @@ -1,40 +0,0 @@ -/* mz_sstrm_os.h -- Stream for filesystem access - part of the minizip-ng project - - Copyright (C) 2010-2021 Nathan Moinvaziri - https://github.com/zlib-ng/minizip-ng - - This program is distributed under the terms of the same license as zlib. - See the accompanying LICENSE file for the full text of the license. -*/ - -#ifndef MZ_STREAM_OS_H -#define MZ_STREAM_OS_H - -#ifdef __cplusplus -extern "C" { -#endif - -/***************************************************************************/ - -int32_t mz_stream_os_open(void *stream, const char *path, int32_t mode); -int32_t mz_stream_os_is_open(void *stream); -int32_t mz_stream_os_read(void *stream, void *buf, int32_t size); -int32_t mz_stream_os_write(void *stream, const void *buf, int32_t size); -int64_t mz_stream_os_tell(void *stream); -int32_t mz_stream_os_seek(void *stream, int64_t offset, int32_t origin); -int32_t mz_stream_os_close(void *stream); -int32_t mz_stream_os_error(void *stream); - -void* mz_stream_os_create(void **stream); -void mz_stream_os_delete(void **stream); - -void* mz_stream_os_get_interface(void); - -/***************************************************************************/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_os_posix.c b/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_os_posix.c deleted file mode 100644 index f0b5bd3..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_os_posix.c +++ /dev/null @@ -1,206 +0,0 @@ -/* mz_strm_posix.c -- Stream for filesystem access for posix/linux - part of the minizip-ng project - - Copyright (C) 2010-2021 Nathan Moinvaziri - https://github.com/zlib-ng/minizip-ng - Modifications for Zip64 support - Copyright (C) 2009-2010 Mathias Svensson - http://result42.com - Copyright (C) 1998-2010 Gilles Vollant - https://www.winimage.com/zLibDll/minizip.html - - This program is distributed under the terms of the same license as zlib. - See the accompanying LICENSE file for the full text of the license. -*/ - - -#include "mz.h" -#include "mz_strm.h" -#include "mz_strm_os.h" - -#include /* fopen, fread.. */ -#include - -/***************************************************************************/ - -#define fopen64 fopen -#ifndef MZ_FILE32_API -# ifndef NO_FSEEKO -# define ftello64 ftello -# define fseeko64 fseeko -# elif defined(_MSC_VER) && (_MSC_VER >= 1400) -# define ftello64 _ftelli64 -# define fseeko64 _fseeki64 -# endif -#endif -#ifndef ftello64 -# define ftello64 ftell -#endif -#ifndef fseeko64 -# define fseeko64 fseek -#endif - -/***************************************************************************/ - -static mz_stream_vtbl mz_stream_os_vtbl = { - mz_stream_os_open, - mz_stream_os_is_open, - mz_stream_os_read, - mz_stream_os_write, - mz_stream_os_tell, - mz_stream_os_seek, - mz_stream_os_close, - mz_stream_os_error, - mz_stream_os_create, - mz_stream_os_delete, - NULL, - NULL -}; - -/***************************************************************************/ - -typedef struct mz_stream_posix_s { - mz_stream stream; - int32_t error; - FILE *handle; -} mz_stream_posix; - -/***************************************************************************/ - -int32_t mz_stream_os_open(void *stream, const char *path, int32_t mode) { - mz_stream_posix *posix = (mz_stream_posix *)stream; - const char *mode_fopen = NULL; - - if (path == NULL) - return MZ_PARAM_ERROR; - - if ((mode & MZ_OPEN_MODE_READWRITE) == MZ_OPEN_MODE_READ) - mode_fopen = "rb"; - else if (mode & MZ_OPEN_MODE_APPEND) - mode_fopen = "r+b"; - else if (mode & MZ_OPEN_MODE_CREATE) - mode_fopen = "wb"; - else - return MZ_OPEN_ERROR; - - posix->handle = fopen64(path, mode_fopen); - if (posix->handle == NULL) { - posix->error = errno; - return MZ_OPEN_ERROR; - } - - if (mode & MZ_OPEN_MODE_APPEND) - return mz_stream_os_seek(stream, 0, MZ_SEEK_END); - - return MZ_OK; -} - -int32_t mz_stream_os_is_open(void *stream) { - mz_stream_posix *posix = (mz_stream_posix*)stream; - if (posix->handle == NULL) - return MZ_OPEN_ERROR; - return MZ_OK; -} - -int32_t mz_stream_os_read(void *stream, void *buf, int32_t size) { - mz_stream_posix *posix = (mz_stream_posix*)stream; - int32_t read = (int32_t)fread(buf, 1, (size_t)size, posix->handle); - if (read < size && ferror(posix->handle)) { - posix->error = errno; - return MZ_READ_ERROR; - } - return read; -} - -int32_t mz_stream_os_write(void *stream, const void *buf, int32_t size) { - mz_stream_posix *posix = (mz_stream_posix*)stream; - int32_t written = (int32_t)fwrite(buf, 1, (size_t)size, posix->handle); - if (written < size && ferror(posix->handle)) { - posix->error = errno; - return MZ_WRITE_ERROR; - } - return written; -} - -int64_t mz_stream_os_tell(void *stream) { - mz_stream_posix *posix = (mz_stream_posix*)stream; - int64_t position = ftello64(posix->handle); - if (position == -1) { - posix->error = errno; - return MZ_TELL_ERROR; - } - return position; -} - -int32_t mz_stream_os_seek(void *stream, int64_t offset, int32_t origin) { - mz_stream_posix *posix = (mz_stream_posix*)stream; - int32_t fseek_origin = 0; - - switch (origin) { - case MZ_SEEK_CUR: - fseek_origin = SEEK_CUR; - break; - case MZ_SEEK_END: - fseek_origin = SEEK_END; - break; - case MZ_SEEK_SET: - fseek_origin = SEEK_SET; - break; - default: - return MZ_SEEK_ERROR; - } - - if (fseeko64(posix->handle, offset, fseek_origin) != 0) { - posix->error = errno; - return MZ_SEEK_ERROR; - } - - return MZ_OK; -} - -int32_t mz_stream_os_close(void *stream) { - mz_stream_posix *posix = (mz_stream_posix*)stream; - int32_t closed = 0; - if (posix->handle != NULL) { - closed = fclose(posix->handle); - posix->handle = NULL; - } - if (closed != 0) { - posix->error = errno; - return MZ_CLOSE_ERROR; - } - return MZ_OK; -} - -int32_t mz_stream_os_error(void *stream) { - mz_stream_posix *posix = (mz_stream_posix*)stream; - return posix->error; -} - -void *mz_stream_os_create(void **stream) { - mz_stream_posix *posix = NULL; - - posix = (mz_stream_posix *)MZ_ALLOC(sizeof(mz_stream_posix)); - if (posix != NULL) { - memset(posix, 0, sizeof(mz_stream_posix)); - posix->stream.vtbl = &mz_stream_os_vtbl; - } - if (stream != NULL) - *stream = posix; - - return posix; -} - -void mz_stream_os_delete(void **stream) { - mz_stream_posix *posix = NULL; - if (stream == NULL) - return; - posix = (mz_stream_posix *)*stream; - if (posix != NULL) - MZ_FREE(posix); - *stream = NULL; -} - -void *mz_stream_os_get_interface(void) { - return (void *)&mz_stream_os_vtbl; -} diff --git a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_pkcrypt.c b/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_pkcrypt.c deleted file mode 100644 index 41c762f..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_pkcrypt.c +++ /dev/null @@ -1,338 +0,0 @@ -/* mz_strm_pkcrypt.c -- Code for traditional PKWARE encryption - part of the minizip-ng project - - Copyright (C) 2010-2021 Nathan Moinvaziri - https://github.com/zlib-ng/minizip-ng - Copyright (C) 1998-2005 Gilles Vollant - Modifications for Info-ZIP crypting - https://www.winimage.com/zLibDll/minizip.html - Copyright (C) 2003 Terry Thorsen - - This code is a modified version of crypting code in Info-ZIP distribution - - Copyright (C) 1990-2000 Info-ZIP. All rights reserved. - - This program is distributed under the terms of the same license as zlib. - See the accompanying LICENSE file for the full text of the license. - - This encryption code is a direct transcription of the algorithm from - Roger Schlafly, described by Phil Katz in the file appnote.txt. This - file (appnote.txt) is distributed with the PKZIP program (even in the - version without encryption capabilities). -*/ - - -#include "mz.h" -#include "mz_crypt.h" -#include "mz_strm.h" -#include "mz_strm_pkcrypt.h" - -/***************************************************************************/ - -static mz_stream_vtbl mz_stream_pkcrypt_vtbl = { - mz_stream_pkcrypt_open, - mz_stream_pkcrypt_is_open, - mz_stream_pkcrypt_read, - mz_stream_pkcrypt_write, - mz_stream_pkcrypt_tell, - mz_stream_pkcrypt_seek, - mz_stream_pkcrypt_close, - mz_stream_pkcrypt_error, - mz_stream_pkcrypt_create, - mz_stream_pkcrypt_delete, - mz_stream_pkcrypt_get_prop_int64, - mz_stream_pkcrypt_set_prop_int64 -}; - -/***************************************************************************/ - -typedef struct mz_stream_pkcrypt_s { - mz_stream stream; - int32_t error; - int16_t initialized; - uint8_t buffer[UINT16_MAX]; - int64_t total_in; - int64_t max_total_in; - int64_t total_out; - uint32_t keys[3]; /* keys defining the pseudo-random sequence */ - uint8_t verify1; - uint8_t verify2; - const char *password; -} mz_stream_pkcrypt; - -/***************************************************************************/ - -#define mz_stream_pkcrypt_decode(strm, c) \ - (mz_stream_pkcrypt_update_keys(strm, \ - c ^= mz_stream_pkcrypt_decrypt_byte(strm))) - -#define mz_stream_pkcrypt_encode(strm, c, t) \ - (t = mz_stream_pkcrypt_decrypt_byte(strm), \ - mz_stream_pkcrypt_update_keys(strm, (uint8_t)c), (uint8_t)(t^(c))) - -/***************************************************************************/ - -static uint8_t mz_stream_pkcrypt_decrypt_byte(void *stream) { - mz_stream_pkcrypt *pkcrypt = (mz_stream_pkcrypt *)stream; - - unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an */ - /* unpredictable manner on 16-bit systems; not a problem */ - /* with any known compiler so far, though. */ - - temp = pkcrypt->keys[2] | 2; - return (uint8_t)(((temp * (temp ^ 1)) >> 8) & 0xff); -} - -static uint8_t mz_stream_pkcrypt_update_keys(void *stream, uint8_t c) { - mz_stream_pkcrypt *pkcrypt = (mz_stream_pkcrypt *)stream; - uint8_t buf = c; - - pkcrypt->keys[0] = (uint32_t)~mz_crypt_crc32_update(~pkcrypt->keys[0], &buf, 1); - - pkcrypt->keys[1] += pkcrypt->keys[0] & 0xff; - pkcrypt->keys[1] *= 134775813L; - pkcrypt->keys[1] += 1; - - buf = (uint8_t)(pkcrypt->keys[1] >> 24); - pkcrypt->keys[2] = (uint32_t)~mz_crypt_crc32_update(~pkcrypt->keys[2], &buf, 1); - - return (uint8_t)c; -} - -static void mz_stream_pkcrypt_init_keys(void *stream, const char *password) { - mz_stream_pkcrypt *pkcrypt = (mz_stream_pkcrypt *)stream; - - pkcrypt->keys[0] = 305419896L; - pkcrypt->keys[1] = 591751049L; - pkcrypt->keys[2] = 878082192L; - - while (*password != 0) { - mz_stream_pkcrypt_update_keys(stream, (uint8_t)*password); - password += 1; - } -} - -/***************************************************************************/ - -int32_t mz_stream_pkcrypt_open(void *stream, const char *path, int32_t mode) { - mz_stream_pkcrypt *pkcrypt = (mz_stream_pkcrypt *)stream; - uint16_t t = 0; - int16_t i = 0; - uint8_t verify1 = 0; - uint8_t verify2 = 0; - uint8_t header[MZ_PKCRYPT_HEADER_SIZE]; - const char *password = path; - - pkcrypt->total_in = 0; - pkcrypt->total_out = 0; - pkcrypt->initialized = 0; - - if (mz_stream_is_open(pkcrypt->stream.base) != MZ_OK) - return MZ_OPEN_ERROR; - - if (password == NULL) - password = pkcrypt->password; - if (password == NULL) - return MZ_PARAM_ERROR; - - mz_stream_pkcrypt_init_keys(stream, password); - - if (mode & MZ_OPEN_MODE_WRITE) { - /* First generate RAND_HEAD_LEN - 2 random bytes. */ - mz_crypt_rand(header, MZ_PKCRYPT_HEADER_SIZE - 2); - - /* Encrypt random header (last two bytes is high word of crc) */ - for (i = 0; i < MZ_PKCRYPT_HEADER_SIZE - 2; i++) - header[i] = mz_stream_pkcrypt_encode(stream, header[i], t); - - header[i++] = mz_stream_pkcrypt_encode(stream, pkcrypt->verify1, t); - header[i++] = mz_stream_pkcrypt_encode(stream, pkcrypt->verify2, t); - - if (mz_stream_write(pkcrypt->stream.base, header, sizeof(header)) != sizeof(header)) - return MZ_WRITE_ERROR; - - pkcrypt->total_out += MZ_PKCRYPT_HEADER_SIZE; - } else if (mode & MZ_OPEN_MODE_READ) { - if (mz_stream_read(pkcrypt->stream.base, header, sizeof(header)) != sizeof(header)) - return MZ_READ_ERROR; - - for (i = 0; i < MZ_PKCRYPT_HEADER_SIZE - 2; i++) - header[i] = mz_stream_pkcrypt_decode(stream, header[i]); - - verify1 = mz_stream_pkcrypt_decode(stream, header[i++]); - verify2 = mz_stream_pkcrypt_decode(stream, header[i++]); - - /* Older versions used 2 byte check, newer versions use 1 byte check. */ - MZ_UNUSED(verify1); - if ((verify2 != 0) && (verify2 != pkcrypt->verify2)) - return MZ_PASSWORD_ERROR; - - pkcrypt->total_in += MZ_PKCRYPT_HEADER_SIZE; - } - - pkcrypt->initialized = 1; - return MZ_OK; -} - -int32_t mz_stream_pkcrypt_is_open(void *stream) { - mz_stream_pkcrypt *pkcrypt = (mz_stream_pkcrypt *)stream; - if (pkcrypt->initialized == 0) - return MZ_OPEN_ERROR; - return MZ_OK; -} - -int32_t mz_stream_pkcrypt_read(void *stream, void *buf, int32_t size) { - mz_stream_pkcrypt *pkcrypt = (mz_stream_pkcrypt *)stream; - uint8_t *buf_ptr = (uint8_t *)buf; - int32_t bytes_to_read = size; - int32_t read = 0; - int32_t i = 0; - - - if ((int64_t)bytes_to_read > (pkcrypt->max_total_in - pkcrypt->total_in)) - bytes_to_read = (int32_t)(pkcrypt->max_total_in - pkcrypt->total_in); - - read = mz_stream_read(pkcrypt->stream.base, buf, bytes_to_read); - - for (i = 0; i < read; i++) - buf_ptr[i] = mz_stream_pkcrypt_decode(stream, buf_ptr[i]); - - if (read > 0) - pkcrypt->total_in += read; - - return read; -} - -int32_t mz_stream_pkcrypt_write(void *stream, const void *buf, int32_t size) { - mz_stream_pkcrypt *pkcrypt = (mz_stream_pkcrypt *)stream; - const uint8_t *buf_ptr = (const uint8_t *)buf; - int32_t bytes_to_write = sizeof(pkcrypt->buffer); - int32_t total_written = 0; - int32_t written = 0; - int32_t i = 0; - uint16_t t = 0; - - if (size < 0) - return MZ_PARAM_ERROR; - - do { - if (bytes_to_write > (size - total_written)) - bytes_to_write = (size - total_written); - - for (i = 0; i < bytes_to_write; i += 1) { - pkcrypt->buffer[i] = mz_stream_pkcrypt_encode(stream, *buf_ptr, t); - buf_ptr += 1; - } - - written = mz_stream_write(pkcrypt->stream.base, pkcrypt->buffer, bytes_to_write); - if (written < 0) - return written; - - total_written += written; - } while (total_written < size && written > 0); - - pkcrypt->total_out += total_written; - return total_written; -} - -int64_t mz_stream_pkcrypt_tell(void *stream) { - mz_stream_pkcrypt *pkcrypt = (mz_stream_pkcrypt *)stream; - return mz_stream_tell(pkcrypt->stream.base); -} - -int32_t mz_stream_pkcrypt_seek(void *stream, int64_t offset, int32_t origin) { - mz_stream_pkcrypt *pkcrypt = (mz_stream_pkcrypt *)stream; - return mz_stream_seek(pkcrypt->stream.base, offset, origin); -} - -int32_t mz_stream_pkcrypt_close(void *stream) { - mz_stream_pkcrypt *pkcrypt = (mz_stream_pkcrypt *)stream; - pkcrypt->initialized = 0; - return MZ_OK; -} - -int32_t mz_stream_pkcrypt_error(void *stream) { - mz_stream_pkcrypt *pkcrypt = (mz_stream_pkcrypt *)stream; - return pkcrypt->error; -} - -void mz_stream_pkcrypt_set_password(void *stream, const char *password) { - mz_stream_pkcrypt *pkcrypt = (mz_stream_pkcrypt *)stream; - pkcrypt->password = password; -} - -void mz_stream_pkcrypt_set_verify(void *stream, uint8_t verify1, uint8_t verify2) { - mz_stream_pkcrypt *pkcrypt = (mz_stream_pkcrypt *)stream; - pkcrypt->verify1 = verify1; - pkcrypt->verify2 = verify2; -} - -void mz_stream_pkcrypt_get_verify(void *stream, uint8_t *verify1, uint8_t *verify2) { - mz_stream_pkcrypt *pkcrypt = (mz_stream_pkcrypt *)stream; - *verify1 = pkcrypt->verify1; - *verify2 = pkcrypt->verify2; -} - -int32_t mz_stream_pkcrypt_get_prop_int64(void *stream, int32_t prop, int64_t *value) { - mz_stream_pkcrypt *pkcrypt = (mz_stream_pkcrypt *)stream; - switch (prop) { - case MZ_STREAM_PROP_TOTAL_IN: - *value = pkcrypt->total_in; - break; - case MZ_STREAM_PROP_TOTAL_OUT: - *value = pkcrypt->total_out; - break; - case MZ_STREAM_PROP_TOTAL_IN_MAX: - *value = pkcrypt->max_total_in; - break; - case MZ_STREAM_PROP_HEADER_SIZE: - *value = MZ_PKCRYPT_HEADER_SIZE; - break; - case MZ_STREAM_PROP_FOOTER_SIZE: - *value = 0; - break; - default: - return MZ_EXIST_ERROR; - } - return MZ_OK; -} - -int32_t mz_stream_pkcrypt_set_prop_int64(void *stream, int32_t prop, int64_t value) { - mz_stream_pkcrypt *pkcrypt = (mz_stream_pkcrypt *)stream; - switch (prop) { - case MZ_STREAM_PROP_TOTAL_IN_MAX: - pkcrypt->max_total_in = value; - break; - default: - return MZ_EXIST_ERROR; - } - return MZ_OK; -} - -void *mz_stream_pkcrypt_create(void **stream) { - mz_stream_pkcrypt *pkcrypt = NULL; - - pkcrypt = (mz_stream_pkcrypt *)MZ_ALLOC(sizeof(mz_stream_pkcrypt)); - if (pkcrypt != NULL) { - memset(pkcrypt, 0, sizeof(mz_stream_pkcrypt)); - pkcrypt->stream.vtbl = &mz_stream_pkcrypt_vtbl; - } - - if (stream != NULL) - *stream = pkcrypt; - return pkcrypt; -} - -void mz_stream_pkcrypt_delete(void **stream) { - mz_stream_pkcrypt *pkcrypt = NULL; - if (stream == NULL) - return; - pkcrypt = (mz_stream_pkcrypt *)*stream; - if (pkcrypt != NULL) - MZ_FREE(pkcrypt); - *stream = NULL; -} - -void *mz_stream_pkcrypt_get_interface(void) { - return (void *)&mz_stream_pkcrypt_vtbl; -} diff --git a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_pkcrypt.h b/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_pkcrypt.h deleted file mode 100644 index 453f1f9..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_pkcrypt.h +++ /dev/null @@ -1,46 +0,0 @@ -/* mz_strm_pkcrypt.h -- Code for traditional PKWARE encryption - part of the minizip-ng project - - Copyright (C) 2010-2021 Nathan Moinvaziri - https://github.com/zlib-ng/minizip-ng - - This program is distributed under the terms of the same license as zlib. - See the accompanying LICENSE file for the full text of the license. -*/ - -#ifndef MZ_STREAM_PKCRYPT_H -#define MZ_STREAM_PKCRYPT_H - -#ifdef __cplusplus -extern "C" { -#endif - -/***************************************************************************/ - -int32_t mz_stream_pkcrypt_open(void *stream, const char *filename, int32_t mode); -int32_t mz_stream_pkcrypt_is_open(void *stream); -int32_t mz_stream_pkcrypt_read(void *stream, void *buf, int32_t size); -int32_t mz_stream_pkcrypt_write(void *stream, const void *buf, int32_t size); -int64_t mz_stream_pkcrypt_tell(void *stream); -int32_t mz_stream_pkcrypt_seek(void *stream, int64_t offset, int32_t origin); -int32_t mz_stream_pkcrypt_close(void *stream); -int32_t mz_stream_pkcrypt_error(void *stream); - -void mz_stream_pkcrypt_set_password(void *stream, const char *password); -void mz_stream_pkcrypt_set_verify(void *stream, uint8_t verify1, uint8_t verify2); -void mz_stream_pkcrypt_get_verify(void *stream, uint8_t *verify1, uint8_t *verify2); -int32_t mz_stream_pkcrypt_get_prop_int64(void *stream, int32_t prop, int64_t *value); -int32_t mz_stream_pkcrypt_set_prop_int64(void *stream, int32_t prop, int64_t value); - -void* mz_stream_pkcrypt_create(void **stream); -void mz_stream_pkcrypt_delete(void **stream); - -void* mz_stream_pkcrypt_get_interface(void); - -/***************************************************************************/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_split.c b/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_split.c deleted file mode 100644 index 12c8bda..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_split.c +++ /dev/null @@ -1,438 +0,0 @@ -/* mz_strm_split.c -- Stream for split files - part of the minizip-ng project - - Copyright (C) 2010-2021 Nathan Moinvaziri - https://github.com/zlib-ng/minizip-ng - - This program is distributed under the terms of the same license as zlib. - See the accompanying LICENSE file for the full text of the license. -*/ - - -#include "mz.h" -#include "mz_os.h" -#include "mz_strm.h" -#include "mz_strm_split.h" - -#include /* snprintf */ - -#if defined(_MSC_VER) && (_MSC_VER < 1900) -# define snprintf _snprintf -#endif - -/***************************************************************************/ - -#define MZ_ZIP_MAGIC_DISKHEADER (0x08074b50) - -/***************************************************************************/ - -static mz_stream_vtbl mz_stream_split_vtbl = { - mz_stream_split_open, - mz_stream_split_is_open, - mz_stream_split_read, - mz_stream_split_write, - mz_stream_split_tell, - mz_stream_split_seek, - mz_stream_split_close, - mz_stream_split_error, - mz_stream_split_create, - mz_stream_split_delete, - mz_stream_split_get_prop_int64, - mz_stream_split_set_prop_int64 -}; - -/***************************************************************************/ - -typedef struct mz_stream_split_s { - mz_stream stream; - int32_t is_open; - int64_t disk_size; - int64_t total_in; - int64_t total_in_disk; - int64_t total_out; - int64_t total_out_disk; - int32_t mode; - char *path_cd; - uint32_t path_cd_size; - char *path_disk; - uint32_t path_disk_size; - int32_t number_disk; - int32_t current_disk; - int64_t current_disk_size; - int32_t reached_end; -} mz_stream_split; - -/***************************************************************************/ - -#if 0 -# define mz_stream_split_print printf -#else -# define mz_stream_split_print(fmt,...) -#endif - -/***************************************************************************/ - -static int32_t mz_stream_split_open_disk(void *stream, int32_t number_disk) { - mz_stream_split *split = (mz_stream_split *)stream; - uint32_t magic = 0; - int64_t position = 0; - int32_t i = 0; - int32_t err = MZ_OK; - int16_t disk_part = 0; - - - /* Check if we are reading or writing a disk part or the cd disk */ - if (number_disk >= 0) { - if ((split->mode & MZ_OPEN_MODE_WRITE) == 0) - disk_part = MZ_OPEN_MODE_READ; - else if (split->disk_size > 0) - disk_part = MZ_OPEN_MODE_WRITE; - } - - /* Construct disk path */ - if (disk_part > 0) { - for (i = (int32_t)strlen(split->path_disk) - 1; i >= 0; i -= 1) { - if (split->path_disk[i] != '.') - continue; - snprintf(&split->path_disk[i], split->path_disk_size - (uint32_t)i, - ".z%02" PRId32, number_disk + 1); - break; - } - } else { - strncpy(split->path_disk, split->path_cd, split->path_disk_size - 1); - split->path_disk[split->path_disk_size - 1] = 0; - } - - mz_stream_split_print("Split - Goto disk - %s (disk %" PRId32 ")\n", split->path_disk, number_disk); - - /* If disk part doesn't exist during reading then return MZ_EXIST_ERROR */ - if (disk_part == MZ_OPEN_MODE_READ) - err = mz_os_file_exists(split->path_disk); - - if (err == MZ_OK) - err = mz_stream_open(split->stream.base, split->path_disk, split->mode); - - if (err == MZ_OK) { - split->total_in_disk = 0; - split->total_out_disk = 0; - split->current_disk = number_disk; - - if (split->mode & MZ_OPEN_MODE_WRITE) { - if ((split->current_disk == 0) && (split->disk_size > 0)) { - err = mz_stream_write_uint32(split->stream.base, MZ_ZIP_MAGIC_DISKHEADER); - - split->total_out_disk += 4; - split->total_out += split->total_out_disk; - } - } else if (split->mode & MZ_OPEN_MODE_READ) { - if (split->current_disk == 0) { - err = mz_stream_read_uint32(split->stream.base, &magic); - if (magic != MZ_ZIP_MAGIC_DISKHEADER) - err = MZ_FORMAT_ERROR; - } - } - } - - if (err == MZ_OK) { - /* Get the size of the current disk we are on */ - position = mz_stream_tell(split->stream.base); - mz_stream_seek(split->stream.base, 0, MZ_SEEK_END); - split->current_disk_size = mz_stream_tell(split->stream.base); - mz_stream_seek(split->stream.base, position, MZ_SEEK_SET); - - split->is_open = 1; - } - - return err; -} - -static int32_t mz_stream_split_close_disk(void *stream) { - mz_stream_split *split = (mz_stream_split *)stream; - - if (mz_stream_is_open(split->stream.base) != MZ_OK) - return MZ_OK; - - mz_stream_split_print("Split - Close disk\n"); - return mz_stream_close(split->stream.base); -} - -static int32_t mz_stream_split_goto_disk(void *stream, int32_t number_disk) { - mz_stream_split *split = (mz_stream_split *)stream; - int32_t err = MZ_OK; - int32_t err_is_open = MZ_OK; - - err_is_open = mz_stream_is_open(split->stream.base); - - if ((split->disk_size == 0) && (split->mode & MZ_OPEN_MODE_WRITE)) { - if (err_is_open != MZ_OK) - err = mz_stream_split_open_disk(stream, number_disk); - } else if ((number_disk != split->current_disk) || (err_is_open != MZ_OK)) { - err = mz_stream_split_close_disk(stream); - if (err == MZ_OK) { - err = mz_stream_split_open_disk(stream, number_disk); - if (err == MZ_OK) - split->number_disk = number_disk; - } - } - - return err; -} - -int32_t mz_stream_split_open(void *stream, const char *path, int32_t mode) { - mz_stream_split *split = (mz_stream_split *)stream; - int32_t number_disk = 0; - - split->mode = mode; - - split->path_cd_size = (uint32_t)strlen(path) + 1; - split->path_cd = (char *)MZ_ALLOC(split->path_cd_size); - - if (split->path_cd == NULL) - return MZ_MEM_ERROR; - - strncpy(split->path_cd, path, split->path_cd_size - 1); - split->path_cd[split->path_cd_size - 1] = 0; - - mz_stream_split_print("Split - Open - %s (disk %" PRId32 ")\n", split->path_cd, number_disk); - - split->path_disk_size = (uint32_t)strlen(path) + 10; - split->path_disk = (char *)MZ_ALLOC(split->path_disk_size); - - if (split->path_disk == NULL) { - MZ_FREE(split->path_cd); - return MZ_MEM_ERROR; - } - - strncpy(split->path_disk, path, split->path_disk_size - 1); - split->path_disk[split->path_disk_size - 1] = 0; - - if ((mode & MZ_OPEN_MODE_WRITE) && ((mode & MZ_OPEN_MODE_APPEND) == 0)) { - number_disk = 0; - split->current_disk = -1; - } else { - number_disk = -1; - split->current_disk = 0; - } - - return mz_stream_split_goto_disk(stream, number_disk); -} - -int32_t mz_stream_split_is_open(void *stream) { - mz_stream_split *split = (mz_stream_split *)stream; - if (split->is_open != 1) - return MZ_OPEN_ERROR; - return MZ_OK; -} - -int32_t mz_stream_split_read(void *stream, void *buf, int32_t size) { - mz_stream_split *split = (mz_stream_split *)stream; - int32_t bytes_left = size; - int32_t read = 0; - int32_t err = MZ_OK; - uint8_t *buf_ptr = (uint8_t *)buf; - - err = mz_stream_split_goto_disk(stream, split->number_disk); - if (err != MZ_OK) - return err; - - while (bytes_left > 0) { - read = mz_stream_read(split->stream.base, buf_ptr, bytes_left); - - mz_stream_split_print("Split - Read disk - %" PRId32 "\n", read); - - if (read < 0) - return read; - if (read == 0) { - if (split->current_disk < 0) /* No more disks to goto */ - break; - err = mz_stream_split_goto_disk(stream, split->current_disk + 1); - if (err == MZ_EXIST_ERROR) { - split->current_disk = -1; - break; - } - if (err != MZ_OK) - return err; - } - - bytes_left -= read; - buf_ptr += read; - split->total_in += read; - split->total_in_disk += read; - } - return size - bytes_left; -} - -int32_t mz_stream_split_write(void *stream, const void *buf, int32_t size) { - mz_stream_split *split = (mz_stream_split *)stream; - int64_t position = 0; - int32_t written = 0; - int32_t bytes_left = size; - int32_t bytes_to_write = 0; - int32_t bytes_avail = 0; - int32_t number_disk = -1; - int32_t err = MZ_OK; - const uint8_t *buf_ptr = (const uint8_t *)buf; - - position = mz_stream_tell(split->stream.base); - - while (bytes_left > 0) { - bytes_to_write = bytes_left; - - if (split->disk_size > 0) { - if ((split->total_out_disk == split->disk_size && split->total_out > 0) || - (split->number_disk == -1 && split->number_disk != split->current_disk)) { - if (split->number_disk != -1) - number_disk = split->current_disk + 1; - - err = mz_stream_split_goto_disk(stream, number_disk); - if (err != MZ_OK) - return err; - } - - if (split->number_disk != -1) { - bytes_avail = (int32_t)(split->disk_size - split->total_out_disk); - if (bytes_to_write > bytes_avail) - bytes_to_write = bytes_avail; - } - } - - written = mz_stream_write(split->stream.base, buf_ptr, bytes_to_write); - if (written != bytes_to_write) - return MZ_WRITE_ERROR; - - mz_stream_split_print("Split - Write disk - %" PRId32 "\n", written); - - bytes_left -= written; - buf_ptr += written; - - split->total_out += written; - split->total_out_disk += written; - - if (position == split->current_disk_size) { - split->current_disk_size += written; - position = split->current_disk_size; - } - } - - return size - bytes_left; -} - -int64_t mz_stream_split_tell(void *stream) { - mz_stream_split *split = (mz_stream_split *)stream; - int32_t err = MZ_OK; - err = mz_stream_split_goto_disk(stream, split->number_disk); - if (err != MZ_OK) - return err; - return mz_stream_tell(split->stream.base); -} - -int32_t mz_stream_split_seek(void *stream, int64_t offset, int32_t origin) { - mz_stream_split *split = (mz_stream_split *)stream; - int64_t disk_left = 0; - int64_t position = 0; - int32_t err = MZ_OK; - - err = mz_stream_split_goto_disk(stream, split->number_disk); - - if (err != MZ_OK) - return err; - - mz_stream_split_print("Split - Seek disk - %" PRId64 " (origin %" PRId32 ")\n", offset, origin); - - if ((origin == MZ_SEEK_CUR) && (split->number_disk != -1)) { - position = mz_stream_tell(split->stream.base); - disk_left = split->current_disk_size - position; - - while (offset > disk_left) { - err = mz_stream_split_goto_disk(stream, split->current_disk + 1); - if (err != MZ_OK) - return err; - - offset -= disk_left; - disk_left = split->current_disk_size; - } - } - - return mz_stream_seek(split->stream.base, offset, origin); -} - -int32_t mz_stream_split_close(void *stream) { - mz_stream_split *split = (mz_stream_split *)stream; - int32_t err = MZ_OK; - - err = mz_stream_split_close_disk(stream); - split->is_open = 0; - return err; -} - -int32_t mz_stream_split_error(void *stream) { - mz_stream_split *split = (mz_stream_split *)stream; - return mz_stream_error(split->stream.base); -} - -int32_t mz_stream_split_get_prop_int64(void *stream, int32_t prop, int64_t *value) { - mz_stream_split *split = (mz_stream_split *)stream; - switch (prop) { - case MZ_STREAM_PROP_TOTAL_OUT: - *value = split->total_out; - break; - case MZ_STREAM_PROP_DISK_NUMBER: - *value = split->number_disk; - break; - case MZ_STREAM_PROP_DISK_SIZE: - *value = split->disk_size; - break; - default: - return MZ_EXIST_ERROR; - } - return MZ_OK; -} - -int32_t mz_stream_split_set_prop_int64(void *stream, int32_t prop, int64_t value) { - mz_stream_split *split = (mz_stream_split *)stream; - switch (prop) { - case MZ_STREAM_PROP_DISK_NUMBER: - split->number_disk = (int32_t)value; - break; - case MZ_STREAM_PROP_DISK_SIZE: - split->disk_size = value; - break; - default: - return MZ_EXIST_ERROR; - } - return MZ_OK; -} - -void *mz_stream_split_create(void **stream) { - mz_stream_split *split = NULL; - - split = (mz_stream_split *)MZ_ALLOC(sizeof(mz_stream_split)); - if (split != NULL) { - memset(split, 0, sizeof(mz_stream_split)); - split->stream.vtbl = &mz_stream_split_vtbl; - } - if (stream != NULL) - *stream = split; - - return split; -} - -void mz_stream_split_delete(void **stream) { - mz_stream_split *split = NULL; - if (stream == NULL) - return; - split = (mz_stream_split *)*stream; - if (split != NULL) { - if (split->path_cd) - MZ_FREE(split->path_cd); - if (split->path_disk) - MZ_FREE(split->path_disk); - - MZ_FREE(split); - } - *stream = NULL; -} - -void *mz_stream_split_get_interface(void) { - return (void *)&mz_stream_split_vtbl; -} diff --git a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_split.h b/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_split.h deleted file mode 100644 index da404da..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_split.h +++ /dev/null @@ -1,43 +0,0 @@ -/* mz_strm_split.h -- Stream for split files - part of the minizip-ng project - - Copyright (C) 2010-2021 Nathan Moinvaziri - https://github.com/zlib-ng/minizip-ng - - This program is distributed under the terms of the same license as zlib. - See the accompanying LICENSE file for the full text of the license. -*/ - -#ifndef MZ_STREAM_SPLIT_H -#define MZ_STREAM_SPLIT_H - -#ifdef __cplusplus -extern "C" { -#endif - -/***************************************************************************/ - -int32_t mz_stream_split_open(void *stream, const char *filename, int32_t mode); -int32_t mz_stream_split_is_open(void *stream); -int32_t mz_stream_split_read(void *stream, void *buf, int32_t size); -int32_t mz_stream_split_write(void *stream, const void *buf, int32_t size); -int64_t mz_stream_split_tell(void *stream); -int32_t mz_stream_split_seek(void *stream, int64_t offset, int32_t origin); -int32_t mz_stream_split_close(void *stream); -int32_t mz_stream_split_error(void *stream); - -int32_t mz_stream_split_get_prop_int64(void *stream, int32_t prop, int64_t *value); -int32_t mz_stream_split_set_prop_int64(void *stream, int32_t prop, int64_t value); - -void* mz_stream_split_create(void **stream); -void mz_stream_split_delete(void **stream); - -void* mz_stream_split_get_interface(void); - -/***************************************************************************/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_wzaes.c b/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_wzaes.c deleted file mode 100644 index fd01199..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_wzaes.c +++ /dev/null @@ -1,362 +0,0 @@ -/* mz_strm_wzaes.c -- Stream for WinZip AES encryption - part of the minizip-ng project - - Copyright (C) 2010-2021 Nathan Moinvaziri - https://github.com/zlib-ng/minizip-ng - Copyright (C) 1998-2010 Brian Gladman, Worcester, UK - - This program is distributed under the terms of the same license as zlib. - See the accompanying LICENSE file for the full text of the license. -*/ - - -#include "mz.h" -#include "mz_crypt.h" -#include "mz_strm.h" -#include "mz_strm_wzaes.h" - -/***************************************************************************/ - -#define MZ_AES_KEYING_ITERATIONS (1000) -#define MZ_AES_SALT_LENGTH(MODE) (4 * (MODE & 3) + 4) -#define MZ_AES_SALT_LENGTH_MAX (16) -#define MZ_AES_PW_LENGTH_MAX (128) -#define MZ_AES_PW_VERIFY_SIZE (2) -#define MZ_AES_AUTHCODE_SIZE (10) - -/***************************************************************************/ - -static mz_stream_vtbl mz_stream_wzaes_vtbl = { - mz_stream_wzaes_open, - mz_stream_wzaes_is_open, - mz_stream_wzaes_read, - mz_stream_wzaes_write, - mz_stream_wzaes_tell, - mz_stream_wzaes_seek, - mz_stream_wzaes_close, - mz_stream_wzaes_error, - mz_stream_wzaes_create, - mz_stream_wzaes_delete, - mz_stream_wzaes_get_prop_int64, - mz_stream_wzaes_set_prop_int64 -}; - -/***************************************************************************/ - -typedef struct mz_stream_wzaes_s { - mz_stream stream; - int32_t mode; - int32_t error; - int16_t initialized; - uint8_t buffer[UINT16_MAX]; - int64_t total_in; - int64_t max_total_in; - int64_t total_out; - int16_t encryption_mode; - const char *password; - void *aes; - uint32_t crypt_pos; - uint8_t crypt_block[MZ_AES_BLOCK_SIZE]; - void *hmac; - uint8_t nonce[MZ_AES_BLOCK_SIZE]; -} mz_stream_wzaes; - -/***************************************************************************/ - -int32_t mz_stream_wzaes_open(void *stream, const char *path, int32_t mode) { - mz_stream_wzaes *wzaes = (mz_stream_wzaes *)stream; - uint16_t salt_length = 0; - uint16_t password_length = 0; - uint16_t key_length = 0; - uint8_t kbuf[2 * MZ_AES_KEY_LENGTH_MAX + MZ_AES_PW_VERIFY_SIZE]; - uint8_t verify[MZ_AES_PW_VERIFY_SIZE]; - uint8_t verify_expected[MZ_AES_PW_VERIFY_SIZE]; - uint8_t salt_value[MZ_AES_SALT_LENGTH_MAX]; - const char *password = path; - - wzaes->total_in = 0; - wzaes->total_out = 0; - wzaes->initialized = 0; - - if (mz_stream_is_open(wzaes->stream.base) != MZ_OK) - return MZ_OPEN_ERROR; - - if (password == NULL) - password = wzaes->password; - if (password == NULL) - return MZ_PARAM_ERROR; - password_length = (uint16_t)strlen(password); - if (password_length > MZ_AES_PW_LENGTH_MAX) - return MZ_PARAM_ERROR; - - if (wzaes->encryption_mode < 1 || wzaes->encryption_mode > 3) - return MZ_PARAM_ERROR; - - salt_length = MZ_AES_SALT_LENGTH(wzaes->encryption_mode); - - if (mode & MZ_OPEN_MODE_WRITE) { - mz_crypt_rand(salt_value, salt_length); - } else if (mode & MZ_OPEN_MODE_READ) { - if (mz_stream_read(wzaes->stream.base, salt_value, salt_length) != salt_length) - return MZ_READ_ERROR; - } - - key_length = MZ_AES_KEY_LENGTH(wzaes->encryption_mode); - - /* Derive the encryption and authentication keys and the password verifier */ - mz_crypt_pbkdf2((uint8_t *)password, password_length, salt_value, salt_length, - MZ_AES_KEYING_ITERATIONS, kbuf, 2 * key_length + MZ_AES_PW_VERIFY_SIZE); - - /* Initialize the encryption nonce and buffer pos */ - wzaes->crypt_pos = MZ_AES_BLOCK_SIZE; - memset(wzaes->nonce, 0, sizeof(wzaes->nonce)); - - /* Initialize for encryption using key 1 */ - mz_crypt_aes_reset(wzaes->aes); - mz_crypt_aes_set_mode(wzaes->aes, wzaes->encryption_mode); - mz_crypt_aes_set_encrypt_key(wzaes->aes, kbuf, key_length); - - /* Initialize for authentication using key 2 */ - mz_crypt_hmac_reset(wzaes->hmac); - mz_crypt_hmac_set_algorithm(wzaes->hmac, MZ_HASH_SHA1); - mz_crypt_hmac_init(wzaes->hmac, kbuf + key_length, key_length); - - memcpy(verify, kbuf + (2 * key_length), MZ_AES_PW_VERIFY_SIZE); - - if (mode & MZ_OPEN_MODE_WRITE) { - if (mz_stream_write(wzaes->stream.base, salt_value, salt_length) != salt_length) - return MZ_WRITE_ERROR; - - wzaes->total_out += salt_length; - - if (mz_stream_write(wzaes->stream.base, verify, MZ_AES_PW_VERIFY_SIZE) != MZ_AES_PW_VERIFY_SIZE) - return MZ_WRITE_ERROR; - - wzaes->total_out += MZ_AES_PW_VERIFY_SIZE; - } else if (mode & MZ_OPEN_MODE_READ) { - wzaes->total_in += salt_length; - - if (mz_stream_read(wzaes->stream.base, verify_expected, MZ_AES_PW_VERIFY_SIZE) != MZ_AES_PW_VERIFY_SIZE) - return MZ_READ_ERROR; - - wzaes->total_in += MZ_AES_PW_VERIFY_SIZE; - - if (memcmp(verify_expected, verify, MZ_AES_PW_VERIFY_SIZE) != 0) - return MZ_PASSWORD_ERROR; - } - - wzaes->mode = mode; - wzaes->initialized = 1; - - return MZ_OK; -} - -int32_t mz_stream_wzaes_is_open(void *stream) { - mz_stream_wzaes *wzaes = (mz_stream_wzaes *)stream; - if (wzaes->initialized == 0) - return MZ_OPEN_ERROR; - return MZ_OK; -} - -static int32_t mz_stream_wzaes_ctr_encrypt(void *stream, uint8_t *buf, int32_t size) { - mz_stream_wzaes *wzaes = (mz_stream_wzaes *)stream; - uint32_t pos = wzaes->crypt_pos; - uint32_t i = 0; - int32_t err = MZ_OK; - - while (i < (uint32_t)size) { - if (pos == MZ_AES_BLOCK_SIZE) { - uint32_t j = 0; - - /* Increment encryption nonce */ - while (j < 8 && !++wzaes->nonce[j]) - j += 1; - - /* Encrypt the nonce to form next xor buffer */ - memcpy(wzaes->crypt_block, wzaes->nonce, MZ_AES_BLOCK_SIZE); - mz_crypt_aes_encrypt(wzaes->aes, wzaes->crypt_block, sizeof(wzaes->crypt_block)); - pos = 0; - } - - buf[i++] ^= wzaes->crypt_block[pos++]; - } - - wzaes->crypt_pos = pos; - return err; -} - -int32_t mz_stream_wzaes_read(void *stream, void *buf, int32_t size) { - mz_stream_wzaes *wzaes = (mz_stream_wzaes *)stream; - int64_t max_total_in = 0; - int32_t bytes_to_read = size; - int32_t read = 0; - - max_total_in = wzaes->max_total_in - MZ_AES_FOOTER_SIZE; - if ((int64_t)bytes_to_read > (max_total_in - wzaes->total_in)) - bytes_to_read = (int32_t)(max_total_in - wzaes->total_in); - - read = mz_stream_read(wzaes->stream.base, buf, bytes_to_read); - - if (read > 0) { - mz_crypt_hmac_update(wzaes->hmac, (uint8_t *)buf, read); - mz_stream_wzaes_ctr_encrypt(stream, (uint8_t *)buf, read); - - wzaes->total_in += read; - } - - return read; -} - -int32_t mz_stream_wzaes_write(void *stream, const void *buf, int32_t size) { - mz_stream_wzaes *wzaes = (mz_stream_wzaes *)stream; - const uint8_t *buf_ptr = (const uint8_t *)buf; - int32_t bytes_to_write = sizeof(wzaes->buffer); - int32_t total_written = 0; - int32_t written = 0; - - if (size < 0) - return MZ_PARAM_ERROR; - - do { - if (bytes_to_write > (size - total_written)) - bytes_to_write = (size - total_written); - - memcpy(wzaes->buffer, buf_ptr, bytes_to_write); - buf_ptr += bytes_to_write; - - mz_stream_wzaes_ctr_encrypt(stream, (uint8_t *)wzaes->buffer, bytes_to_write); - mz_crypt_hmac_update(wzaes->hmac, wzaes->buffer, bytes_to_write); - - written = mz_stream_write(wzaes->stream.base, wzaes->buffer, bytes_to_write); - if (written < 0) - return written; - - total_written += written; - } while (total_written < size && written > 0); - - wzaes->total_out += total_written; - return total_written; -} - -int64_t mz_stream_wzaes_tell(void *stream) { - mz_stream_wzaes *wzaes = (mz_stream_wzaes *)stream; - return mz_stream_tell(wzaes->stream.base); -} - -int32_t mz_stream_wzaes_seek(void *stream, int64_t offset, int32_t origin) { - mz_stream_wzaes *wzaes = (mz_stream_wzaes *)stream; - return mz_stream_seek(wzaes->stream.base, offset, origin); -} - -int32_t mz_stream_wzaes_close(void *stream) { - mz_stream_wzaes *wzaes = (mz_stream_wzaes *)stream; - uint8_t expected_hash[MZ_AES_AUTHCODE_SIZE]; - uint8_t computed_hash[MZ_HASH_SHA1_SIZE]; - - mz_crypt_hmac_end(wzaes->hmac, computed_hash, sizeof(computed_hash)); - - if (wzaes->mode & MZ_OPEN_MODE_WRITE) { - if (mz_stream_write(wzaes->stream.base, computed_hash, MZ_AES_AUTHCODE_SIZE) != MZ_AES_AUTHCODE_SIZE) - return MZ_WRITE_ERROR; - - wzaes->total_out += MZ_AES_AUTHCODE_SIZE; - } else if (wzaes->mode & MZ_OPEN_MODE_READ) { - if (mz_stream_read(wzaes->stream.base, expected_hash, MZ_AES_AUTHCODE_SIZE) != MZ_AES_AUTHCODE_SIZE) - return MZ_READ_ERROR; - - wzaes->total_in += MZ_AES_AUTHCODE_SIZE; - - /* If entire entry was not read this will fail */ - if (memcmp(computed_hash, expected_hash, MZ_AES_AUTHCODE_SIZE) != 0) - return MZ_CRC_ERROR; - } - - wzaes->initialized = 0; - return MZ_OK; -} - -int32_t mz_stream_wzaes_error(void *stream) { - mz_stream_wzaes *wzaes = (mz_stream_wzaes *)stream; - return wzaes->error; -} - -void mz_stream_wzaes_set_password(void *stream, const char *password) { - mz_stream_wzaes *wzaes = (mz_stream_wzaes *)stream; - wzaes->password = password; -} - -void mz_stream_wzaes_set_encryption_mode(void *stream, int16_t encryption_mode) { - mz_stream_wzaes *wzaes = (mz_stream_wzaes *)stream; - wzaes->encryption_mode = encryption_mode; -} - -int32_t mz_stream_wzaes_get_prop_int64(void *stream, int32_t prop, int64_t *value) { - mz_stream_wzaes *wzaes = (mz_stream_wzaes *)stream; - switch (prop) { - case MZ_STREAM_PROP_TOTAL_IN: - *value = wzaes->total_in; - break; - case MZ_STREAM_PROP_TOTAL_OUT: - *value = wzaes->total_out; - break; - case MZ_STREAM_PROP_TOTAL_IN_MAX: - *value = wzaes->max_total_in; - break; - case MZ_STREAM_PROP_HEADER_SIZE: - *value = MZ_AES_SALT_LENGTH((int64_t)wzaes->encryption_mode) + MZ_AES_PW_VERIFY_SIZE; - break; - case MZ_STREAM_PROP_FOOTER_SIZE: - *value = MZ_AES_AUTHCODE_SIZE; - break; - default: - return MZ_EXIST_ERROR; - } - return MZ_OK; -} - -int32_t mz_stream_wzaes_set_prop_int64(void *stream, int32_t prop, int64_t value) { - mz_stream_wzaes *wzaes = (mz_stream_wzaes *)stream; - switch (prop) { - case MZ_STREAM_PROP_TOTAL_IN_MAX: - wzaes->max_total_in = value; - break; - default: - return MZ_EXIST_ERROR; - } - return MZ_OK; -} - -void *mz_stream_wzaes_create(void **stream) { - mz_stream_wzaes *wzaes = NULL; - - wzaes = (mz_stream_wzaes *)MZ_ALLOC(sizeof(mz_stream_wzaes)); - if (wzaes != NULL) { - memset(wzaes, 0, sizeof(mz_stream_wzaes)); - wzaes->stream.vtbl = &mz_stream_wzaes_vtbl; - wzaes->encryption_mode = MZ_AES_ENCRYPTION_MODE_256; - - mz_crypt_hmac_create(&wzaes->hmac); - mz_crypt_aes_create(&wzaes->aes); - } - if (stream != NULL) - *stream = wzaes; - - return wzaes; -} - -void mz_stream_wzaes_delete(void **stream) { - mz_stream_wzaes *wzaes = NULL; - if (stream == NULL) - return; - wzaes = (mz_stream_wzaes *)*stream; - if (wzaes != NULL) { - mz_crypt_aes_delete(&wzaes->aes); - mz_crypt_hmac_delete(&wzaes->hmac); - MZ_FREE(wzaes); - } - *stream = NULL; -} - -void *mz_stream_wzaes_get_interface(void) { - return (void *)&mz_stream_wzaes_vtbl; -} diff --git a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_wzaes.h b/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_wzaes.h deleted file mode 100644 index e27f112..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_wzaes.h +++ /dev/null @@ -1,46 +0,0 @@ -/* mz_strm_wzaes.h -- Stream for WinZIP AES encryption - part of the minizip-ng project - - Copyright (C) 2010-2021 Nathan Moinvaziri - https://github.com/zlib-ng/minizip-ng - - This program is distributed under the terms of the same license as zlib. - See the accompanying LICENSE file for the full text of the license. -*/ - -#ifndef MZ_STREAM_WZAES_SHA1_H -#define MZ_STREAM_WZAES_SHA1_H - -#ifdef __cplusplus -extern "C" { -#endif - -/***************************************************************************/ - -int32_t mz_stream_wzaes_open(void *stream, const char *filename, int32_t mode); -int32_t mz_stream_wzaes_is_open(void *stream); -int32_t mz_stream_wzaes_read(void *stream, void *buf, int32_t size); -int32_t mz_stream_wzaes_write(void *stream, const void *buf, int32_t size); -int64_t mz_stream_wzaes_tell(void *stream); -int32_t mz_stream_wzaes_seek(void *stream, int64_t offset, int32_t origin); -int32_t mz_stream_wzaes_close(void *stream); -int32_t mz_stream_wzaes_error(void *stream); - -void mz_stream_wzaes_set_password(void *stream, const char *password); -void mz_stream_wzaes_set_encryption_mode(void *stream, int16_t encryption_mode); - -int32_t mz_stream_wzaes_get_prop_int64(void *stream, int32_t prop, int64_t *value); -int32_t mz_stream_wzaes_set_prop_int64(void *stream, int32_t prop, int64_t value); - -void* mz_stream_wzaes_create(void **stream); -void mz_stream_wzaes_delete(void **stream); - -void* mz_stream_wzaes_get_interface(void); - -/***************************************************************************/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_zlib.c b/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_zlib.c deleted file mode 100644 index e83bbac..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_zlib.c +++ /dev/null @@ -1,393 +0,0 @@ -/* mz_strm_zlib.c -- Stream for zlib inflate/deflate - part of the minizip-ng project - - Copyright (C) 2010-2021 Nathan Moinvaziri - https://github.com/zlib-ng/minizip-ng - - This program is distributed under the terms of the same license as zlib. - See the accompanying LICENSE file for the full text of the license. -*/ - - -#include "mz.h" -#include "mz_strm.h" -#include "mz_strm_zlib.h" - -#include "zlib.h" -#if defined(ZLIBNG_VERNUM) && !defined(ZLIB_COMPAT) -# include "zlib-ng.h" -#endif - -/***************************************************************************/ - -#if defined(ZLIBNG_VERNUM) && !defined(ZLIB_COMPAT) -# define ZLIB_PREFIX(x) zng_ ## x - typedef zng_stream zlib_stream; -#else -# define ZLIB_PREFIX(x) x - typedef z_stream zlib_stream; -#endif - -#if !defined(DEF_MEM_LEVEL) -# if MAX_MEM_LEVEL >= 8 -# define DEF_MEM_LEVEL 8 -# else -# define DEF_MEM_LEVEL MAX_MEM_LEVEL -# endif -#endif - -/***************************************************************************/ - -static mz_stream_vtbl mz_stream_zlib_vtbl = { - mz_stream_zlib_open, - mz_stream_zlib_is_open, - mz_stream_zlib_read, - mz_stream_zlib_write, - mz_stream_zlib_tell, - mz_stream_zlib_seek, - mz_stream_zlib_close, - mz_stream_zlib_error, - mz_stream_zlib_create, - mz_stream_zlib_delete, - mz_stream_zlib_get_prop_int64, - mz_stream_zlib_set_prop_int64 -}; - -/***************************************************************************/ - -typedef struct mz_stream_zlib_s { - mz_stream stream; - zlib_stream zstream; - uint8_t buffer[INT16_MAX]; - int32_t buffer_len; - int64_t total_in; - int64_t total_out; - int64_t max_total_in; - int8_t initialized; - int16_t level; - int32_t window_bits; - int32_t mode; - int32_t error; -} mz_stream_zlib; - -/***************************************************************************/ - -int32_t mz_stream_zlib_open(void *stream, const char *path, int32_t mode) { - mz_stream_zlib *zlib = (mz_stream_zlib *)stream; - - MZ_UNUSED(path); - - zlib->zstream.data_type = Z_BINARY; - zlib->zstream.zalloc = Z_NULL; - zlib->zstream.zfree = Z_NULL; - zlib->zstream.opaque = Z_NULL; - zlib->zstream.total_in = 0; - zlib->zstream.total_out = 0; - - zlib->total_in = 0; - zlib->total_out = 0; - - if (mode & MZ_OPEN_MODE_WRITE) { -#ifdef MZ_ZIP_NO_COMPRESSION - return MZ_SUPPORT_ERROR; -#else - zlib->zstream.next_out = zlib->buffer; - zlib->zstream.avail_out = sizeof(zlib->buffer); - - zlib->error = ZLIB_PREFIX(deflateInit2)(&zlib->zstream, (int8_t)zlib->level, Z_DEFLATED, - zlib->window_bits, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); -#endif - } else if (mode & MZ_OPEN_MODE_READ) { -#ifdef MZ_ZIP_NO_DECOMPRESSION - return MZ_SUPPORT_ERROR; -#else - zlib->zstream.next_in = zlib->buffer; - zlib->zstream.avail_in = 0; - - zlib->error = ZLIB_PREFIX(inflateInit2)(&zlib->zstream, zlib->window_bits); -#endif - } - - if (zlib->error != Z_OK) - return MZ_OPEN_ERROR; - - zlib->initialized = 1; - zlib->mode = mode; - return MZ_OK; -} - -int32_t mz_stream_zlib_is_open(void *stream) { - mz_stream_zlib *zlib = (mz_stream_zlib *)stream; - if (zlib->initialized != 1) - return MZ_OPEN_ERROR; - return MZ_OK; -} - -int32_t mz_stream_zlib_read(void *stream, void *buf, int32_t size) { -#ifdef MZ_ZIP_NO_DECOMPRESSION - MZ_UNUSED(stream); - MZ_UNUSED(buf); - MZ_UNUSED(size); - return MZ_SUPPORT_ERROR; -#else - mz_stream_zlib *zlib = (mz_stream_zlib *)stream; - uint64_t total_in_before = 0; - uint64_t total_in_after = 0; - uint64_t total_out_before = 0; - uint64_t total_out_after = 0; - uint32_t total_in = 0; - uint32_t total_out = 0; - uint32_t in_bytes = 0; - uint32_t out_bytes = 0; - int32_t bytes_to_read = sizeof(zlib->buffer); - int32_t read = 0; - int32_t err = Z_OK; - - - zlib->zstream.next_out = (Bytef*)buf; - zlib->zstream.avail_out = (uInt)size; - - do { - if (zlib->zstream.avail_in == 0) { - if (zlib->max_total_in > 0) { - if ((int64_t)bytes_to_read > (zlib->max_total_in - zlib->total_in)) - bytes_to_read = (int32_t)(zlib->max_total_in - zlib->total_in); - } - - read = mz_stream_read(zlib->stream.base, zlib->buffer, bytes_to_read); - - if (read < 0) - return read; - - zlib->zstream.next_in = zlib->buffer; - zlib->zstream.avail_in = read; - } - - total_in_before = zlib->zstream.avail_in; - total_out_before = zlib->zstream.total_out; - - err = ZLIB_PREFIX(inflate)(&zlib->zstream, Z_SYNC_FLUSH); - if ((err >= Z_OK) && (zlib->zstream.msg != NULL)) { - zlib->error = Z_DATA_ERROR; - break; - } - - total_in_after = zlib->zstream.avail_in; - total_out_after = zlib->zstream.total_out; - - in_bytes = (uint32_t)(total_in_before - total_in_after); - out_bytes = (uint32_t)(total_out_after - total_out_before); - - total_in += in_bytes; - total_out += out_bytes; - - zlib->total_in += in_bytes; - zlib->total_out += out_bytes; - - if (err == Z_STREAM_END) - break; - if (err != Z_OK) { - zlib->error = err; - break; - } - } while (zlib->zstream.avail_out > 0); - - if (zlib->error != 0) { - /* Zlib errors are compatible with MZ */ - return zlib->error; - } - - return total_out; -#endif -} - -#ifndef MZ_ZIP_NO_COMPRESSION -static int32_t mz_stream_zlib_flush(void *stream) { - mz_stream_zlib *zlib = (mz_stream_zlib *)stream; - if (mz_stream_write(zlib->stream.base, zlib->buffer, zlib->buffer_len) != zlib->buffer_len) - return MZ_WRITE_ERROR; - return MZ_OK; -} - -static int32_t mz_stream_zlib_deflate(void *stream, int flush) { - mz_stream_zlib *zlib = (mz_stream_zlib *)stream; - uint64_t total_out_before = 0; - uint64_t total_out_after = 0; - int32_t out_bytes = 0; - int32_t err = Z_OK; - - - do { - if (zlib->zstream.avail_out == 0) { - err = mz_stream_zlib_flush(zlib); - if (err != MZ_OK) - return err; - - zlib->zstream.avail_out = sizeof(zlib->buffer); - zlib->zstream.next_out = zlib->buffer; - - zlib->buffer_len = 0; - } - - total_out_before = zlib->zstream.total_out; - err = ZLIB_PREFIX(deflate)(&zlib->zstream, flush); - total_out_after = zlib->zstream.total_out; - - out_bytes = (uint32_t)(total_out_after - total_out_before); - - zlib->buffer_len += out_bytes; - zlib->total_out += out_bytes; - - if (err == Z_STREAM_END) - break; - if (err != Z_OK) { - zlib->error = err; - return MZ_DATA_ERROR; - } - } while ((zlib->zstream.avail_in > 0) || (flush == Z_FINISH && err == Z_OK)); - - return MZ_OK; -} -#endif - -int32_t mz_stream_zlib_write(void *stream, const void *buf, int32_t size) { -#ifdef MZ_ZIP_NO_COMPRESSION - MZ_UNUSED(stream); - MZ_UNUSED(buf); - MZ_UNUSED(size); - return MZ_SUPPORT_ERROR; -#else - mz_stream_zlib *zlib = (mz_stream_zlib *)stream; - int32_t err = MZ_OK; - - zlib->zstream.next_in = (Bytef*)(intptr_t)buf; - zlib->zstream.avail_in = (uInt)size; - - err = mz_stream_zlib_deflate(stream, Z_NO_FLUSH); - if (err != MZ_OK) { - return err; - } - - zlib->total_in += size; - return size; -#endif -} - -int64_t mz_stream_zlib_tell(void *stream) { - MZ_UNUSED(stream); - - return MZ_TELL_ERROR; -} - -int32_t mz_stream_zlib_seek(void *stream, int64_t offset, int32_t origin) { - MZ_UNUSED(stream); - MZ_UNUSED(offset); - MZ_UNUSED(origin); - - return MZ_SEEK_ERROR; -} - -int32_t mz_stream_zlib_close(void *stream) { - mz_stream_zlib *zlib = (mz_stream_zlib *)stream; - - - if (zlib->mode & MZ_OPEN_MODE_WRITE) { -#ifdef MZ_ZIP_NO_COMPRESSION - return MZ_SUPPORT_ERROR; -#else - mz_stream_zlib_deflate(stream, Z_FINISH); - mz_stream_zlib_flush(stream); - - ZLIB_PREFIX(deflateEnd)(&zlib->zstream); -#endif - } else if (zlib->mode & MZ_OPEN_MODE_READ) { -#ifdef MZ_ZIP_NO_DECOMPRESSION - return MZ_SUPPORT_ERROR; -#else - ZLIB_PREFIX(inflateEnd)(&zlib->zstream); -#endif - } - - zlib->initialized = 0; - - if (zlib->error != Z_OK) - return MZ_CLOSE_ERROR; - return MZ_OK; -} - -int32_t mz_stream_zlib_error(void *stream) { - mz_stream_zlib *zlib = (mz_stream_zlib *)stream; - return zlib->error; -} - -int32_t mz_stream_zlib_get_prop_int64(void *stream, int32_t prop, int64_t *value) { - mz_stream_zlib *zlib = (mz_stream_zlib *)stream; - switch (prop) { - case MZ_STREAM_PROP_TOTAL_IN: - *value = zlib->total_in; - break; - case MZ_STREAM_PROP_TOTAL_IN_MAX: - *value = zlib->max_total_in; - break; - case MZ_STREAM_PROP_TOTAL_OUT: - *value = zlib->total_out; - break; - case MZ_STREAM_PROP_HEADER_SIZE: - *value = 0; - break; - case MZ_STREAM_PROP_COMPRESS_WINDOW: - *value = zlib->window_bits; - break; - default: - return MZ_EXIST_ERROR; - } - return MZ_OK; -} - -int32_t mz_stream_zlib_set_prop_int64(void *stream, int32_t prop, int64_t value) { - mz_stream_zlib *zlib = (mz_stream_zlib *)stream; - switch (prop) { - case MZ_STREAM_PROP_COMPRESS_LEVEL: - zlib->level = (int16_t)value; - break; - case MZ_STREAM_PROP_TOTAL_IN_MAX: - zlib->max_total_in = value; - break; - case MZ_STREAM_PROP_COMPRESS_WINDOW: - zlib->window_bits = (int32_t)value; - break; - default: - return MZ_EXIST_ERROR; - } - return MZ_OK; -} - -void *mz_stream_zlib_create(void **stream) { - mz_stream_zlib *zlib = NULL; - - zlib = (mz_stream_zlib *)MZ_ALLOC(sizeof(mz_stream_zlib)); - if (zlib != NULL) { - memset(zlib, 0, sizeof(mz_stream_zlib)); - zlib->stream.vtbl = &mz_stream_zlib_vtbl; - zlib->level = Z_DEFAULT_COMPRESSION; - zlib->window_bits = -MAX_WBITS; - } - if (stream != NULL) - *stream = zlib; - - return zlib; -} - -void mz_stream_zlib_delete(void **stream) { - mz_stream_zlib *zlib = NULL; - if (stream == NULL) - return; - zlib = (mz_stream_zlib *)*stream; - if (zlib != NULL) - MZ_FREE(zlib); - *stream = NULL; -} - -void *mz_stream_zlib_get_interface(void) { - return (void *)&mz_stream_zlib_vtbl; -} diff --git a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_zlib.h b/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_zlib.h deleted file mode 100644 index 47f7480..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_zlib.h +++ /dev/null @@ -1,43 +0,0 @@ -/* mz_strm_zlib.h -- Stream for zlib inflate/deflate - part of the minizip-ng project - - Copyright (C) 2010-2021 Nathan Moinvaziri - https://github.com/zlib-ng/minizip-ng - - This program is distributed under the terms of the same license as zlib. - See the accompanying LICENSE file for the full text of the license. -*/ - -#ifndef MZ_STREAM_ZLIB_H -#define MZ_STREAM_ZLIB_H - -#ifdef __cplusplus -extern "C" { -#endif - -/***************************************************************************/ - -int32_t mz_stream_zlib_open(void *stream, const char *filename, int32_t mode); -int32_t mz_stream_zlib_is_open(void *stream); -int32_t mz_stream_zlib_read(void *stream, void *buf, int32_t size); -int32_t mz_stream_zlib_write(void *stream, const void *buf, int32_t size); -int64_t mz_stream_zlib_tell(void *stream); -int32_t mz_stream_zlib_seek(void *stream, int64_t offset, int32_t origin); -int32_t mz_stream_zlib_close(void *stream); -int32_t mz_stream_zlib_error(void *stream); - -int32_t mz_stream_zlib_get_prop_int64(void *stream, int32_t prop, int64_t *value); -int32_t mz_stream_zlib_set_prop_int64(void *stream, int32_t prop, int64_t value); - -void* mz_stream_zlib_create(void **stream); -void mz_stream_zlib_delete(void **stream); - -void* mz_stream_zlib_get_interface(void); - -/***************************************************************************/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_zip.c b/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_zip.c deleted file mode 100644 index cc4f57d..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_zip.c +++ /dev/null @@ -1,2771 +0,0 @@ -/* zip.c -- Zip manipulation - part of the minizip-ng project - - Copyright (C) 2010-2021 Nathan Moinvaziri - https://github.com/zlib-ng/minizip-ng - Copyright (C) 2009-2010 Mathias Svensson - Modifications for Zip64 support - http://result42.com - Copyright (C) 2007-2008 Even Rouault - Modifications of Unzip for Zip64 - Copyright (C) 1998-2010 Gilles Vollant - https://www.winimage.com/zLibDll/minizip.html - - This program is distributed under the terms of the same license as zlib. - See the accompanying LICENSE file for the full text of the license. -*/ - - -#include "mz.h" -#include "mz_crypt.h" -#include "mz_strm.h" -#ifdef HAVE_BZIP2 -# include "mz_strm_bzip.h" -#endif -#ifdef HAVE_LIBCOMP -# include "mz_strm_libcomp.h" -#endif -#ifdef HAVE_LZMA -# include "mz_strm_lzma.h" -#endif -#include "mz_strm_mem.h" -#ifdef HAVE_PKCRYPT -# include "mz_strm_pkcrypt.h" -#endif -#ifdef HAVE_WZAES -# include "mz_strm_wzaes.h" -#endif -#ifdef HAVE_ZLIB -# include "mz_strm_zlib.h" -#endif -#ifdef HAVE_ZSTD -# include "mz_strm_zstd.h" -#endif - -#include "mz_zip.h" - -#include /* tolower */ -#include /* snprintf */ - -#if defined(_MSC_VER) || defined(__MINGW32__) -# define localtime_r(t1,t2) (localtime_s(t2,t1) == 0 ? t1 : NULL) -#endif -#if defined(_MSC_VER) && (_MSC_VER < 1900) -# define snprintf _snprintf -#endif - -/***************************************************************************/ - -#define MZ_ZIP_MAGIC_LOCALHEADER (0x04034b50) -#define MZ_ZIP_MAGIC_LOCALHEADERU8 { 0x50, 0x4b, 0x03, 0x04 } -#define MZ_ZIP_MAGIC_CENTRALHEADER (0x02014b50) -#define MZ_ZIP_MAGIC_CENTRALHEADERU8 { 0x50, 0x4b, 0x01, 0x02 } -#define MZ_ZIP_MAGIC_ENDHEADER (0x06054b50) -#define MZ_ZIP_MAGIC_ENDHEADERU8 { 0x50, 0x4b, 0x05, 0x06 } -#define MZ_ZIP_MAGIC_ENDHEADER64 (0x06064b50) -#define MZ_ZIP_MAGIC_ENDLOCHEADER64 (0x07064b50) -#define MZ_ZIP_MAGIC_DATADESCRIPTOR (0x08074b50) -#define MZ_ZIP_MAGIC_DATADESCRIPTORU8 { 0x50, 0x4b, 0x07, 0x08 } - -#define MZ_ZIP_SIZE_LD_ITEM (30) -#define MZ_ZIP_SIZE_CD_ITEM (46) -#define MZ_ZIP_SIZE_CD_LOCATOR64 (20) -#define MZ_ZIP_SIZE_MAX_DATA_DESCRIPTOR (24) - -#define MZ_ZIP_OFFSET_CRC_SIZES (14) -#define MZ_ZIP_UNCOMPR_SIZE64_CUSHION (2 * 1024 * 1024) - -#ifndef MZ_ZIP_EOCD_MAX_BACK -#define MZ_ZIP_EOCD_MAX_BACK (1 << 20) -#endif - -/***************************************************************************/ - -typedef struct mz_zip_s { - mz_zip_file file_info; - mz_zip_file local_file_info; - - void *stream; /* main stream */ - void *cd_stream; /* pointer to the stream with the cd */ - void *cd_mem_stream; /* memory stream for central directory */ - void *compress_stream; /* compression stream */ - void *crypt_stream; /* encryption stream */ - void *file_info_stream; /* memory stream for storing file info */ - void *local_file_info_stream; /* memory stream for storing local file info */ - - int32_t open_mode; - uint8_t recover; - uint8_t data_descriptor; - - uint32_t disk_number_with_cd; /* number of the disk with the central dir */ - int64_t disk_offset_shift; /* correction for zips that have wrong offset start of cd */ - - int64_t cd_start_pos; /* pos of the first file in the central dir stream */ - int64_t cd_current_pos; /* pos of the current file in the central dir */ - int64_t cd_offset; /* offset of start of central directory */ - int64_t cd_size; /* size of the central directory */ - uint32_t cd_signature; /* signature of central directory */ - - uint8_t entry_scanned; /* entry header information read ok */ - uint8_t entry_opened; /* entry is open for read/write */ - uint8_t entry_raw; /* entry opened with raw mode */ - uint32_t entry_crc32; /* entry crc32 */ - - uint64_t number_entry; - - uint16_t version_madeby; - char *comment; -} mz_zip; - -/***************************************************************************/ - -#if 0 -# define mz_zip_print printf -#else -# define mz_zip_print(fmt,...) -#endif - -/***************************************************************************/ - -/* Locate the end of central directory */ -static int32_t mz_zip_search_eocd(void *stream, int64_t *central_pos) { - int64_t file_size = 0; - int64_t max_back = MZ_ZIP_EOCD_MAX_BACK; - uint8_t find[4] = MZ_ZIP_MAGIC_ENDHEADERU8; - int32_t err = MZ_OK; - - err = mz_stream_seek(stream, 0, MZ_SEEK_END); - if (err != MZ_OK) - return err; - - file_size = mz_stream_tell(stream); - - if (max_back <= 0 || max_back > file_size) - max_back = file_size; - - return mz_stream_find_reverse(stream, (const void *)find, sizeof(find), max_back, central_pos); -} - -/* Locate the end of central directory 64 of a zip file */ -static int32_t mz_zip_search_zip64_eocd(void *stream, const int64_t end_central_offset, int64_t *central_pos) { - int64_t offset = 0; - uint32_t value32 = 0; - int32_t err = MZ_OK; - - - *central_pos = 0; - - /* Zip64 end of central directory locator */ - err = mz_stream_seek(stream, end_central_offset - MZ_ZIP_SIZE_CD_LOCATOR64, MZ_SEEK_SET); - /* Read locator signature */ - if (err == MZ_OK) { - err = mz_stream_read_uint32(stream, &value32); - if (value32 != MZ_ZIP_MAGIC_ENDLOCHEADER64) - err = MZ_FORMAT_ERROR; - } - /* Number of the disk with the start of the zip64 end of central directory */ - if (err == MZ_OK) - err = mz_stream_read_uint32(stream, &value32); - /* Relative offset of the zip64 end of central directory record8 */ - if (err == MZ_OK) - err = mz_stream_read_uint64(stream, (uint64_t *)&offset); - /* Total number of disks */ - if (err == MZ_OK) - err = mz_stream_read_uint32(stream, &value32); - /* Goto end of central directory record */ - if (err == MZ_OK) - err = mz_stream_seek(stream, (int64_t)offset, MZ_SEEK_SET); - /* The signature */ - if (err == MZ_OK) { - err = mz_stream_read_uint32(stream, &value32); - if (value32 != MZ_ZIP_MAGIC_ENDHEADER64) - err = MZ_FORMAT_ERROR; - } - - if (err == MZ_OK) - *central_pos = offset; - - return err; -} - -/* Get PKWARE traditional encryption verifier */ -static uint16_t mz_zip_get_pk_verify(uint32_t dos_date, uint64_t crc, uint16_t flag) -{ - /* Info-ZIP modification to ZipCrypto format: if bit 3 of the general - * purpose bit flag is set, it uses high byte of 16-bit File Time. */ - if (flag & MZ_ZIP_FLAG_DATA_DESCRIPTOR) - return ((dos_date >> 16) & 0xff) << 8 | ((dos_date >> 8) & 0xff); - return ((crc >> 16) & 0xff) << 8 | ((crc >> 24) & 0xff); -} - -/* Get info about the current file in the zip file */ -static int32_t mz_zip_entry_read_header(void *stream, uint8_t local, mz_zip_file *file_info, void *file_extra_stream) { - uint64_t ntfs_time = 0; - uint32_t reserved = 0; - uint32_t magic = 0; - uint32_t dos_date = 0; - uint32_t field_pos = 0; - uint16_t field_type = 0; - uint16_t field_length = 0; - uint32_t field_length_read = 0; - uint16_t ntfs_attrib_id = 0; - uint16_t ntfs_attrib_size = 0; - uint16_t linkname_size; - uint16_t value16 = 0; - uint32_t value32 = 0; - int64_t extrafield_pos = 0; - int64_t comment_pos = 0; - int64_t linkname_pos = 0; - int64_t saved_pos = 0; - int32_t err = MZ_OK; - char *linkname = NULL; - - - memset(file_info, 0, sizeof(mz_zip_file)); - - /* Check the magic */ - err = mz_stream_read_uint32(stream, &magic); - if (err == MZ_END_OF_STREAM) - err = MZ_END_OF_LIST; - else if (magic == MZ_ZIP_MAGIC_ENDHEADER || magic == MZ_ZIP_MAGIC_ENDHEADER64) - err = MZ_END_OF_LIST; - else if ((local) && (magic != MZ_ZIP_MAGIC_LOCALHEADER)) - err = MZ_FORMAT_ERROR; - else if ((!local) && (magic != MZ_ZIP_MAGIC_CENTRALHEADER)) - err = MZ_FORMAT_ERROR; - - /* Read header fields */ - if (err == MZ_OK) { - if (!local) - err = mz_stream_read_uint16(stream, &file_info->version_madeby); - if (err == MZ_OK) - err = mz_stream_read_uint16(stream, &file_info->version_needed); - if (err == MZ_OK) - err = mz_stream_read_uint16(stream, &file_info->flag); - if (err == MZ_OK) - err = mz_stream_read_uint16(stream, &file_info->compression_method); - if (err == MZ_OK) { - err = mz_stream_read_uint32(stream, &dos_date); - file_info->modified_date = mz_zip_dosdate_to_time_t(dos_date); - } - if (err == MZ_OK) - err = mz_stream_read_uint32(stream, &file_info->crc); -#ifdef HAVE_PKCRYPT - if (err == MZ_OK && file_info->flag & MZ_ZIP_FLAG_ENCRYPTED) { - /* Use dos_date from header instead of derived from time in zip extensions */ - file_info->pk_verify = mz_zip_get_pk_verify(dos_date, file_info->crc, file_info->flag); - } -#endif - if (err == MZ_OK) { - err = mz_stream_read_uint32(stream, &value32); - file_info->compressed_size = value32; - } - if (err == MZ_OK) { - err = mz_stream_read_uint32(stream, &value32); - file_info->uncompressed_size = value32; - } - if (err == MZ_OK) - err = mz_stream_read_uint16(stream, &file_info->filename_size); - if (err == MZ_OK) - err = mz_stream_read_uint16(stream, &file_info->extrafield_size); - if (!local) { - if (err == MZ_OK) - err = mz_stream_read_uint16(stream, &file_info->comment_size); - if (err == MZ_OK) { - err = mz_stream_read_uint16(stream, &value16); - file_info->disk_number = value16; - } - if (err == MZ_OK) - err = mz_stream_read_uint16(stream, &file_info->internal_fa); - if (err == MZ_OK) - err = mz_stream_read_uint32(stream, &file_info->external_fa); - if (err == MZ_OK) { - err = mz_stream_read_uint32(stream, &value32); - file_info->disk_offset = value32; - } - } - } - - if (err == MZ_OK) - err = mz_stream_seek(file_extra_stream, 0, MZ_SEEK_SET); - - /* Copy variable length data to memory stream for later retrieval */ - if ((err == MZ_OK) && (file_info->filename_size > 0)) - err = mz_stream_copy(file_extra_stream, stream, file_info->filename_size); - mz_stream_write_uint8(file_extra_stream, 0); - extrafield_pos = mz_stream_tell(file_extra_stream); - - if ((err == MZ_OK) && (file_info->extrafield_size > 0)) - err = mz_stream_copy(file_extra_stream, stream, file_info->extrafield_size); - mz_stream_write_uint8(file_extra_stream, 0); - - comment_pos = mz_stream_tell(file_extra_stream); - if ((err == MZ_OK) && (file_info->comment_size > 0)) - err = mz_stream_copy(file_extra_stream, stream, file_info->comment_size); - mz_stream_write_uint8(file_extra_stream, 0); - - linkname_pos = mz_stream_tell(file_extra_stream); - /* Overwrite if we encounter UNIX1 extra block */ - mz_stream_write_uint8(file_extra_stream, 0); - - if ((err == MZ_OK) && (file_info->extrafield_size > 0)) { - /* Seek to and parse the extra field */ - err = mz_stream_seek(file_extra_stream, extrafield_pos, MZ_SEEK_SET); - - while ((err == MZ_OK) && (field_pos + 4 <= file_info->extrafield_size)) { - err = mz_zip_extrafield_read(file_extra_stream, &field_type, &field_length); - if (err != MZ_OK) - break; - field_pos += 4; - - /* Don't allow field length to exceed size of remaining extrafield */ - if (field_length > (file_info->extrafield_size - field_pos)) - field_length = (uint16_t)(file_info->extrafield_size - field_pos); - - /* Read ZIP64 extra field */ - if ((field_type == MZ_ZIP_EXTENSION_ZIP64) && (field_length >= 8)) { - if ((err == MZ_OK) && (file_info->uncompressed_size == UINT32_MAX)) { - err = mz_stream_read_int64(file_extra_stream, &file_info->uncompressed_size); - if (file_info->uncompressed_size < 0) - err = MZ_FORMAT_ERROR; - } - if ((err == MZ_OK) && (file_info->compressed_size == UINT32_MAX)) { - err = mz_stream_read_int64(file_extra_stream, &file_info->compressed_size); - if (file_info->compressed_size < 0) - err = MZ_FORMAT_ERROR; - } - if ((err == MZ_OK) && (file_info->disk_offset == UINT32_MAX)) { - err = mz_stream_read_int64(file_extra_stream, &file_info->disk_offset); - if (file_info->disk_offset < 0) - err = MZ_FORMAT_ERROR; - } - if ((err == MZ_OK) && (file_info->disk_number == UINT16_MAX)) - err = mz_stream_read_uint32(file_extra_stream, &file_info->disk_number); - } - /* Read NTFS extra field */ - else if ((field_type == MZ_ZIP_EXTENSION_NTFS) && (field_length > 4)) { - if (err == MZ_OK) - err = mz_stream_read_uint32(file_extra_stream, &reserved); - field_length_read = 4; - - while ((err == MZ_OK) && (field_length_read + 4 <= field_length)) { - err = mz_stream_read_uint16(file_extra_stream, &ntfs_attrib_id); - if (err == MZ_OK) - err = mz_stream_read_uint16(file_extra_stream, &ntfs_attrib_size); - field_length_read += 4; - - if ((err == MZ_OK) && (ntfs_attrib_id == 0x01) && (ntfs_attrib_size == 24)) { - err = mz_stream_read_uint64(file_extra_stream, &ntfs_time); - mz_zip_ntfs_to_unix_time(ntfs_time, &file_info->modified_date); - - if (err == MZ_OK) { - err = mz_stream_read_uint64(file_extra_stream, &ntfs_time); - mz_zip_ntfs_to_unix_time(ntfs_time, &file_info->accessed_date); - } - if (err == MZ_OK) { - err = mz_stream_read_uint64(file_extra_stream, &ntfs_time); - mz_zip_ntfs_to_unix_time(ntfs_time, &file_info->creation_date); - } - } else if ((err == MZ_OK) && (field_length_read + ntfs_attrib_size <= field_length)) { - err = mz_stream_seek(file_extra_stream, ntfs_attrib_size, MZ_SEEK_CUR); - } - - field_length_read += ntfs_attrib_size; - } - } - /* Read UNIX1 extra field */ - else if ((field_type == MZ_ZIP_EXTENSION_UNIX1) && (field_length >= 12)) { - if (err == MZ_OK) { - err = mz_stream_read_uint32(file_extra_stream, &value32); - if (err == MZ_OK && file_info->accessed_date == 0) - file_info->accessed_date = value32; - } - if (err == MZ_OK) { - err = mz_stream_read_uint32(file_extra_stream, &value32); - if (err == MZ_OK && file_info->modified_date == 0) - file_info->modified_date = value32; - } - if (err == MZ_OK) - err = mz_stream_read_uint16(file_extra_stream, &value16); /* User id */ - if (err == MZ_OK) - err = mz_stream_read_uint16(file_extra_stream, &value16); /* Group id */ - - /* Copy linkname to end of file extra stream so we can return null - terminated string */ - linkname_size = field_length - 12; - if ((err == MZ_OK) && (linkname_size > 0)) { - linkname = (char *)MZ_ALLOC(linkname_size); - if (linkname != NULL) { - if (mz_stream_read(file_extra_stream, linkname, linkname_size) != linkname_size) - err = MZ_READ_ERROR; - if (err == MZ_OK) { - saved_pos = mz_stream_tell(file_extra_stream); - - mz_stream_seek(file_extra_stream, linkname_pos, MZ_SEEK_SET); - mz_stream_write(file_extra_stream, linkname, linkname_size); - mz_stream_write_uint8(file_extra_stream, 0); - - mz_stream_seek(file_extra_stream, saved_pos, MZ_SEEK_SET); - } - MZ_FREE(linkname); - } - } - } -#ifdef HAVE_WZAES - /* Read AES extra field */ - else if ((field_type == MZ_ZIP_EXTENSION_AES) && (field_length == 7)) { - uint8_t value8 = 0; - /* Verify version info */ - err = mz_stream_read_uint16(file_extra_stream, &value16); - /* Support AE-1 and AE-2 */ - if (value16 != 1 && value16 != 2) - err = MZ_FORMAT_ERROR; - file_info->aes_version = value16; - if (err == MZ_OK) - err = mz_stream_read_uint8(file_extra_stream, &value8); - if ((char)value8 != 'A') - err = MZ_FORMAT_ERROR; - if (err == MZ_OK) - err = mz_stream_read_uint8(file_extra_stream, &value8); - if ((char)value8 != 'E') - err = MZ_FORMAT_ERROR; - /* Get AES encryption strength and actual compression method */ - if (err == MZ_OK) { - err = mz_stream_read_uint8(file_extra_stream, &value8); - file_info->aes_encryption_mode = value8; - } - if (err == MZ_OK) { - err = mz_stream_read_uint16(file_extra_stream, &value16); - file_info->compression_method = value16; - } - } -#endif - else if (field_length > 0) { - err = mz_stream_seek(file_extra_stream, field_length, MZ_SEEK_CUR); - } - - field_pos += field_length; - } - } - - /* Get pointers to variable length data */ - mz_stream_mem_get_buffer(file_extra_stream, (const void **)&file_info->filename); - mz_stream_mem_get_buffer_at(file_extra_stream, extrafield_pos, (const void **)&file_info->extrafield); - mz_stream_mem_get_buffer_at(file_extra_stream, comment_pos, (const void **)&file_info->comment); - mz_stream_mem_get_buffer_at(file_extra_stream, linkname_pos, (const void **)&file_info->linkname); - - /* Set to empty string just in-case */ - if (file_info->filename == NULL) - file_info->filename = ""; - if (file_info->extrafield == NULL) - file_info->extrafield_size = 0; - if (file_info->comment == NULL) - file_info->comment = ""; - if (file_info->linkname == NULL) - file_info->linkname = ""; - - if (err == MZ_OK) { - mz_zip_print("Zip - Entry - Read header - %s (local %" PRId8 ")\n", - file_info->filename, local); - mz_zip_print("Zip - Entry - Read header compress (ucs %" PRId64 " cs %" PRId64 " crc 0x%08" PRIx32 ")\n", - file_info->uncompressed_size, file_info->compressed_size, file_info->crc); - if (!local) { - mz_zip_print("Zip - Entry - Read header disk (disk %" PRIu32 " offset %" PRId64 ")\n", - file_info->disk_number, file_info->disk_offset); - } - mz_zip_print("Zip - Entry - Read header variable (fnl %" PRId32 " efs %" PRId32 " cms %" PRId32 ")\n", - file_info->filename_size, file_info->extrafield_size, file_info->comment_size); - } - - return err; -} - -static int32_t mz_zip_entry_read_descriptor(void *stream, uint8_t zip64, uint32_t *crc32, int64_t *compressed_size, int64_t *uncompressed_size) { - uint32_t value32 = 0; - int64_t value64 = 0; - int32_t err = MZ_OK; - - - err = mz_stream_read_uint32(stream, &value32); - if (value32 != MZ_ZIP_MAGIC_DATADESCRIPTOR) - err = MZ_FORMAT_ERROR; - if (err == MZ_OK) - err = mz_stream_read_uint32(stream, &value32); - if ((err == MZ_OK) && (crc32 != NULL)) - *crc32 = value32; - if (err == MZ_OK) { - /* If zip 64 extension is enabled then read as 8 byte */ - if (!zip64) { - err = mz_stream_read_uint32(stream, &value32); - value64 = value32; - } else { - err = mz_stream_read_int64(stream, &value64); - if (value64 < 0) - err = MZ_FORMAT_ERROR; - } - if ((err == MZ_OK) && (compressed_size != NULL)) - *compressed_size = value64; - } - if (err == MZ_OK) { - if (!zip64) { - err = mz_stream_read_uint32(stream, &value32); - value64 = value32; - } else { - err = mz_stream_read_int64(stream, &value64); - if (value64 < 0) - err = MZ_FORMAT_ERROR; - } - if ((err == MZ_OK) && (uncompressed_size != NULL)) - *uncompressed_size = value64; - } - - return err; -} - -static int32_t mz_zip_entry_write_crc_sizes(void *stream, uint8_t zip64, uint8_t mask, mz_zip_file *file_info) { - int32_t err = MZ_OK; - - if (mask) - err = mz_stream_write_uint32(stream, 0); - else - err = mz_stream_write_uint32(stream, file_info->crc); /* crc */ - - /* For backwards-compatibility with older zip applications we set all sizes to UINT32_MAX - * when zip64 is needed, instead of only setting sizes larger than UINT32_MAX. */ - - if (err == MZ_OK) { - if (zip64) /* compr size */ - err = mz_stream_write_uint32(stream, UINT32_MAX); - else - err = mz_stream_write_uint32(stream, (uint32_t)file_info->compressed_size); - } - if (err == MZ_OK) { - if (mask) /* uncompr size */ - err = mz_stream_write_uint32(stream, 0); - else if (zip64) - err = mz_stream_write_uint32(stream, UINT32_MAX); - else - err = mz_stream_write_uint32(stream, (uint32_t)file_info->uncompressed_size); - } - return err; -} - -static int32_t mz_zip_entry_needs_zip64(mz_zip_file *file_info, uint8_t local, uint8_t *zip64) { - uint32_t max_uncompressed_size = UINT32_MAX; - uint8_t needs_zip64 = 0; - - if (zip64 == NULL) - return MZ_PARAM_ERROR; - - *zip64 = 0; - - if (local) { - /* At local header we might not know yet whether compressed size will overflow unsigned - 32-bit integer which might happen for high entropy data so we give it some cushion */ - - max_uncompressed_size -= MZ_ZIP_UNCOMPR_SIZE64_CUSHION; - } - - needs_zip64 = (file_info->uncompressed_size >= max_uncompressed_size) || - (file_info->compressed_size >= UINT32_MAX); - - if (!local) { - /* Disk offset and number only used in central directory header */ - needs_zip64 |= (file_info->disk_offset >= UINT32_MAX) || - (file_info->disk_number >= UINT16_MAX); - } - - if (file_info->zip64 == MZ_ZIP64_AUTO) { - /* If uncompressed size is unknown, assume zip64 for 64-bit data descriptors */ - if (local && file_info->uncompressed_size == 0) { - /* Don't use zip64 for local header directory entries */ - if (mz_zip_attrib_is_dir(file_info->external_fa, file_info->version_madeby) != MZ_OK) { - *zip64 = 1; - } - } - *zip64 |= needs_zip64; - } else if (file_info->zip64 == MZ_ZIP64_FORCE) { - *zip64 = 1; - } else if (file_info->zip64 == MZ_ZIP64_DISABLE) { - /* Zip64 extension is required to zip file */ - if (needs_zip64) - return MZ_PARAM_ERROR; - } - - return MZ_OK; -} - -static int32_t mz_zip_entry_write_header(void *stream, uint8_t local, mz_zip_file *file_info) { - uint64_t ntfs_time = 0; - uint32_t reserved = 0; - uint32_t dos_date = 0; - uint16_t extrafield_size = 0; - uint16_t field_type = 0; - uint16_t field_length = 0; - uint16_t field_length_zip64 = 0; - uint16_t field_length_ntfs = 0; - uint16_t field_length_aes = 0; - uint16_t field_length_unix1 = 0; - uint16_t filename_size = 0; - uint16_t filename_length = 0; - uint16_t linkname_size = 0; - uint16_t version_needed = 0; - int32_t comment_size = 0; - int32_t err = MZ_OK; - int32_t err_mem = MZ_OK; - uint8_t zip64 = 0; - uint8_t skip_aes = 0; - uint8_t mask = 0; - uint8_t write_end_slash = 0; - const char *filename = NULL; - char masked_name[64]; - void *file_extra_stream = NULL; - - if (file_info == NULL) - return MZ_PARAM_ERROR; - - if ((local) && (file_info->flag & MZ_ZIP_FLAG_MASK_LOCAL_INFO)) - mask = 1; - - /* Determine if zip64 extra field is necessary */ - err = mz_zip_entry_needs_zip64(file_info, local, &zip64); - if (err != MZ_OK) - return err; - - /* Start calculating extra field sizes */ - if (zip64) { - /* Both compressed and uncompressed sizes must be included (at least in local header) */ - field_length_zip64 = 8 + 8; - if ((!local) && (file_info->disk_offset >= UINT32_MAX)) - field_length_zip64 += 8; - - extrafield_size += 4; - extrafield_size += field_length_zip64; - } - - /* Calculate extra field size and check for duplicates */ - if (file_info->extrafield_size > 0) { - mz_stream_mem_create(&file_extra_stream); - mz_stream_mem_set_buffer(file_extra_stream, (void *)file_info->extrafield, - file_info->extrafield_size); - - do { - err_mem = mz_stream_read_uint16(file_extra_stream, &field_type); - if (err_mem == MZ_OK) - err_mem = mz_stream_read_uint16(file_extra_stream, &field_length); - if (err_mem != MZ_OK) - break; - - /* Prefer incoming aes extensions over ours */ - if (field_type == MZ_ZIP_EXTENSION_AES) - skip_aes = 1; - - /* Prefer our zip64, ntfs, unix1 extension over incoming */ - if (field_type != MZ_ZIP_EXTENSION_ZIP64 && field_type != MZ_ZIP_EXTENSION_NTFS && - field_type != MZ_ZIP_EXTENSION_UNIX1) - extrafield_size += 4 + field_length; - - if (err_mem == MZ_OK) - err_mem = mz_stream_seek(file_extra_stream, field_length, MZ_SEEK_CUR); - } while (err_mem == MZ_OK); - } - -#ifdef HAVE_WZAES - if (!skip_aes) { - if ((file_info->flag & MZ_ZIP_FLAG_ENCRYPTED) && (file_info->aes_version)) { - field_length_aes = 1 + 1 + 1 + 2 + 2; - extrafield_size += 4 + field_length_aes; - } - } -#else - MZ_UNUSED(field_length_aes); - MZ_UNUSED(skip_aes); -#endif - /* NTFS timestamps */ - if ((file_info->modified_date != 0) && - (file_info->accessed_date != 0) && - (file_info->creation_date != 0) && (!mask)) { - field_length_ntfs = 8 + 8 + 8 + 4 + 2 + 2; - extrafield_size += 4 + field_length_ntfs; - } - - /* Unix1 symbolic links */ - if (file_info->linkname != NULL && *file_info->linkname != 0) { - linkname_size = (uint16_t)strlen(file_info->linkname); - field_length_unix1 = 12 + linkname_size; - extrafield_size += 4 + field_length_unix1; - } - - if (local) - err = mz_stream_write_uint32(stream, MZ_ZIP_MAGIC_LOCALHEADER); - else { - err = mz_stream_write_uint32(stream, MZ_ZIP_MAGIC_CENTRALHEADER); - if (err == MZ_OK) - err = mz_stream_write_uint16(stream, file_info->version_madeby); - } - - /* Calculate version needed to extract */ - if (err == MZ_OK) { - version_needed = file_info->version_needed; - if (version_needed == 0) { - version_needed = 20; - if (zip64) - version_needed = 45; -#ifdef HAVE_WZAES - if ((file_info->flag & MZ_ZIP_FLAG_ENCRYPTED) && (file_info->aes_version)) - version_needed = 51; -#endif -#if defined(HAVE_LZMA) || defined(HAVE_LIBCOMP) - if ((file_info->compression_method == MZ_COMPRESS_METHOD_LZMA) || - (file_info->compression_method == MZ_COMPRESS_METHOD_XZ)) - version_needed = 63; -#endif - } - err = mz_stream_write_uint16(stream, version_needed); - } - if (err == MZ_OK) - err = mz_stream_write_uint16(stream, file_info->flag); - if (err == MZ_OK) { -#ifdef HAVE_WZAES - if ((file_info->flag & MZ_ZIP_FLAG_ENCRYPTED) && (file_info->aes_version)) - err = mz_stream_write_uint16(stream, MZ_COMPRESS_METHOD_AES); - else -#endif - err = mz_stream_write_uint16(stream, file_info->compression_method); - } - if (err == MZ_OK) { - if (file_info->modified_date != 0 && !mask) - dos_date = mz_zip_time_t_to_dos_date(file_info->modified_date); - err = mz_stream_write_uint32(stream, dos_date); - } - - if (err == MZ_OK) - err = mz_zip_entry_write_crc_sizes(stream, zip64, mask, file_info); - - if (mask) { - snprintf(masked_name, sizeof(masked_name), "%" PRIx32 "_%" PRIx64, - file_info->disk_number, file_info->disk_offset); - filename = masked_name; - } else { - filename = file_info->filename; - } - - filename_length = (uint16_t)strlen(filename); - filename_size += filename_length; - - if ((mz_zip_attrib_is_dir(file_info->external_fa, file_info->version_madeby) == MZ_OK) && - ((filename[filename_length - 1] != '/') && (filename[filename_length - 1] != '\\'))) { - filename_size += 1; - write_end_slash = 1; - } - - if (err == MZ_OK) - err = mz_stream_write_uint16(stream, filename_size); - if (err == MZ_OK) - err = mz_stream_write_uint16(stream, extrafield_size); - - if (!local) { - if (file_info->comment != NULL) { - comment_size = (int32_t)strlen(file_info->comment); - if (comment_size > UINT16_MAX) - comment_size = UINT16_MAX; - } - if (err == MZ_OK) - err = mz_stream_write_uint16(stream, (uint16_t)comment_size); - if (err == MZ_OK) - err = mz_stream_write_uint16(stream, (uint16_t)file_info->disk_number); - if (err == MZ_OK) - err = mz_stream_write_uint16(stream, file_info->internal_fa); - if (err == MZ_OK) - err = mz_stream_write_uint32(stream, file_info->external_fa); - if (err == MZ_OK) { - if (file_info->disk_offset >= UINT32_MAX) - err = mz_stream_write_uint32(stream, UINT32_MAX); - else - err = mz_stream_write_uint32(stream, (uint32_t)file_info->disk_offset); - } - } - - if (err == MZ_OK) { - if (mz_stream_write(stream, filename, filename_length) != filename_length) - err = MZ_WRITE_ERROR; - - /* Ensure that directories have a slash appended to them for compatibility */ - if (err == MZ_OK && write_end_slash) - err = mz_stream_write_uint8(stream, '/'); - } - - /* Write ZIP64 extra field first so we can update sizes later if data descriptor not used */ - if ((err == MZ_OK) && (zip64)) { - err = mz_zip_extrafield_write(stream, MZ_ZIP_EXTENSION_ZIP64, field_length_zip64); - if (err == MZ_OK) { - if (mask) - err = mz_stream_write_int64(stream, 0); - else - err = mz_stream_write_int64(stream, file_info->uncompressed_size); - } - if (err == MZ_OK) - err = mz_stream_write_int64(stream, file_info->compressed_size); - if ((err == MZ_OK) && (!local) && (file_info->disk_offset >= UINT32_MAX)) - err = mz_stream_write_int64(stream, file_info->disk_offset); - if ((err == MZ_OK) && (!local) && (file_info->disk_number >= UINT16_MAX)) - err = mz_stream_write_uint32(stream, file_info->disk_number); - } - /* Write NTFS extra field */ - if ((err == MZ_OK) && (field_length_ntfs > 0)) { - err = mz_zip_extrafield_write(stream, MZ_ZIP_EXTENSION_NTFS, field_length_ntfs); - if (err == MZ_OK) - err = mz_stream_write_uint32(stream, reserved); - if (err == MZ_OK) - err = mz_stream_write_uint16(stream, 0x01); - if (err == MZ_OK) - err = mz_stream_write_uint16(stream, field_length_ntfs - 8); - if (err == MZ_OK) { - mz_zip_unix_to_ntfs_time(file_info->modified_date, &ntfs_time); - err = mz_stream_write_uint64(stream, ntfs_time); - } - if (err == MZ_OK) { - mz_zip_unix_to_ntfs_time(file_info->accessed_date, &ntfs_time); - err = mz_stream_write_uint64(stream, ntfs_time); - } - if (err == MZ_OK) { - mz_zip_unix_to_ntfs_time(file_info->creation_date, &ntfs_time); - err = mz_stream_write_uint64(stream, ntfs_time); - } - } - /* Write UNIX extra block extra field */ - if ((err == MZ_OK) && (field_length_unix1 > 0)) { - err = mz_zip_extrafield_write(stream, MZ_ZIP_EXTENSION_UNIX1, field_length_unix1); - if (err == MZ_OK) - err = mz_stream_write_uint32(stream, (uint32_t)file_info->accessed_date); - if (err == MZ_OK) - err = mz_stream_write_uint32(stream, (uint32_t)file_info->modified_date); - if (err == MZ_OK) /* User id */ - err = mz_stream_write_uint16(stream, 0); - if (err == MZ_OK) /* Group id */ - err = mz_stream_write_uint16(stream, 0); - if (err == MZ_OK && linkname_size > 0) { - if (mz_stream_write(stream, file_info->linkname, linkname_size) != linkname_size) - err = MZ_WRITE_ERROR; - } - } -#ifdef HAVE_WZAES - /* Write AES extra field */ - if ((err == MZ_OK) && (!skip_aes) && (file_info->flag & MZ_ZIP_FLAG_ENCRYPTED) && (file_info->aes_version)) { - err = mz_zip_extrafield_write(stream, MZ_ZIP_EXTENSION_AES, field_length_aes); - if (err == MZ_OK) - err = mz_stream_write_uint16(stream, file_info->aes_version); - if (err == MZ_OK) - err = mz_stream_write_uint8(stream, 'A'); - if (err == MZ_OK) - err = mz_stream_write_uint8(stream, 'E'); - if (err == MZ_OK) - err = mz_stream_write_uint8(stream, file_info->aes_encryption_mode); - if (err == MZ_OK) - err = mz_stream_write_uint16(stream, file_info->compression_method); - } -#endif - - if (file_info->extrafield_size > 0) { - err_mem = mz_stream_mem_seek(file_extra_stream, 0, MZ_SEEK_SET); - while (err == MZ_OK && err_mem == MZ_OK) { - err_mem = mz_stream_read_uint16(file_extra_stream, &field_type); - if (err_mem == MZ_OK) - err_mem = mz_stream_read_uint16(file_extra_stream, &field_length); - if (err_mem != MZ_OK) - break; - - /* Prefer our zip 64, ntfs, unix1 extensions over incoming */ - if (field_type == MZ_ZIP_EXTENSION_ZIP64 || field_type == MZ_ZIP_EXTENSION_NTFS || - field_type == MZ_ZIP_EXTENSION_UNIX1) { - err_mem = mz_stream_seek(file_extra_stream, field_length, MZ_SEEK_CUR); - continue; - } - - err = mz_stream_write_uint16(stream, field_type); - if (err == MZ_OK) - err = mz_stream_write_uint16(stream, field_length); - if (err == MZ_OK) - err = mz_stream_copy(stream, file_extra_stream, field_length); - } - - mz_stream_mem_delete(&file_extra_stream); - } - - if ((err == MZ_OK) && (!local) && (file_info->comment != NULL)) { - if (mz_stream_write(stream, file_info->comment, file_info->comment_size) != file_info->comment_size) - err = MZ_WRITE_ERROR; - } - - return err; -} - -static int32_t mz_zip_entry_write_descriptor(void *stream, uint8_t zip64, uint32_t crc32, int64_t compressed_size, int64_t uncompressed_size) { - int32_t err = MZ_OK; - - err = mz_stream_write_uint32(stream, MZ_ZIP_MAGIC_DATADESCRIPTOR); - if (err == MZ_OK) - err = mz_stream_write_uint32(stream, crc32); - - /* Store data descriptor as 8 bytes if zip 64 extension enabled */ - if (err == MZ_OK) { - /* Zip 64 extension is enabled when uncompressed size is > UINT32_MAX */ - if (!zip64) - err = mz_stream_write_uint32(stream, (uint32_t)compressed_size); - else - err = mz_stream_write_int64(stream, compressed_size); - } - if (err == MZ_OK) { - if (!zip64) - err = mz_stream_write_uint32(stream, (uint32_t)uncompressed_size); - else - err = mz_stream_write_int64(stream, uncompressed_size); - } - - return err; -} - -static int32_t mz_zip_read_cd(void *handle) { - mz_zip *zip = (mz_zip *)handle; - uint64_t number_entry_cd64 = 0; - uint64_t number_entry_cd = 0; - int64_t eocd_pos = 0; - int64_t eocd_pos64 = 0; - int64_t value64i = 0; - uint16_t value16 = 0; - uint32_t value32 = 0; - uint64_t value64 = 0; - uint16_t comment_size = 0; - int32_t comment_read = 0; - int32_t err = MZ_OK; - - - if (zip == NULL) - return MZ_PARAM_ERROR; - - /* Read and cache central directory records */ - err = mz_zip_search_eocd(zip->stream, &eocd_pos); - if (err == MZ_OK) { - /* The signature, already checked */ - err = mz_stream_read_uint32(zip->stream, &value32); - /* Number of this disk */ - if (err == MZ_OK) - err = mz_stream_read_uint16(zip->stream, &value16); - /* Number of the disk with the start of the central directory */ - if (err == MZ_OK) - err = mz_stream_read_uint16(zip->stream, &value16); - zip->disk_number_with_cd = value16; - /* Total number of entries in the central dir on this disk */ - if (err == MZ_OK) - err = mz_stream_read_uint16(zip->stream, &value16); - zip->number_entry = value16; - /* Total number of entries in the central dir */ - if (err == MZ_OK) - err = mz_stream_read_uint16(zip->stream, &value16); - number_entry_cd = value16; - if (number_entry_cd != zip->number_entry) - err = MZ_FORMAT_ERROR; - /* Size of the central directory */ - if (err == MZ_OK) - err = mz_stream_read_uint32(zip->stream, &value32); - if (err == MZ_OK) - zip->cd_size = value32; - /* Offset of start of central directory with respect to the starting disk number */ - if (err == MZ_OK) - err = mz_stream_read_uint32(zip->stream, &value32); - if (err == MZ_OK) - zip->cd_offset = value32; - /* Zip file global comment length */ - if (err == MZ_OK) - err = mz_stream_read_uint16(zip->stream, &comment_size); - if ((err == MZ_OK) && (comment_size > 0)) { - zip->comment = (char *)MZ_ALLOC(comment_size + 1); - if (zip->comment != NULL) { - comment_read = mz_stream_read(zip->stream, zip->comment, comment_size); - /* Don't fail if incorrect comment length read, not critical */ - if (comment_read < 0) - comment_read = 0; - zip->comment[comment_read] = 0; - } - } - - if ((err == MZ_OK) && ((number_entry_cd == UINT16_MAX) || (zip->cd_offset == UINT32_MAX))) { - /* Format should be Zip64, as the central directory or file size is too large */ - if (mz_zip_search_zip64_eocd(zip->stream, eocd_pos, &eocd_pos64) == MZ_OK) { - eocd_pos = eocd_pos64; - - err = mz_stream_seek(zip->stream, eocd_pos, MZ_SEEK_SET); - /* The signature, already checked */ - if (err == MZ_OK) - err = mz_stream_read_uint32(zip->stream, &value32); - /* Size of zip64 end of central directory record */ - if (err == MZ_OK) - err = mz_stream_read_uint64(zip->stream, &value64); - /* Version made by */ - if (err == MZ_OK) - err = mz_stream_read_uint16(zip->stream, &zip->version_madeby); - /* Version needed to extract */ - if (err == MZ_OK) - err = mz_stream_read_uint16(zip->stream, &value16); - /* Number of this disk */ - if (err == MZ_OK) - err = mz_stream_read_uint32(zip->stream, &value32); - /* Number of the disk with the start of the central directory */ - if (err == MZ_OK) - err = mz_stream_read_uint32(zip->stream, &zip->disk_number_with_cd); - /* Total number of entries in the central directory on this disk */ - if (err == MZ_OK) - err = mz_stream_read_uint64(zip->stream, &zip->number_entry); - /* Total number of entries in the central directory */ - if (err == MZ_OK) - err = mz_stream_read_uint64(zip->stream, &number_entry_cd64); - if (zip->number_entry != number_entry_cd64) - err = MZ_FORMAT_ERROR; - /* Size of the central directory */ - if (err == MZ_OK) { - err = mz_stream_read_int64(zip->stream, &zip->cd_size); - if (zip->cd_size < 0) - err = MZ_FORMAT_ERROR; - } - /* Offset of start of central directory with respect to the starting disk number */ - if (err == MZ_OK) { - err = mz_stream_read_int64(zip->stream, &zip->cd_offset); - if (zip->cd_offset < 0) - err = MZ_FORMAT_ERROR; - } - } else if ((zip->number_entry == UINT16_MAX) || (number_entry_cd != zip->number_entry) || - (zip->cd_size == UINT16_MAX) || (zip->cd_offset == UINT32_MAX)) { - err = MZ_FORMAT_ERROR; - } - } - } - - if (err == MZ_OK) { - mz_zip_print("Zip - Read cd (disk %" PRId32 " entries %" PRId64 " offset %" PRId64 " size %" PRId64 ")\n", - zip->disk_number_with_cd, zip->number_entry, zip->cd_offset, zip->cd_size); - - /* Verify central directory signature exists at offset */ - err = mz_stream_seek(zip->stream, zip->cd_offset, MZ_SEEK_SET); - if (err == MZ_OK) - err = mz_stream_read_uint32(zip->stream, &zip->cd_signature); - if ((err == MZ_OK) && (zip->cd_signature != MZ_ZIP_MAGIC_CENTRALHEADER)) { - /* If cd exists in large file and no zip-64 support, error for recover */ - if (eocd_pos > UINT32_MAX && eocd_pos64 == 0) - err = MZ_FORMAT_ERROR; - /* If cd not found attempt to seek backward to find it */ - if (err == MZ_OK) - err = mz_stream_seek(zip->stream, eocd_pos - zip->cd_size, MZ_SEEK_SET); - if (err == MZ_OK) - err = mz_stream_read_uint32(zip->stream, &zip->cd_signature); - if ((err == MZ_OK) && (zip->cd_signature == MZ_ZIP_MAGIC_CENTRALHEADER)) { - - /* If found compensate for incorrect locations */ - value64i = zip->cd_offset; - zip->cd_offset = eocd_pos - zip->cd_size; - /* Assume disk has prepended data */ - zip->disk_offset_shift = zip->cd_offset - value64i; - } - } - } - - if (err == MZ_OK) { - if (eocd_pos < zip->cd_offset) { - /* End of central dir should always come after central dir */ - err = MZ_FORMAT_ERROR; - } else if ((uint64_t)eocd_pos < (uint64_t)zip->cd_offset + zip->cd_size) { - /* Truncate size of cd if incorrect size or offset provided */ - zip->cd_size = eocd_pos - zip->cd_offset; - } - } - - return err; -} - -static int32_t mz_zip_write_cd(void *handle) { - mz_zip *zip = (mz_zip *)handle; - int64_t zip64_eocd_pos_inzip = 0; - int64_t disk_number = 0; - int64_t disk_size = 0; - int32_t comment_size = 0; - int32_t err = MZ_OK; - - - if (zip == NULL) - return MZ_PARAM_ERROR; - - if (mz_stream_get_prop_int64(zip->stream, MZ_STREAM_PROP_DISK_NUMBER, &disk_number) == MZ_OK) - zip->disk_number_with_cd = (uint32_t)disk_number; - if (mz_stream_get_prop_int64(zip->stream, MZ_STREAM_PROP_DISK_SIZE, &disk_size) == MZ_OK && disk_size > 0) - zip->disk_number_with_cd += 1; - mz_stream_set_prop_int64(zip->stream, MZ_STREAM_PROP_DISK_NUMBER, -1); - if ((zip->disk_number_with_cd > 0) && (zip->open_mode & MZ_OPEN_MODE_APPEND)) { - // Overwrite existing central directory if using split disks - mz_stream_seek(zip->stream, 0, MZ_SEEK_SET); - } - - zip->cd_offset = mz_stream_tell(zip->stream); - mz_stream_seek(zip->cd_mem_stream, 0, MZ_SEEK_END); - zip->cd_size = (uint32_t)mz_stream_tell(zip->cd_mem_stream); - mz_stream_seek(zip->cd_mem_stream, 0, MZ_SEEK_SET); - - err = mz_stream_copy(zip->stream, zip->cd_mem_stream, (int32_t)zip->cd_size); - - mz_zip_print("Zip - Write cd (disk %" PRId32 " entries %" PRId64 " offset %" PRId64 " size %" PRId64 ")\n", - zip->disk_number_with_cd, zip->number_entry, zip->cd_offset, zip->cd_size); - - if (zip->cd_size == 0 && zip->number_entry > 0) { - // Zip does not contain central directory, open with recovery option - return MZ_FORMAT_ERROR; - } - - /* Write the ZIP64 central directory header */ - if (zip->cd_offset >= UINT32_MAX || zip->number_entry >= UINT16_MAX) { - zip64_eocd_pos_inzip = mz_stream_tell(zip->stream); - - err = mz_stream_write_uint32(zip->stream, MZ_ZIP_MAGIC_ENDHEADER64); - - /* Size of this 'zip64 end of central directory' */ - if (err == MZ_OK) - err = mz_stream_write_uint64(zip->stream, (uint64_t)44); - /* Version made by */ - if (err == MZ_OK) - err = mz_stream_write_uint16(zip->stream, zip->version_madeby); - /* Version needed */ - if (err == MZ_OK) - err = mz_stream_write_uint16(zip->stream, (uint16_t)45); - /* Number of this disk */ - if (err == MZ_OK) - err = mz_stream_write_uint32(zip->stream, zip->disk_number_with_cd); - /* Number of the disk with the start of the central directory */ - if (err == MZ_OK) - err = mz_stream_write_uint32(zip->stream, zip->disk_number_with_cd); - /* Total number of entries in the central dir on this disk */ - if (err == MZ_OK) - err = mz_stream_write_uint64(zip->stream, zip->number_entry); - /* Total number of entries in the central dir */ - if (err == MZ_OK) - err = mz_stream_write_uint64(zip->stream, zip->number_entry); - /* Size of the central directory */ - if (err == MZ_OK) - err = mz_stream_write_int64(zip->stream, zip->cd_size); - /* Offset of start of central directory with respect to the starting disk number */ - if (err == MZ_OK) - err = mz_stream_write_int64(zip->stream, zip->cd_offset); - if (err == MZ_OK) - err = mz_stream_write_uint32(zip->stream, MZ_ZIP_MAGIC_ENDLOCHEADER64); - - /* Number of the disk with the start of the central directory */ - if (err == MZ_OK) - err = mz_stream_write_uint32(zip->stream, zip->disk_number_with_cd); - /* Relative offset to the end of zip64 central directory */ - if (err == MZ_OK) - err = mz_stream_write_int64(zip->stream, zip64_eocd_pos_inzip); - /* Number of the disk with the start of the central directory */ - if (err == MZ_OK) - err = mz_stream_write_uint32(zip->stream, zip->disk_number_with_cd + 1); - } - - /* Write the central directory header */ - - /* Signature */ - if (err == MZ_OK) - err = mz_stream_write_uint32(zip->stream, MZ_ZIP_MAGIC_ENDHEADER); - /* Number of this disk */ - if (err == MZ_OK) - err = mz_stream_write_uint16(zip->stream, (uint16_t)zip->disk_number_with_cd); - /* Number of the disk with the start of the central directory */ - if (err == MZ_OK) - err = mz_stream_write_uint16(zip->stream, (uint16_t)zip->disk_number_with_cd); - /* Total number of entries in the central dir on this disk */ - if (err == MZ_OK) { - if (zip->number_entry >= UINT16_MAX) - err = mz_stream_write_uint16(zip->stream, UINT16_MAX); - else - err = mz_stream_write_uint16(zip->stream, (uint16_t)zip->number_entry); - } - /* Total number of entries in the central dir */ - if (err == MZ_OK) { - if (zip->number_entry >= UINT16_MAX) - err = mz_stream_write_uint16(zip->stream, UINT16_MAX); - else - err = mz_stream_write_uint16(zip->stream, (uint16_t)zip->number_entry); - } - /* Size of the central directory */ - if (err == MZ_OK) - err = mz_stream_write_uint32(zip->stream, (uint32_t)zip->cd_size); - /* Offset of start of central directory with respect to the starting disk number */ - if (err == MZ_OK) { - if (zip->cd_offset >= UINT32_MAX) - err = mz_stream_write_uint32(zip->stream, UINT32_MAX); - else - err = mz_stream_write_uint32(zip->stream, (uint32_t)zip->cd_offset); - } - - /* Write global comment */ - if (zip->comment != NULL) { - comment_size = (int32_t)strlen(zip->comment); - if (comment_size > UINT16_MAX) - comment_size = UINT16_MAX; - } - if (err == MZ_OK) - err = mz_stream_write_uint16(zip->stream, (uint16_t)comment_size); - if (err == MZ_OK) { - if (mz_stream_write(zip->stream, zip->comment, comment_size) != comment_size) - err = MZ_READ_ERROR; - } - return err; -} - -static int32_t mz_zip_recover_cd(void *handle) { - mz_zip *zip = (mz_zip *)handle; - mz_zip_file local_file_info; - void *local_file_info_stream = NULL; - void *cd_mem_stream = NULL; - uint64_t number_entry = 0; - int64_t descriptor_pos = 0; - int64_t next_header_pos = 0; - int64_t disk_offset = 0; - int64_t disk_number = 0; - int64_t compressed_pos = 0; - int64_t compressed_end_pos = 0; - int64_t compressed_size = 0; - int64_t uncompressed_size = 0; - uint8_t descriptor_magic[4] = MZ_ZIP_MAGIC_DATADESCRIPTORU8; - uint8_t local_header_magic[4] = MZ_ZIP_MAGIC_LOCALHEADERU8; - uint8_t central_header_magic[4] = MZ_ZIP_MAGIC_CENTRALHEADERU8; - uint32_t crc32 = 0; - int32_t disk_number_with_cd = 0; - int32_t err = MZ_OK; - uint8_t zip64 = 0; - uint8_t eof = 0; - - - mz_zip_print("Zip - Recover - Start\n"); - - mz_zip_get_cd_mem_stream(handle, &cd_mem_stream); - - /* Determine if we are on a split disk or not */ - mz_stream_set_prop_int64(zip->stream, MZ_STREAM_PROP_DISK_NUMBER, 0); - if (mz_stream_tell(zip->stream) < 0) { - mz_stream_set_prop_int64(zip->stream, MZ_STREAM_PROP_DISK_NUMBER, -1); - mz_stream_seek(zip->stream, 0, MZ_SEEK_SET); - } else - disk_number_with_cd = 1; - - if (mz_stream_is_open(cd_mem_stream) != MZ_OK) - err = mz_stream_mem_open(cd_mem_stream, NULL, MZ_OPEN_MODE_CREATE); - - mz_stream_mem_create(&local_file_info_stream); - mz_stream_mem_open(local_file_info_stream, NULL, MZ_OPEN_MODE_CREATE); - - if (err == MZ_OK) { - err = mz_stream_find(zip->stream, (const void *)local_header_magic, sizeof(local_header_magic), - INT64_MAX, &next_header_pos); - } - - while (err == MZ_OK && !eof) { - /* Get current offset and disk number for central dir record */ - disk_offset = mz_stream_tell(zip->stream); - mz_stream_get_prop_int64(zip->stream, MZ_STREAM_PROP_DISK_NUMBER, &disk_number); - - /* Read local headers */ - memset(&local_file_info, 0, sizeof(local_file_info)); - err = mz_zip_entry_read_header(zip->stream, 1, &local_file_info, local_file_info_stream); - if (err != MZ_OK) - break; - - local_file_info.disk_offset = disk_offset; - if (disk_number < 0) - disk_number = 0; - local_file_info.disk_number = (uint32_t)disk_number; - - compressed_pos = mz_stream_tell(zip->stream); - - if ((err == MZ_OK) && (local_file_info.compressed_size > 0)) { - mz_stream_seek(zip->stream, local_file_info.compressed_size, MZ_SEEK_CUR); - } - - for (;;) { - /* Search for the next local header */ - err = mz_stream_find(zip->stream, (const void *)local_header_magic, sizeof(local_header_magic), - INT64_MAX, &next_header_pos); - - if (err == MZ_EXIST_ERROR) { - mz_stream_seek(zip->stream, compressed_pos, MZ_SEEK_SET); - - /* Search for central dir if no local header found */ - err = mz_stream_find(zip->stream, (const void *)central_header_magic, sizeof(central_header_magic), - INT64_MAX, &next_header_pos); - - if (err == MZ_EXIST_ERROR) { - /* Get end of stream if no central header found */ - mz_stream_seek(zip->stream, 0, MZ_SEEK_END); - next_header_pos = mz_stream_tell(zip->stream); - } - - eof = 1; - } - - if (local_file_info.flag & MZ_ZIP_FLAG_DATA_DESCRIPTOR || local_file_info.compressed_size == 0) { - /* Search backwards for the descriptor, seeking too far back will be incorrect if compressed size is small */ - err = mz_stream_find_reverse(zip->stream, (const void *)descriptor_magic, sizeof(descriptor_magic), - MZ_ZIP_SIZE_MAX_DATA_DESCRIPTOR, &descriptor_pos); - if (err == MZ_OK) { - if (mz_zip_extrafield_contains(local_file_info.extrafield, - local_file_info.extrafield_size, MZ_ZIP_EXTENSION_ZIP64, NULL) == MZ_OK) - zip64 = 1; - - err = mz_zip_entry_read_descriptor(zip->stream, zip64, &crc32, - &compressed_size, &uncompressed_size); - - if (err == MZ_OK) { - if (local_file_info.crc == 0) - local_file_info.crc = crc32; - if (local_file_info.compressed_size == 0) - local_file_info.compressed_size = compressed_size; - if (local_file_info.uncompressed_size == 0) - local_file_info.uncompressed_size = uncompressed_size; - } - - compressed_end_pos = descriptor_pos; - } else if (eof) { - compressed_end_pos = next_header_pos; - } else if (local_file_info.flag & MZ_ZIP_FLAG_DATA_DESCRIPTOR) { - /* Wrong local file entry found, keep searching */ - next_header_pos += 1; - mz_stream_seek(zip->stream, next_header_pos, MZ_SEEK_SET); - continue; - } - } else { - compressed_end_pos = next_header_pos; - } - - break; - } - - compressed_size = compressed_end_pos - compressed_pos; - - if (compressed_size > UINT32_MAX) { - /* Update sizes if 4GB file is written with no ZIP64 support */ - if (local_file_info.uncompressed_size < UINT32_MAX) { - local_file_info.compressed_size = compressed_size; - local_file_info.uncompressed_size = 0; - } - } - - mz_zip_print("Zip - Recover - Entry %s (csize %" PRId64 " usize %" PRId64 " flags 0x%" PRIx16 ")\n", - local_file_info.filename, local_file_info.compressed_size, local_file_info.uncompressed_size, - local_file_info.flag); - - /* Rewrite central dir with local headers and offsets */ - err = mz_zip_entry_write_header(cd_mem_stream, 0, &local_file_info); - if (err == MZ_OK) - number_entry += 1; - - err = mz_stream_seek(zip->stream, next_header_pos, MZ_SEEK_SET); - } - - mz_stream_mem_delete(&local_file_info_stream); - - mz_zip_print("Zip - Recover - Complete (cddisk %" PRId32 " entries %" PRId64 ")\n", - disk_number_with_cd, number_entry); - - if (number_entry == 0) - return err; - - /* Set new upper seek boundary for central dir mem stream */ - disk_offset = mz_stream_tell(cd_mem_stream); - mz_stream_mem_set_buffer_limit(cd_mem_stream, (int32_t)disk_offset); - - /* Set new central directory info */ - mz_zip_set_cd_stream(handle, 0, cd_mem_stream); - mz_zip_set_number_entry(handle, number_entry); - mz_zip_set_disk_number_with_cd(handle, disk_number_with_cd); - - return MZ_OK; -} - -void *mz_zip_create(void **handle) { - mz_zip *zip = NULL; - - zip = (mz_zip *)MZ_ALLOC(sizeof(mz_zip)); - if (zip != NULL) { - memset(zip, 0, sizeof(mz_zip)); - zip->data_descriptor = 1; - } - if (handle != NULL) - *handle = zip; - - return zip; -} - -void mz_zip_delete(void **handle) { - mz_zip *zip = NULL; - if (handle == NULL) - return; - zip = (mz_zip *)*handle; - if (zip != NULL) { - MZ_FREE(zip); - } - *handle = NULL; -} - -int32_t mz_zip_open(void *handle, void *stream, int32_t mode) { - mz_zip *zip = (mz_zip *)handle; - int32_t err = MZ_OK; - - - if (zip == NULL) - return MZ_PARAM_ERROR; - - mz_zip_print("Zip - Open\n"); - - zip->stream = stream; - - mz_stream_mem_create(&zip->cd_mem_stream); - - if (mode & MZ_OPEN_MODE_WRITE) { - mz_stream_mem_open(zip->cd_mem_stream, NULL, MZ_OPEN_MODE_CREATE); - zip->cd_stream = zip->cd_mem_stream; - } else { - zip->cd_stream = stream; - } - - if ((mode & MZ_OPEN_MODE_READ) || (mode & MZ_OPEN_MODE_APPEND)) { - if ((mode & MZ_OPEN_MODE_CREATE) == 0) { - err = mz_zip_read_cd(zip); - if (err != MZ_OK) { - mz_zip_print("Zip - Error detected reading cd (%" PRId32 ")\n", err); - if (zip->recover && mz_zip_recover_cd(zip) == MZ_OK) - err = MZ_OK; - } - } - - if ((err == MZ_OK) && (mode & MZ_OPEN_MODE_APPEND)) { - if (zip->cd_size > 0) { - /* Store central directory in memory */ - err = mz_stream_seek(zip->stream, zip->cd_offset, MZ_SEEK_SET); - if (err == MZ_OK) - err = mz_stream_copy(zip->cd_mem_stream, zip->stream, (int32_t)zip->cd_size); - if (err == MZ_OK) - err = mz_stream_seek(zip->stream, zip->cd_offset, MZ_SEEK_SET); - } else { - if (zip->cd_signature == MZ_ZIP_MAGIC_ENDHEADER) { - /* If tiny zip then overwrite end header */ - err = mz_stream_seek(zip->stream, zip->cd_offset, MZ_SEEK_SET); - } else { - /* If no central directory, append new zip to end of file */ - err = mz_stream_seek(zip->stream, 0, MZ_SEEK_END); - } - } - - if (zip->disk_number_with_cd > 0) { - /* Move to last disk to begin appending */ - mz_stream_set_prop_int64(zip->stream, MZ_STREAM_PROP_DISK_NUMBER, zip->disk_number_with_cd - 1); - } - } else { - zip->cd_start_pos = zip->cd_offset; - } - } - - if (err != MZ_OK) { - mz_zip_close(zip); - return err; - } - - /* Memory streams used to store variable length file info data */ - mz_stream_mem_create(&zip->file_info_stream); - mz_stream_mem_open(zip->file_info_stream, NULL, MZ_OPEN_MODE_CREATE); - - mz_stream_mem_create(&zip->local_file_info_stream); - mz_stream_mem_open(zip->local_file_info_stream, NULL, MZ_OPEN_MODE_CREATE); - - zip->open_mode = mode; - - return err; -} - -int32_t mz_zip_close(void *handle) { - mz_zip *zip = (mz_zip *)handle; - int32_t err = MZ_OK; - - if (zip == NULL) - return MZ_PARAM_ERROR; - - mz_zip_print("Zip - Close\n"); - - if (mz_zip_entry_is_open(handle) == MZ_OK) - err = mz_zip_entry_close(handle); - - if ((err == MZ_OK) && (zip->open_mode & MZ_OPEN_MODE_WRITE)) - err = mz_zip_write_cd(handle); - - if (zip->cd_mem_stream != NULL) { - mz_stream_close(zip->cd_mem_stream); - mz_stream_delete(&zip->cd_mem_stream); - } - - if (zip->file_info_stream != NULL) { - mz_stream_mem_close(zip->file_info_stream); - mz_stream_mem_delete(&zip->file_info_stream); - } - if (zip->local_file_info_stream != NULL) { - mz_stream_mem_close(zip->local_file_info_stream); - mz_stream_mem_delete(&zip->local_file_info_stream); - } - - if (zip->comment) { - MZ_FREE(zip->comment); - zip->comment = NULL; - } - - zip->stream = NULL; - zip->cd_stream = NULL; - - return err; -} - -int32_t mz_zip_get_comment(void *handle, const char **comment) { - mz_zip *zip = (mz_zip *)handle; - if (zip == NULL || comment == NULL) - return MZ_PARAM_ERROR; - if (zip->comment == NULL) - return MZ_EXIST_ERROR; - *comment = zip->comment; - return MZ_OK; -} - -int32_t mz_zip_set_comment(void *handle, const char *comment) { - mz_zip *zip = (mz_zip *)handle; - int32_t comment_size = 0; - if (zip == NULL || comment == NULL) - return MZ_PARAM_ERROR; - if (zip->comment != NULL) - MZ_FREE(zip->comment); - comment_size = (int32_t)strlen(comment); - if (comment_size > UINT16_MAX) - return MZ_PARAM_ERROR; - zip->comment = (char *)MZ_ALLOC(comment_size+1); - if (zip->comment == NULL) - return MZ_MEM_ERROR; - memset(zip->comment, 0, comment_size+1); - strncpy(zip->comment, comment, comment_size); - return MZ_OK; -} - -int32_t mz_zip_get_version_madeby(void *handle, uint16_t *version_madeby) { - mz_zip *zip = (mz_zip *)handle; - if (zip == NULL || version_madeby == NULL) - return MZ_PARAM_ERROR; - *version_madeby = zip->version_madeby; - return MZ_OK; -} - -int32_t mz_zip_set_version_madeby(void *handle, uint16_t version_madeby) { - mz_zip *zip = (mz_zip *)handle; - if (zip == NULL) - return MZ_PARAM_ERROR; - zip->version_madeby = version_madeby; - return MZ_OK; -} - -int32_t mz_zip_set_recover(void *handle, uint8_t recover) { - mz_zip *zip = (mz_zip *)handle; - if (zip == NULL) - return MZ_PARAM_ERROR; - zip->recover = recover; - return MZ_OK; -} - -int32_t mz_zip_set_data_descriptor(void *handle, uint8_t data_descriptor) { - mz_zip *zip = (mz_zip *)handle; - if (zip == NULL) - return MZ_PARAM_ERROR; - zip->data_descriptor = data_descriptor; - return MZ_OK; -} - -int32_t mz_zip_get_stream(void *handle, void **stream) { - mz_zip *zip = (mz_zip *)handle; - if (zip == NULL || stream == NULL) - return MZ_PARAM_ERROR; - *stream = zip->stream; - if (*stream == NULL) - return MZ_EXIST_ERROR; - return MZ_OK; -} - -int32_t mz_zip_set_cd_stream(void *handle, int64_t cd_start_pos, void *cd_stream) { - mz_zip *zip = (mz_zip *)handle; - if (zip == NULL || cd_stream == NULL) - return MZ_PARAM_ERROR; - zip->cd_offset = 0; - zip->cd_stream = cd_stream; - zip->cd_start_pos = cd_start_pos; - return MZ_OK; -} - -int32_t mz_zip_get_cd_mem_stream(void *handle, void **cd_mem_stream) { - mz_zip *zip = (mz_zip *)handle; - if (zip == NULL || cd_mem_stream == NULL) - return MZ_PARAM_ERROR; - *cd_mem_stream = zip->cd_mem_stream; - if (*cd_mem_stream == NULL) - return MZ_EXIST_ERROR; - return MZ_OK; -} - -int32_t mz_zip_set_number_entry(void *handle, uint64_t number_entry) { - mz_zip *zip = (mz_zip *)handle; - if (zip == NULL) - return MZ_PARAM_ERROR; - zip->number_entry = number_entry; - return MZ_OK; -} - -int32_t mz_zip_get_number_entry(void *handle, uint64_t *number_entry) { - mz_zip *zip = (mz_zip *)handle; - if (zip == NULL || number_entry == NULL) - return MZ_PARAM_ERROR; - *number_entry = zip->number_entry; - return MZ_OK; -} - -int32_t mz_zip_set_disk_number_with_cd(void *handle, uint32_t disk_number_with_cd) { - mz_zip *zip = (mz_zip *)handle; - if (zip == NULL) - return MZ_PARAM_ERROR; - zip->disk_number_with_cd = disk_number_with_cd; - return MZ_OK; -} - -int32_t mz_zip_get_disk_number_with_cd(void *handle, uint32_t *disk_number_with_cd) { - mz_zip *zip = (mz_zip *)handle; - if (zip == NULL || disk_number_with_cd == NULL) - return MZ_PARAM_ERROR; - *disk_number_with_cd = zip->disk_number_with_cd; - return MZ_OK; -} - -static int32_t mz_zip_entry_close_int(void *handle) { - mz_zip *zip = (mz_zip *)handle; - - if (zip->crypt_stream != NULL) - mz_stream_delete(&zip->crypt_stream); - zip->crypt_stream = NULL; - if (zip->compress_stream != NULL) - mz_stream_delete(&zip->compress_stream); - zip->compress_stream = NULL; - - zip->entry_opened = 0; - - return MZ_OK; -} - -static int32_t mz_zip_entry_open_int(void *handle, uint8_t raw, int16_t compress_level, const char *password) { - mz_zip *zip = (mz_zip *)handle; - int64_t max_total_in = 0; - int64_t header_size = 0; - int64_t footer_size = 0; - int32_t err = MZ_OK; - uint8_t use_crypt = 0; - - if (zip == NULL) - return MZ_PARAM_ERROR; - - switch (zip->file_info.compression_method) { - case MZ_COMPRESS_METHOD_STORE: - case MZ_COMPRESS_METHOD_DEFLATE: -#ifdef HAVE_BZIP2 - case MZ_COMPRESS_METHOD_BZIP2: -#endif -#ifdef HAVE_LZMA - case MZ_COMPRESS_METHOD_LZMA: -#endif -#if defined(HAVE_LZMA) || defined(HAVE_LIBCOMP) - case MZ_COMPRESS_METHOD_XZ: -#endif -#ifdef HAVE_ZSTD - case MZ_COMPRESS_METHOD_ZSTD: -#endif - err = MZ_OK; - break; - default: - return MZ_SUPPORT_ERROR; - } - -#ifndef HAVE_WZAES - if (zip->file_info.aes_version) - return MZ_SUPPORT_ERROR; -#endif - - zip->entry_raw = raw; - - if ((zip->file_info.flag & MZ_ZIP_FLAG_ENCRYPTED) && (password != NULL)) { - if (zip->open_mode & MZ_OPEN_MODE_WRITE) { - /* Encrypt only when we are not trying to write raw and password is supplied. */ - if (!zip->entry_raw) - use_crypt = 1; - } else if (zip->open_mode & MZ_OPEN_MODE_READ) { - /* Decrypt only when password is supplied. Don't error when password */ - /* is not supplied as we may want to read the raw encrypted data. */ - use_crypt = 1; - } - } - - if ((err == MZ_OK) && (use_crypt)) { -#ifdef HAVE_WZAES - if (zip->file_info.aes_version) { - mz_stream_wzaes_create(&zip->crypt_stream); - mz_stream_wzaes_set_password(zip->crypt_stream, password); - mz_stream_wzaes_set_encryption_mode(zip->crypt_stream, zip->file_info.aes_encryption_mode); - } else -#endif - { -#ifdef HAVE_PKCRYPT - uint8_t verify1 = (uint8_t)((zip->file_info.pk_verify >> 8) & 0xff); - uint8_t verify2 = (uint8_t)((zip->file_info.pk_verify) & 0xff); - - mz_stream_pkcrypt_create(&zip->crypt_stream); - mz_stream_pkcrypt_set_password(zip->crypt_stream, password); - mz_stream_pkcrypt_set_verify(zip->crypt_stream, verify1, verify2); -#endif - } - } - - if (err == MZ_OK) { - if (zip->crypt_stream == NULL) - mz_stream_raw_create(&zip->crypt_stream); - - mz_stream_set_base(zip->crypt_stream, zip->stream); - - err = mz_stream_open(zip->crypt_stream, NULL, zip->open_mode); - } - - if (err == MZ_OK) { - if (zip->entry_raw || zip->file_info.compression_method == MZ_COMPRESS_METHOD_STORE) - mz_stream_raw_create(&zip->compress_stream); -#ifdef HAVE_ZLIB - else if (zip->file_info.compression_method == MZ_COMPRESS_METHOD_DEFLATE) - mz_stream_zlib_create(&zip->compress_stream); -#endif -#ifdef HAVE_BZIP2 - else if (zip->file_info.compression_method == MZ_COMPRESS_METHOD_BZIP2) - mz_stream_bzip_create(&zip->compress_stream); -#endif -#ifdef HAVE_LIBCOMP - else if (zip->file_info.compression_method == MZ_COMPRESS_METHOD_DEFLATE || - zip->file_info.compression_method == MZ_COMPRESS_METHOD_XZ) { - mz_stream_libcomp_create(&zip->compress_stream); - mz_stream_set_prop_int64(zip->compress_stream, MZ_STREAM_PROP_COMPRESS_METHOD, - zip->file_info.compression_method); - } -#endif -#ifdef HAVE_LZMA - else if (zip->file_info.compression_method == MZ_COMPRESS_METHOD_LZMA || - zip->file_info.compression_method == MZ_COMPRESS_METHOD_XZ) { - mz_stream_lzma_create(&zip->compress_stream); - mz_stream_set_prop_int64(zip->compress_stream, MZ_STREAM_PROP_COMPRESS_METHOD, - zip->file_info.compression_method); - } -#endif -#ifdef HAVE_ZSTD - else if (zip->file_info.compression_method == MZ_COMPRESS_METHOD_ZSTD) - mz_stream_zstd_create(&zip->compress_stream); -#endif - else - err = MZ_PARAM_ERROR; - } - - if (err == MZ_OK) { - if (zip->open_mode & MZ_OPEN_MODE_WRITE) { - mz_stream_set_prop_int64(zip->compress_stream, MZ_STREAM_PROP_COMPRESS_LEVEL, compress_level); - } else { - int32_t set_end_of_stream = 0; - -#ifndef HAVE_LIBCOMP - if (zip->entry_raw || - zip->file_info.compression_method == MZ_COMPRESS_METHOD_STORE || - zip->file_info.flag & MZ_ZIP_FLAG_ENCRYPTED) -#endif - { - max_total_in = zip->file_info.compressed_size; - mz_stream_set_prop_int64(zip->crypt_stream, MZ_STREAM_PROP_TOTAL_IN_MAX, max_total_in); - - if (mz_stream_get_prop_int64(zip->crypt_stream, MZ_STREAM_PROP_HEADER_SIZE, &header_size) == MZ_OK) - max_total_in -= header_size; - if (mz_stream_get_prop_int64(zip->crypt_stream, MZ_STREAM_PROP_FOOTER_SIZE, &footer_size) == MZ_OK) - max_total_in -= footer_size; - - mz_stream_set_prop_int64(zip->compress_stream, MZ_STREAM_PROP_TOTAL_IN_MAX, max_total_in); - } - - switch (zip->file_info.compression_method) { - case MZ_COMPRESS_METHOD_LZMA: - case MZ_COMPRESS_METHOD_XZ: - set_end_of_stream = (zip->file_info.flag & MZ_ZIP_FLAG_LZMA_EOS_MARKER); - break; - case MZ_COMPRESS_METHOD_ZSTD: - set_end_of_stream = 1; - break; - } - - if (set_end_of_stream) { - mz_stream_set_prop_int64(zip->compress_stream, MZ_STREAM_PROP_TOTAL_IN_MAX, zip->file_info.compressed_size); - mz_stream_set_prop_int64(zip->compress_stream, MZ_STREAM_PROP_TOTAL_OUT_MAX, zip->file_info.uncompressed_size); - } - } - - mz_stream_set_base(zip->compress_stream, zip->crypt_stream); - - err = mz_stream_open(zip->compress_stream, NULL, zip->open_mode); - } - - if (err == MZ_OK) { - zip->entry_opened = 1; - zip->entry_crc32 = 0; - } else { - mz_zip_entry_close_int(handle); - } - - return err; -} - -int32_t mz_zip_entry_is_open(void *handle) { - mz_zip *zip = (mz_zip *)handle; - if (zip == NULL) - return MZ_PARAM_ERROR; - if (zip->entry_opened == 0) - return MZ_EXIST_ERROR; - return MZ_OK; -} - -int32_t mz_zip_entry_read_open(void *handle, uint8_t raw, const char *password) { - mz_zip *zip = (mz_zip *)handle; - int32_t err = MZ_OK; - int32_t err_shift = MZ_OK; - -#if defined(MZ_ZIP_NO_ENCRYPTION) - if (password != NULL) - return MZ_SUPPORT_ERROR; -#endif - if (zip == NULL) - return MZ_PARAM_ERROR; - if ((zip->open_mode & MZ_OPEN_MODE_READ) == 0) - return MZ_PARAM_ERROR; - if (zip->entry_scanned == 0) - return MZ_PARAM_ERROR; - - mz_zip_print("Zip - Entry - Read open (raw %" PRId32 ")\n", raw); - - err = mz_zip_entry_seek_local_header(handle); - if (err == MZ_OK) - err = mz_zip_entry_read_header(zip->stream, 1, &zip->local_file_info, zip->local_file_info_stream); - - if (err == MZ_FORMAT_ERROR && zip->disk_offset_shift > 0) { - /* Perhaps we didn't compensated correctly for incorrect cd offset */ - err_shift = mz_stream_seek(zip->stream, zip->file_info.disk_offset, MZ_SEEK_SET); - if (err_shift == MZ_OK) - err_shift = mz_zip_entry_read_header(zip->stream, 1, &zip->local_file_info, zip->local_file_info_stream); - if (err_shift == MZ_OK) { - zip->disk_offset_shift = 0; - err = err_shift; - } - } - -#ifdef MZ_ZIP_NO_DECOMPRESSION - if (!raw && zip->file_info.compression_method != MZ_COMPRESS_METHOD_STORE) - err = MZ_SUPPORT_ERROR; -#endif - if (err == MZ_OK) - err = mz_zip_entry_open_int(handle, raw, 0, password); - - return err; -} - -int32_t mz_zip_entry_write_open(void *handle, const mz_zip_file *file_info, int16_t compress_level, uint8_t raw, const char *password) { - mz_zip *zip = (mz_zip *)handle; - int64_t filename_pos = -1; - int64_t extrafield_pos = 0; - int64_t comment_pos = 0; - int64_t linkname_pos = 0; - int64_t disk_number = 0; - uint8_t is_dir = 0; - int32_t err = MZ_OK; - -#if defined(MZ_ZIP_NO_ENCRYPTION) - if (password != NULL) - return MZ_SUPPORT_ERROR; -#endif - if (zip == NULL || file_info == NULL || file_info->filename == NULL) - return MZ_PARAM_ERROR; - - if (mz_zip_entry_is_open(handle) == MZ_OK) { - err = mz_zip_entry_close(handle); - if (err != MZ_OK) - return err; - } - - memcpy(&zip->file_info, file_info, sizeof(mz_zip_file)); - - mz_zip_print("Zip - Entry - Write open - %s (level %" PRId16 " raw %" PRId8 ")\n", - zip->file_info.filename, compress_level, raw); - - mz_stream_seek(zip->file_info_stream, 0, MZ_SEEK_SET); - mz_stream_write(zip->file_info_stream, file_info, sizeof(mz_zip_file)); - - /* Copy filename, extrafield, and comment internally */ - filename_pos = mz_stream_tell(zip->file_info_stream); - if (file_info->filename != NULL) - mz_stream_write(zip->file_info_stream, file_info->filename, (int32_t)strlen(file_info->filename)); - mz_stream_write_uint8(zip->file_info_stream, 0); - - extrafield_pos = mz_stream_tell(zip->file_info_stream); - if (file_info->extrafield != NULL) - mz_stream_write(zip->file_info_stream, file_info->extrafield, file_info->extrafield_size); - mz_stream_write_uint8(zip->file_info_stream, 0); - - comment_pos = mz_stream_tell(zip->file_info_stream); - if (file_info->comment != NULL) - mz_stream_write(zip->file_info_stream, file_info->comment, file_info->comment_size); - mz_stream_write_uint8(zip->file_info_stream, 0); - - linkname_pos = mz_stream_tell(zip->file_info_stream); - if (file_info->linkname != NULL) - mz_stream_write(zip->file_info_stream, file_info->linkname, (int32_t)strlen(file_info->linkname)); - mz_stream_write_uint8(zip->file_info_stream, 0); - - mz_stream_mem_get_buffer_at(zip->file_info_stream, filename_pos, (const void **)&zip->file_info.filename); - mz_stream_mem_get_buffer_at(zip->file_info_stream, extrafield_pos, (const void **)&zip->file_info.extrafield); - mz_stream_mem_get_buffer_at(zip->file_info_stream, comment_pos, (const void **)&zip->file_info.comment); - mz_stream_mem_get_buffer_at(zip->file_info_stream, linkname_pos, (const void **)&zip->file_info.linkname); - - if (zip->file_info.compression_method == MZ_COMPRESS_METHOD_DEFLATE) { - if ((compress_level == 8) || (compress_level == 9)) - zip->file_info.flag |= MZ_ZIP_FLAG_DEFLATE_MAX; - if (compress_level == 2) - zip->file_info.flag |= MZ_ZIP_FLAG_DEFLATE_FAST; - if (compress_level == 1) - zip->file_info.flag |= MZ_ZIP_FLAG_DEFLATE_SUPER_FAST; - } -#if defined(HAVE_LZMA) || defined(HAVE_LIBCOMP) - else if (zip->file_info.compression_method == MZ_COMPRESS_METHOD_LZMA || - zip->file_info.compression_method == MZ_COMPRESS_METHOD_XZ) - zip->file_info.flag |= MZ_ZIP_FLAG_LZMA_EOS_MARKER; -#endif - - if (mz_zip_attrib_is_dir(zip->file_info.external_fa, zip->file_info.version_madeby) == MZ_OK) - is_dir = 1; - - if (!is_dir) { - if (zip->data_descriptor) - zip->file_info.flag |= MZ_ZIP_FLAG_DATA_DESCRIPTOR; - if (password != NULL) - zip->file_info.flag |= MZ_ZIP_FLAG_ENCRYPTED; - } - - mz_stream_get_prop_int64(zip->stream, MZ_STREAM_PROP_DISK_NUMBER, &disk_number); - zip->file_info.disk_number = (uint32_t)disk_number; - zip->file_info.disk_offset = mz_stream_tell(zip->stream); - - if (zip->file_info.flag & MZ_ZIP_FLAG_ENCRYPTED) { -#ifdef HAVE_PKCRYPT - /* Pre-calculated CRC value is required for PKWARE traditional encryption */ - uint32_t dos_date = mz_zip_time_t_to_dos_date(zip->file_info.modified_date); - zip->file_info.pk_verify = mz_zip_get_pk_verify(dos_date, zip->file_info.crc, zip->file_info.flag); -#endif -#ifdef HAVE_WZAES - if (zip->file_info.aes_version && zip->file_info.aes_encryption_mode == 0) - zip->file_info.aes_encryption_mode = MZ_AES_ENCRYPTION_MODE_256; -#endif - } - - zip->file_info.crc = 0; - zip->file_info.compressed_size = 0; - - if ((compress_level == 0) || (is_dir)) - zip->file_info.compression_method = MZ_COMPRESS_METHOD_STORE; - -#ifdef MZ_ZIP_NO_COMPRESSION - if (zip->file_info.compression_method != MZ_COMPRESS_METHOD_STORE) - err = MZ_SUPPORT_ERROR; -#endif - if (err == MZ_OK) - err = mz_zip_entry_write_header(zip->stream, 1, &zip->file_info); - if (err == MZ_OK) - err = mz_zip_entry_open_int(handle, raw, compress_level, password); - - return err; -} - -int32_t mz_zip_entry_read(void *handle, void *buf, int32_t len) { - mz_zip *zip = (mz_zip *)handle; - int32_t read = 0; - - if (zip == NULL || mz_zip_entry_is_open(handle) != MZ_OK) - return MZ_PARAM_ERROR; - if (UINT_MAX == UINT16_MAX && len > UINT16_MAX) /* zlib limitation */ - return MZ_PARAM_ERROR; - if (len == 0) - return MZ_PARAM_ERROR; - - if (zip->file_info.compressed_size == 0) - return 0; - - /* Read entire entry even if uncompressed_size = 0, otherwise */ - /* aes encryption validation will fail if compressed_size > 0 */ - read = mz_stream_read(zip->compress_stream, buf, len); - if (read > 0) - zip->entry_crc32 = mz_crypt_crc32_update(zip->entry_crc32, buf, read); - - mz_zip_print("Zip - Entry - Read - %" PRId32 " (max %" PRId32 ")\n", read, len); - - return read; -} - -int32_t mz_zip_entry_write(void *handle, const void *buf, int32_t len) { - mz_zip *zip = (mz_zip *)handle; - int32_t written = 0; - - if (zip == NULL || mz_zip_entry_is_open(handle) != MZ_OK) - return MZ_PARAM_ERROR; - written = mz_stream_write(zip->compress_stream, buf, len); - if (written > 0) - zip->entry_crc32 = mz_crypt_crc32_update(zip->entry_crc32, buf, written); - - mz_zip_print("Zip - Entry - Write - %" PRId32 " (max %" PRId32 ")\n", written, len); - - return written; -} - -int32_t mz_zip_entry_read_close(void *handle, uint32_t *crc32, int64_t *compressed_size, - int64_t *uncompressed_size) { - mz_zip *zip = (mz_zip *)handle; - int64_t total_in = 0; - int32_t err = MZ_OK; - uint8_t zip64 = 0; - - if (zip == NULL || mz_zip_entry_is_open(handle) != MZ_OK) - return MZ_PARAM_ERROR; - - mz_stream_close(zip->compress_stream); - - mz_zip_print("Zip - Entry - Read Close\n"); - - if (crc32 != NULL) - *crc32 = zip->file_info.crc; - if (compressed_size != NULL) - *compressed_size = zip->file_info.compressed_size; - if (uncompressed_size != NULL) - *uncompressed_size = zip->file_info.uncompressed_size; - - mz_stream_get_prop_int64(zip->compress_stream, MZ_STREAM_PROP_TOTAL_IN, &total_in); - - if ((zip->file_info.flag & MZ_ZIP_FLAG_DATA_DESCRIPTOR) && - ((zip->file_info.flag & MZ_ZIP_FLAG_MASK_LOCAL_INFO) == 0) && - (crc32 != NULL || compressed_size != NULL || uncompressed_size != NULL)) { - /* Check to see if data descriptor is zip64 bit format or not */ - if (mz_zip_extrafield_contains(zip->local_file_info.extrafield, - zip->local_file_info.extrafield_size, MZ_ZIP_EXTENSION_ZIP64, NULL) == MZ_OK) - zip64 = 1; - - err = mz_zip_entry_seek_local_header(handle); - - /* Seek to end of compressed stream since we might have over-read during compression */ - if (err == MZ_OK) - err = mz_stream_seek(zip->stream, MZ_ZIP_SIZE_LD_ITEM + - (int64_t)zip->local_file_info.filename_size + - (int64_t)zip->local_file_info.extrafield_size + - total_in, MZ_SEEK_CUR); - - /* Read data descriptor */ - if (err == MZ_OK) - err = mz_zip_entry_read_descriptor(zip->stream, zip64, - crc32, compressed_size, uncompressed_size); - } - - /* If entire entry was not read verification will fail */ - if ((err == MZ_OK) && (total_in > 0) && (!zip->entry_raw)) { -#ifdef HAVE_WZAES - /* AES zip version AE-1 will expect a valid crc as well */ - if (zip->file_info.aes_version <= 0x0001) -#endif - { - if (zip->entry_crc32 != zip->file_info.crc) { - mz_zip_print("Zip - Entry - Crc failed (actual 0x%08" PRIx32 " expected 0x%08" PRIx32 ")\n", - zip->entry_crc32, zip->file_info.crc); - - err = MZ_CRC_ERROR; - } - } - } - - mz_zip_entry_close_int(handle); - - return err; -} - -int32_t mz_zip_entry_write_close(void *handle, uint32_t crc32, int64_t compressed_size, - int64_t uncompressed_size) { - mz_zip *zip = (mz_zip *)handle; - int64_t end_disk_number = 0; - int32_t err = MZ_OK; - uint8_t zip64 = 0; - - if (zip == NULL || mz_zip_entry_is_open(handle) != MZ_OK) - return MZ_PARAM_ERROR; - - mz_stream_close(zip->compress_stream); - - if (!zip->entry_raw) - crc32 = zip->entry_crc32; - - mz_zip_print("Zip - Entry - Write Close (crc 0x%08" PRIx32 " cs %" PRId64 " ucs %" PRId64 ")\n", - crc32, compressed_size, uncompressed_size); - - /* If sizes are not set, then read them from the compression stream */ - if (compressed_size < 0) - mz_stream_get_prop_int64(zip->compress_stream, MZ_STREAM_PROP_TOTAL_OUT, &compressed_size); - if (uncompressed_size < 0) - mz_stream_get_prop_int64(zip->compress_stream, MZ_STREAM_PROP_TOTAL_IN, &uncompressed_size); - - if (zip->file_info.flag & MZ_ZIP_FLAG_ENCRYPTED) { - mz_stream_set_base(zip->crypt_stream, zip->stream); - err = mz_stream_close(zip->crypt_stream); - - mz_stream_get_prop_int64(zip->crypt_stream, MZ_STREAM_PROP_TOTAL_OUT, &compressed_size); - } - - mz_zip_entry_needs_zip64(&zip->file_info, 1, &zip64); - - if ((err == MZ_OK) && (zip->file_info.flag & MZ_ZIP_FLAG_DATA_DESCRIPTOR)) { - /* Determine if we need to write data descriptor in zip64 format, - if local extrafield was saved with zip64 extrafield */ - - if (zip->file_info.flag & MZ_ZIP_FLAG_MASK_LOCAL_INFO) - err = mz_zip_entry_write_descriptor(zip->stream, - zip64, 0, compressed_size, 0); - else - err = mz_zip_entry_write_descriptor(zip->stream, - zip64, crc32, compressed_size, uncompressed_size); - } - - /* Write file info to central directory */ - - mz_zip_print("Zip - Entry - Write cd (ucs %" PRId64 " cs %" PRId64 " crc 0x%08" PRIx32 ")\n", - uncompressed_size, compressed_size, crc32); - - zip->file_info.crc = crc32; - zip->file_info.compressed_size = compressed_size; - zip->file_info.uncompressed_size = uncompressed_size; - - if (err == MZ_OK) - err = mz_zip_entry_write_header(zip->cd_mem_stream, 0, &zip->file_info); - - /* Update local header with crc32 and sizes */ - if ((err == MZ_OK) && ((zip->file_info.flag & MZ_ZIP_FLAG_DATA_DESCRIPTOR) == 0) && - ((zip->file_info.flag & MZ_ZIP_FLAG_MASK_LOCAL_INFO) == 0)) { - /* Save the disk number and position we are to seek back after updating local header */ - int64_t end_pos = mz_stream_tell(zip->stream); - mz_stream_get_prop_int64(zip->stream, MZ_STREAM_PROP_DISK_NUMBER, &end_disk_number); - - err = mz_zip_entry_seek_local_header(handle); - - if (err == MZ_OK) { - /* Seek to crc32 and sizes offset in local header */ - err = mz_stream_seek(zip->stream, MZ_ZIP_OFFSET_CRC_SIZES, MZ_SEEK_CUR); - } - - if (err == MZ_OK) - err = mz_zip_entry_write_crc_sizes(zip->stream, zip64, 0, &zip->file_info); - - /* Seek to and update zip64 extension sizes */ - if ((err == MZ_OK) && (zip64)) { - int64_t filename_size = zip->file_info.filename_size; - - if (filename_size == 0) - filename_size = strlen(zip->file_info.filename); - - /* Since we write zip64 extension first we know its offset */ - err = mz_stream_seek(zip->stream, 2 + 2 + filename_size + 4, MZ_SEEK_CUR); - - if (err == MZ_OK) - err = mz_stream_write_uint64(zip->stream, zip->file_info.uncompressed_size); - if (err == MZ_OK) - err = mz_stream_write_uint64(zip->stream, zip->file_info.compressed_size); - } - - mz_stream_set_prop_int64(zip->stream, MZ_STREAM_PROP_DISK_NUMBER, end_disk_number); - mz_stream_seek(zip->stream, end_pos, MZ_SEEK_SET); - } - - zip->number_entry += 1; - - mz_zip_entry_close_int(handle); - - return err; -} - -int32_t mz_zip_entry_seek_local_header(void *handle) { - mz_zip *zip = (mz_zip *)handle; - int64_t disk_size = 0; - uint32_t disk_number = zip->file_info.disk_number; - - if (disk_number == zip->disk_number_with_cd) { - mz_stream_get_prop_int64(zip->stream, MZ_STREAM_PROP_DISK_SIZE, &disk_size); - if ((disk_size == 0) || ((zip->open_mode & MZ_OPEN_MODE_WRITE) == 0)) - disk_number = (uint32_t)-1; - } - - mz_stream_set_prop_int64(zip->stream, MZ_STREAM_PROP_DISK_NUMBER, disk_number); - - mz_zip_print("Zip - Entry - Seek local (disk %" PRId32 " offset %" PRId64 ")\n", - disk_number, zip->file_info.disk_offset); - - /* Guard against seek overflows */ - if ((zip->disk_offset_shift > 0) && - (zip->file_info.disk_offset > (INT64_MAX - zip->disk_offset_shift))) - return MZ_FORMAT_ERROR; - - return mz_stream_seek(zip->stream, zip->file_info.disk_offset + zip->disk_offset_shift, MZ_SEEK_SET); -} - -int32_t mz_zip_entry_close(void *handle) { - return mz_zip_entry_close_raw(handle, UINT64_MAX, 0); -} - -int32_t mz_zip_entry_close_raw(void *handle, int64_t uncompressed_size, uint32_t crc32) { - mz_zip *zip = (mz_zip *)handle; - int32_t err = MZ_OK; - - if (zip == NULL || mz_zip_entry_is_open(handle) != MZ_OK) - return MZ_PARAM_ERROR; - - if (zip->open_mode & MZ_OPEN_MODE_WRITE) - err = mz_zip_entry_write_close(handle, crc32, UINT64_MAX, uncompressed_size); - else - err = mz_zip_entry_read_close(handle, NULL, NULL, NULL); - - return err; -} - -int32_t mz_zip_entry_is_dir(void *handle) { - mz_zip *zip = (mz_zip *)handle; - int32_t filename_length = 0; - - if (zip == NULL) - return MZ_PARAM_ERROR; - if (zip->entry_scanned == 0) - return MZ_PARAM_ERROR; - if (mz_zip_attrib_is_dir(zip->file_info.external_fa, zip->file_info.version_madeby) == MZ_OK) - return MZ_OK; - - filename_length = (int32_t)strlen(zip->file_info.filename); - if (filename_length > 0) { - if ((zip->file_info.filename[filename_length - 1] == '/') || - (zip->file_info.filename[filename_length - 1] == '\\')) - return MZ_OK; - } - return MZ_EXIST_ERROR; -} - -int32_t mz_zip_entry_is_symlink(void *handle) { - mz_zip *zip = (mz_zip *)handle; - - if (zip == NULL) - return MZ_PARAM_ERROR; - if (zip->entry_scanned == 0) - return MZ_PARAM_ERROR; - if (mz_zip_attrib_is_symlink(zip->file_info.external_fa, zip->file_info.version_madeby) != MZ_OK) - return MZ_EXIST_ERROR; - if (zip->file_info.linkname == NULL || *zip->file_info.linkname == 0) - return MZ_EXIST_ERROR; - - return MZ_OK; -} - -int32_t mz_zip_entry_get_info(void *handle, mz_zip_file **file_info) { - mz_zip *zip = (mz_zip *)handle; - - if (zip == NULL) - return MZ_PARAM_ERROR; - - if ((zip->open_mode & MZ_OPEN_MODE_WRITE) == 0) { - if (!zip->entry_scanned) - return MZ_PARAM_ERROR; - } - - *file_info = &zip->file_info; - return MZ_OK; -} - -int32_t mz_zip_entry_get_local_info(void *handle, mz_zip_file **local_file_info) { - mz_zip *zip = (mz_zip *)handle; - if (zip == NULL || mz_zip_entry_is_open(handle) != MZ_OK) - return MZ_PARAM_ERROR; - *local_file_info = &zip->local_file_info; - return MZ_OK; -} - -int32_t mz_zip_entry_set_extrafield(void *handle, const uint8_t *extrafield, uint16_t extrafield_size) { - mz_zip *zip = (mz_zip *)handle; - - if (zip == NULL || mz_zip_entry_is_open(handle) != MZ_OK) - return MZ_PARAM_ERROR; - - zip->file_info.extrafield = extrafield; - zip->file_info.extrafield_size = extrafield_size; - return MZ_OK; -} - -static int32_t mz_zip_goto_next_entry_int(void *handle) { - mz_zip *zip = (mz_zip *)handle; - int32_t err = MZ_OK; - - if (zip == NULL) - return MZ_PARAM_ERROR; - - zip->entry_scanned = 0; - - mz_stream_set_prop_int64(zip->cd_stream, MZ_STREAM_PROP_DISK_NUMBER, -1); - - err = mz_stream_seek(zip->cd_stream, zip->cd_current_pos, MZ_SEEK_SET); - if (err == MZ_OK) - err = mz_zip_entry_read_header(zip->cd_stream, 0, &zip->file_info, zip->file_info_stream); - if (err == MZ_OK) - zip->entry_scanned = 1; - return err; -} - -int64_t mz_zip_get_entry(void *handle) { - mz_zip *zip = (mz_zip *)handle; - - if (zip == NULL) - return MZ_PARAM_ERROR; - - return zip->cd_current_pos; -} - -int32_t mz_zip_goto_entry(void *handle, int64_t cd_pos) { - mz_zip *zip = (mz_zip *)handle; - - if (zip == NULL) - return MZ_PARAM_ERROR; - - if (cd_pos < zip->cd_start_pos || cd_pos > zip->cd_start_pos + zip->cd_size) - return MZ_PARAM_ERROR; - - zip->cd_current_pos = cd_pos; - - return mz_zip_goto_next_entry_int(handle); -} - -int32_t mz_zip_goto_first_entry(void *handle) { - mz_zip *zip = (mz_zip *)handle; - - if (zip == NULL) - return MZ_PARAM_ERROR; - - zip->cd_current_pos = zip->cd_start_pos; - - return mz_zip_goto_next_entry_int(handle); -} - -int32_t mz_zip_goto_next_entry(void *handle) { - mz_zip *zip = (mz_zip *)handle; - - if (zip == NULL) - return MZ_PARAM_ERROR; - - zip->cd_current_pos += (int64_t)MZ_ZIP_SIZE_CD_ITEM + zip->file_info.filename_size + - zip->file_info.extrafield_size + zip->file_info.comment_size; - - return mz_zip_goto_next_entry_int(handle); -} - -int32_t mz_zip_locate_entry(void *handle, const char *filename, uint8_t ignore_case) { - mz_zip *zip = (mz_zip *)handle; - int32_t err = MZ_OK; - int32_t result = 0; - - if (zip == NULL || filename == NULL) - return MZ_PARAM_ERROR; - - /* If we are already on the current entry, no need to search */ - if ((zip->entry_scanned) && (zip->file_info.filename != NULL)) { - result = mz_zip_path_compare(zip->file_info.filename, filename, ignore_case); - if (result == 0) - return MZ_OK; - } - - /* Search all entries starting at the first */ - err = mz_zip_goto_first_entry(handle); - while (err == MZ_OK) { - result = mz_zip_path_compare(zip->file_info.filename, filename, ignore_case); - if (result == 0) - return MZ_OK; - - err = mz_zip_goto_next_entry(handle); - } - - return err; -} - -int32_t mz_zip_locate_first_entry(void *handle, void *userdata, mz_zip_locate_entry_cb cb) { - mz_zip *zip = (mz_zip *)handle; - int32_t err = MZ_OK; - int32_t result = 0; - - /* Search first entry looking for match */ - err = mz_zip_goto_first_entry(handle); - if (err != MZ_OK) - return err; - - result = cb(handle, userdata, &zip->file_info); - if (result == 0) - return MZ_OK; - - return mz_zip_locate_next_entry(handle, userdata, cb); -} - -int32_t mz_zip_locate_next_entry(void *handle, void *userdata, mz_zip_locate_entry_cb cb) { - mz_zip *zip = (mz_zip *)handle; - int32_t err = MZ_OK; - int32_t result = 0; - - /* Search next entries looking for match */ - err = mz_zip_goto_next_entry(handle); - while (err == MZ_OK) { - result = cb(handle, userdata, &zip->file_info); - if (result == 0) - return MZ_OK; - - err = mz_zip_goto_next_entry(handle); - } - - return err; -} - -/***************************************************************************/ - -int32_t mz_zip_attrib_is_dir(uint32_t attrib, int32_t version_madeby) { - uint32_t posix_attrib = 0; - uint8_t system = MZ_HOST_SYSTEM(version_madeby); - int32_t err = MZ_OK; - - err = mz_zip_attrib_convert(system, attrib, MZ_HOST_SYSTEM_UNIX, &posix_attrib); - if (err == MZ_OK) { - if ((posix_attrib & 0170000) == 0040000) /* S_ISDIR */ - return MZ_OK; - } - - return MZ_EXIST_ERROR; -} - -int32_t mz_zip_attrib_is_symlink(uint32_t attrib, int32_t version_madeby) { - uint32_t posix_attrib = 0; - uint8_t system = MZ_HOST_SYSTEM(version_madeby); - int32_t err = MZ_OK; - - err = mz_zip_attrib_convert(system, attrib, MZ_HOST_SYSTEM_UNIX, &posix_attrib); - if (err == MZ_OK) { - if ((posix_attrib & 0170000) == 0120000) /* S_ISLNK */ - return MZ_OK; - } - - return MZ_EXIST_ERROR; -} - -int32_t mz_zip_attrib_convert(uint8_t src_sys, uint32_t src_attrib, uint8_t target_sys, uint32_t *target_attrib) { - if (target_attrib == NULL) - return MZ_PARAM_ERROR; - - *target_attrib = 0; - - if ((src_sys == MZ_HOST_SYSTEM_MSDOS) || (src_sys == MZ_HOST_SYSTEM_WINDOWS_NTFS)) { - if ((target_sys == MZ_HOST_SYSTEM_MSDOS) || (target_sys == MZ_HOST_SYSTEM_WINDOWS_NTFS)) { - *target_attrib = src_attrib; - return MZ_OK; - } - if ((target_sys == MZ_HOST_SYSTEM_UNIX) || (target_sys == MZ_HOST_SYSTEM_OSX_DARWIN) || (target_sys == MZ_HOST_SYSTEM_RISCOS)) - return mz_zip_attrib_win32_to_posix(src_attrib, target_attrib); - } else if ((src_sys == MZ_HOST_SYSTEM_UNIX) || (src_sys == MZ_HOST_SYSTEM_OSX_DARWIN) || (src_sys == MZ_HOST_SYSTEM_RISCOS)) { - if ((target_sys == MZ_HOST_SYSTEM_UNIX) || (target_sys == MZ_HOST_SYSTEM_OSX_DARWIN) || (target_sys == MZ_HOST_SYSTEM_RISCOS)) { - /* If high bytes are set, it contains unix specific attributes */ - if ((src_attrib >> 16) != 0) - src_attrib >>= 16; - - *target_attrib = src_attrib; - return MZ_OK; - } - if ((target_sys == MZ_HOST_SYSTEM_MSDOS) || (target_sys == MZ_HOST_SYSTEM_WINDOWS_NTFS)) - return mz_zip_attrib_posix_to_win32(src_attrib, target_attrib); - } - - return MZ_SUPPORT_ERROR; -} - -int32_t mz_zip_attrib_posix_to_win32(uint32_t posix_attrib, uint32_t *win32_attrib) { - if (win32_attrib == NULL) - return MZ_PARAM_ERROR; - - *win32_attrib = 0; - - /* S_IWUSR | S_IWGRP | S_IWOTH | S_IXUSR | S_IXGRP | S_IXOTH */ - if ((posix_attrib & 0000333) == 0 && (posix_attrib & 0000444) != 0) - *win32_attrib |= 0x01; /* FILE_ATTRIBUTE_READONLY */ - /* S_IFLNK */ - if ((posix_attrib & 0170000) == 0120000) - *win32_attrib |= 0x400; /* FILE_ATTRIBUTE_REPARSE_POINT */ - /* S_IFDIR */ - else if ((posix_attrib & 0170000) == 0040000) - *win32_attrib |= 0x10; /* FILE_ATTRIBUTE_DIRECTORY */ - /* S_IFREG */ - else - *win32_attrib |= 0x80; /* FILE_ATTRIBUTE_NORMAL */ - - return MZ_OK; -} - -int32_t mz_zip_attrib_win32_to_posix(uint32_t win32_attrib, uint32_t *posix_attrib) { - if (posix_attrib == NULL) - return MZ_PARAM_ERROR; - - *posix_attrib = 0000444; /* S_IRUSR | S_IRGRP | S_IROTH */ - /* FILE_ATTRIBUTE_READONLY */ - if ((win32_attrib & 0x01) == 0) - *posix_attrib |= 0000222; /* S_IWUSR | S_IWGRP | S_IWOTH */ - /* FILE_ATTRIBUTE_REPARSE_POINT */ - if ((win32_attrib & 0x400) == 0x400) - *posix_attrib |= 0120000; /* S_IFLNK */ - /* FILE_ATTRIBUTE_DIRECTORY */ - else if ((win32_attrib & 0x10) == 0x10) - *posix_attrib |= 0040111; /* S_IFDIR | S_IXUSR | S_IXGRP | S_IXOTH */ - else - *posix_attrib |= 0100000; /* S_IFREG */ - - return MZ_OK; -} - -/***************************************************************************/ - -int32_t mz_zip_extrafield_find(void *stream, uint16_t type, int32_t max_seek, uint16_t *length) { - int32_t err = MZ_OK; - uint16_t field_type = 0; - uint16_t field_length = 0; - - - if (max_seek < 4) - return MZ_EXIST_ERROR; - - do { - err = mz_stream_read_uint16(stream, &field_type); - if (err == MZ_OK) - err = mz_stream_read_uint16(stream, &field_length); - if (err != MZ_OK) - break; - - if (type == field_type) { - if (length != NULL) - *length = field_length; - return MZ_OK; - } - - max_seek -= field_length - 4; - if (max_seek < 0) - return MZ_EXIST_ERROR; - - err = mz_stream_seek(stream, field_length, MZ_SEEK_CUR); - } while (err == MZ_OK); - - return MZ_EXIST_ERROR; -} - -int32_t mz_zip_extrafield_contains(const uint8_t *extrafield, int32_t extrafield_size, - uint16_t type, uint16_t *length) { - void *file_extra_stream = NULL; - int32_t err = MZ_OK; - - if (extrafield == NULL || extrafield_size == 0) - return MZ_PARAM_ERROR; - - mz_stream_mem_create(&file_extra_stream); - mz_stream_mem_set_buffer(file_extra_stream, (void *)extrafield, extrafield_size); - - err = mz_zip_extrafield_find(file_extra_stream, type, extrafield_size, length); - - mz_stream_mem_delete(&file_extra_stream); - - return err; -} - -int32_t mz_zip_extrafield_read(void *stream, uint16_t *type, uint16_t *length) { - int32_t err = MZ_OK; - if (type == NULL || length == NULL) - return MZ_PARAM_ERROR; - err = mz_stream_read_uint16(stream, type); - if (err == MZ_OK) - err = mz_stream_read_uint16(stream, length); - return err; -} - -int32_t mz_zip_extrafield_write(void *stream, uint16_t type, uint16_t length) { - int32_t err = MZ_OK; - err = mz_stream_write_uint16(stream, type); - if (err == MZ_OK) - err = mz_stream_write_uint16(stream, length); - return err; -} - -/***************************************************************************/ - -static int32_t mz_zip_invalid_date(const struct tm *ptm) { -#define datevalue_in_range(min, max, value) ((min) <= (value) && (value) <= (max)) - return (!datevalue_in_range(0, 127 + 80, ptm->tm_year) || /* 1980-based year, allow 80 extra */ - !datevalue_in_range(0, 11, ptm->tm_mon) || - !datevalue_in_range(1, 31, ptm->tm_mday) || - !datevalue_in_range(0, 23, ptm->tm_hour) || - !datevalue_in_range(0, 59, ptm->tm_min) || - !datevalue_in_range(0, 59, ptm->tm_sec)); -#undef datevalue_in_range -} - -static void mz_zip_dosdate_to_raw_tm(uint64_t dos_date, struct tm *ptm) { - uint64_t date = (uint64_t)(dos_date >> 16); - - ptm->tm_mday = (uint16_t)(date & 0x1f); - ptm->tm_mon = (uint16_t)(((date & 0x1E0) / 0x20) - 1); - ptm->tm_year = (uint16_t)(((date & 0x0FE00) / 0x0200) + 80); - ptm->tm_hour = (uint16_t)((dos_date & 0xF800) / 0x800); - ptm->tm_min = (uint16_t)((dos_date & 0x7E0) / 0x20); - ptm->tm_sec = (uint16_t)(2 * (dos_date & 0x1f)); - ptm->tm_isdst = -1; -} - -int32_t mz_zip_dosdate_to_tm(uint64_t dos_date, struct tm *ptm) { - if (ptm == NULL) - return MZ_PARAM_ERROR; - - mz_zip_dosdate_to_raw_tm(dos_date, ptm); - - if (mz_zip_invalid_date(ptm)) { - /* Invalid date stored, so don't return it */ - memset(ptm, 0, sizeof(struct tm)); - return MZ_FORMAT_ERROR; - } - return MZ_OK; -} - -time_t mz_zip_dosdate_to_time_t(uint64_t dos_date) { - struct tm ptm; - mz_zip_dosdate_to_raw_tm(dos_date, &ptm); - return mktime(&ptm); -} - -int32_t mz_zip_time_t_to_tm(time_t unix_time, struct tm *ptm) { - struct tm ltm; - if (ptm == NULL) - return MZ_PARAM_ERROR; - if (localtime_r(&unix_time, <m) == NULL) { /* Returns a 1900-based year */ - /* Invalid date stored, so don't return it */ - memset(ptm, 0, sizeof(struct tm)); - return MZ_INTERNAL_ERROR; - } - memcpy(ptm, <m, sizeof(struct tm)); - return MZ_OK; -} - -uint32_t mz_zip_time_t_to_dos_date(time_t unix_time) { - struct tm ptm; - mz_zip_time_t_to_tm(unix_time, &ptm); - return mz_zip_tm_to_dosdate((const struct tm *)&ptm); -} - -uint32_t mz_zip_tm_to_dosdate(const struct tm *ptm) { - struct tm fixed_tm; - - /* Years supported: */ - - /* [00, 79] (assumed to be between 2000 and 2079) */ - /* [80, 207] (assumed to be between 1980 and 2107, typical output of old */ - /* software that does 'year-1900' to get a double digit year) */ - /* [1980, 2107] (due to format limitations, only years 1980-2107 can be stored.) */ - - memcpy(&fixed_tm, ptm, sizeof(struct tm)); - if (fixed_tm.tm_year >= 1980) /* range [1980, 2107] */ - fixed_tm.tm_year -= 1980; - else if (fixed_tm.tm_year >= 80) /* range [80, 207] */ - fixed_tm.tm_year -= 80; - else /* range [00, 79] */ - fixed_tm.tm_year += 20; - - if (mz_zip_invalid_date(&fixed_tm)) - return 0; - - return (((uint32_t)fixed_tm.tm_mday + (32 * ((uint32_t)fixed_tm.tm_mon + 1)) + (512 * (uint32_t)fixed_tm.tm_year)) << 16) | - (((uint32_t)fixed_tm.tm_sec / 2) + (32 * (uint32_t)fixed_tm.tm_min) + (2048 * (uint32_t)fixed_tm.tm_hour)); -} - -int32_t mz_zip_ntfs_to_unix_time(uint64_t ntfs_time, time_t *unix_time) { - *unix_time = (time_t)((ntfs_time - 116444736000000000LL) / 10000000); - return MZ_OK; -} - -int32_t mz_zip_unix_to_ntfs_time(time_t unix_time, uint64_t *ntfs_time) { - *ntfs_time = ((uint64_t)unix_time * 10000000) + 116444736000000000LL; - return MZ_OK; -} - -/***************************************************************************/ - -int32_t mz_zip_path_compare(const char *path1, const char *path2, uint8_t ignore_case) { - do { - if ((*path1 == '\\' && *path2 == '/') || - (*path2 == '\\' && *path1 == '/')) { - /* Ignore comparison of path slashes */ - } else if (ignore_case) { - if (tolower(*path1) != tolower(*path2)) - break; - } else if (*path1 != *path2) { - break; - } - - path1 += 1; - path2 += 1; - } while (*path1 != 0 && *path2 != 0); - - if (ignore_case) - return (int32_t)(tolower(*path1) - tolower(*path2)); - - return (int32_t)(*path1 - *path2); -} - -/***************************************************************************/ - -const char* mz_zip_get_compression_method_string(int32_t compression_method) -{ - const char *method = "?"; - switch (compression_method) { - case MZ_COMPRESS_METHOD_STORE: - method = "stored"; - break; - case MZ_COMPRESS_METHOD_DEFLATE: - method = "deflate"; - break; - case MZ_COMPRESS_METHOD_BZIP2: - method = "bzip2"; - break; - case MZ_COMPRESS_METHOD_LZMA: - method = "lzma"; - break; - case MZ_COMPRESS_METHOD_XZ: - method = "xz"; - break; - case MZ_COMPRESS_METHOD_ZSTD: - method = "zstd"; - break; - } - return method; -} - -/***************************************************************************/ diff --git a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_zip.h b/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_zip.h deleted file mode 100644 index e3d1fbd..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_zip.h +++ /dev/null @@ -1,259 +0,0 @@ -/* mz_zip.h -- Zip manipulation - part of the minizip-ng project - - Copyright (C) 2010-2021 Nathan Moinvaziri - https://github.com/zlib-ng/minizip-ng - Copyright (C) 2009-2010 Mathias Svensson - Modifications for Zip64 support - http://result42.com - Copyright (C) 1998-2010 Gilles Vollant - https://www.winimage.com/zLibDll/minizip.html - - This program is distributed under the terms of the same license as zlib. - See the accompanying LICENSE file for the full text of the license. -*/ - -#ifndef MZ_ZIP_H -#define MZ_ZIP_H - -#ifdef __cplusplus -extern "C" { -#endif - -/***************************************************************************/ - -typedef struct mz_zip_file_s { - uint16_t version_madeby; /* version made by */ - uint16_t version_needed; /* version needed to extract */ - uint16_t flag; /* general purpose bit flag */ - uint16_t compression_method; /* compression method */ - time_t modified_date; /* last modified date in unix time */ - time_t accessed_date; /* last accessed date in unix time */ - time_t creation_date; /* creation date in unix time */ - uint32_t crc; /* crc-32 */ - int64_t compressed_size; /* compressed size */ - int64_t uncompressed_size; /* uncompressed size */ - uint16_t filename_size; /* filename length */ - uint16_t extrafield_size; /* extra field length */ - uint16_t comment_size; /* file comment length */ - uint32_t disk_number; /* disk number start */ - int64_t disk_offset; /* relative offset of local header */ - uint16_t internal_fa; /* internal file attributes */ - uint32_t external_fa; /* external file attributes */ - - const char *filename; /* filename utf8 null-terminated string */ - const uint8_t *extrafield; /* extrafield data */ - const char *comment; /* comment utf8 null-terminated string */ - const char *linkname; /* sym-link filename utf8 null-terminated string */ - - uint16_t zip64; /* zip64 extension mode */ - uint16_t aes_version; /* winzip aes extension if not 0 */ - uint8_t aes_encryption_mode; /* winzip aes encryption mode */ - uint16_t pk_verify; /* pkware encryption verifier */ - -} mz_zip_file, mz_zip_entry; - -/***************************************************************************/ - -typedef int32_t (*mz_zip_locate_entry_cb)(void *handle, void *userdata, mz_zip_file *file_info); - -/***************************************************************************/ - -void * mz_zip_create(void **handle); -/* Create zip instance for opening */ - -void mz_zip_delete(void **handle); -/* Delete zip object */ - -int32_t mz_zip_open(void *handle, void *stream, int32_t mode); -/* Create a zip file, no delete file in zip functionality */ - -int32_t mz_zip_close(void *handle); -/* Close the zip file */ - -int32_t mz_zip_get_comment(void *handle, const char **comment); -/* Get a pointer to the global comment */ - -int32_t mz_zip_set_comment(void *handle, const char *comment); -/* Sets the global comment used for writing zip file */ - -int32_t mz_zip_get_version_madeby(void *handle, uint16_t *version_madeby); -/* Get the version made by */ - -int32_t mz_zip_set_version_madeby(void *handle, uint16_t version_madeby); -/* Sets the version made by used for writing zip file */ - -int32_t mz_zip_set_recover(void *handle, uint8_t recover); -/* Sets the ability to recover the central dir by reading local file headers */ - -int32_t mz_zip_set_data_descriptor(void *handle, uint8_t data_descriptor); -/* Sets the use of data descriptor flag when writing zip entries */ - -int32_t mz_zip_get_stream(void *handle, void **stream); -/* Get a pointer to the stream used to open */ - -int32_t mz_zip_set_cd_stream(void *handle, int64_t cd_start_pos, void *cd_stream); -/* Sets the stream to use for reading the central dir */ - -int32_t mz_zip_get_cd_mem_stream(void *handle, void **cd_mem_stream); -/* Get a pointer to the stream used to store the central dir in memory */ - -int32_t mz_zip_set_number_entry(void *handle, uint64_t number_entry); -/* Sets the total number of entries */ - -int32_t mz_zip_get_number_entry(void *handle, uint64_t *number_entry); -/* Get the total number of entries */ - -int32_t mz_zip_set_disk_number_with_cd(void *handle, uint32_t disk_number_with_cd); -/* Sets the disk number containing the central directory record */ - -int32_t mz_zip_get_disk_number_with_cd(void *handle, uint32_t *disk_number_with_cd); -/* Get the disk number containing the central directory record */ - -/***************************************************************************/ - -int32_t mz_zip_entry_is_open(void *handle); -/* Check to see if entry is open for read/write */ - -int32_t mz_zip_entry_read_open(void *handle, uint8_t raw, const char *password); -/* Open for reading the current file in the zip file */ - -int32_t mz_zip_entry_read(void *handle, void *buf, int32_t len); -/* Read bytes from the current file in the zip file */ - -int32_t mz_zip_entry_read_close(void *handle, uint32_t *crc32, int64_t *compressed_size, - int64_t *uncompressed_size); -/* Close the current file for reading and get data descriptor values */ - -int32_t mz_zip_entry_write_open(void *handle, const mz_zip_file *file_info, - int16_t compress_level, uint8_t raw, const char *password); -/* Open for writing the current file in the zip file */ - -int32_t mz_zip_entry_write(void *handle, const void *buf, int32_t len); -/* Write bytes from the current file in the zip file */ - -int32_t mz_zip_entry_write_close(void *handle, uint32_t crc32, int64_t compressed_size, - int64_t uncompressed_size); -/* Close the current file for writing and set data descriptor values */ - -int32_t mz_zip_entry_seek_local_header(void *handle); -/* Seeks to the local header for the entry */ - -int32_t mz_zip_entry_close_raw(void *handle, int64_t uncompressed_size, uint32_t crc32); -/* Close the current file in the zip file where raw is compressed data */ - -int32_t mz_zip_entry_close(void *handle); -/* Close the current file in the zip file */ - -/***************************************************************************/ - -int32_t mz_zip_entry_is_dir(void *handle); -/* Checks to see if the entry is a directory */ - -int32_t mz_zip_entry_is_symlink(void *handle); -/* Checks to see if the entry is a symbolic link */ - -int32_t mz_zip_entry_get_info(void *handle, mz_zip_file **file_info); -/* Get info about the current file, only valid while current entry is open */ - -int32_t mz_zip_entry_get_local_info(void *handle, mz_zip_file **local_file_info); -/* Get local info about the current file, only valid while current entry is being read */ - -int32_t mz_zip_entry_set_extrafield(void *handle, const uint8_t *extrafield, uint16_t extrafield_size); -/* Sets or updates the extra field for the entry to be used before writing cd */ - -int64_t mz_zip_get_entry(void *handle); -/* Return offset of the current entry in the zip file */ - -int32_t mz_zip_goto_entry(void *handle, int64_t cd_pos); -/* Go to specified entry in the zip file */ - -int32_t mz_zip_goto_first_entry(void *handle); -/* Go to the first entry in the zip file */ - -int32_t mz_zip_goto_next_entry(void *handle); -/* Go to the next entry in the zip file or MZ_END_OF_LIST if reaching the end */ - -int32_t mz_zip_locate_entry(void *handle, const char *filename, uint8_t ignore_case); -/* Locate the file with the specified name in the zip file or MZ_END_LIST if not found */ - -int32_t mz_zip_locate_first_entry(void *handle, void *userdata, mz_zip_locate_entry_cb cb); -/* Locate the first matching entry based on a match callback */ - -int32_t mz_zip_locate_next_entry(void *handle, void *userdata, mz_zip_locate_entry_cb cb); -/* Locate the next matching entry based on a match callback */ - -/***************************************************************************/ - -int32_t mz_zip_attrib_is_dir(uint32_t attrib, int32_t version_madeby); -/* Checks to see if the attribute is a directory based on platform */ - -int32_t mz_zip_attrib_is_symlink(uint32_t attrib, int32_t version_madeby); -/* Checks to see if the attribute is a symbolic link based on platform */ - -int32_t mz_zip_attrib_convert(uint8_t src_sys, uint32_t src_attrib, uint8_t target_sys, - uint32_t *target_attrib); -/* Converts file attributes from one host system to another */ - -int32_t mz_zip_attrib_posix_to_win32(uint32_t posix_attrib, uint32_t *win32_attrib); -/* Converts posix file attributes to win32 file attributes */ - -int32_t mz_zip_attrib_win32_to_posix(uint32_t win32_attrib, uint32_t *posix_attrib); -/* Converts win32 file attributes to posix file attributes */ - -/***************************************************************************/ - -int32_t mz_zip_extrafield_find(void *stream, uint16_t type, int32_t max_seek, uint16_t *length); -/* Seeks to extra field by its type and returns its length */ - -int32_t mz_zip_extrafield_contains(const uint8_t *extrafield, int32_t extrafield_size, - uint16_t type, uint16_t *length); -/* Gets whether an extrafield exists and its size */ - -int32_t mz_zip_extrafield_read(void *stream, uint16_t *type, uint16_t *length); -/* Reads an extrafield header from a stream */ - -int32_t mz_zip_extrafield_write(void *stream, uint16_t type, uint16_t length); -/* Writes an extrafield header to a stream */ - -/***************************************************************************/ - -int32_t mz_zip_dosdate_to_tm(uint64_t dos_date, struct tm *ptm); -/* Convert dos date/time format to struct tm */ - -time_t mz_zip_dosdate_to_time_t(uint64_t dos_date); -/* Convert dos date/time format to time_t */ - -int32_t mz_zip_time_t_to_tm(time_t unix_time, struct tm *ptm); -/* Convert time_t to time struct */ - -uint32_t mz_zip_time_t_to_dos_date(time_t unix_time); -/* Convert time_t to dos date/time format */ - -uint32_t mz_zip_tm_to_dosdate(const struct tm *ptm); -/* Convert struct tm to dos date/time format */ - -int32_t mz_zip_ntfs_to_unix_time(uint64_t ntfs_time, time_t *unix_time); -/* Convert ntfs time to unix time */ - -int32_t mz_zip_unix_to_ntfs_time(time_t unix_time, uint64_t *ntfs_time); -/* Convert unix time to ntfs time */ - -/***************************************************************************/ - -int32_t mz_zip_path_compare(const char *path1, const char *path2, uint8_t ignore_case); -/* Compare two paths without regard to slashes */ - -/***************************************************************************/ - -const -char* mz_zip_get_compression_method_string(int32_t compression_method); -/* Gets a string representing the compression method */ - -/***************************************************************************/ - -#ifdef __cplusplus -} -#endif - -#endif /* _ZIP_H */ diff --git a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_zip_rw.c b/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_zip_rw.c deleted file mode 100644 index 464e559..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_zip_rw.c +++ /dev/null @@ -1,1943 +0,0 @@ -/* mz_zip_rw.c -- Zip reader/writer - part of the minizip-ng project - - Copyright (C) 2010-2021 Nathan Moinvaziri - https://github.com/zlib-ng/minizip-ng - - This program is distributed under the terms of the same license as zlib. - See the accompanying LICENSE file for the full text of the license. -*/ - -#include "mz.h" -#include "mz_crypt.h" -#include "mz_os.h" -#include "mz_strm.h" -#include "mz_strm_buf.h" -#include "mz_strm_mem.h" -#include "mz_strm_os.h" -#include "mz_strm_split.h" -#include "mz_strm_wzaes.h" -#include "mz_zip.h" - -#include "mz_zip_rw.h" - -/***************************************************************************/ - -#define MZ_DEFAULT_PROGRESS_INTERVAL (1000u) - -#define MZ_ZIP_CD_FILENAME ("__cdcd__") - -/***************************************************************************/ - -typedef struct mz_zip_reader_s { - void *zip_handle; - void *file_stream; - void *buffered_stream; - void *split_stream; - void *mem_stream; - void *hash; - uint16_t hash_algorithm; - uint16_t hash_digest_size; - mz_zip_file *file_info; - const char *pattern; - uint8_t pattern_ignore_case; - const char *password; - void *overwrite_userdata; - mz_zip_reader_overwrite_cb - overwrite_cb; - void *password_userdata; - mz_zip_reader_password_cb - password_cb; - void *progress_userdata; - mz_zip_reader_progress_cb - progress_cb; - uint32_t progress_cb_interval_ms; - void *entry_userdata; - mz_zip_reader_entry_cb - entry_cb; - uint8_t raw; - uint8_t buffer[UINT16_MAX]; - int32_t encoding; - uint8_t sign_required; - uint8_t cd_verified; - uint8_t cd_zipped; - uint8_t entry_verified; - uint8_t recover; -} mz_zip_reader; - -/***************************************************************************/ - -int32_t mz_zip_reader_is_open(void *handle) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - if (reader == NULL) - return MZ_PARAM_ERROR; - if (reader->zip_handle == NULL) - return MZ_PARAM_ERROR; - return MZ_OK; -} - -int32_t mz_zip_reader_open(void *handle, void *stream) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - int32_t err = MZ_OK; - - reader->cd_verified = 0; - reader->cd_zipped = 0; - - mz_zip_create(&reader->zip_handle); - mz_zip_set_recover(reader->zip_handle, reader->recover); - - err = mz_zip_open(reader->zip_handle, stream, MZ_OPEN_MODE_READ); - - if (err != MZ_OK) { - mz_zip_reader_close(handle); - return err; - } - - mz_zip_reader_unzip_cd(reader); - return MZ_OK; -} - -int32_t mz_zip_reader_open_file(void *handle, const char *path) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - int32_t err = MZ_OK; - - - mz_zip_reader_close(handle); - - mz_stream_os_create(&reader->file_stream); - mz_stream_buffered_create(&reader->buffered_stream); - mz_stream_split_create(&reader->split_stream); - - mz_stream_set_base(reader->buffered_stream, reader->file_stream); - mz_stream_set_base(reader->split_stream, reader->buffered_stream); - - err = mz_stream_open(reader->split_stream, path, MZ_OPEN_MODE_READ); - if (err == MZ_OK) - err = mz_zip_reader_open(handle, reader->split_stream); - return err; -} - -int32_t mz_zip_reader_open_file_in_memory(void *handle, const char *path) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - void *file_stream = NULL; - int64_t file_size = 0; - int32_t err = 0; - - - mz_zip_reader_close(handle); - - mz_stream_os_create(&file_stream); - - err = mz_stream_os_open(file_stream, path, MZ_OPEN_MODE_READ); - - if (err != MZ_OK) { - mz_stream_os_delete(&file_stream); - mz_zip_reader_close(handle); - return err; - } - - mz_stream_os_seek(file_stream, 0, MZ_SEEK_END); - file_size = mz_stream_os_tell(file_stream); - mz_stream_os_seek(file_stream, 0, MZ_SEEK_SET); - - if ((file_size <= 0) || (file_size > UINT32_MAX)) { - /* Memory size is too large or too small */ - - mz_stream_os_close(file_stream); - mz_stream_os_delete(&file_stream); - mz_zip_reader_close(handle); - return MZ_MEM_ERROR; - } - - mz_stream_mem_create(&reader->mem_stream); - mz_stream_mem_set_grow_size(reader->mem_stream, (int32_t)file_size); - mz_stream_mem_open(reader->mem_stream, NULL, MZ_OPEN_MODE_CREATE); - - err = mz_stream_copy(reader->mem_stream, file_stream, (int32_t)file_size); - - mz_stream_os_close(file_stream); - mz_stream_os_delete(&file_stream); - - if (err == MZ_OK) - err = mz_zip_reader_open(handle, reader->mem_stream); - if (err != MZ_OK) - mz_zip_reader_close(handle); - - return err; -} - -int32_t mz_zip_reader_open_buffer(void *handle, uint8_t *buf, int32_t len, uint8_t copy) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - int32_t err = MZ_OK; - - mz_zip_reader_close(handle); - - mz_stream_mem_create(&reader->mem_stream); - - if (copy) { - mz_stream_mem_set_grow_size(reader->mem_stream, len); - mz_stream_mem_open(reader->mem_stream, NULL, MZ_OPEN_MODE_CREATE); - mz_stream_mem_write(reader->mem_stream, buf, len); - mz_stream_mem_seek(reader->mem_stream, 0, MZ_SEEK_SET); - } else { - mz_stream_mem_open(reader->mem_stream, NULL, MZ_OPEN_MODE_READ); - mz_stream_mem_set_buffer(reader->mem_stream, buf, len); - } - - if (err == MZ_OK) - err = mz_zip_reader_open(handle, reader->mem_stream); - - return err; -} - -int32_t mz_zip_reader_close(void *handle) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - int32_t err = MZ_OK; - - if (reader->zip_handle != NULL) { - err = mz_zip_close(reader->zip_handle); - mz_zip_delete(&reader->zip_handle); - } - - if (reader->split_stream != NULL) { - mz_stream_split_close(reader->split_stream); - mz_stream_split_delete(&reader->split_stream); - } - - if (reader->buffered_stream != NULL) - mz_stream_buffered_delete(&reader->buffered_stream); - - if (reader->file_stream != NULL) - mz_stream_os_delete(&reader->file_stream); - - if (reader->mem_stream != NULL) { - mz_stream_mem_close(reader->mem_stream); - mz_stream_mem_delete(&reader->mem_stream); - } - - return err; -} - -/***************************************************************************/ - -int32_t mz_zip_reader_unzip_cd(void *handle) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - mz_zip_file *cd_info = NULL; - void *cd_mem_stream = NULL; - void *new_cd_stream = NULL; - void *file_extra_stream = NULL; - uint64_t number_entry = 0; - int32_t err = MZ_OK; - - - err = mz_zip_reader_goto_first_entry(handle); - if (err != MZ_OK) - return err; - err = mz_zip_reader_entry_get_info(handle, &cd_info); - if (err != MZ_OK) - return err; - - if (strcmp(cd_info->filename, MZ_ZIP_CD_FILENAME) != 0) - return mz_zip_reader_goto_first_entry(handle); - - err = mz_zip_reader_entry_open(handle); - if (err != MZ_OK) - return err; - - mz_stream_mem_create(&file_extra_stream); - mz_stream_mem_set_buffer(file_extra_stream, (void *)cd_info->extrafield, cd_info->extrafield_size); - - err = mz_zip_extrafield_find(file_extra_stream, MZ_ZIP_EXTENSION_CDCD, INT32_MAX, NULL); - if (err == MZ_OK) - err = mz_stream_read_uint64(file_extra_stream, &number_entry); - - mz_stream_mem_delete(&file_extra_stream); - - if (err != MZ_OK) - return err; - - mz_zip_get_cd_mem_stream(reader->zip_handle, &cd_mem_stream); - if (mz_stream_mem_is_open(cd_mem_stream) != MZ_OK) - mz_stream_mem_open(cd_mem_stream, NULL, MZ_OPEN_MODE_CREATE); - - err = mz_stream_seek(cd_mem_stream, 0, MZ_SEEK_SET); - if (err == MZ_OK) - err = mz_stream_copy_stream(cd_mem_stream, NULL, handle, mz_zip_reader_entry_read, - (int32_t)cd_info->uncompressed_size); - - if (err == MZ_OK) { - reader->cd_zipped = 1; - - mz_zip_set_cd_stream(reader->zip_handle, 0, cd_mem_stream); - mz_zip_set_number_entry(reader->zip_handle, number_entry); - - err = mz_zip_reader_goto_first_entry(handle); - } - - reader->cd_verified = reader->entry_verified; - - mz_stream_mem_delete(&new_cd_stream); - return err; -} - -/***************************************************************************/ - -static int32_t mz_zip_reader_locate_entry_cb(void *handle, void *userdata, mz_zip_file *file_info) { - mz_zip_reader *reader = (mz_zip_reader *)userdata; - int32_t result = 0; - MZ_UNUSED(handle); - result = mz_path_compare_wc(file_info->filename, reader->pattern, reader->pattern_ignore_case); - return result; -} - -int32_t mz_zip_reader_goto_first_entry(void *handle) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - int32_t err = MZ_OK; - - if (mz_zip_reader_is_open(handle) != MZ_OK) - return MZ_PARAM_ERROR; - - if (mz_zip_entry_is_open(reader->zip_handle) == MZ_OK) - mz_zip_reader_entry_close(handle); - - if (reader->pattern == NULL) - err = mz_zip_goto_first_entry(reader->zip_handle); - else - err = mz_zip_locate_first_entry(reader->zip_handle, reader, mz_zip_reader_locate_entry_cb); - - reader->file_info = NULL; - if (err == MZ_OK) - err = mz_zip_entry_get_info(reader->zip_handle, &reader->file_info); - - return err; -} - -int32_t mz_zip_reader_goto_next_entry(void *handle) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - int32_t err = MZ_OK; - - if (mz_zip_reader_is_open(handle) != MZ_OK) - return MZ_PARAM_ERROR; - - if (mz_zip_entry_is_open(reader->zip_handle) == MZ_OK) - mz_zip_reader_entry_close(handle); - - if (reader->pattern == NULL) - err = mz_zip_goto_next_entry(reader->zip_handle); - else - err = mz_zip_locate_next_entry(reader->zip_handle, reader, mz_zip_reader_locate_entry_cb); - - reader->file_info = NULL; - if (err == MZ_OK) - err = mz_zip_entry_get_info(reader->zip_handle, &reader->file_info); - - return err; -} - -int32_t mz_zip_reader_locate_entry(void *handle, const char *filename, uint8_t ignore_case) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - int32_t err = MZ_OK; - - if (mz_zip_entry_is_open(reader->zip_handle) == MZ_OK) - mz_zip_reader_entry_close(handle); - - err = mz_zip_locate_entry(reader->zip_handle, filename, ignore_case); - - reader->file_info = NULL; - if (err == MZ_OK) - err = mz_zip_entry_get_info(reader->zip_handle, &reader->file_info); - - return err; -} - -/***************************************************************************/ - -int32_t mz_zip_reader_entry_open(void *handle) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - int32_t err = MZ_OK; - const char *password = NULL; - char password_buf[120]; - - - reader->entry_verified = 0; - - if (mz_zip_reader_is_open(reader) != MZ_OK) - return MZ_PARAM_ERROR; - if (reader->file_info == NULL) - return MZ_PARAM_ERROR; - - /* If the entry isn't open for reading, open it */ - if (mz_zip_entry_is_open(reader->zip_handle) == MZ_OK) - return MZ_OK; - - password = reader->password; - - /* Check if we need a password and ask for it if we need to */ - if ((reader->file_info->flag & MZ_ZIP_FLAG_ENCRYPTED) && (password == NULL) && - (reader->password_cb != NULL)) { - reader->password_cb(handle, reader->password_userdata, reader->file_info, - password_buf, sizeof(password_buf)); - - password = password_buf; - } - - err = mz_zip_entry_read_open(reader->zip_handle, reader->raw, password); -#ifndef MZ_ZIP_NO_CRYPTO - if (err != MZ_OK) - return err; - - if (mz_zip_reader_entry_get_first_hash(handle, &reader->hash_algorithm, &reader->hash_digest_size) == MZ_OK) { - mz_crypt_sha_create(&reader->hash); - if (reader->hash_algorithm == MZ_HASH_SHA1) - mz_crypt_sha_set_algorithm(reader->hash, MZ_HASH_SHA1); - else if (reader->hash_algorithm == MZ_HASH_SHA256) - mz_crypt_sha_set_algorithm(reader->hash, MZ_HASH_SHA256); - else - err = MZ_SUPPORT_ERROR; - - if (err == MZ_OK) - mz_crypt_sha_begin(reader->hash); -#ifdef MZ_ZIP_SIGNING - if (err == MZ_OK) { - if (mz_zip_reader_entry_has_sign(handle) == MZ_OK) { - err = mz_zip_reader_entry_sign_verify(handle); - if (err == MZ_OK) - reader->entry_verified = 1; - } else if (reader->sign_required && !reader->cd_verified) - err = MZ_SIGN_ERROR; - } -#endif - } else if (reader->sign_required && !reader->cd_verified) - err = MZ_SIGN_ERROR; -#endif - - return err; -} - -int32_t mz_zip_reader_entry_close(void *handle) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - int32_t err = MZ_OK; - int32_t err_close = MZ_OK; -#ifndef MZ_ZIP_NO_CRYPTO - int32_t err_hash = MZ_OK; - uint8_t computed_hash[MZ_HASH_MAX_SIZE]; - uint8_t expected_hash[MZ_HASH_MAX_SIZE]; - - if (reader->hash != NULL) { - mz_crypt_sha_end(reader->hash, computed_hash, sizeof(computed_hash)); - mz_crypt_sha_delete(&reader->hash); - - err_hash = mz_zip_reader_entry_get_hash(handle, reader->hash_algorithm, expected_hash, - reader->hash_digest_size); - - if (err_hash == MZ_OK) { - /* Verify expected hash against computed hash */ - if (memcmp(computed_hash, expected_hash, reader->hash_digest_size) != 0) - err = MZ_CRC_ERROR; - } - } -#endif - - err_close = mz_zip_entry_close(reader->zip_handle); - if (err == MZ_OK) - err = err_close; - return err; -} - -int32_t mz_zip_reader_entry_read(void *handle, void *buf, int32_t len) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - int32_t read = 0; - read = mz_zip_entry_read(reader->zip_handle, buf, len); -#ifndef MZ_ZIP_NO_CRYPTO - if ((read > 0) && (reader->hash != NULL)) - mz_crypt_sha_update(reader->hash, buf, read); -#endif - return read; -} - -int32_t mz_zip_reader_entry_has_sign(void *handle) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - - if (reader == NULL || mz_zip_entry_is_open(reader->zip_handle) != MZ_OK) - return MZ_PARAM_ERROR; - - return mz_zip_extrafield_contains(reader->file_info->extrafield, - reader->file_info->extrafield_size, MZ_ZIP_EXTENSION_SIGN, NULL); -} - -#if !defined(MZ_ZIP_NO_CRYPTO) && defined(MZ_ZIP_SIGNING) -int32_t mz_zip_reader_entry_sign_verify(void *handle) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - void *file_extra_stream = NULL; - int32_t err = MZ_OK; - uint8_t *signature = NULL; - uint16_t signature_size = 0; - uint8_t hash[MZ_HASH_MAX_SIZE]; - - if (reader == NULL || mz_zip_entry_is_open(reader->zip_handle) != MZ_OK) - return MZ_PARAM_ERROR; - - mz_stream_mem_create(&file_extra_stream); - mz_stream_mem_set_buffer(file_extra_stream, (void *)reader->file_info->extrafield, - reader->file_info->extrafield_size); - - err = mz_zip_extrafield_find(file_extra_stream, MZ_ZIP_EXTENSION_SIGN, INT32_MAX, &signature_size); - if ((err == MZ_OK) && (signature_size > 0)) { - signature = (uint8_t *)MZ_ALLOC(signature_size); - if (mz_stream_read(file_extra_stream, signature, signature_size) != signature_size) - err = MZ_READ_ERROR; - } - - mz_stream_mem_delete(&file_extra_stream); - - if (err == MZ_OK) { - /* Get most secure hash to verify signature against */ - err = mz_zip_reader_entry_get_hash(handle, reader->hash_algorithm, hash, reader->hash_digest_size); - } - - if (err == MZ_OK) { - /* Verify the pkcs signature */ - err = mz_crypt_sign_verify(hash, reader->hash_digest_size, signature, signature_size); - } - - if (signature != NULL) - MZ_FREE(signature); - - return err; -} -#endif - -int32_t mz_zip_reader_entry_get_hash(void *handle, uint16_t algorithm, uint8_t *digest, int32_t digest_size) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - void *file_extra_stream = NULL; - int32_t err = MZ_OK; - int32_t return_err = MZ_EXIST_ERROR; - uint16_t cur_algorithm = 0; - uint16_t cur_digest_size = 0; - - mz_stream_mem_create(&file_extra_stream); - mz_stream_mem_set_buffer(file_extra_stream, (void *)reader->file_info->extrafield, - reader->file_info->extrafield_size); - - do { - err = mz_zip_extrafield_find(file_extra_stream, MZ_ZIP_EXTENSION_HASH, INT32_MAX, NULL); - if (err != MZ_OK) - break; - - err = mz_stream_read_uint16(file_extra_stream, &cur_algorithm); - if (err == MZ_OK) - err = mz_stream_read_uint16(file_extra_stream, &cur_digest_size); - if ((err == MZ_OK) && (cur_algorithm == algorithm) && (cur_digest_size <= digest_size) && - (cur_digest_size <= MZ_HASH_MAX_SIZE)) { - /* Read hash digest */ - if (mz_stream_read(file_extra_stream, digest, digest_size) == cur_digest_size) - return_err = MZ_OK; - break; - } else { - err = mz_stream_seek(file_extra_stream, cur_digest_size, MZ_SEEK_CUR); - } - } while (err == MZ_OK); - - mz_stream_mem_delete(&file_extra_stream); - - return return_err; -} - -int32_t mz_zip_reader_entry_get_first_hash(void *handle, uint16_t *algorithm, uint16_t *digest_size) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - void *file_extra_stream = NULL; - int32_t err = MZ_OK; - uint16_t cur_algorithm = 0; - uint16_t cur_digest_size = 0; - - if (reader == NULL || algorithm == NULL) - return MZ_PARAM_ERROR; - - mz_stream_mem_create(&file_extra_stream); - mz_stream_mem_set_buffer(file_extra_stream, (void *)reader->file_info->extrafield, - reader->file_info->extrafield_size); - - err = mz_zip_extrafield_find(file_extra_stream, MZ_ZIP_EXTENSION_HASH, INT32_MAX, NULL); - if (err == MZ_OK) - err = mz_stream_read_uint16(file_extra_stream, &cur_algorithm); - if (err == MZ_OK) - err = mz_stream_read_uint16(file_extra_stream, &cur_digest_size); - - if (algorithm != NULL) - *algorithm = cur_algorithm; - if (digest_size != NULL) - *digest_size = cur_digest_size; - - mz_stream_mem_delete(&file_extra_stream); - - return err; -} - -int32_t mz_zip_reader_entry_get_info(void *handle, mz_zip_file **file_info) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - int32_t err = MZ_OK; - if (file_info == NULL || mz_zip_reader_is_open(handle) != MZ_OK) - return MZ_PARAM_ERROR; - *file_info = reader->file_info; - if (*file_info == NULL) - return MZ_EXIST_ERROR; - return err; -} - -int32_t mz_zip_reader_entry_is_dir(void *handle) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - if (mz_zip_reader_is_open(handle) != MZ_OK) - return MZ_PARAM_ERROR; - return mz_zip_entry_is_dir(reader->zip_handle); -} - -int32_t mz_zip_reader_entry_save_process(void *handle, void *stream, mz_stream_write_cb write_cb) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - int32_t err = MZ_OK; - int32_t read = 0; - int32_t written = 0; - - - if (mz_zip_reader_is_open(reader) != MZ_OK) - return MZ_PARAM_ERROR; - if (reader->file_info == NULL) - return MZ_PARAM_ERROR; - if (write_cb == NULL) - return MZ_PARAM_ERROR; - - /* If the entry isn't open for reading, open it */ - if (mz_zip_entry_is_open(reader->zip_handle) != MZ_OK) - err = mz_zip_reader_entry_open(handle); - - if (err != MZ_OK) - return err; - - /* Unzip entry in zip file */ - read = mz_zip_reader_entry_read(handle, reader->buffer, sizeof(reader->buffer)); - - if (read == 0) { - /* If we are done close the entry */ - err = mz_zip_reader_entry_close(handle); - if (err != MZ_OK) - return err; - - return MZ_END_OF_STREAM; - } - - if (read > 0) { - /* Write the data to the specified stream */ - written = write_cb(stream, reader->buffer, read); - if (written != read) - return MZ_WRITE_ERROR; - } - - return read; -} - -int32_t mz_zip_reader_entry_save(void *handle, void *stream, mz_stream_write_cb write_cb) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - uint64_t current_time = 0; - uint64_t update_time = 0; - int64_t current_pos = 0; - int64_t update_pos = 0; - int32_t err = MZ_OK; - int32_t written = 0; - - if (mz_zip_reader_is_open(reader) != MZ_OK) - return MZ_PARAM_ERROR; - if (reader->file_info == NULL) - return MZ_PARAM_ERROR; - - /* Update the progress at the beginning */ - if (reader->progress_cb != NULL) - reader->progress_cb(handle, reader->progress_userdata, reader->file_info, current_pos); - - /* Write data to stream until done */ - while (err == MZ_OK) { - written = mz_zip_reader_entry_save_process(handle, stream, write_cb); - if (written == MZ_END_OF_STREAM) - break; - if (written > 0) - current_pos += written; - if (written < 0) - err = written; - - /* Update progress if enough time have passed */ - current_time = mz_os_ms_time(); - if ((current_time - update_time) > reader->progress_cb_interval_ms) { - if (reader->progress_cb != NULL) - reader->progress_cb(handle, reader->progress_userdata, reader->file_info, current_pos); - - update_pos = current_pos; - update_time = current_time; - } - } - - /* Update the progress at the end */ - if (reader->progress_cb != NULL && update_pos != current_pos) - reader->progress_cb(handle, reader->progress_userdata, reader->file_info, current_pos); - - return err; -} - -int32_t mz_zip_reader_entry_save_file(void *handle, const char *path) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - void *stream = NULL; - uint32_t target_attrib = 0; - int32_t err_attrib = 0; - int32_t err = MZ_OK; - int32_t err_cb = MZ_OK; - char pathwfs[512]; - char directory[512]; - - if (mz_zip_reader_is_open(reader) != MZ_OK) - return MZ_PARAM_ERROR; - if (reader->file_info == NULL || path == NULL) - return MZ_PARAM_ERROR; - - /* Convert to forward slashes for unix which doesn't like backslashes */ - strncpy(pathwfs, path, sizeof(pathwfs) - 1); - pathwfs[sizeof(pathwfs) - 1] = 0; - mz_path_convert_slashes(pathwfs, MZ_PATH_SLASH_UNIX); - - if (reader->entry_cb != NULL) - reader->entry_cb(handle, reader->entry_userdata, reader->file_info, pathwfs); - - strncpy(directory, pathwfs, sizeof(directory) - 1); - directory[sizeof(directory) - 1] = 0; - mz_path_remove_filename(directory); - - /* If it is a directory entry then create a directory instead of writing file */ - if ((mz_zip_entry_is_dir(reader->zip_handle) == MZ_OK) && - (mz_zip_entry_is_symlink(reader->zip_handle) != MZ_OK)) { - err = mz_dir_make(directory); - return err; - } - - /* Check if file exists and ask if we want to overwrite */ - if ((mz_os_file_exists(pathwfs) == MZ_OK) && (reader->overwrite_cb != NULL)) { - err_cb = reader->overwrite_cb(handle, reader->overwrite_userdata, reader->file_info, pathwfs); - if (err_cb != MZ_OK) - return err; - /* We want to overwrite the file so we delete the existing one */ - mz_os_unlink(pathwfs); - } - - /* If symbolic link then properly construct destination path and link path */ - if (mz_zip_entry_is_symlink(reader->zip_handle) == MZ_OK) { - mz_path_remove_slash(pathwfs); - mz_path_remove_filename(directory); - } - - /* Create the output directory if it doesn't already exist */ - if (mz_os_is_dir(directory) != MZ_OK) { - err = mz_dir_make(directory); - if (err != MZ_OK) - return err; - } - - /* If it is a symbolic link then create symbolic link instead of writing file */ - if (mz_zip_entry_is_symlink(reader->zip_handle) == MZ_OK) { - mz_os_make_symlink(pathwfs, reader->file_info->linkname); - /* Don't check return value because we aren't validating symbolic link target */ - return err; - } - - /* Create the file on disk so we can save to it */ - mz_stream_os_create(&stream); - err = mz_stream_os_open(stream, pathwfs, MZ_OPEN_MODE_CREATE); - - if (err == MZ_OK) - err = mz_zip_reader_entry_save(handle, stream, mz_stream_write); - - mz_stream_close(stream); - mz_stream_delete(&stream); - - if (err == MZ_OK) { - /* Set the time of the file that has been created */ - mz_os_set_file_date(pathwfs, reader->file_info->modified_date, - reader->file_info->accessed_date, reader->file_info->creation_date); - } - - if (err == MZ_OK) { - /* Set file attributes for the correct system */ - err_attrib = mz_zip_attrib_convert(MZ_HOST_SYSTEM(reader->file_info->version_madeby), - reader->file_info->external_fa, MZ_VERSION_MADEBY_HOST_SYSTEM, &target_attrib); - - if (err_attrib == MZ_OK) - mz_os_set_file_attribs(pathwfs, target_attrib); - } - - return err; -} - -int32_t mz_zip_reader_entry_save_buffer(void *handle, void *buf, int32_t len) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - void *mem_stream = NULL; - int32_t err = MZ_OK; - - if (mz_zip_reader_is_open(reader) != MZ_OK) - return MZ_PARAM_ERROR; - if (reader->file_info == NULL) - return MZ_PARAM_ERROR; - if (reader->file_info->uncompressed_size > INT32_MAX) - return MZ_PARAM_ERROR; - if (len != (int32_t)reader->file_info->uncompressed_size) - return MZ_BUF_ERROR; - - /* Create a memory stream backed by our buffer and save to it */ - mz_stream_mem_create(&mem_stream); - mz_stream_mem_set_buffer(mem_stream, buf, len); - - err = mz_stream_mem_open(mem_stream, NULL, MZ_OPEN_MODE_READ); - if (err == MZ_OK) - err = mz_zip_reader_entry_save(handle, mem_stream, mz_stream_mem_write); - - mz_stream_mem_delete(&mem_stream); - return err; -} - -int32_t mz_zip_reader_entry_save_buffer_length(void *handle) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - - if (mz_zip_reader_is_open(reader) != MZ_OK) - return MZ_PARAM_ERROR; - if (reader->file_info == NULL) - return MZ_PARAM_ERROR; - if (reader->file_info->uncompressed_size > INT32_MAX) - return MZ_PARAM_ERROR; - - /* Get the maximum size required for the save buffer */ - return (int32_t)reader->file_info->uncompressed_size; -} - -/***************************************************************************/ - -int32_t mz_zip_reader_save_all(void *handle, const char *destination_dir) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - int32_t err = MZ_OK; - uint8_t *utf8_string = NULL; - char path[512]; - char utf8_name[256]; - char resolved_name[256]; - - err = mz_zip_reader_goto_first_entry(handle); - - if (err == MZ_END_OF_LIST) - return err; - - while (err == MZ_OK) { - /* Construct output path */ - path[0] = 0; - - strncpy(utf8_name, reader->file_info->filename, sizeof(utf8_name) - 1); - utf8_name[sizeof(utf8_name) - 1] = 0; - - if ((reader->encoding > 0) && (reader->file_info->flag & MZ_ZIP_FLAG_UTF8) == 0) { - utf8_string = mz_os_utf8_string_create(reader->file_info->filename, reader->encoding); - if (utf8_string) { - strncpy(utf8_name, (char *)utf8_string, sizeof(utf8_name) - 1); - utf8_name[sizeof(utf8_name) - 1] = 0; - mz_os_utf8_string_delete(&utf8_string); - } - } - - err = mz_path_resolve(utf8_name, resolved_name, sizeof(resolved_name)); - if (err != MZ_OK) - break; - - if (destination_dir != NULL) - mz_path_combine(path, destination_dir, sizeof(path)); - - mz_path_combine(path, resolved_name, sizeof(path)); - - /* Save file to disk */ - err = mz_zip_reader_entry_save_file(handle, path); - - if (err == MZ_OK) - err = mz_zip_reader_goto_next_entry(handle); - } - - if (err == MZ_END_OF_LIST) - return MZ_OK; - - return err; -} - -/***************************************************************************/ - -void mz_zip_reader_set_pattern(void *handle, const char *pattern, uint8_t ignore_case) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - reader->pattern = pattern; - reader->pattern_ignore_case = ignore_case; -} - -void mz_zip_reader_set_password(void *handle, const char *password) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - reader->password = password; -} - -void mz_zip_reader_set_raw(void *handle, uint8_t raw) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - reader->raw = raw; -} - -int32_t mz_zip_reader_get_raw(void *handle, uint8_t *raw) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - if (raw == NULL) - return MZ_PARAM_ERROR; - *raw = reader->raw; - return MZ_OK; -} - -int32_t mz_zip_reader_get_zip_cd(void *handle, uint8_t *zip_cd) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - if (zip_cd == NULL) - return MZ_PARAM_ERROR; - *zip_cd = reader->cd_zipped; - return MZ_OK; -} - -int32_t mz_zip_reader_get_comment(void *handle, const char **comment) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - if (mz_zip_reader_is_open(reader) != MZ_OK) - return MZ_PARAM_ERROR; - if (comment == NULL) - return MZ_PARAM_ERROR; - return mz_zip_get_comment(reader->zip_handle, comment); -} - -int32_t mz_zip_reader_set_recover(void *handle, uint8_t recover) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - if (reader == NULL) - return MZ_PARAM_ERROR; - reader->recover = recover; - return MZ_OK; -} - -void mz_zip_reader_set_encoding(void *handle, int32_t encoding) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - reader->encoding = encoding; -} - -void mz_zip_reader_set_sign_required(void *handle, uint8_t sign_required) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - reader->sign_required = sign_required; -} - -void mz_zip_reader_set_overwrite_cb(void *handle, void *userdata, mz_zip_reader_overwrite_cb cb) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - reader->overwrite_cb = cb; - reader->overwrite_userdata = userdata; -} - -void mz_zip_reader_set_password_cb(void *handle, void *userdata, mz_zip_reader_password_cb cb) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - reader->password_cb = cb; - reader->password_userdata = userdata; -} - -void mz_zip_reader_set_progress_cb(void *handle, void *userdata, mz_zip_reader_progress_cb cb) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - reader->progress_cb = cb; - reader->progress_userdata = userdata; -} - -void mz_zip_reader_set_progress_interval(void *handle, uint32_t milliseconds) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - reader->progress_cb_interval_ms = milliseconds; -} - -void mz_zip_reader_set_entry_cb(void *handle, void *userdata, mz_zip_reader_entry_cb cb) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - reader->entry_cb = cb; - reader->entry_userdata = userdata; -} - -int32_t mz_zip_reader_get_zip_handle(void *handle, void **zip_handle) { - mz_zip_reader *reader = (mz_zip_reader *)handle; - if (zip_handle == NULL) - return MZ_PARAM_ERROR; - *zip_handle = reader->zip_handle; - if (*zip_handle == NULL) - return MZ_EXIST_ERROR; - return MZ_OK; -} - -/***************************************************************************/ - -void *mz_zip_reader_create(void **handle) { - mz_zip_reader *reader = NULL; - - reader = (mz_zip_reader *)MZ_ALLOC(sizeof(mz_zip_reader)); - if (reader != NULL) { - memset(reader, 0, sizeof(mz_zip_reader)); - reader->recover = 1; - reader->progress_cb_interval_ms = MZ_DEFAULT_PROGRESS_INTERVAL; - } - if (handle != NULL) - *handle = reader; - - return reader; -} - -void mz_zip_reader_delete(void **handle) { - mz_zip_reader *reader = NULL; - if (handle == NULL) - return; - reader = (mz_zip_reader *)*handle; - if (reader != NULL) { - mz_zip_reader_close(reader); - MZ_FREE(reader); - } - *handle = NULL; -} - -/***************************************************************************/ - -typedef struct mz_zip_writer_s { - void *zip_handle; - void *file_stream; - void *buffered_stream; - void *split_stream; - void *sha256; - void *mem_stream; - void *file_extra_stream; - mz_zip_file file_info; - void *overwrite_userdata; - mz_zip_writer_overwrite_cb - overwrite_cb; - void *password_userdata; - mz_zip_writer_password_cb - password_cb; - void *progress_userdata; - mz_zip_writer_progress_cb - progress_cb; - uint32_t progress_cb_interval_ms; - void *entry_userdata; - mz_zip_writer_entry_cb - entry_cb; - const char *password; - const char *comment; - uint8_t *cert_data; - int32_t cert_data_size; - const char *cert_pwd; - uint16_t compress_method; - int16_t compress_level; - uint8_t follow_links; - uint8_t store_links; - uint8_t zip_cd; - uint8_t aes; - uint8_t raw; - uint8_t buffer[UINT16_MAX]; -} mz_zip_writer; - -/***************************************************************************/ - -int32_t mz_zip_writer_zip_cd(void *handle) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - mz_zip_file cd_file; - uint64_t number_entry = 0; - int64_t cd_mem_length = 0; - int32_t err = MZ_OK; - int32_t extrafield_size = 0; - void *file_extra_stream = NULL; - void *cd_mem_stream = NULL; - - - memset(&cd_file, 0, sizeof(cd_file)); - - mz_zip_get_number_entry(writer->zip_handle, &number_entry); - mz_zip_get_cd_mem_stream(writer->zip_handle, &cd_mem_stream); - mz_stream_seek(cd_mem_stream, 0, MZ_SEEK_END); - cd_mem_length = (uint32_t)mz_stream_tell(cd_mem_stream); - mz_stream_seek(cd_mem_stream, 0, MZ_SEEK_SET); - - cd_file.filename = MZ_ZIP_CD_FILENAME; - cd_file.modified_date = time(NULL); - cd_file.version_madeby = MZ_VERSION_MADEBY; - cd_file.compression_method = writer->compress_method; - cd_file.uncompressed_size = (int32_t)cd_mem_length; - cd_file.flag = MZ_ZIP_FLAG_UTF8; - - if (writer->password != NULL) - cd_file.flag |= MZ_ZIP_FLAG_ENCRYPTED; - - mz_stream_mem_create(&file_extra_stream); - mz_stream_mem_open(file_extra_stream, NULL, MZ_OPEN_MODE_CREATE); - - mz_zip_extrafield_write(file_extra_stream, MZ_ZIP_EXTENSION_CDCD, 8); - - mz_stream_write_uint64(file_extra_stream, number_entry); - - mz_stream_mem_get_buffer(file_extra_stream, (const void **)&cd_file.extrafield); - mz_stream_mem_get_buffer_length(file_extra_stream, &extrafield_size); - cd_file.extrafield_size = (uint16_t)extrafield_size; - - err = mz_zip_writer_entry_open(handle, &cd_file); - if (err == MZ_OK) { - mz_stream_copy_stream(handle, mz_zip_writer_entry_write, cd_mem_stream, - NULL, (int32_t)cd_mem_length); - - mz_stream_seek(cd_mem_stream, 0, MZ_SEEK_SET); - mz_stream_mem_set_buffer_limit(cd_mem_stream, 0); - - err = mz_zip_writer_entry_close(writer); - } - - mz_stream_mem_delete(&file_extra_stream); - - return err; -} - -/***************************************************************************/ - -int32_t mz_zip_writer_is_open(void *handle) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - if (writer == NULL) - return MZ_PARAM_ERROR; - if (writer->zip_handle == NULL) - return MZ_PARAM_ERROR; - return MZ_OK; -} - -static int32_t mz_zip_writer_open_int(void *handle, void *stream, int32_t mode) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - int32_t err = MZ_OK; - - mz_zip_create(&writer->zip_handle); - err = mz_zip_open(writer->zip_handle, stream, mode); - - if (err != MZ_OK) { - mz_zip_writer_close(handle); - return err; - } - - return MZ_OK; -} - -int32_t mz_zip_writer_open(void *handle, void *stream, uint8_t append) { - int32_t mode = MZ_OPEN_MODE_WRITE; - - if (append) { - mode |= MZ_OPEN_MODE_APPEND; - } else { - mode |= MZ_OPEN_MODE_CREATE; - } - - return mz_zip_writer_open_int(handle, stream, mode); -} - -int32_t mz_zip_writer_open_file(void *handle, const char *path, int64_t disk_size, uint8_t append) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - int32_t mode = MZ_OPEN_MODE_READWRITE; - int32_t err = MZ_OK; - int32_t err_cb = 0; - char directory[320]; - - mz_zip_writer_close(handle); - - if (mz_os_file_exists(path) != MZ_OK) { - /* If the file doesn't exist, we don't append file */ - mode |= MZ_OPEN_MODE_CREATE; - - /* Create destination directory if it doesn't already exist */ - if (strchr(path, '/') != NULL || strrchr(path, '\\') != NULL) { - strncpy(directory, path, sizeof(directory)); - mz_path_remove_filename(directory); - if (mz_os_file_exists(directory) != MZ_OK) - mz_dir_make(directory); - } - } else if (append) { - mode |= MZ_OPEN_MODE_APPEND; - } else { - if (writer->overwrite_cb != NULL) - err_cb = writer->overwrite_cb(handle, writer->overwrite_userdata, path); - - if (err_cb == MZ_INTERNAL_ERROR) - return err; - - if (err_cb == MZ_OK) - mode |= MZ_OPEN_MODE_CREATE; - else - mode |= MZ_OPEN_MODE_APPEND; - } - - mz_stream_os_create(&writer->file_stream); - mz_stream_buffered_create(&writer->buffered_stream); - mz_stream_split_create(&writer->split_stream); - - mz_stream_set_base(writer->buffered_stream, writer->file_stream); - mz_stream_set_base(writer->split_stream, writer->buffered_stream); - - mz_stream_split_set_prop_int64(writer->split_stream, MZ_STREAM_PROP_DISK_SIZE, disk_size); - - err = mz_stream_open(writer->split_stream, path, mode); - if (err == MZ_OK) - err = mz_zip_writer_open_int(handle, writer->split_stream, mode); - - return err; -} - -int32_t mz_zip_writer_open_file_in_memory(void *handle, const char *path) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - void *file_stream = NULL; - int64_t file_size = 0; - int32_t err = 0; - - - mz_zip_writer_close(handle); - - mz_stream_os_create(&file_stream); - - err = mz_stream_os_open(file_stream, path, MZ_OPEN_MODE_READ); - - if (err != MZ_OK) { - mz_stream_os_delete(&file_stream); - mz_zip_writer_close(handle); - return err; - } - - mz_stream_os_seek(file_stream, 0, MZ_SEEK_END); - file_size = mz_stream_os_tell(file_stream); - mz_stream_os_seek(file_stream, 0, MZ_SEEK_SET); - - if ((file_size <= 0) || (file_size > UINT32_MAX)) { - /* Memory size is too large or too small */ - - mz_stream_os_close(file_stream); - mz_stream_os_delete(&file_stream); - mz_zip_writer_close(handle); - return MZ_MEM_ERROR; - } - - mz_stream_mem_create(&writer->mem_stream); - mz_stream_mem_set_grow_size(writer->mem_stream, (int32_t)file_size); - mz_stream_mem_open(writer->mem_stream, NULL, MZ_OPEN_MODE_CREATE); - - err = mz_stream_copy(writer->mem_stream, file_stream, (int32_t)file_size); - - mz_stream_os_close(file_stream); - mz_stream_os_delete(&file_stream); - - if (err == MZ_OK) - err = mz_zip_writer_open(handle, writer->mem_stream, 1); - if (err != MZ_OK) - mz_zip_writer_close(handle); - - return err; -} - -int32_t mz_zip_writer_close(void *handle) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - int32_t err = MZ_OK; - - - if (writer->zip_handle != NULL) { - mz_zip_set_version_madeby(writer->zip_handle, MZ_VERSION_MADEBY); - if (writer->comment) - mz_zip_set_comment(writer->zip_handle, writer->comment); - if (writer->zip_cd) - mz_zip_writer_zip_cd(writer); - - err = mz_zip_close(writer->zip_handle); - mz_zip_delete(&writer->zip_handle); - } - - if (writer->split_stream != NULL) { - mz_stream_split_close(writer->split_stream); - mz_stream_split_delete(&writer->split_stream); - } - - if (writer->buffered_stream != NULL) - mz_stream_buffered_delete(&writer->buffered_stream); - - if (writer->file_stream != NULL) - mz_stream_os_delete(&writer->file_stream); - - if (writer->mem_stream != NULL) { - mz_stream_mem_close(writer->mem_stream); - mz_stream_mem_delete(&writer->mem_stream); - } - - return err; -} - -/***************************************************************************/ - -int32_t mz_zip_writer_entry_open(void *handle, mz_zip_file *file_info) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - int32_t err = MZ_OK; - const char *password = NULL; - char password_buf[120]; - - /* Copy file info to access data upon close */ - memcpy(&writer->file_info, file_info, sizeof(mz_zip_file)); - - if (writer->entry_cb != NULL) - writer->entry_cb(handle, writer->entry_userdata, &writer->file_info); - - password = writer->password; - - /* Check if we need a password and ask for it if we need to */ - if ((writer->file_info.flag & MZ_ZIP_FLAG_ENCRYPTED) && (password == NULL) && - (writer->password_cb != NULL)) { - writer->password_cb(handle, writer->password_userdata, &writer->file_info, - password_buf, sizeof(password_buf)); - password = password_buf; - } - -#ifndef MZ_ZIP_NO_CRYPTO - if (mz_zip_attrib_is_dir(writer->file_info.external_fa, writer->file_info.version_madeby) != MZ_OK) { - /* Start calculating sha256 */ - mz_crypt_sha_create(&writer->sha256); - mz_crypt_sha_set_algorithm(writer->sha256, MZ_HASH_SHA256); - mz_crypt_sha_begin(writer->sha256); - } -#endif - - /* Open entry in zip */ - err = mz_zip_entry_write_open(writer->zip_handle, &writer->file_info, writer->compress_level, - writer->raw, password); - - return err; -} - -#if !defined(MZ_ZIP_NO_CRYPTO) && defined(MZ_ZIP_SIGNING) -int32_t mz_zip_writer_entry_sign(void *handle, uint8_t *message, int32_t message_size, - uint8_t *cert_data, int32_t cert_data_size, const char *cert_pwd) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - int32_t err = MZ_OK; - int32_t signature_size = 0; - uint8_t *signature = NULL; - - - if (writer == NULL || cert_data == NULL || cert_data_size <= 0) - return MZ_PARAM_ERROR; - if (mz_zip_entry_is_open(writer->zip_handle) != MZ_OK) - return MZ_PARAM_ERROR; - - /* Sign message with certificate */ - err = mz_crypt_sign(message, message_size, cert_data, cert_data_size, cert_pwd, - &signature, &signature_size); - - if ((err == MZ_OK) && (signature != NULL)) { - /* Write signature zip extra field */ - err = mz_zip_extrafield_write(writer->file_extra_stream, MZ_ZIP_EXTENSION_SIGN, - (uint16_t)signature_size); - - if (err == MZ_OK) { - if (mz_stream_write(writer->file_extra_stream, signature, signature_size) != signature_size) - err = MZ_WRITE_ERROR; - } - - MZ_FREE(signature); - } - - return err; -} -#endif - -int32_t mz_zip_writer_entry_close(void *handle) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - int32_t err = MZ_OK; -#ifndef MZ_ZIP_NO_CRYPTO - const uint8_t *extrafield = NULL; - int32_t extrafield_size = 0; - int16_t field_length_hash = 0; - uint8_t sha256[MZ_HASH_SHA256_SIZE]; - - - if (writer->sha256 != NULL) { - mz_crypt_sha_end(writer->sha256, sha256, sizeof(sha256)); - mz_crypt_sha_delete(&writer->sha256); - - /* Copy extrafield so we can append our own fields before close */ - mz_stream_mem_create(&writer->file_extra_stream); - mz_stream_mem_open(writer->file_extra_stream, NULL, MZ_OPEN_MODE_CREATE); - - /* Write sha256 hash to extrafield */ - field_length_hash = 4 + MZ_HASH_SHA256_SIZE; - err = mz_zip_extrafield_write(writer->file_extra_stream, MZ_ZIP_EXTENSION_HASH, field_length_hash); - if (err == MZ_OK) - err = mz_stream_write_uint16(writer->file_extra_stream, MZ_HASH_SHA256); - if (err == MZ_OK) - err = mz_stream_write_uint16(writer->file_extra_stream, MZ_HASH_SHA256_SIZE); - if (err == MZ_OK) { - if (mz_stream_write(writer->file_extra_stream, sha256, sizeof(sha256)) != MZ_HASH_SHA256_SIZE) - err = MZ_WRITE_ERROR; - } - -#ifdef MZ_ZIP_SIGNING - if ((err == MZ_OK) && (writer->cert_data != NULL) && (writer->cert_data_size > 0)) { - /* Sign entry if not zipping cd or if it is cd being zipped */ - if (!writer->zip_cd || strcmp(writer->file_info.filename, MZ_ZIP_CD_FILENAME) == 0) { - err = mz_zip_writer_entry_sign(handle, sha256, sizeof(sha256), - writer->cert_data, writer->cert_data_size, writer->cert_pwd); - } - } -#endif - - if ((writer->file_info.extrafield != NULL) && (writer->file_info.extrafield_size > 0)) - mz_stream_mem_write(writer->file_extra_stream, writer->file_info.extrafield, - writer->file_info.extrafield_size); - - /* Update extra field for central directory after adding extra fields */ - mz_stream_mem_get_buffer(writer->file_extra_stream, (const void **)&extrafield); - mz_stream_mem_get_buffer_length(writer->file_extra_stream, &extrafield_size); - - mz_zip_entry_set_extrafield(writer->zip_handle, extrafield, (uint16_t)extrafield_size); - } -#endif - - if (err == MZ_OK) { - if (writer->raw) - err = mz_zip_entry_close_raw(writer->zip_handle, writer->file_info.uncompressed_size, - writer->file_info.crc); - else - err = mz_zip_entry_close(writer->zip_handle); - } - - if (writer->file_extra_stream != NULL) - mz_stream_mem_delete(&writer->file_extra_stream); - - return err; -} - -int32_t mz_zip_writer_entry_write(void *handle, const void *buf, int32_t len) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - int32_t written = 0; - written = mz_zip_entry_write(writer->zip_handle, buf, len); -#ifndef MZ_ZIP_NO_CRYPTO - if ((written > 0) && (writer->sha256 != NULL)) - mz_crypt_sha_update(writer->sha256, buf, written); -#endif - return written; -} -/***************************************************************************/ - -int32_t mz_zip_writer_add_process(void *handle, void *stream, mz_stream_read_cb read_cb) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - int32_t read = 0; - int32_t written = 0; - int32_t err = MZ_OK; - - if (mz_zip_writer_is_open(writer) != MZ_OK) - return MZ_PARAM_ERROR; - /* If the entry isn't open for writing, open it */ - if (mz_zip_entry_is_open(writer->zip_handle) != MZ_OK) - return MZ_PARAM_ERROR; - if (read_cb == NULL) - return MZ_PARAM_ERROR; - - read = read_cb(stream, writer->buffer, sizeof(writer->buffer)); - if (read == 0) - return MZ_END_OF_STREAM; - if (read < 0) { - err = read; - return err; - } - - written = mz_zip_writer_entry_write(handle, writer->buffer, read); - if (written != read) - return MZ_WRITE_ERROR; - - return written; -} - -int32_t mz_zip_writer_add(void *handle, void *stream, mz_stream_read_cb read_cb) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - uint64_t current_time = 0; - uint64_t update_time = 0; - int64_t current_pos = 0; - int64_t update_pos = 0; - int32_t err = MZ_OK; - int32_t written = 0; - - /* Update the progress at the beginning */ - if (writer->progress_cb != NULL) - writer->progress_cb(handle, writer->progress_userdata, &writer->file_info, current_pos); - - /* Write data to stream until done */ - while (err == MZ_OK) { - written = mz_zip_writer_add_process(handle, stream, read_cb); - if (written == MZ_END_OF_STREAM) - break; - if (written > 0) - current_pos += written; - if (written < 0) - err = written; - - /* Update progress if enough time have passed */ - current_time = mz_os_ms_time(); - if ((current_time - update_time) > writer->progress_cb_interval_ms) { - if (writer->progress_cb != NULL) - writer->progress_cb(handle, writer->progress_userdata, &writer->file_info, current_pos); - - update_pos = current_pos; - update_time = current_time; - } - } - - /* Update the progress at the end */ - if (writer->progress_cb != NULL && update_pos != current_pos) - writer->progress_cb(handle, writer->progress_userdata, &writer->file_info, current_pos); - - return err; -} - -int32_t mz_zip_writer_add_info(void *handle, void *stream, mz_stream_read_cb read_cb, mz_zip_file *file_info) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - int32_t err = MZ_OK; - - - if (mz_zip_writer_is_open(handle) != MZ_OK) - return MZ_PARAM_ERROR; - if (file_info == NULL) - return MZ_PARAM_ERROR; - - /* Add to zip */ - err = mz_zip_writer_entry_open(handle, file_info); - if (err != MZ_OK) - return err; - - if (stream != NULL) { - if (mz_zip_attrib_is_dir(writer->file_info.external_fa, writer->file_info.version_madeby) != MZ_OK) { - err = mz_zip_writer_add(handle, stream, read_cb); - if (err != MZ_OK) - return err; - } - } - - err = mz_zip_writer_entry_close(handle); - - return err; -} - -int32_t mz_zip_writer_add_buffer(void *handle, void *buf, int32_t len, mz_zip_file *file_info) { - void *mem_stream = NULL; - int32_t err = MZ_OK; - - if (mz_zip_writer_is_open(handle) != MZ_OK) - return MZ_PARAM_ERROR; - if (buf == NULL) - return MZ_PARAM_ERROR; - - /* Create a memory stream backed by our buffer and add from it */ - mz_stream_mem_create(&mem_stream); - mz_stream_mem_set_buffer(mem_stream, buf, len); - - err = mz_stream_mem_open(mem_stream, NULL, MZ_OPEN_MODE_READ); - if (err == MZ_OK) - err = mz_zip_writer_add_info(handle, mem_stream, mz_stream_mem_read, file_info); - - mz_stream_mem_delete(&mem_stream); - return err; -} - -int32_t mz_zip_writer_add_file(void *handle, const char *path, const char *filename_in_zip) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - mz_zip_file file_info; - uint32_t target_attrib = 0; - uint32_t src_attrib = 0; - int32_t err = MZ_OK; - uint8_t src_sys = 0; - void *stream = NULL; - char link_path[1024]; - const char *filename = filename_in_zip; - - - if (mz_zip_writer_is_open(handle) != MZ_OK) - return MZ_PARAM_ERROR; - if (path == NULL) - return MZ_PARAM_ERROR; - - if (filename == NULL) { - err = mz_path_get_filename(path, &filename); - if (err != MZ_OK) - return err; - } - - memset(&file_info, 0, sizeof(file_info)); - - /* The path name saved, should not include a leading slash. */ - /* If it did, windows/xp and dynazip couldn't read the zip file. */ - - while (filename[0] == '\\' || filename[0] == '/') - filename += 1; - - /* Get information about the file on disk so we can store it in zip */ - - file_info.version_madeby = MZ_VERSION_MADEBY; - file_info.compression_method = writer->compress_method; - file_info.filename = filename; - file_info.uncompressed_size = mz_os_get_file_size(path); - file_info.flag = MZ_ZIP_FLAG_UTF8; - - if (writer->zip_cd) - file_info.flag |= MZ_ZIP_FLAG_MASK_LOCAL_INFO; - if (writer->aes) - file_info.aes_version = MZ_AES_VERSION; - - mz_os_get_file_date(path, &file_info.modified_date, &file_info.accessed_date, - &file_info.creation_date); - mz_os_get_file_attribs(path, &src_attrib); - - src_sys = MZ_HOST_SYSTEM(file_info.version_madeby); - - if ((src_sys != MZ_HOST_SYSTEM_MSDOS) && (src_sys != MZ_HOST_SYSTEM_WINDOWS_NTFS)) { - /* High bytes are OS specific attributes, low byte is always DOS attributes */ - if (mz_zip_attrib_convert(src_sys, src_attrib, MZ_HOST_SYSTEM_MSDOS, &target_attrib) == MZ_OK) - file_info.external_fa = target_attrib; - file_info.external_fa |= (src_attrib << 16); - } else { - file_info.external_fa = src_attrib; - } - - if (writer->store_links && mz_os_is_symlink(path) == MZ_OK) { - err = mz_os_read_symlink(path, link_path, sizeof(link_path)); - if (err == MZ_OK) - file_info.linkname = link_path; - } else if (mz_os_is_dir(path) != MZ_OK) { - mz_stream_os_create(&stream); - err = mz_stream_os_open(stream, path, MZ_OPEN_MODE_READ); - } - - if (err == MZ_OK) - err = mz_zip_writer_add_info(handle, stream, mz_stream_read, &file_info); - - if (stream != NULL) { - mz_stream_close(stream); - mz_stream_delete(&stream); - } - - return err; -} - -int32_t mz_zip_writer_add_path(void *handle, const char *path, const char *root_path, - uint8_t include_path, uint8_t recursive) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - DIR *dir = NULL; - struct dirent *entry = NULL; - int32_t err = MZ_OK; - int16_t is_dir = 0; - const char *filename = NULL; - const char *filenameinzip = path; - char *wildcard_ptr = NULL; - char full_path[1024]; - char path_dir[1024]; - - - if (strrchr(path, '*') != NULL) { - strncpy(path_dir, path, sizeof(path_dir) - 1); - path_dir[sizeof(path_dir) - 1] = 0; - mz_path_remove_filename(path_dir); - wildcard_ptr = path_dir + strlen(path_dir) + 1; - root_path = path = path_dir; - } else { - if (mz_os_is_dir(path) == MZ_OK) - is_dir = 1; - - /* Construct the filename that our file will be stored in the zip as */ - if (root_path == NULL) - root_path = path; - - /* Should the file be stored with any path info at all? */ - if (!include_path) { - if (!is_dir && root_path == path) { - if (mz_path_get_filename(filenameinzip, &filename) == MZ_OK) - filenameinzip = filename; - } else { - filenameinzip += strlen(root_path); - } - } - - if (!writer->store_links && !writer->follow_links) { - if (mz_os_is_symlink(path) == MZ_OK) - return err; - } - - if (*filenameinzip != 0) - err = mz_zip_writer_add_file(handle, path, filenameinzip); - - if (!is_dir) - return err; - - if (writer->store_links) { - if (mz_os_is_symlink(path) == MZ_OK) - return err; - } - } - - dir = mz_os_open_dir(path); - - if (dir == NULL) - return MZ_EXIST_ERROR; - - while ((entry = mz_os_read_dir(dir)) != NULL) { - if (strcmp(entry->d_name, ".") == 0 || strcmp(entry->d_name, "..") == 0) - continue; - - full_path[0] = 0; - mz_path_combine(full_path, path, sizeof(full_path)); - mz_path_combine(full_path, entry->d_name, sizeof(full_path)); - - if (!recursive && mz_os_is_dir(full_path) == MZ_OK) - continue; - - if ((wildcard_ptr != NULL) && (mz_path_compare_wc(entry->d_name, wildcard_ptr, 1) != MZ_OK)) - continue; - - err = mz_zip_writer_add_path(handle, full_path, root_path, include_path, recursive); - if (err != MZ_OK) - break; - } - - mz_os_close_dir(dir); - return err; -} - -int32_t mz_zip_writer_copy_from_reader(void *handle, void *reader) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - mz_zip_file *file_info = NULL; - int64_t compressed_size = 0; - int64_t uncompressed_size = 0; - uint32_t crc32 = 0; - int32_t err = MZ_OK; - uint8_t original_raw = 0; - void *reader_zip_handle = NULL; - void *writer_zip_handle = NULL; - - - if (mz_zip_reader_is_open(reader) != MZ_OK) - return MZ_PARAM_ERROR; - if (mz_zip_writer_is_open(writer) != MZ_OK) - return MZ_PARAM_ERROR; - - err = mz_zip_reader_entry_get_info(reader, &file_info); - - if (err != MZ_OK) - return err; - - mz_zip_reader_get_zip_handle(reader, &reader_zip_handle); - mz_zip_writer_get_zip_handle(writer, &writer_zip_handle); - - /* Open entry for raw reading */ - err = mz_zip_entry_read_open(reader_zip_handle, 1, NULL); - - if (err == MZ_OK) { - /* Write entry raw, save original raw value */ - original_raw = writer->raw; - writer->raw = 1; - - err = mz_zip_writer_entry_open(writer, file_info); - - if ((err == MZ_OK) && - (mz_zip_attrib_is_dir(writer->file_info.external_fa, writer->file_info.version_madeby) != MZ_OK)) { - err = mz_zip_writer_add(writer, reader_zip_handle, mz_zip_entry_read); - } - - if (err == MZ_OK) { - err = mz_zip_entry_read_close(reader_zip_handle, &crc32, &compressed_size, &uncompressed_size); - if (err == MZ_OK) - err = mz_zip_entry_write_close(writer_zip_handle, crc32, compressed_size, uncompressed_size); - } - - if (mz_zip_entry_is_open(reader_zip_handle) == MZ_OK) - mz_zip_entry_close(reader_zip_handle); - - if (mz_zip_entry_is_open(writer_zip_handle) == MZ_OK) - mz_zip_entry_close(writer_zip_handle); - - writer->raw = original_raw; - } - - return err; -} - -/***************************************************************************/ - -void mz_zip_writer_set_password(void *handle, const char *password) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - writer->password = password; -} - -void mz_zip_writer_set_comment(void *handle, const char *comment) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - writer->comment = comment; -} - -void mz_zip_writer_set_raw(void *handle, uint8_t raw) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - writer->raw = raw; -} - -int32_t mz_zip_writer_get_raw(void *handle, uint8_t *raw) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - if (raw == NULL) - return MZ_PARAM_ERROR; - *raw = writer->raw; - return MZ_OK; -} - -void mz_zip_writer_set_aes(void *handle, uint8_t aes) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - writer->aes = aes; -} - -void mz_zip_writer_set_compress_method(void *handle, uint16_t compress_method) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - writer->compress_method = compress_method; -} - -void mz_zip_writer_set_compress_level(void *handle, int16_t compress_level) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - writer->compress_level = compress_level; -} - -void mz_zip_writer_set_follow_links(void *handle, uint8_t follow_links) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - writer->follow_links = follow_links; -} - -void mz_zip_writer_set_store_links(void *handle, uint8_t store_links) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - writer->store_links = store_links; -} - -void mz_zip_writer_set_zip_cd(void *handle, uint8_t zip_cd) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - writer->zip_cd = zip_cd; -} - -int32_t mz_zip_writer_set_certificate(void *handle, const char *cert_path, const char *cert_pwd) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - void *cert_stream = NULL; - uint8_t *cert_data = NULL; - int32_t cert_data_size = 0; - int32_t err = MZ_OK; - - if (cert_path == NULL) - return MZ_PARAM_ERROR; - - cert_data_size = (int32_t)mz_os_get_file_size(cert_path); - - if (cert_data_size == 0) - return MZ_PARAM_ERROR; - - if (writer->cert_data != NULL) { - MZ_FREE(writer->cert_data); - writer->cert_data = NULL; - } - - cert_data = (uint8_t *)MZ_ALLOC(cert_data_size); - - /* Read pkcs12 certificate from disk */ - mz_stream_os_create(&cert_stream); - err = mz_stream_os_open(cert_stream, cert_path, MZ_OPEN_MODE_READ); - if (err == MZ_OK) { - if (mz_stream_os_read(cert_stream, cert_data, cert_data_size) != cert_data_size) - err = MZ_READ_ERROR; - mz_stream_os_close(cert_stream); - } - mz_stream_os_delete(&cert_stream); - - if (err == MZ_OK) { - writer->cert_data = cert_data; - writer->cert_data_size = cert_data_size; - writer->cert_pwd = cert_pwd; - } else { - MZ_FREE(cert_data); - } - - return err; -} - -void mz_zip_writer_set_overwrite_cb(void *handle, void *userdata, mz_zip_writer_overwrite_cb cb) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - writer->overwrite_cb = cb; - writer->overwrite_userdata = userdata; -} - -void mz_zip_writer_set_password_cb(void *handle, void *userdata, mz_zip_writer_password_cb cb) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - writer->password_cb = cb; - writer->password_userdata = userdata; -} - -void mz_zip_writer_set_progress_cb(void *handle, void *userdata, mz_zip_writer_progress_cb cb) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - writer->progress_cb = cb; - writer->progress_userdata = userdata; -} - -void mz_zip_writer_set_progress_interval(void *handle, uint32_t milliseconds) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - writer->progress_cb_interval_ms = milliseconds; -} - -void mz_zip_writer_set_entry_cb(void *handle, void *userdata, mz_zip_writer_entry_cb cb) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - writer->entry_cb = cb; - writer->entry_userdata = userdata; -} - -int32_t mz_zip_writer_get_zip_handle(void *handle, void **zip_handle) { - mz_zip_writer *writer = (mz_zip_writer *)handle; - if (zip_handle == NULL) - return MZ_PARAM_ERROR; - *zip_handle = writer->zip_handle; - if (*zip_handle == NULL) - return MZ_EXIST_ERROR; - return MZ_OK; -} - -/***************************************************************************/ - -void *mz_zip_writer_create(void **handle) { - mz_zip_writer *writer = NULL; - - writer = (mz_zip_writer *)MZ_ALLOC(sizeof(mz_zip_writer)); - if (writer != NULL) { - memset(writer, 0, sizeof(mz_zip_writer)); -#if defined(HAVE_WZAES) - writer->aes = 1; -#endif -#if defined(HAVE_ZLIB) || defined(HAVE_LIBCOMP) - writer->compress_method = MZ_COMPRESS_METHOD_DEFLATE; -#elif defined(HAVE_BZIP2) - writer->compress_method = MZ_COMPRESS_METHOD_BZIP2; -#elif defined(HAVE_LZMA) - writer->compress_method = MZ_COMPRESS_METHOD_LZMA; -#else - writer->compress_method = MZ_COMPRESS_METHOD_STORE; -#endif - writer->compress_level = MZ_COMPRESS_LEVEL_BEST; - writer->progress_cb_interval_ms = MZ_DEFAULT_PROGRESS_INTERVAL; - } - if (handle != NULL) - *handle = writer; - - return writer; -} - -void mz_zip_writer_delete(void **handle) { - mz_zip_writer *writer = NULL; - if (handle == NULL) - return; - writer = (mz_zip_writer *)*handle; - if (writer != NULL) { - mz_zip_writer_close(writer); - - if (writer->cert_data != NULL) - MZ_FREE(writer->cert_data); - - writer->cert_data = NULL; - writer->cert_data_size = 0; - - MZ_FREE(writer); - } - *handle = NULL; -} - -/***************************************************************************/ diff --git a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_zip_rw.h b/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_zip_rw.h deleted file mode 100644 index e507f94..0000000 --- a/example/Pods/SSZipArchive/SSZipArchive/minizip/mz_zip_rw.h +++ /dev/null @@ -1,285 +0,0 @@ -/* mz_zip_rw.h -- Zip reader/writer - part of the minizip-ng project - - Copyright (C) 2010-2021 Nathan Moinvaziri - https://github.com/zlib-ng/minizip-ng - - This program is distributed under the terms of the same license as zlib. - See the accompanying LICENSE file for the full text of the license. -*/ - -#ifndef MZ_ZIP_RW_H -#define MZ_ZIP_RW_H - -#ifdef __cplusplus -extern "C" { -#endif - -/***************************************************************************/ - -typedef int32_t (*mz_zip_reader_overwrite_cb)(void *handle, void *userdata, mz_zip_file *file_info, const char *path); -typedef int32_t (*mz_zip_reader_password_cb)(void *handle, void *userdata, mz_zip_file *file_info, char *password, int32_t max_password); -typedef int32_t (*mz_zip_reader_progress_cb)(void *handle, void *userdata, mz_zip_file *file_info, int64_t position); -typedef int32_t (*mz_zip_reader_entry_cb)(void *handle, void *userdata, mz_zip_file *file_info, const char *path); - -/***************************************************************************/ - -int32_t mz_zip_reader_is_open(void *handle); -/* Checks to see if the zip file is open */ - -int32_t mz_zip_reader_open(void *handle, void *stream); -/* Opens zip file from stream */ - -int32_t mz_zip_reader_open_file(void *handle, const char *path); -/* Opens zip file from a file path */ - -int32_t mz_zip_reader_open_file_in_memory(void *handle, const char *path); -/* Opens zip file from a file path into memory for faster access */ - -int32_t mz_zip_reader_open_buffer(void *handle, uint8_t *buf, int32_t len, uint8_t copy); -/* Opens zip file from memory buffer */ - -int32_t mz_zip_reader_close(void *handle); -/* Closes the zip file */ - -/***************************************************************************/ - -int32_t mz_zip_reader_unzip_cd(void *handle); -/* Unzip the central directory */ - -/***************************************************************************/ - -int32_t mz_zip_reader_goto_first_entry(void *handle); -/* Goto the first entry in the zip file that matches the pattern */ - -int32_t mz_zip_reader_goto_next_entry(void *handle); -/* Goto the next entry in the zip file that matches the pattern */ - -int32_t mz_zip_reader_locate_entry(void *handle, const char *filename, uint8_t ignore_case); -/* Locates an entry by filename */ - -int32_t mz_zip_reader_entry_open(void *handle); -/* Opens an entry for reading */ - -int32_t mz_zip_reader_entry_close(void *handle); -/* Closes an entry */ - -int32_t mz_zip_reader_entry_read(void *handle, void *buf, int32_t len); -/* Reads and entry after being opened */ - -int32_t mz_zip_reader_entry_has_sign(void *handle); -/* Checks to see if the entry has a signature */ - -int32_t mz_zip_reader_entry_sign_verify(void *handle); -/* Verifies a signature stored with the entry */ - -int32_t mz_zip_reader_entry_get_hash(void *handle, uint16_t algorithm, uint8_t *digest, int32_t digest_size); -/* Gets a hash algorithm from the entry's extra field */ - -int32_t mz_zip_reader_entry_get_first_hash(void *handle, uint16_t *algorithm, uint16_t *digest_size); -/* Gets the most secure hash algorithm from the entry's extra field */ - -int32_t mz_zip_reader_entry_get_info(void *handle, mz_zip_file **file_info); -/* Gets the current entry file info */ - -int32_t mz_zip_reader_entry_is_dir(void *handle); -/* Gets the current entry is a directory */ - -int32_t mz_zip_reader_entry_save(void *handle, void *stream, mz_stream_write_cb write_cb); -/* Save the current entry to a stream */ - -int32_t mz_zip_reader_entry_save_process(void *handle, void *stream, mz_stream_write_cb write_cb); -/* Saves a portion of the current entry to a stream callback */ - -int32_t mz_zip_reader_entry_save_file(void *handle, const char *path); -/* Save the current entry to a file */ - -int32_t mz_zip_reader_entry_save_buffer(void *handle, void *buf, int32_t len); -/* Save the current entry to a memory buffer */ - -int32_t mz_zip_reader_entry_save_buffer_length(void *handle); -/* Gets the length of the buffer required to save */ - -/***************************************************************************/ - -int32_t mz_zip_reader_save_all(void *handle, const char *destination_dir); -/* Save all files into a directory */ - -/***************************************************************************/ - -void mz_zip_reader_set_pattern(void *handle, const char *pattern, uint8_t ignore_case); -/* Sets the match pattern for entries in the zip file, if null all entries are matched */ - -void mz_zip_reader_set_password(void *handle, const char *password); -/* Sets the password required for extraction */ - -void mz_zip_reader_set_raw(void *handle, uint8_t raw); -/* Sets whether or not it should save the entry raw */ - -int32_t mz_zip_reader_get_raw(void *handle, uint8_t *raw); -/* Gets whether or not it should save the entry raw */ - -int32_t mz_zip_reader_get_zip_cd(void *handle, uint8_t *zip_cd); -/* Gets whether or not the archive has a zipped central directory */ - -int32_t mz_zip_reader_get_comment(void *handle, const char **comment); -/* Gets the comment for the central directory */ - -int32_t mz_zip_reader_set_recover(void *handle, uint8_t recover); -/* Sets the ability to recover the central dir by reading local file headers */ - -void mz_zip_reader_set_encoding(void *handle, int32_t encoding); -/* Sets whether or not it should support a special character encoding in zip file names. */ - -void mz_zip_reader_set_sign_required(void *handle, uint8_t sign_required); -/* Sets whether or not it a signature is required */ - -void mz_zip_reader_set_overwrite_cb(void *handle, void *userdata, mz_zip_reader_overwrite_cb cb); -/* Callback for what to do when a file is being overwritten */ - -void mz_zip_reader_set_password_cb(void *handle, void *userdata, mz_zip_reader_password_cb cb); -/* Callback for when a password is required and hasn't been set */ - -void mz_zip_reader_set_progress_cb(void *handle, void *userdata, mz_zip_reader_progress_cb cb); -/* Callback for extraction progress */ - -void mz_zip_reader_set_progress_interval(void *handle, uint32_t milliseconds); -/* Let at least milliseconds pass between calls to progress callback */ - -void mz_zip_reader_set_entry_cb(void *handle, void *userdata, mz_zip_reader_entry_cb cb); -/* Callback for zip file entries */ - -int32_t mz_zip_reader_get_zip_handle(void *handle, void **zip_handle); -/* Gets the underlying zip instance handle */ - -void* mz_zip_reader_create(void **handle); -/* Create new instance of zip reader */ - -void mz_zip_reader_delete(void **handle); -/* Delete instance of zip reader */ - -/***************************************************************************/ - -typedef int32_t (*mz_zip_writer_overwrite_cb)(void *handle, void *userdata, const char *path); -typedef int32_t (*mz_zip_writer_password_cb)(void *handle, void *userdata, mz_zip_file *file_info, char *password, int32_t max_password); -typedef int32_t (*mz_zip_writer_progress_cb)(void *handle, void *userdata, mz_zip_file *file_info, int64_t position); -typedef int32_t (*mz_zip_writer_entry_cb)(void *handle, void *userdata, mz_zip_file *file_info); - -/***************************************************************************/ - -int32_t mz_zip_writer_is_open(void *handle); -/* Checks to see if the zip file is open */ - -int32_t mz_zip_writer_open(void *handle, void *stream, uint8_t append); -/* Opens zip file from stream */ - -int32_t mz_zip_writer_open_file(void *handle, const char *path, int64_t disk_size, uint8_t append); -/* Opens zip file from a file path */ - -int32_t mz_zip_writer_open_file_in_memory(void *handle, const char *path); -/* Opens zip file from a file path into memory for faster access */ - -int32_t mz_zip_writer_close(void *handle); -/* Closes the zip file */ - -/***************************************************************************/ - -int32_t mz_zip_writer_entry_open(void *handle, mz_zip_file *file_info); -/* Opens an entry in the zip file for writing */ - -int32_t mz_zip_writer_entry_close(void *handle); -/* Closes entry in zip file */ - -int32_t mz_zip_writer_entry_write(void *handle, const void *buf, int32_t len); -/* Writes data into entry for zip */ - -/***************************************************************************/ - -int32_t mz_zip_writer_add(void *handle, void *stream, mz_stream_read_cb read_cb); -/* Writes all data to the currently open entry in the zip */ - -int32_t mz_zip_writer_add_process(void *handle, void *stream, mz_stream_read_cb read_cb); -/* Writes a portion of data to the currently open entry in the zip */ - -int32_t mz_zip_writer_add_info(void *handle, void *stream, mz_stream_read_cb read_cb, mz_zip_file *file_info); -/* Adds an entry to the zip based on the info */ - -int32_t mz_zip_writer_add_buffer(void *handle, void *buf, int32_t len, mz_zip_file *file_info); -/* Adds an entry to the zip with a memory buffer */ - -int32_t mz_zip_writer_add_file(void *handle, const char *path, const char *filename_in_zip); -/* Adds an entry to the zip from a file */ - -int32_t mz_zip_writer_add_path(void *handle, const char *path, const char *root_path, uint8_t include_path, - uint8_t recursive); -/* Enumerates a directory or pattern and adds entries to the zip */ - -int32_t mz_zip_writer_copy_from_reader(void *handle, void *reader); -/* Adds an entry from a zip reader instance */ - -/***************************************************************************/ - -void mz_zip_writer_set_password(void *handle, const char *password); -/* Password to use for encrypting files in the zip */ - -void mz_zip_writer_set_comment(void *handle, const char *comment); -/* Comment to use for the archive */ - -void mz_zip_writer_set_raw(void *handle, uint8_t raw); -/* Sets whether or not we should write the entry raw */ - -int32_t mz_zip_writer_get_raw(void *handle, uint8_t *raw); -/* Gets whether or not we should write the entry raw */ - -void mz_zip_writer_set_aes(void *handle, uint8_t aes); -/* Use aes encryption when adding files in zip */ - -void mz_zip_writer_set_compress_method(void *handle, uint16_t compress_method); -/* Sets the compression method when adding files in zip */ - -void mz_zip_writer_set_compress_level(void *handle, int16_t compress_level); -/* Sets the compression level when adding files in zip */ - -void mz_zip_writer_set_follow_links(void *handle, uint8_t follow_links); -/* Follow symbolic links when traversing directories and files to add */ - -void mz_zip_writer_set_store_links(void *handle, uint8_t store_links); -/* Store symbolic links in zip file */ - -void mz_zip_writer_set_zip_cd(void *handle, uint8_t zip_cd); -/* Sets whether or not central directory should be zipped */ - -int32_t mz_zip_writer_set_certificate(void *handle, const char *cert_path, const char *cert_pwd); -/* Sets the certificate and timestamp url to use for signing when adding files in zip */ - -void mz_zip_writer_set_overwrite_cb(void *handle, void *userdata, mz_zip_writer_overwrite_cb cb); -/* Callback for what to do when zip file already exists */ - -void mz_zip_writer_set_password_cb(void *handle, void *userdata, mz_zip_writer_password_cb cb); -/* Callback for ask if a password is required for adding */ - -void mz_zip_writer_set_progress_cb(void *handle, void *userdata, mz_zip_writer_progress_cb cb); -/* Callback for compression progress */ - -void mz_zip_writer_set_progress_interval(void *handle, uint32_t milliseconds); -/* Let at least milliseconds pass between calls to progress callback */ - -void mz_zip_writer_set_entry_cb(void *handle, void *userdata, mz_zip_writer_entry_cb cb); -/* Callback for zip file entries */ - -int32_t mz_zip_writer_get_zip_handle(void *handle, void **zip_handle); -/* Gets the underlying zip handle */ - -void* mz_zip_writer_create(void **handle); -/* Create new instance of zip writer */ - -void mz_zip_writer_delete(void **handle); -/* Delete instance of zip writer */ - -/***************************************************************************/ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/example/Pods/Target Support Files/SSZipArchive/SSZipArchive-Info.plist b/example/Pods/Target Support Files/DDKitSwift/DDKitSwift-Info.plist similarity index 91% rename from example/Pods/Target Support Files/SSZipArchive/SSZipArchive-Info.plist rename to example/Pods/Target Support Files/DDKitSwift/DDKitSwift-Info.plist index 53cf15a..c10e1fb 100644 --- a/example/Pods/Target Support Files/SSZipArchive/SSZipArchive-Info.plist +++ b/example/Pods/Target Support Files/DDKitSwift/DDKitSwift-Info.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - en + ${PODS_DEVELOPMENT_LANGUAGE} CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.4.3 + 3.0.0 CFBundleSignature ???? CFBundleVersion diff --git a/example/Pods/Target Support Files/DDKitSwift/DDKitSwift-dummy.m b/example/Pods/Target Support Files/DDKitSwift/DDKitSwift-dummy.m new file mode 100644 index 0000000..096f8e3 --- /dev/null +++ b/example/Pods/Target Support Files/DDKitSwift/DDKitSwift-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_DDKitSwift : NSObject +@end +@implementation PodsDummy_DDKitSwift +@end diff --git a/example/Pods/Target Support Files/SSZipArchive/SSZipArchive-prefix.pch b/example/Pods/Target Support Files/DDKitSwift/DDKitSwift-prefix.pch similarity index 100% rename from example/Pods/Target Support Files/SSZipArchive/SSZipArchive-prefix.pch rename to example/Pods/Target Support Files/DDKitSwift/DDKitSwift-prefix.pch diff --git a/example/Pods/Target Support Files/ZXKitUtil/ZXKitUtil-umbrella.h b/example/Pods/Target Support Files/DDKitSwift/DDKitSwift-umbrella.h similarity index 63% rename from example/Pods/Target Support Files/ZXKitUtil/ZXKitUtil-umbrella.h rename to example/Pods/Target Support Files/DDKitSwift/DDKitSwift-umbrella.h index 148f5a6..365fbc5 100644 --- a/example/Pods/Target Support Files/ZXKitUtil/ZXKitUtil-umbrella.h +++ b/example/Pods/Target Support Files/DDKitSwift/DDKitSwift-umbrella.h @@ -11,6 +11,6 @@ #endif -FOUNDATION_EXPORT double ZXKitUtilVersionNumber; -FOUNDATION_EXPORT const unsigned char ZXKitUtilVersionString[]; +FOUNDATION_EXPORT double DDKitSwiftVersionNumber; +FOUNDATION_EXPORT const unsigned char DDKitSwiftVersionString[]; diff --git a/example/Pods/Target Support Files/ZXKitCore/ZXKitCore.debug.xcconfig b/example/Pods/Target Support Files/DDKitSwift/DDKitSwift.debug.xcconfig similarity index 55% rename from example/Pods/Target Support Files/ZXKitCore/ZXKitCore.debug.xcconfig rename to example/Pods/Target Support Files/DDKitSwift/DDKitSwift.debug.xcconfig index 4f04ffe..7aefcb9 100644 --- a/example/Pods/Target Support Files/ZXKitCore/ZXKitCore.debug.xcconfig +++ b/example/Pods/Target Support Files/DDKitSwift/DDKitSwift.debug.xcconfig @@ -1,14 +1,15 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ZXKitCore -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SSZipArchive" "${PODS_CONFIGURATION_BUILD_DIR}/ZXKitLogger" "${PODS_CONFIGURATION_BUILD_DIR}/ZXKitUtil" +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/DDKitSwift +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/DDLoggerSwift" "${PODS_CONFIGURATION_BUILD_DIR}/DDUtils" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_LDFLAGS = $(inherited) -framework "SSZipArchive" -framework "Security" -framework "ZXKitLogger" -framework "ZXKitUtil" -weak_framework "CryptoKit" +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_LDFLAGS = $(inherited) -framework "DDLoggerSwift" -framework "DDUtils" -weak_framework "CryptoKit" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/ZXKitCore +PODS_TARGET_SRCROOT = ${PODS_ROOT}/DDKitSwift PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES diff --git a/example/Pods/Target Support Files/DDKitSwift/DDKitSwift.modulemap b/example/Pods/Target Support Files/DDKitSwift/DDKitSwift.modulemap new file mode 100644 index 0000000..af6687a --- /dev/null +++ b/example/Pods/Target Support Files/DDKitSwift/DDKitSwift.modulemap @@ -0,0 +1,6 @@ +framework module DDKitSwift { + umbrella header "DDKitSwift-umbrella.h" + + export * + module * { export * } +} diff --git a/example/Pods/Target Support Files/ZXKitCore/ZXKitCore.release.xcconfig b/example/Pods/Target Support Files/DDKitSwift/DDKitSwift.release.xcconfig similarity index 55% rename from example/Pods/Target Support Files/ZXKitCore/ZXKitCore.release.xcconfig rename to example/Pods/Target Support Files/DDKitSwift/DDKitSwift.release.xcconfig index 4f04ffe..7aefcb9 100644 --- a/example/Pods/Target Support Files/ZXKitCore/ZXKitCore.release.xcconfig +++ b/example/Pods/Target Support Files/DDKitSwift/DDKitSwift.release.xcconfig @@ -1,14 +1,15 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ZXKitCore -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SSZipArchive" "${PODS_CONFIGURATION_BUILD_DIR}/ZXKitLogger" "${PODS_CONFIGURATION_BUILD_DIR}/ZXKitUtil" +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/DDKitSwift +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/DDLoggerSwift" "${PODS_CONFIGURATION_BUILD_DIR}/DDUtils" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_LDFLAGS = $(inherited) -framework "SSZipArchive" -framework "Security" -framework "ZXKitLogger" -framework "ZXKitUtil" -weak_framework "CryptoKit" +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_LDFLAGS = $(inherited) -framework "DDLoggerSwift" -framework "DDUtils" -weak_framework "CryptoKit" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/ZXKitCore +PODS_TARGET_SRCROOT = ${PODS_ROOT}/DDKitSwift PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES diff --git a/example/Pods/Target Support Files/ZXKitLogger/ResourceBundle-ZXKitLogger-ZXKitLogger-Info.plist b/example/Pods/Target Support Files/DDKitSwift/ResourceBundle-DDKitSwift-DDKitSwift-Info.plist similarity index 90% rename from example/Pods/Target Support Files/ZXKitLogger/ResourceBundle-ZXKitLogger-ZXKitLogger-Info.plist rename to example/Pods/Target Support Files/DDKitSwift/ResourceBundle-DDKitSwift-DDKitSwift-Info.plist index f4d6214..b44e1c5 100644 --- a/example/Pods/Target Support Files/ZXKitLogger/ResourceBundle-ZXKitLogger-ZXKitLogger-Info.plist +++ b/example/Pods/Target Support Files/DDKitSwift/ResourceBundle-DDKitSwift-DDKitSwift-Info.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - en + ${PODS_DEVELOPMENT_LANGUAGE} CFBundleIdentifier ${PRODUCT_BUNDLE_IDENTIFIER} CFBundleInfoDictionaryVersion @@ -13,7 +13,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 4.0.5 + 3.0.0 CFBundleSignature ???? CFBundleVersion diff --git a/example/Pods/Target Support Files/ZXKitLogger/ZXKitLogger-Info.plist b/example/Pods/Target Support Files/DDLoggerSwift/DDLoggerSwift-Info.plist similarity index 91% rename from example/Pods/Target Support Files/ZXKitLogger/ZXKitLogger-Info.plist rename to example/Pods/Target Support Files/DDLoggerSwift/DDLoggerSwift-Info.plist index aebe579..577fdfa 100644 --- a/example/Pods/Target Support Files/ZXKitLogger/ZXKitLogger-Info.plist +++ b/example/Pods/Target Support Files/DDLoggerSwift/DDLoggerSwift-Info.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - en + ${PODS_DEVELOPMENT_LANGUAGE} CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 4.0.5 + 5.0.0 CFBundleSignature ???? CFBundleVersion diff --git a/example/Pods/Target Support Files/DDLoggerSwift/DDLoggerSwift-dummy.m b/example/Pods/Target Support Files/DDLoggerSwift/DDLoggerSwift-dummy.m new file mode 100644 index 0000000..fb6aecd --- /dev/null +++ b/example/Pods/Target Support Files/DDLoggerSwift/DDLoggerSwift-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_DDLoggerSwift : NSObject +@end +@implementation PodsDummy_DDLoggerSwift +@end diff --git a/example/Pods/Target Support Files/ZXKitCore/ZXKitCore-prefix.pch b/example/Pods/Target Support Files/DDLoggerSwift/DDLoggerSwift-prefix.pch similarity index 100% rename from example/Pods/Target Support Files/ZXKitCore/ZXKitCore-prefix.pch rename to example/Pods/Target Support Files/DDLoggerSwift/DDLoggerSwift-prefix.pch diff --git a/example/Pods/Target Support Files/ZXKitCore/ZXKitCore-umbrella.h b/example/Pods/Target Support Files/DDLoggerSwift/DDLoggerSwift-umbrella.h similarity index 61% rename from example/Pods/Target Support Files/ZXKitCore/ZXKitCore-umbrella.h rename to example/Pods/Target Support Files/DDLoggerSwift/DDLoggerSwift-umbrella.h index 0933419..07412d5 100644 --- a/example/Pods/Target Support Files/ZXKitCore/ZXKitCore-umbrella.h +++ b/example/Pods/Target Support Files/DDLoggerSwift/DDLoggerSwift-umbrella.h @@ -11,6 +11,6 @@ #endif -FOUNDATION_EXPORT double ZXKitCoreVersionNumber; -FOUNDATION_EXPORT const unsigned char ZXKitCoreVersionString[]; +FOUNDATION_EXPORT double DDLoggerSwiftVersionNumber; +FOUNDATION_EXPORT const unsigned char DDLoggerSwiftVersionString[]; diff --git a/example/Pods/Target Support Files/ZXKitLogger/ZXKitLogger.debug.xcconfig b/example/Pods/Target Support Files/DDLoggerSwift/DDLoggerSwift.debug.xcconfig similarity index 61% rename from example/Pods/Target Support Files/ZXKitLogger/ZXKitLogger.debug.xcconfig rename to example/Pods/Target Support Files/DDLoggerSwift/DDLoggerSwift.debug.xcconfig index a706afb..5b07fea 100644 --- a/example/Pods/Target Support Files/ZXKitLogger/ZXKitLogger.debug.xcconfig +++ b/example/Pods/Target Support Files/DDLoggerSwift/DDLoggerSwift.debug.xcconfig @@ -1,14 +1,15 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ZXKitLogger -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ZXKitUtil" +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/DDLoggerSwift +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/DDUtils" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_LDFLAGS = $(inherited) -l"sqlite3" -framework "ZXKitUtil" -weak_framework "CryptoKit" +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_LDFLAGS = $(inherited) -l"sqlite3" -framework "DDUtils" -weak_framework "CryptoKit" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/ZXKitLogger +PODS_TARGET_SRCROOT = ${PODS_ROOT}/DDLoggerSwift PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES diff --git a/example/Pods/Target Support Files/DDLoggerSwift/DDLoggerSwift.modulemap b/example/Pods/Target Support Files/DDLoggerSwift/DDLoggerSwift.modulemap new file mode 100644 index 0000000..b402f44 --- /dev/null +++ b/example/Pods/Target Support Files/DDLoggerSwift/DDLoggerSwift.modulemap @@ -0,0 +1,6 @@ +framework module DDLoggerSwift { + umbrella header "DDLoggerSwift-umbrella.h" + + export * + module * { export * } +} diff --git a/example/Pods/Target Support Files/ZXKitLogger/ZXKitLogger.release.xcconfig b/example/Pods/Target Support Files/DDLoggerSwift/DDLoggerSwift.release.xcconfig similarity index 61% rename from example/Pods/Target Support Files/ZXKitLogger/ZXKitLogger.release.xcconfig rename to example/Pods/Target Support Files/DDLoggerSwift/DDLoggerSwift.release.xcconfig index a706afb..5b07fea 100644 --- a/example/Pods/Target Support Files/ZXKitLogger/ZXKitLogger.release.xcconfig +++ b/example/Pods/Target Support Files/DDLoggerSwift/DDLoggerSwift.release.xcconfig @@ -1,14 +1,15 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ZXKitLogger -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/ZXKitUtil" +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/DDLoggerSwift +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/DDUtils" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_LDFLAGS = $(inherited) -l"sqlite3" -framework "ZXKitUtil" -weak_framework "CryptoKit" +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_LDFLAGS = $(inherited) -l"sqlite3" -framework "DDUtils" -weak_framework "CryptoKit" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/ZXKitLogger +PODS_TARGET_SRCROOT = ${PODS_ROOT}/DDLoggerSwift PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES diff --git a/example/Pods/Target Support Files/ZXKitCore/ResourceBundle-ZXKitCore-ZXKitCore-Info.plist b/example/Pods/Target Support Files/DDLoggerSwift/ResourceBundle-DDLoggerSwift-DDLoggerSwift-Info.plist similarity index 90% rename from example/Pods/Target Support Files/ZXKitCore/ResourceBundle-ZXKitCore-ZXKitCore-Info.plist rename to example/Pods/Target Support Files/DDLoggerSwift/ResourceBundle-DDLoggerSwift-DDLoggerSwift-Info.plist index 2dfa8d5..1c86d4b 100644 --- a/example/Pods/Target Support Files/ZXKitCore/ResourceBundle-ZXKitCore-ZXKitCore-Info.plist +++ b/example/Pods/Target Support Files/DDLoggerSwift/ResourceBundle-DDLoggerSwift-DDLoggerSwift-Info.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - en + ${PODS_DEVELOPMENT_LANGUAGE} CFBundleIdentifier ${PRODUCT_BUNDLE_IDENTIFIER} CFBundleInfoDictionaryVersion @@ -13,7 +13,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 2.0.2 + 5.0.0 CFBundleSignature ???? CFBundleVersion diff --git a/example/Pods/Target Support Files/ZXKitCore/ZXKitCore-Info.plist b/example/Pods/Target Support Files/DDUtils/DDUtils-Info.plist similarity index 91% rename from example/Pods/Target Support Files/ZXKitCore/ZXKitCore-Info.plist rename to example/Pods/Target Support Files/DDUtils/DDUtils-Info.plist index 09cb0fc..558ae16 100644 --- a/example/Pods/Target Support Files/ZXKitCore/ZXKitCore-Info.plist +++ b/example/Pods/Target Support Files/DDUtils/DDUtils-Info.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - en + ${PODS_DEVELOPMENT_LANGUAGE} CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.0.2 + 5.0.2 CFBundleSignature ???? CFBundleVersion diff --git a/example/Pods/Target Support Files/DDUtils/DDUtils-dummy.m b/example/Pods/Target Support Files/DDUtils/DDUtils-dummy.m new file mode 100644 index 0000000..283d336 --- /dev/null +++ b/example/Pods/Target Support Files/DDUtils/DDUtils-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_DDUtils : NSObject +@end +@implementation PodsDummy_DDUtils +@end diff --git a/example/Pods/Target Support Files/ZXKitLogger/ZXKitLogger-prefix.pch b/example/Pods/Target Support Files/DDUtils/DDUtils-prefix.pch similarity index 100% rename from example/Pods/Target Support Files/ZXKitLogger/ZXKitLogger-prefix.pch rename to example/Pods/Target Support Files/DDUtils/DDUtils-prefix.pch diff --git a/example/Pods/Target Support Files/ZXKitUtil/ZXKitUtil-prefix.pch b/example/Pods/Target Support Files/DDUtils/DDUtils-umbrella.h similarity index 63% rename from example/Pods/Target Support Files/ZXKitUtil/ZXKitUtil-prefix.pch rename to example/Pods/Target Support Files/DDUtils/DDUtils-umbrella.h index beb2a24..2b30d0a 100644 --- a/example/Pods/Target Support Files/ZXKitUtil/ZXKitUtil-prefix.pch +++ b/example/Pods/Target Support Files/DDUtils/DDUtils-umbrella.h @@ -10,3 +10,7 @@ #endif #endif + +FOUNDATION_EXPORT double DDUtilsVersionNumber; +FOUNDATION_EXPORT const unsigned char DDUtilsVersionString[]; + diff --git a/example/Pods/Target Support Files/ZXKitUtil/ZXKitUtil.debug.xcconfig b/example/Pods/Target Support Files/DDUtils/DDUtils.debug.xcconfig similarity index 69% rename from example/Pods/Target Support Files/ZXKitUtil/ZXKitUtil.debug.xcconfig rename to example/Pods/Target Support Files/DDUtils/DDUtils.debug.xcconfig index 68756f1..09ff4e4 100644 --- a/example/Pods/Target Support Files/ZXKitUtil/ZXKitUtil.debug.xcconfig +++ b/example/Pods/Target Support Files/DDUtils/DDUtils.debug.xcconfig @@ -1,13 +1,14 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ZXKitUtil +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/DDUtils GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift OTHER_LDFLAGS = $(inherited) -weak_framework "CryptoKit" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/ZXKitUtil +PODS_TARGET_SRCROOT = ${PODS_ROOT}/DDUtils PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES diff --git a/example/Pods/Target Support Files/DDUtils/DDUtils.modulemap b/example/Pods/Target Support Files/DDUtils/DDUtils.modulemap new file mode 100644 index 0000000..5ea5cf1 --- /dev/null +++ b/example/Pods/Target Support Files/DDUtils/DDUtils.modulemap @@ -0,0 +1,6 @@ +framework module DDUtils { + umbrella header "DDUtils-umbrella.h" + + export * + module * { export * } +} diff --git a/example/Pods/Target Support Files/ZXKitUtil/ZXKitUtil.release.xcconfig b/example/Pods/Target Support Files/DDUtils/DDUtils.release.xcconfig similarity index 69% rename from example/Pods/Target Support Files/ZXKitUtil/ZXKitUtil.release.xcconfig rename to example/Pods/Target Support Files/DDUtils/DDUtils.release.xcconfig index 68756f1..09ff4e4 100644 --- a/example/Pods/Target Support Files/ZXKitUtil/ZXKitUtil.release.xcconfig +++ b/example/Pods/Target Support Files/DDUtils/DDUtils.release.xcconfig @@ -1,13 +1,14 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ZXKitUtil +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/DDUtils GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift OTHER_LDFLAGS = $(inherited) -weak_framework "CryptoKit" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/ZXKitUtil +PODS_TARGET_SRCROOT = ${PODS_ROOT}/DDUtils PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES diff --git a/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-Info.plist b/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-Info.plist similarity index 94% rename from example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-Info.plist rename to example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-Info.plist index 2243fe6..19cf209 100644 --- a/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-Info.plist +++ b/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-Info.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - en + ${PODS_DEVELOPMENT_LANGUAGE} CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier diff --git a/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-acknowledgements.markdown b/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-acknowledgements.markdown similarity index 79% rename from example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-acknowledgements.markdown rename to example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-acknowledgements.markdown index 61c5bfa..7195105 100644 --- a/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-acknowledgements.markdown +++ b/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-acknowledgements.markdown @@ -1,31 +1,7 @@ # Acknowledgements This application makes use of the following third party libraries: -## SSZipArchive - -Copyright (c) 2013-2021, ZipArchive, https://github.com/ZipArchive - -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: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -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. - - -## ZXKitCore +## DDKitSwift MIT License @@ -50,7 +26,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -## ZXKitLogger +## DDLoggerSwift MIT License @@ -75,7 +51,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -## ZXKitUtil +## DDUtils MIT License diff --git a/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-acknowledgements.plist b/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-acknowledgements.plist similarity index 80% rename from example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-acknowledgements.plist rename to example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-acknowledgements.plist index 8d56df6..0699e72 100644 --- a/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-acknowledgements.plist +++ b/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-acknowledgements.plist @@ -12,36 +12,6 @@ Type PSGroupSpecifier - - FooterText - Copyright (c) 2013-2021, ZipArchive, https://github.com/ZipArchive - -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: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -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. - - License - MIT - Title - SSZipArchive - Type - PSGroupSpecifier - FooterText MIT License @@ -69,7 +39,7 @@ SOFTWARE. License MIT Title - ZXKitCore + DDKitSwift Type PSGroupSpecifier @@ -100,7 +70,7 @@ SOFTWARE. License MIT Title - ZXKitLogger + DDLoggerSwift Type PSGroupSpecifier @@ -131,7 +101,7 @@ SOFTWARE. License MIT Title - ZXKitUtil + DDUtils Type PSGroupSpecifier diff --git a/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-dummy.m b/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-dummy.m new file mode 100644 index 0000000..a18e647 --- /dev/null +++ b/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_DDKitSwift_Netfox : NSObject +@end +@implementation PodsDummy_Pods_DDKitSwift_Netfox +@end diff --git a/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-frameworks-Debug-input-files.xcfilelist b/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-frameworks-Debug-input-files.xcfilelist new file mode 100644 index 0000000..ba4708d --- /dev/null +++ b/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-frameworks-Debug-input-files.xcfilelist @@ -0,0 +1,5 @@ +${PODS_ROOT}/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-frameworks.sh +${BUILT_PRODUCTS_DIR}/DDKitSwift/DDKitSwift.framework +${BUILT_PRODUCTS_DIR}/DDLoggerSwift/DDLoggerSwift.framework +${BUILT_PRODUCTS_DIR}/DDUtils/DDUtils.framework +${BUILT_PRODUCTS_DIR}/netfox/netfox.framework \ No newline at end of file diff --git a/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-frameworks-Debug-output-files.xcfilelist b/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-frameworks-Debug-output-files.xcfilelist new file mode 100644 index 0000000..c8792d6 --- /dev/null +++ b/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-frameworks-Debug-output-files.xcfilelist @@ -0,0 +1,4 @@ +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DDKitSwift.framework +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DDLoggerSwift.framework +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DDUtils.framework +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/netfox.framework \ No newline at end of file diff --git a/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-frameworks-Release-input-files.xcfilelist b/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-frameworks-Release-input-files.xcfilelist new file mode 100644 index 0000000..ba4708d --- /dev/null +++ b/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-frameworks-Release-input-files.xcfilelist @@ -0,0 +1,5 @@ +${PODS_ROOT}/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-frameworks.sh +${BUILT_PRODUCTS_DIR}/DDKitSwift/DDKitSwift.framework +${BUILT_PRODUCTS_DIR}/DDLoggerSwift/DDLoggerSwift.framework +${BUILT_PRODUCTS_DIR}/DDUtils/DDUtils.framework +${BUILT_PRODUCTS_DIR}/netfox/netfox.framework \ No newline at end of file diff --git a/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-frameworks-Release-output-files.xcfilelist b/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-frameworks-Release-output-files.xcfilelist new file mode 100644 index 0000000..c8792d6 --- /dev/null +++ b/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-frameworks-Release-output-files.xcfilelist @@ -0,0 +1,4 @@ +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DDKitSwift.framework +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DDLoggerSwift.framework +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DDUtils.framework +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/netfox.framework \ No newline at end of file diff --git a/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-frameworks.sh b/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-frameworks.sh similarity index 92% rename from example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-frameworks.sh rename to example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-frameworks.sh index 287e69e..1189600 100755 --- a/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-frameworks.sh +++ b/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-frameworks.sh @@ -18,7 +18,7 @@ echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" -SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" +SWIFT_STDLIB_PATH="${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" BCSYMBOLMAP_DIR="BCSymbolMaps" @@ -41,7 +41,7 @@ install_framework() if [ -L "${source}" ]; then echo "Symlinked..." - source="$(readlink "${source}")" + source="$(readlink -f "${source}")" fi if [ -d "${source}/${BCSYMBOLMAP_DIR}" ]; then @@ -176,17 +176,15 @@ code_sign_if_enabled() { } if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework "${BUILT_PRODUCTS_DIR}/SSZipArchive/SSZipArchive.framework" - install_framework "${BUILT_PRODUCTS_DIR}/ZXKitCore/ZXKitCore.framework" - install_framework "${BUILT_PRODUCTS_DIR}/ZXKitLogger/ZXKitLogger.framework" - install_framework "${BUILT_PRODUCTS_DIR}/ZXKitUtil/ZXKitUtil.framework" + install_framework "${BUILT_PRODUCTS_DIR}/DDKitSwift/DDKitSwift.framework" + install_framework "${BUILT_PRODUCTS_DIR}/DDLoggerSwift/DDLoggerSwift.framework" + install_framework "${BUILT_PRODUCTS_DIR}/DDUtils/DDUtils.framework" install_framework "${BUILT_PRODUCTS_DIR}/netfox/netfox.framework" fi if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "${BUILT_PRODUCTS_DIR}/SSZipArchive/SSZipArchive.framework" - install_framework "${BUILT_PRODUCTS_DIR}/ZXKitCore/ZXKitCore.framework" - install_framework "${BUILT_PRODUCTS_DIR}/ZXKitLogger/ZXKitLogger.framework" - install_framework "${BUILT_PRODUCTS_DIR}/ZXKitUtil/ZXKitUtil.framework" + install_framework "${BUILT_PRODUCTS_DIR}/DDKitSwift/DDKitSwift.framework" + install_framework "${BUILT_PRODUCTS_DIR}/DDLoggerSwift/DDLoggerSwift.framework" + install_framework "${BUILT_PRODUCTS_DIR}/DDUtils/DDUtils.framework" install_framework "${BUILT_PRODUCTS_DIR}/netfox/netfox.framework" fi if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then diff --git a/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-umbrella.h b/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-umbrella.h similarity index 58% rename from example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-umbrella.h rename to example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-umbrella.h index 9bfa58f..ef73dec 100644 --- a/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-umbrella.h +++ b/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox-umbrella.h @@ -11,6 +11,6 @@ #endif -FOUNDATION_EXPORT double Pods_netfox_zxkitVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_netfox_zxkitVersionString[]; +FOUNDATION_EXPORT double Pods_DDKitSwift_NetfoxVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_DDKitSwift_NetfoxVersionString[]; diff --git a/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox.debug.xcconfig b/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox.debug.xcconfig new file mode 100644 index 0000000..47872af --- /dev/null +++ b/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox.debug.xcconfig @@ -0,0 +1,15 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/DDKitSwift" "${PODS_CONFIGURATION_BUILD_DIR}/DDLoggerSwift" "${PODS_CONFIGURATION_BUILD_DIR}/DDUtils" "${PODS_CONFIGURATION_BUILD_DIR}/netfox" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/DDKitSwift/DDKitSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/DDLoggerSwift/DDLoggerSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/DDUtils/DDUtils.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/netfox/netfox.framework/Headers" +LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_LDFLAGS = $(inherited) -l"sqlite3" -framework "DDKitSwift" -framework "DDLoggerSwift" -framework "DDUtils" -framework "netfox" -weak_framework "CryptoKit" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox.modulemap b/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox.modulemap new file mode 100644 index 0000000..f4940ab --- /dev/null +++ b/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox.modulemap @@ -0,0 +1,6 @@ +framework module Pods_DDKitSwift_Netfox { + umbrella header "Pods-DDKitSwift-Netfox-umbrella.h" + + export * + module * { export * } +} diff --git a/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox.release.xcconfig b/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox.release.xcconfig new file mode 100644 index 0000000..47872af --- /dev/null +++ b/example/Pods/Target Support Files/Pods-DDKitSwift-Netfox/Pods-DDKitSwift-Netfox.release.xcconfig @@ -0,0 +1,15 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/DDKitSwift" "${PODS_CONFIGURATION_BUILD_DIR}/DDLoggerSwift" "${PODS_CONFIGURATION_BUILD_DIR}/DDUtils" "${PODS_CONFIGURATION_BUILD_DIR}/netfox" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/DDKitSwift/DDKitSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/DDLoggerSwift/DDLoggerSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/DDUtils/DDUtils.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/netfox/netfox.framework/Headers" +LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_LDFLAGS = $(inherited) -l"sqlite3" -framework "DDKitSwift" -framework "DDLoggerSwift" -framework "DDUtils" -framework "netfox" -weak_framework "CryptoKit" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-dummy.m b/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-dummy.m deleted file mode 100644 index c2b20c2..0000000 --- a/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_netfox_zxkit : NSObject -@end -@implementation PodsDummy_Pods_netfox_zxkit -@end diff --git a/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-frameworks-Debug-input-files.xcfilelist b/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-frameworks-Debug-input-files.xcfilelist deleted file mode 100644 index 9ee9dfe..0000000 --- a/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-frameworks-Debug-input-files.xcfilelist +++ /dev/null @@ -1,6 +0,0 @@ -${PODS_ROOT}/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-frameworks.sh -${BUILT_PRODUCTS_DIR}/SSZipArchive/SSZipArchive.framework -${BUILT_PRODUCTS_DIR}/ZXKitCore/ZXKitCore.framework -${BUILT_PRODUCTS_DIR}/ZXKitLogger/ZXKitLogger.framework -${BUILT_PRODUCTS_DIR}/ZXKitUtil/ZXKitUtil.framework -${BUILT_PRODUCTS_DIR}/netfox/netfox.framework \ No newline at end of file diff --git a/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-frameworks-Debug-output-files.xcfilelist b/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-frameworks-Debug-output-files.xcfilelist deleted file mode 100644 index ec9b1b7..0000000 --- a/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-frameworks-Debug-output-files.xcfilelist +++ /dev/null @@ -1,5 +0,0 @@ -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SSZipArchive.framework -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZXKitCore.framework -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZXKitLogger.framework -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZXKitUtil.framework -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/netfox.framework \ No newline at end of file diff --git a/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-frameworks-Release-input-files.xcfilelist b/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-frameworks-Release-input-files.xcfilelist deleted file mode 100644 index 9ee9dfe..0000000 --- a/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-frameworks-Release-input-files.xcfilelist +++ /dev/null @@ -1,6 +0,0 @@ -${PODS_ROOT}/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-frameworks.sh -${BUILT_PRODUCTS_DIR}/SSZipArchive/SSZipArchive.framework -${BUILT_PRODUCTS_DIR}/ZXKitCore/ZXKitCore.framework -${BUILT_PRODUCTS_DIR}/ZXKitLogger/ZXKitLogger.framework -${BUILT_PRODUCTS_DIR}/ZXKitUtil/ZXKitUtil.framework -${BUILT_PRODUCTS_DIR}/netfox/netfox.framework \ No newline at end of file diff --git a/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-frameworks-Release-output-files.xcfilelist b/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-frameworks-Release-output-files.xcfilelist deleted file mode 100644 index ec9b1b7..0000000 --- a/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit-frameworks-Release-output-files.xcfilelist +++ /dev/null @@ -1,5 +0,0 @@ -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SSZipArchive.framework -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZXKitCore.framework -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZXKitLogger.framework -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZXKitUtil.framework -${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/netfox.framework \ No newline at end of file diff --git a/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit.debug.xcconfig b/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit.debug.xcconfig deleted file mode 100644 index 35de9f6..0000000 --- a/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit.debug.xcconfig +++ /dev/null @@ -1,15 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SSZipArchive" "${PODS_CONFIGURATION_BUILD_DIR}/ZXKitCore" "${PODS_CONFIGURATION_BUILD_DIR}/ZXKitLogger" "${PODS_CONFIGURATION_BUILD_DIR}/ZXKitUtil" "${PODS_CONFIGURATION_BUILD_DIR}/netfox" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SSZipArchive/SSZipArchive.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ZXKitCore/ZXKitCore.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ZXKitLogger/ZXKitLogger.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ZXKitUtil/ZXKitUtil.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/netfox/netfox.framework/Headers" -LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' -LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_LDFLAGS = $(inherited) -l"iconv" -l"sqlite3" -l"z" -framework "SSZipArchive" -framework "Security" -framework "ZXKitCore" -framework "ZXKitLogger" -framework "ZXKitUtil" -framework "netfox" -weak_framework "CryptoKit" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit.modulemap b/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit.modulemap deleted file mode 100644 index 5c527d4..0000000 --- a/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_netfox_zxkit { - umbrella header "Pods-netfox-zxkit-umbrella.h" - - export * - module * { export * } -} diff --git a/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit.release.xcconfig b/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit.release.xcconfig deleted file mode 100644 index 35de9f6..0000000 --- a/example/Pods/Target Support Files/Pods-netfox-zxkit/Pods-netfox-zxkit.release.xcconfig +++ /dev/null @@ -1,15 +0,0 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SSZipArchive" "${PODS_CONFIGURATION_BUILD_DIR}/ZXKitCore" "${PODS_CONFIGURATION_BUILD_DIR}/ZXKitLogger" "${PODS_CONFIGURATION_BUILD_DIR}/ZXKitUtil" "${PODS_CONFIGURATION_BUILD_DIR}/netfox" -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SSZipArchive/SSZipArchive.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ZXKitCore/ZXKitCore.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ZXKitLogger/ZXKitLogger.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ZXKitUtil/ZXKitUtil.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/netfox/netfox.framework/Headers" -LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' -LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_LDFLAGS = $(inherited) -l"iconv" -l"sqlite3" -l"z" -framework "SSZipArchive" -framework "Security" -framework "ZXKitCore" -framework "ZXKitLogger" -framework "ZXKitUtil" -framework "netfox" -weak_framework "CryptoKit" -OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_PODFILE_DIR_PATH = ${SRCROOT}/. -PODS_ROOT = ${SRCROOT}/Pods -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/example/Pods/Target Support Files/SSZipArchive/SSZipArchive-dummy.m b/example/Pods/Target Support Files/SSZipArchive/SSZipArchive-dummy.m deleted file mode 100644 index 9fabf79..0000000 --- a/example/Pods/Target Support Files/SSZipArchive/SSZipArchive-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_SSZipArchive : NSObject -@end -@implementation PodsDummy_SSZipArchive -@end diff --git a/example/Pods/Target Support Files/SSZipArchive/SSZipArchive-umbrella.h b/example/Pods/Target Support Files/SSZipArchive/SSZipArchive-umbrella.h deleted file mode 100644 index 332a149..0000000 --- a/example/Pods/Target Support Files/SSZipArchive/SSZipArchive-umbrella.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - -#import "SSZipArchive.h" -#import "SSZipCommon.h" - -FOUNDATION_EXPORT double SSZipArchiveVersionNumber; -FOUNDATION_EXPORT const unsigned char SSZipArchiveVersionString[]; - diff --git a/example/Pods/Target Support Files/SSZipArchive/SSZipArchive.debug.xcconfig b/example/Pods/Target Support Files/SSZipArchive/SSZipArchive.debug.xcconfig deleted file mode 100644 index d928358..0000000 --- a/example/Pods/Target Support Files/SSZipArchive/SSZipArchive.debug.xcconfig +++ /dev/null @@ -1,13 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SSZipArchive -DEFINES_MODULE = YES -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HAVE_INTTYPES_H HAVE_PKCRYPT HAVE_STDINT_H HAVE_WZAES HAVE_ZLIB -OTHER_LDFLAGS = $(inherited) -l"iconv" -l"z" -framework "Security" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/SSZipArchive -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/example/Pods/Target Support Files/SSZipArchive/SSZipArchive.modulemap b/example/Pods/Target Support Files/SSZipArchive/SSZipArchive.modulemap deleted file mode 100644 index c30b519..0000000 --- a/example/Pods/Target Support Files/SSZipArchive/SSZipArchive.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module SSZipArchive { - umbrella header "SSZipArchive-umbrella.h" - - export * - module * { export * } -} diff --git a/example/Pods/Target Support Files/SSZipArchive/SSZipArchive.release.xcconfig b/example/Pods/Target Support Files/SSZipArchive/SSZipArchive.release.xcconfig deleted file mode 100644 index d928358..0000000 --- a/example/Pods/Target Support Files/SSZipArchive/SSZipArchive.release.xcconfig +++ /dev/null @@ -1,13 +0,0 @@ -CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SSZipArchive -DEFINES_MODULE = YES -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HAVE_INTTYPES_H HAVE_PKCRYPT HAVE_STDINT_H HAVE_WZAES HAVE_ZLIB -OTHER_LDFLAGS = $(inherited) -l"iconv" -l"z" -framework "Security" -PODS_BUILD_DIR = ${BUILD_DIR} -PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/SSZipArchive -PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/example/Pods/Target Support Files/ZXKitCore/ZXKitCore-dummy.m b/example/Pods/Target Support Files/ZXKitCore/ZXKitCore-dummy.m deleted file mode 100644 index 258d81f..0000000 --- a/example/Pods/Target Support Files/ZXKitCore/ZXKitCore-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_ZXKitCore : NSObject -@end -@implementation PodsDummy_ZXKitCore -@end diff --git a/example/Pods/Target Support Files/ZXKitCore/ZXKitCore.modulemap b/example/Pods/Target Support Files/ZXKitCore/ZXKitCore.modulemap deleted file mode 100644 index d1afa8f..0000000 --- a/example/Pods/Target Support Files/ZXKitCore/ZXKitCore.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module ZXKitCore { - umbrella header "ZXKitCore-umbrella.h" - - export * - module * { export * } -} diff --git a/example/Pods/Target Support Files/ZXKitLogger/ZXKitLogger-dummy.m b/example/Pods/Target Support Files/ZXKitLogger/ZXKitLogger-dummy.m deleted file mode 100644 index 0cd1245..0000000 --- a/example/Pods/Target Support Files/ZXKitLogger/ZXKitLogger-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_ZXKitLogger : NSObject -@end -@implementation PodsDummy_ZXKitLogger -@end diff --git a/example/Pods/Target Support Files/ZXKitLogger/ZXKitLogger-umbrella.h b/example/Pods/Target Support Files/ZXKitLogger/ZXKitLogger-umbrella.h deleted file mode 100644 index 51f02fe..0000000 --- a/example/Pods/Target Support Files/ZXKitLogger/ZXKitLogger-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double ZXKitLoggerVersionNumber; -FOUNDATION_EXPORT const unsigned char ZXKitLoggerVersionString[]; - diff --git a/example/Pods/Target Support Files/ZXKitLogger/ZXKitLogger.modulemap b/example/Pods/Target Support Files/ZXKitLogger/ZXKitLogger.modulemap deleted file mode 100644 index 4fc0923..0000000 --- a/example/Pods/Target Support Files/ZXKitLogger/ZXKitLogger.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module ZXKitLogger { - umbrella header "ZXKitLogger-umbrella.h" - - export * - module * { export * } -} diff --git a/example/Pods/Target Support Files/ZXKitUtil/ZXKitUtil-Info.plist b/example/Pods/Target Support Files/ZXKitUtil/ZXKitUtil-Info.plist deleted file mode 100644 index 3424ca6..0000000 --- a/example/Pods/Target Support Files/ZXKitUtil/ZXKitUtil-Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 4.0.0 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/example/Pods/Target Support Files/ZXKitUtil/ZXKitUtil-dummy.m b/example/Pods/Target Support Files/ZXKitUtil/ZXKitUtil-dummy.m deleted file mode 100644 index ba861b6..0000000 --- a/example/Pods/Target Support Files/ZXKitUtil/ZXKitUtil-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_ZXKitUtil : NSObject -@end -@implementation PodsDummy_ZXKitUtil -@end diff --git a/example/Pods/Target Support Files/ZXKitUtil/ZXKitUtil.modulemap b/example/Pods/Target Support Files/ZXKitUtil/ZXKitUtil.modulemap deleted file mode 100644 index 75677cf..0000000 --- a/example/Pods/Target Support Files/ZXKitUtil/ZXKitUtil.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module ZXKitUtil { - umbrella header "ZXKitUtil-umbrella.h" - - export * - module * { export * } -} diff --git a/example/Pods/Target Support Files/netfox/netfox-Info.plist b/example/Pods/Target Support Files/netfox/netfox-Info.plist index cc9cc52..41a7a63 100644 --- a/example/Pods/Target Support Files/netfox/netfox-Info.plist +++ b/example/Pods/Target Support Files/netfox/netfox-Info.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - en + ${PODS_DEVELOPMENT_LANGUAGE} CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier diff --git a/example/Pods/Target Support Files/netfox/netfox.debug.xcconfig b/example/Pods/Target Support Files/netfox/netfox.debug.xcconfig index 164e67c..a28e79f 100644 --- a/example/Pods/Target Support Files/netfox/netfox.debug.xcconfig +++ b/example/Pods/Target Support Files/netfox/netfox.debug.xcconfig @@ -1,10 +1,11 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/netfox GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} PODS_ROOT = ${SRCROOT} PODS_TARGET_SRCROOT = ${PODS_ROOT}/netfox PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates diff --git a/example/Pods/Target Support Files/netfox/netfox.release.xcconfig b/example/Pods/Target Support Files/netfox/netfox.release.xcconfig index 164e67c..a28e79f 100644 --- a/example/Pods/Target Support Files/netfox/netfox.release.xcconfig +++ b/example/Pods/Target Support Files/netfox/netfox.release.xcconfig @@ -1,10 +1,11 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/netfox GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} PODS_ROOT = ${SRCROOT} PODS_TARGET_SRCROOT = ${PODS_ROOT}/netfox PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates diff --git a/example/Pods/ZXKitCore/README.md b/example/Pods/ZXKitCore/README.md deleted file mode 100644 index b33f2ad..0000000 --- a/example/Pods/ZXKitCore/README.md +++ /dev/null @@ -1,171 +0,0 @@ -# ZXKitCore - -![](https://img.shields.io/badge/CocoaPods-supported-brightgreen) ![](https://img.shields.io/badge/Swift-5.0-brightgreen) ![](https://img.shields.io/badge/License-MIT-brightgreen) ![](https://img.shields.io/badge/version-iOS11.0-brightgreen) - -[English](./README_en.md) - -如果您需要的是快速集成多个调试功能,例如日志查看、网速测试、文件查看等功能,请使用 [DamonHu/ZXKitSwift](https://github.com/DamonHu/ZXKitSwift)。 - -`ZXKitCore`是`ZXKit`插件的支撑框架,面向的对象是`ZXKit`插件的开发。该框架提供了插件显示、管理等功能,只需要实现对应的`ZXKitPluginProtocol`协议,即可快速的开发出ZXKit插件并显示使用。该文档提供了插件开发教程和使用教程,开发者可以根据需要查看。 - -> 天地不仁,以万物为刍狗 -> -诛仙 - - -## 开发一个ZXKit插件 - -如果需要开发自定义插件,只需要实现`ZXKitPluginProtocol`即可。实现的方式很简单。 - -### 1、导入核心文件 - -项目导入`ZXKitCore`,可使用cocoapods快速导入核心文件 - -``` -pod 'ZXKitCore' -``` - -### 2、实现协议 - -声明一个对象,遵守`ZXKitPluginProtocol`协议即可。分别返回对应插件的唯一标识,对应的icon、插件名字、插件类型分组、启动函数 - -``` -class PluginDemo: NSObject { - var isPluginRunning = true -} - -extension PluginDemo: ZXKitPluginProtocol { - //唯一标识 - var pluginIdentifier: String { - return "com.zxkit.pluginDemo" - } - - var pluginIcon: UIImage? { - return UIImage(named: "zxkit") - } - - var pluginTitle: String { - return "插件标题" - } - - var pluginType: ZXKitPluginType { - return .ui - } - - func start() { - print("点击启动该插件") - isPluginRunning = true - } - - var isRunning: Bool { - return isPluginRunning - } - - func stop() { - print("插件停止运行") - isPluginRunning = false - } -} -``` - -### 3、注册插件 - -之后注册插件即可,全局只需注册一次即可 - -``` -ZXKit.regist(plugin: PluginDemo()) -``` - -### 4、完成 - -cocoapods发布上线之后,当用户打开`ZXKit`时,调试集合页就会出现您的插件 - -## 5、自定义配置 - -#### 5.1、可通过修改`UIConfig`修改窗口颜色等显示 - -``` -ZXKit.UIConfig -``` - -#### 5.2、调试文件夹,悬浮菜单分享时会将该文件夹打包分享 - -``` -ZXKit.DebugFolderPath -``` - -#### 5.3、显示输入框 - -``` -ZXKit.show(.input(placeholder: "placeholder", text: nil, endEdit: { text in - print(text) -})) -``` - -#### 5.4、更新悬浮图标 - -``` -let config = ZXKitButtonConfig(title: "test\(i)") -ZXKit.updateFloatButton(config: config, plugin: PluginDemo()) -``` - -#### 5.5、输出调试数据到悬浮窗 - -``` -printError("error") -``` - -### 消息通知 - -`ZXKitCore`提供了以下消息通知,您可以通过绑定以下通知获取框架显示、隐藏、关闭、注册新插件的时机 - -``` -//注册新插件 -NSNotification.Name.ZXKitPluginRegist -//显示 -NSNotification.Name.ZXKitShow -//隐藏 -NSNotification.Name.ZXKitHide -//关闭 -NSNotification.Name.ZXKitClose -``` - -## 安装使用ZXKit插件 - -`ZXKit`插件使用很简单,只需要导入对应的库,在`AppDelegate`启动函数注册即可。例如安装`日志插件ZXKitLogger`。 - -### 首先pod安装对应插件 - -``` -pod 'ZXKitLogger/zxkit' -``` -### 注册插件 - -``` -ZXKit.regist(plugin: ZXKitLogger.shared) -``` - -### 打开插件列表 - -``` -ZXKit.show() -``` - -### 隐藏插件列表 - -``` -ZXKit.hide() -``` - -### 关闭插件列表 - -``` -ZXKit.close() -``` - -## ZXKitSwift - -我们发布了一个cocoaPods库,名字叫[ZXKitSwift](https://github.com/DamonHu/ZXKitSwift),这是一个集成了多个ZXKit插件的工具库。可以帮助你快速使用多个调试功能。 - -## License - -ZXKitCore 基于 MIT license 发布。 diff --git a/example/Pods/ZXKitCore/pod/ZXKitPluginProtocol.swift b/example/Pods/ZXKitCore/pod/ZXKitPluginProtocol.swift deleted file mode 100644 index f034977..0000000 --- a/example/Pods/ZXKitCore/pod/ZXKitPluginProtocol.swift +++ /dev/null @@ -1,25 +0,0 @@ -// -// ZXKitPluginProtocol.swift -// ZXKit -// -// Created by Damon on 2021/4/23. -// - -import UIKit - -public enum ZXKitPluginType { - case ui - case data - case other -} - -public protocol ZXKitPluginProtocol { - var pluginIdentifier: String { get } - var pluginIcon: UIImage? { get } - var pluginTitle: String { get } - var pluginType: ZXKitPluginType { get } - var isRunning: Bool { get } - - func start() - func stop() -} diff --git a/example/Pods/ZXKitCore/pod/extend/ZXKitLogger+zxkit.swift b/example/Pods/ZXKitCore/pod/extend/ZXKitLogger+zxkit.swift deleted file mode 100644 index ab01650..0000000 --- a/example/Pods/ZXKitCore/pod/extend/ZXKitLogger+zxkit.swift +++ /dev/null @@ -1,43 +0,0 @@ -// -// ZXLogger+zxkit.swift -// ZXKitLogger -// -// Created by Damon on 2021/4/25. -// Copyright © 2021 Damon. All rights reserved. -// - -import Foundation -import ZXKitLogger - -//ZXKitPlugin -extension ZXKitLogger: ZXKitPluginProtocol { - public var pluginIdentifier: String { - return "com.zxkit.zxkitLogger" - } - - public var pluginIcon: UIImage? { - return UIImageHDBoundle(named: "logger_logo") - } - - public var pluginTitle: String { - return "Logger".ZXLocaleString - } - - public var pluginType: ZXKitPluginType { - return .data - } - - public func start() { - ZXKit.hide() - ZXKitLogger.show() - } - - public var isRunning: Bool { - return true - } - - public func stop() { - ZXKit.hide() - ZXKitLogger.show() - } -} diff --git a/example/Pods/ZXKitLogger/README.md b/example/Pods/ZXKitLogger/README.md deleted file mode 100644 index d2d2443..0000000 --- a/example/Pods/ZXKitLogger/README.md +++ /dev/null @@ -1,357 +0,0 @@ -# ZXKitLogger - -![](https://img.shields.io/badge/CocoaPods-supported-brightgreen) ![](https://img.shields.io/badge/Swift-5.0-brightgreen) ![](https://img.shields.io/badge/License-MIT-brightgreen) ![](https://img.shields.io/badge/version-iOS11.0-brightgreen) - -[English](./README_en.md) - -> 如果您需要的是快速集成多个调试功能,例如日志查看、网速测试、文件查看等功能,可使用 [DamonHu/ZXKitSwift](https://github.com/DamonHu/ZXKitSwift)。 - - -iOS端将输出日志log悬浮显示在屏幕上,可以生成日志文件分享,便于在真机没有连接xcode的情况下调试信息。可以分享、筛选log等操作。 - -该项目使用`sqlite`高效存储,后台运行期间只记录数据,不会影响界面性能,前台运行效率高,基本和Xcode同步输出日志,可以查看和xCode日志输出的对比gif图 - -|预览gif图|Xcode对比gif图| -|----|----| -|![](./readmeResources/preview.gif)|![](./readmeResources/debug.gif)| - - -|预览图|分享 & FPS| -|----|----| -|![](./readmeResources/mobile_preview.png)
XCode预览图
![](./readmeResources/xcode_preview.png)|![](./readmeResources/share_preview.png)| - -![](./readmeResources/preview.png) - -## 一、安装 - -你可以选择使用cocoaPod安装,也可以直接下载源文件拖入项目中 - -### 1.1、cocoaPod安装 - -``` -pod 'ZXKitLogger' -``` - -### 1.2、文件安装 - -可以将工程底下,`pod`文件夹内的文件拖入项目即可 - -## 二、使用 - -简单三步即可调用 - -### 1、导入头文件 - -``` -import ZXKitLogger -``` - -### 2、显示悬浮窗 - -``` -ZXKitLogger.show() -``` - -### 3、打印日志内容 - -四种输出方式字体颜色显示不同,对应的printLog不同的类型 - -``` -printDebug(log) //调试输出,默认不会写入数据库 - -printLog(log) //日志为绿色 - -printWarn(log) //日志为黄色 - -printError(log) //日志为红色 - -printPrivacy(log) //加密数据的输出,具体加密方式在下面的加密中说明 - -``` - -输出格式 - -``` -2021-08-11 10:07:28.378 ---- ⚠️⚠️ ---- File: ViewController.swift -- Line: 82 -- Function:ViewController.swift.onClickButton() ---- -警告提示 - -2021-08-11 10:07:28.380 ---- ❌❌ ---- File: ViewController.swift -- Line: 84 -- Function:ViewController.swift.onClickButton() ---- -错误出现 - -2021-08-11 10:07:28.381 ---- ⛔️⛔️ ---- File: ViewController.swift -- Line: 86 -- Function:ViewController.swift.onClickButton() ---- -AAuKjIm5hC2jiPqz7OKHAngWspeACyWZufDguqdOcugituhWV8jnbr/6SHYoK0/9 - -2021-08-11 10:07:28.383 ---- ✅✅ ---- File: ViewController.swift -- Line: 89 -- Function:ViewController.swift.onClickButton() ---- -{ - "77777" : "数据库的复健科花见花开会尽快圣诞节开发和金黄色的费四大皆空回复就开始和豆腐是砍价的回复斯柯达金凤凰", - "hhhhhhh" : "撒旦法是打发斯蒂芬是打发斯蒂芬" -} - -2021-08-11 10:07:28.388 ---- 💜💜 ---- File: ViewController.swift -- Line: 76 -- Function:ViewController.swift.onClickButton() ---- -测试输出,默认不会写入数据库 -``` - -## 三、更多设置 - -通过其他设置可以实现获取更多功能 - -### 1、设置是否输出全部信息 - -``` -ZXKitLogger.isFullLogOut = true -``` - -如果设置为`true`,那么输出的格式是下面这样的,包含了输出文件、调用的行数、和调用的函数 - -``` -13:36:08.474 ---- ⚠️⚠️ ---- File: ViewController.swift -- Line: 82 -- Function:ViewController.swift.onClickButton() ---- -警告提示 - -13:36:08.476 ---- ❌❌ ---- File: ViewController.swift -- Line: 84 -- Function:ViewController.swift.onClickButton() ---- -错误出现 - -13:36:08.487 ---- ⛔️⛔️ ---- File: ViewController.swift -- Line: 86 -- Function:ViewController.swift.onClickButton() ---- -AAuKjIm5hC2jiPqz7OKHAngWspeACyWZufDguqdOcugituhWV8jnbr/6SHYoK0/9 - -13:36:08.489 ---- ✅✅ ---- File: ViewController.swift -- Line: 89 -- Function:ViewController.swift.onClickButton() ---- -{ - "hhhhhhh" : "撒旦法是打发斯蒂芬是打发斯蒂芬", - "77777" : "数据库的复健科花见花开会尽快圣诞节开发和金黄色的费四大皆空回复就开始和豆腐是砍价的回复斯柯达金凤凰" -} - -2021-08-11 10:07:28.388 ---- 💜💜 ---- File: ViewController.swift -- Line: 76 -- Function:ViewController.swift.onClickButton() ---- -测试输出,默认不会写入数据库 -``` - -设置为`false`的输出样式 - -``` -2021-08-11 10:10:33.309 ---- ⚠️⚠️ ---- -警告提示 - -2021-08-11 10:10:33.310 ---- ❌❌ ---- -错误出现 - -2021-08-11 10:10:33.312 ---- ⛔️⛔️ ---- -AAuKjIm5hC2jiPqz7OKHAngWspeACyWZufDguqdOcugituhWV8jnbr/6SHYoK0/9 - -2021-08-11 10:10:33.318 ---- ✅✅ ---- -{ - "hhhhhhh" : "撒旦法是打发斯蒂芬是打发斯蒂芬", - "77777" : "数据库的复健科花见花开会尽快圣诞节开发和金黄色的费四大皆空回复就开始和豆腐是砍价的回复斯柯达金凤凰" -} - -2021-08-11 10:10:33.323 ---- 💜💜 ---- -测试输出,默认不会写入数据库 -``` - -### 2、是否在xcode底部的调试栏同步输出内容 - -``` -ZXKitLogger.isSyncConsole = true -``` - -### 3、针对不同用户设置独立日志文件夹 - -``` -ZXKitLogger.userID = "1001" -``` - -### 4、清空log - -``` -ZXKitLogger.cleanLog() -``` - -### 5、关闭整个log窗口 - -``` -ZXKitLogger.close() -``` - -### 6、仅隐藏log输出窗口 - -``` -ZXKitLogger.hide() -``` - -### 7、设置显示log最大记录数,0为不限制, 默认为100 - -``` -ZXKitLogger.maxDisplayCount = 100 -``` - -### 8、 删除本地日志文件 - -``` -ZXKitLogger.deleteLogFile() -``` - -### 9、 本地日志文件的有效期(天),超出有效期的本地日志会被删除,0为没有有效期,默认为30天 - -``` -ZXKitLogger.logExpiryDay = 30 -``` - -### 10、存储日志的级别 - -包含在内的日志级别会被存储到数据库,默认debug级别不存储 - -``` - -ZXKitLogger.storageLevels = [.info, .warn, .error, .privacy] - -``` - -### 11、获取数据库存储的日志信息数组,也可以指定日期 - -``` -//获取今日的日志 -ZXKitLogger.getAllLog() -//指定日期 -ZXKitLogger.getAllLog(date: Date(timeIntervalSinceNow: 1000)) -``` - - -如果你想获取所有日志文件,可以获取日志存储的文件夹,返回的是一个URL结果,然后自己进行遍历去处理 - -``` -ZXKitLogger.getDBFolder() -``` - -例如 - -``` -let dbFolder = ZXKitLogger.getDBFolder() - -if let enumer = FileManager.default.enumerator(atPath: dbFolder.path) { - while let file = enumer.nextObject() { - if let file: String = file as? String { - if file.hasSuffix(".db") { - //获取到具体的log文件日志 - let logFilePath = dbFolder.appendingPathComponent(file, isDirectory: false) - } - } - } -} -``` - -### 12、直接显示日志分享window - -如果你不想让用户看到日志输出的window,而仅仅是让分享日志,则可以调用 - -``` -ZXKitLogger.showShare() -``` - -### 13、显示日志上传选择window和按钮 - -如果你想让用户上传db文件,除了可以自己遍历,我们也提供了快捷方案,和分享一样,调用 - -``` -ZXKitLogger.showUpload() -``` - -即可出现上传的选项,用户选择之后确定的回调在`uploadComplete`,你实现该回调即可,例如 - -``` -ZXKitLogger.uploadComplete = { file in - print(file) - //处理上传 -} -``` - -### LogContent协议 - -如果你想自定义输出的内容,可以集成并该类型的LogContent协议,例如设置打印`URL`类型只输出它的`path`,可以直接设置返回的`logStringValue`即可。 - -``` -extension URL: LogContent { - public var logStringValue: String { - return self.path - } -} -``` - - -## 四、 敏感信息输出加密和解密 - -如果存在敏感信息,不希望用户或者手机调试时看到,简单两步就可以设置加密 - -``` -//1、设置加密密码,32个字符数字。默认为12345678901234561234567890123456 -ZXKitLogger.privacyLogPassword = "12345678901234561234567890123456" - -//2、输出加密内容 -printPrivacy("这个是加密数据的测试数据222") -``` - -### 4.2、显示窗内容解密 - -设置之后,在显示窗中的显示为`该内容已加密,请解密后查看`,输入设置的加密密码然后点击解密之后即可显示正常的加密内容。 - -### 4.1、 分享文件解密 - -* 如果已经在显示窗解密了数据,此时分享的文件内容不会加密,会显示所有内容。 -* 如果在显示窗中未解密,此时分享出的文件内容为AES加密内容,可以搜索`AES在线解密的网站`去解密内容,设置参照下图: - -![](./readmeResources/decrypt.png) - -* 模式: CBC -* 填充: Pkcs7 -* 数据块: 128位 -* 偏移量: abcdefghijklmnop -* 编码: Base64 -* 字符集: UTF8 -* 密码: 你自己在sdk中设置的密码 - -然后点击解密即可。 - -这里推荐几个在线的网站,你也可以自己百度 - -* [https://oktools.net/aes](https://oktools.net/aes) -* [http://tools.bugscaner.com/cryptoaes/](http://tools.bugscaner.com/cryptoaes/) -* [http://tool.chacuo.net/cryptaes](http://tool.chacuo.net/cryptaes) - - -## 五、日志查看客户端 - -该库使用SQLite存储日志信息,如果使用通用的SQLite查看工具,只是一条一条的表格,并且有的还收费。所以可以使用[ZXKitLogger_Mac](https://github.com/DamonHu/ZXKitLogger_Mac)的客户端配合查看`ZXKitLogger`导出的SQLite文件。 - -![](./readmeResources/Jietu20220731-212644.png) - -## 六、局域网实时日志 - -`3.0.0` 版本之后,可配合上面的日志查看工具,可实现局域网实时日志查看,简单配置接口使用 - -1、增加局域网功能 - -``` -pod 'ZXKitLogger/socket' -``` - -2、在项目`info.plist`增加局域网描述,和`Bonjour`的服务字段。 - -``` -NSBonjourServices - - _zxkitlogger._tcp - -NSLocalNetworkUsageDescription -查找本地网络以便使用Bonjour功能 -``` - -**注意:`NSBonjourServices`的type值和`ZXKitLogger.socketType`保持一致,ZXKitLogger代码中的`socketType`可以自定义,修改之后info.plist也做对应的修改即可** - -无需其他配置,即可在通过[ZXKitLogger_Mac](https://github.com/DamonHu/ZXKitLogger_Mac)查看同一局域网下的设备日志 - -## 七、其他说明tips - -1. 为了查看方便,分为普通、警告、错误三种类型,对应了三种不同的颜色,方便查看 -2. 点击对应的cell可以直接将输出log复制到系统剪贴板 -3. 分享调用的系统分享,可以分享到哪个软件取决于你手机上安装的有哪些软件。 -4. 分享出去的log文件可在任意文本编辑器查看,在`VSCode`查看会有代码高亮效果 - -## License - -该项目基于MIT协议,您可以自由修改使用 \ No newline at end of file diff --git a/example/Pods/ZXKitUtil/README.md b/example/Pods/ZXKitUtil/README.md deleted file mode 100644 index 4d4efff..0000000 --- a/example/Pods/ZXKitUtil/README.md +++ /dev/null @@ -1,146 +0,0 @@ - -# ZXKitUtil - -![](https://img.shields.io/badge/CocoaPods-supported-brightgreen) ![](https://img.shields.io/badge/Swift-5.0-brightgreen) ![](https://img.shields.io/badge/License-MIT-brightgreen) ![](https://img.shields.io/badge/version-iOS10.0-brightgreen) - -[English](./README_en.md) - -`ZXKitUtil`是一个常用功能的合集, 简单高效的集成常用功能。 - -OC版本: [HDCommonTools](https://github.com/DamonHu/HDCommonTools) - -## 一、导入项目 - -### 通过cocoapods导入 - -``` -pod 'ZXKitUtil' -``` - -如果需要`idfa`的功能,可以选择导入 - -``` -pod 'ZXKitUtil/idfa' -``` - -### 通过文件导入 - -下载项目,将项目文件下的pod文件夹里面的内容导入项目即可 - -## 二、API列表 - -已有的数据类型操作可以通过`.zx`的语法,其他操作可以通过`ZXKitUtil.shared`单例来使用。 - -* 单例和`.zx`使用没区别,单例会更统一简单,`.zx`语法的好处就是不需要在使用的地方导入 - -### UI相关 - -|名称|功能说明|示例| -|----|----|----| -|func getCurrentNormalWindow()|获取当前的NormalWindow|ZXKitUtil.shared.getCurrentNormalWindow()| -|func getCurrentVC()|获取当前的ViewController|ZXKitUtil.shared.getCurrentVC()| -|func getImage(color: UIColor)|通过颜色生成一张纯色背景图|ZXKitUtil.shared.getImage(color: UIColor.red)
或者
UIImage.zx.getImage(color: UIColor.red)| -|func getLinearGradientImage(colors: [UIColor], directionType: ZXKitUtilGradientDirection, size: CGSize = CGSize(width: 100, height: 100))|生成线性渐变的图片|ZXKitUtil.shared.getLinearGradientImage(colors: [UIColor.red, UIColor.black, UIColor.blue]
或者
UIImage.zx.getLinearGradientImage(colors: [UIColor.red, UIColor.black, UIColor.blue], directionType: .leftToRight)| -|func getRadialGradientImage(colors: [UIColor], raduis: CGFloat, size: CGSize = CGSize(width: 100, height: 100))|生成角度渐变的图片|ZXKitUtil.shared.getRadialGradientImage(colors: [UIColor.red, UIColor.black, UIColor.blue], raduis: 45)
或者
UIImage.zx.getRadialGradientImage(colors: [UIColor.red, UIColor.black, UIColor.blue], raduis: 45)| -|func getColor(hexString: String, alpha: CGFloat = 1.0)|通过十六进制字符串获取颜色| UIColor.zx.color(hexString: "#FFFFFF")| -|func UIColor(hexValue: Int, darkHexValue: Int = 0x333333, alpha: Float = 1.0, darkAlpha: Float = 1.0)|通过十六进制获取颜色| UIColor.zx.color(hexValue: 0xffffff)| -|UIScreenWidth|屏幕宽度|| -|UIScreenHeight|屏幕高度|| -|ZXKitUtil_StatusBar_Height|状态栏高度|| -|ZXKitUtil_HomeIndicator_Height|Home Indicator高度|| -|func ZXKitUtil_Default_NavigationBar_Height(vc: UIViewController? = nil)|导航栏高度|ZXKitUtil_Default_NavigationBar_Height()| -|func func ZXKitUtil_Default_Tabbar_Height(vc: UIViewController? = nil)|tabbar高度|ZXKitUtil_Default_Tabbar_Height()| -|func addLayerShadow(color: UIColor, offset: CGSize, radius: CGFloat, cornerRadius: CGFloat? = nil)|为view添加阴影|view.zx.addLayerShadow(color: UIColor.black, offset: CGSize(width: 2, height: 0), radius: 10)| -|func setFrame(x: CGFloat? = nil, y: CGFloat? = nil, width: CGFloat? = nil, height: CGFloat? = nil)|view单独设置Frame的某个值|view.zx.setFrame(x: 10)| -|func className() -> String|获取view的类名|button.zx.className()| - -### 系统和软件信息 - -|名称|功能说明|示例| -|----|----|----| -|func getAppVersionString()|获取软件版本|ZXKitUtil.shared.getAppVersionString()| -|func getAppBuildVersionString()|获取软件构建版本|ZXKitUtil.shared.getAppBuildVersionString()| -|func getAppNameString()|获取软件的显示名字|ZXKitUtil.shared.getAppNameString()| -|func getIOSVersionString()|获取系统的iOS版本|ZXKitUtil.shared.getIOSVersionString()| -|func getIOSLanguageStr()|获取系统语言|ZXKitUtil.shared.getIOSLanguageStr()| -|func getBundleIdentifier()|获取软件Bundle Identifier|ZXKitUtil.shared.getBundleIdentifier()| -|func getSystemHardware()|获取本机机型标识|ZXKitUtil.shared.getSystemHardware()| -|func getSystemUpTime()|获取本机上次重启时间|ZXKitUtil.shared.getSystemUpTime()| -|func getIDFAString(idfvIfFailed: Bool = true)|模拟软件唯一标示|ZXKitUtil.shared.getIDFAString()| -|func getMacAddress()|获取手机WIFI的MAC地址,需要开启Access WiFi information|ZXKitUtil.shared.getMacAddress()| -|func openSystemSetting()|打开系统设置|ZXKitUtil.shared.openSystemSetting()| -|func openAppStorePage(openType: ZXKitUtilOpenAppStoreType, appleID: String)|打开软件对应的App Store页面|ZXKitUtil.shared.openAppStorePage(openType: .app, appleID: "1123211")| -|func openAppStoreReviewPage(openType: ZXKitUtilOpenAppStoreType, appleID: String = "")|打开软件对应的评分页面|ZXKitUtil.shared.openAppStoreReviewPage(openType: .app)| - -### 软件权限 - -|名称|功能说明|示例| -|----|----|----| -|func requestPermission(type: ZXKitUtilPermissionType, complete: @escaping ((ZXKitUtilPermissionStatus) -> Void))|请求权限|ZXKitUtil.shared.requestPermission(type: .notification) { (status) in print("权限设置回调", status) }| -|func checkPermission(type: ZXKitUtilPermissionType, complete: @escaping ((ZXKitUtilPermissionStatus) -> Void))|检测软件权限|ZXKitUtil.shared.checkPermission(type: .notification) { (status) in print("当前权限状态", status) }| -|func requestIDFAPermission(complete: @escaping ((ZXKitUtilPermissionStatus) -> Void)) -> Void|请求软件IDFA权限|ZXKitUtil.shared.requestIDFAPermission { (status) in print("当前idfa权限状态", status) }| -|func checkIDFAPermission(type: ZXKitUtilPermissionType, complete: @escaping ((ZXKitUtilPermissionStatus) -> Void)) -> Void|检测软件idfa权限|ZXKitUtil.shared.checkIDFAPermission { (status) in print("当前权限状态", status) }| - -### 多媒体操作 - -|名称|功能说明|示例| -|----|----|----| -|func getVideoDuration(videoURL: URL) -> Double|获取指定video的时长, 单位秒| ZXKitUtil.shared.getVideoDuration(videoURL: URL(fileURLWithPath: path))| -|func getVideoSize(videoURL: URL)|获取指定视频的分辨率,支持本地或者网络地址|ZXKitUtil.shared.getVideoSize(videoURL: URL(fileURLWithPath: path))| -|func playMusic(url: URL?, repeated: Bool = false, audioSessionCategory: AVAudioSession.Category = AVAudioSession.Category.playback)|播放音乐|ZXKitUtil.shared.playMusic(url: url, repeated: false)| -|func stopMusic()|关闭音乐播放|ZXKitUtil.shared.stopMusic()| -|func playEffect(url: URL?, vibrate: Bool = false)|播放音效,静音模式不会播放音效|ZXKitUtil.shared.playEffect(url: url, vibrate: true)| -|func startVibrate(repeated: Bool = false)|开始震动|ZXKitUtil.shared.startVibrate()| -|func stopVibrate()|结束震动|ZXKitUtil.shared.stopVibrate()| - -### 文件操作 - -|名称|功能说明|示例| -|----|----|----| -|func getFileDirectory(type: ZXKitUtilFileDirectoryType)|获取文件夹路径|ZXKitUtil.shared.getFileDirectory(type: .documents)| -|func createFileDirectory(in type: ZXKitUtilFileDirectoryType, directoryName: String)|在指定文件夹中创建文件夹|ZXKitUtil.shared.createFileDirectory(in: .documents, directoryName: "filePath")| -|func getFileSize(filePath: URL)|获取指定文件的大小|ZXKitUtil.shared.getFileSize(filePath: url)| -|func getFileDirectorySize(fileDirectoryPth: URL)|获取指定文件夹的大小|ZXKitUtil.shared.getFileDirectorySize(fileDirectoryPth: url)| - -### 其他 - -#### ZXKitUtil - -|名称|功能说明|示例| -|----|----|----| -|func getDictionary(object: Any, debug: Bool = false) -> [String: Any]|遍历获取class\struct的所有属性名和值|ZXKitUtil.shared.getDictionary(object: testModel)| -|func runInMainThread(type: ZXMainThreadType = .default, function: @escaping ()->Void)|主线程执行function|ZXKitUtil.shared.runInMainThread(type: .sync) { ... }| - -#### String - -|名称|功能说明|示例| -|----|----|----| -|func subString(rang: NSRange)|截取字符串|string.zx.subString(rang: NSRange(location: 2, length: 5))| -|func unicodeDecode()|unicode转中文|"\\u54c8\\u54c8\\u54c8".zx.unicodeDecode()| -|func unicodeEncode()|字符串转unicode|"哈哈是电话费".zx.unicodeEncode()| -|func encodeString(from originType: ZXKitUtilEncodeType = .system(.utf8), to encodeType: ZXKitUtilEncodeType)|字符串修改编码显示|"5ZOI5ZOI5piv55S16K+d6LS5".zx.encodeString(from: .base64, to: .system(.utf8))| -|func aesCBCEncrypt(password: String, ivString: String = "abcdefghijklmnop")|aes cbc模式加密|string.zx.aesCBCEncrypt(password: "password")| -|func aesCBCDecrypt(password: String, ivString: String = "abcdefghijklmnop")|aes cbc解密|string.zx.aesCBCDecrypt(password: "password")| -|func hashString(hashType: ZXKitUtilHashType, lowercase: Bool = true)|字符串hash计算|string.zx. hashString(hashType: .md5)
支持md5/sha1/sha224/sha256/sha384/sha512| -|func aesGCMEncrypt(password: String, encodeType: ZXKitUtilEncodeType = .base64, nonce: AES.GCM.Nonce? = AES.GCM.Nonce())|aes gcm模式加密|string.zx.aesGCMEncrypt(password: "password")| -|func aesGCMDecrypt(password: String, encodeType: ZXKitUtilEncodeType = .base64)|aes gcm模式解密|string.zx.aesGCMDecrypt(password: "password")| -|func hmac(hashType: ZXKitUtilHashType, password: String, encodeType: ZXKitUtilEncodeType = .base64)|HMAC计算|"ZXKitUtil".zx.hmac(hashType: .sha1, password: "67FG", encodeType: .hex)| - -#### Data - -|名称|功能说明|示例| -|----|----|----| -|static func data(from string: String, encodeType: ZXKitUtilEncodeType)|通过字符串和编码获取数据| Data.zx.data(from: "d5a423f64b607ea7c65b311d855dc48f36114b227bd0c7a3d403f6158a9e4412", encodeType: .hex)| -|func encodeString(encodeType: ZXKitUtilEncodeType)|数据转为指定编码的字符串| data.zx.encodeString(encodeType: .hex)| -|func aesCBCEncrypt(password: String, ivString: String = "abcdefghijklmnop")|aes cbc模式加密|data.zx.aesCBCEncrypt(password: "password")| -|func aesCBCDecrypt(password: String, ivString: String = "abcdefghijklmnop")|aes cbc解密|data.zx.aesCBCDecrypt(password: "password")| -|func hashString(hashType: ZXKitUtilHashType, lowercase: Bool = true)|字符串hash计算|data.zx. hashString(hashType: .md5)
支持md5/sha1/sha224/sha256/sha384/sha512| -|func aesGCMEncrypt(password: String, encodeType: ZXKitUtilEncodeType = .base64, nonce: AES.GCM.Nonce? = AES.GCM.Nonce())|aes gcm模式加密|data.zx.aesGCMEncrypt(password: "password")| -|func aesGCMDecrypt(password: String, encodeType: ZXKitUtilEncodeType = .base64)|aes gcm模式解密|data.zx.aesGCMDecrypt(password: "password")| -|func hmac(hashType: ZXKitUtilHashType, password: String, encodeType: ZXKitUtilEncodeType = .base64)|HMAC计算|data.zx.hmac(hashType: .sha1, password: "67FG", encodeType: .hex)| - - - -## License协议 - -该项目基于MIT协议,您可以自由修改使用 \ No newline at end of file diff --git a/example/Pods/ZXKitUtil/pod/ZXKitUtil+permission.swift b/example/Pods/ZXKitUtil/pod/ZXKitUtil+permission.swift deleted file mode 100644 index bc6a9f2..0000000 --- a/example/Pods/ZXKitUtil/pod/ZXKitUtil+permission.swift +++ /dev/null @@ -1,208 +0,0 @@ -// -// ZXKitUtil+permission.swift -// ZXKitUtil -// -// Created by Damon on 2020/7/3. -// Copyright © 2020 Damon. All rights reserved. -// - -import Foundation -import AVFoundation -import Photos -import UserNotifications - -private var mLocationManager: CLLocationManager? //定位管理 -private var locationComplete: ((ZXKitUtilPermissionStatus) -> Void)? //定位结束 - -public enum ZXKitUtilPermissionType { - case audio //麦克风权限 - case video //相机权限 - case photoLibrary //相册权限 - case GPS //定位权限 - case notification //通知权限 -} - -public enum ZXKitUtilPermissionStatus { - case authorized //用户允许 - case restricted //被限制修改不了状态,比如家长控制选项等 - case denied //用户拒绝 - case notDetermined //用户尚未选择 - case limited //部分允许,iOS14之后增加的特性 -} - -public extension ZXKitUtil { - ///请求权限 - func requestPermission(type: ZXKitUtilPermissionType, complete: @escaping ((ZXKitUtilPermissionStatus) -> Void)) -> Void { - switch type { - case .audio: - AVCaptureDevice.requestAccess(for: .audio) { (granted) in - self.runInMainThread { - if granted { - complete(.authorized) - } else { - complete(.denied) - } - } - } - case .video: - AVCaptureDevice.requestAccess(for: .video) { (granted) in - self.runInMainThread { - if granted { - complete(.authorized) - } else { - complete(.denied) - } - } - } - case .photoLibrary: - PHPhotoLibrary.requestAuthorization { (status) in - self.runInMainThread { - switch status { - case .notDetermined: - complete(.notDetermined) - case .restricted: - complete(.restricted) - case .denied: - complete(.denied) - case .authorized: - complete(.authorized) - case .limited: - complete(.limited) - default: - complete(.authorized) - } - } - } - case .GPS: - mLocationManager = CLLocationManager() - mLocationManager?.delegate = self - mLocationManager?.requestWhenInUseAuthorization() - mLocationManager?.requestAlwaysAuthorization() - locationComplete = complete - case .notification: - UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .badge]) { (granted, error) in - self.runInMainThread { - if granted { - complete(.authorized) - } else { - complete(.denied) - } - } - } - } - } - - ///检测权限 - func checkPermission(type: ZXKitUtilPermissionType, complete: @escaping ((ZXKitUtilPermissionStatus) -> Void)) -> Void { - switch type { - case .audio: - let status = AVCaptureDevice.authorizationStatus(for: AVMediaType.audio) - switch status { - case .notDetermined: - complete(.notDetermined) - case .restricted: - complete(.restricted) - case .denied: - complete(.denied) - case .authorized: - complete(.authorized) - default: - complete(.authorized) - } - case .video: - let status = AVCaptureDevice.authorizationStatus(for: AVMediaType.video) - switch status { - case .notDetermined: - complete(.notDetermined) - case .restricted: - complete(.restricted) - case .denied: - complete(.denied) - case .authorized: - complete(.authorized) - default: - complete(.authorized) - } - case .photoLibrary: - let status = PHPhotoLibrary.authorizationStatus() - switch status { - case .notDetermined: - complete(.notDetermined) - case .restricted: - complete(.restricted) - case .denied: - complete(.denied) - case .authorized: - complete(.authorized) - case .limited: - complete(.limited) - default: - complete(.authorized) - } - case .GPS: - if CLLocationManager.locationServicesEnabled() && CLLocationManager.authorizationStatus() == .authorizedAlways || CLLocationManager.authorizationStatus() == .authorizedWhenInUse { - complete(.authorized) - } else if CLLocationManager.authorizationStatus() == .notDetermined { - complete(.notDetermined) - } else if CLLocationManager.authorizationStatus() == .restricted { - complete(.restricted) - } else if CLLocationManager.authorizationStatus() == .denied { - complete(.denied) - } - case .notification: - UNUserNotificationCenter.current().getNotificationSettings { (notificationSettings) in - switch notificationSettings.authorizationStatus { - case .notDetermined: - complete(.notDetermined) - case .denied: - complete(.denied) - case .authorized: - complete(.authorized) - case .provisional: - complete (.authorized) - default: - complete(.authorized) - } - } - } - } -} - -extension ZXKitUtil: CLLocationManagerDelegate { - public func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) { - guard let locationComplete = locationComplete else { return } - switch status { - case .notDetermined: - locationComplete(.notDetermined) - case .restricted: - locationComplete(.restricted) - case .denied: - locationComplete(.denied) - case .authorizedAlways: - locationComplete(.authorized) - case .authorizedWhenInUse: - locationComplete(.authorized) - default: - locationComplete(.authorized) - } - } - - @available(iOS 14.0, *) - public func locationManagerDidChangeAuthorization(_ manager: CLLocationManager) { - guard let locationComplete = locationComplete else { return } - switch manager.authorizationStatus { - case .notDetermined: - locationComplete(.notDetermined) - case .restricted: - locationComplete(.restricted) - case .denied: - locationComplete(.denied) - case .authorizedAlways: - locationComplete(.authorized) - case .authorizedWhenInUse: - locationComplete(.authorized) - default: - locationComplete(.authorized) - } - } -} diff --git a/example/Pods/ZXKitUtil/pod/extend/ZXKitNameSpace.swift b/example/Pods/ZXKitUtil/pod/extend/ZXKitNameSpace.swift deleted file mode 100644 index c81ce05..0000000 --- a/example/Pods/ZXKitUtil/pod/extend/ZXKitNameSpace.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// ZXKitUtilNameSpace.swift -// ZXKitUtil -// -// Created by Damon on 2020/7/3. -// Copyright © 2020 Damon. All rights reserved. -// - -import Foundation - -//实现命名空间需遵守的协议 -public protocol ZXKitUtilNameSpaceWrappable { - associatedtype WrapperType - var zx: WrapperType { get } - static var zx: WrapperType.Type { get } -} - -public struct ZXKitUtilNameSpace { - let object: T //存储的实例对象 - static var classObject: T.Type { - return T.self - } - internal init(object: T) { - self.object = object - } -} - -//协议默认的实现方式 -public extension ZXKitUtilNameSpaceWrappable { - var zx: ZXKitUtilNameSpace { - return ZXKitUtilNameSpace(object: self) - } - - static var zx: ZXKitUtilNameSpace.Type { - return ZXKitUtilNameSpace.self - } -} diff --git a/example/netfox-zxkit.xcodeproj/project.xcworkspace/xcuserdata/damon.xcuserdatad/UserInterfaceState.xcuserstate b/example/netfox-zxkit.xcodeproj/project.xcworkspace/xcuserdata/damon.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index e96e83c679d7b38fdf449ac1443bca1b02f884b7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5653 zcmbVQdw3Jql|Of8B#kuVSR)LWr)_KqG02gHY}pXNvSoq57GT*13`UWyu`Q4#F(U)! zkzVp3lu+0-P_}8(VnZRD(2(x8&4x7FcC*_iDa*1zy5CpwZoVdIlTB%wSF_vQJu@T8 zb{_l3+J9)~-gD16_dI^*oasp?;%dg_dJzaPzyb#*FoOkb8!C3liW*NPH&#TI-hnv2 zwO3?P=?xXBo~?3kMs)x=a57>q424(A!*a}*CAtDUSUbX*Xhx>wynP1 z7J?J1;8t)!HMqeK%@BYUuo8l>3RXi4v_Tlw!xo5u41ExXK}f+3g9Lv1UpQEDeFVw zs%`SH+J(Pa!*y2lCZei33KBRdL)lR%g2|MlTd5~vuc-Ak`Tb4xO-{eNZjsaD2{bwz zo2vuP>Y93w&*!SG_tn-%>_tI;^ZJysO-)C8Wq+!7Xi!dOa)PJB9H=}CGhimng4s|4 zrBFsq)J!dur&emC!dWPX3YZJ?kZ3;4r6TR8UOIq8Mfh7Bu`e6XzdhR1luBllR3afO zk!Dw|+ZzaYob|58T2!#c>-2fujn10pMIKjEeRX}Er)i6JJf4iDb_SH_pd7K!%P%0a z#;CGBs&>ZJcuzuJAI}VgPtFef!)FCN>|HOg=0thfl4Xjb$<4b*}c>YyGL(*k-EEu?lT zQ3suL7Hzi_mceppz^6vE-DEnAPN%c+sYJ7)9c6?EQaeM@9r6As-oRMOzxosz?;#;o zM<$+#XX3KDJ|4>q7-Yeun#M#+DPv^$ljF!V0r}(I$g4RP&mOYo?$QctpmGF4bjk>< zrBgNC3Rftpp>$YIpa{%zHAmVG9Z-4lBrU!Q8(<@J!KN-FUX$p^4aTFaM(mS9;ntyy z<`REg=MYtfPa*kc=-wO(kF9M8h1ckSQQnYl0PQa)>2~PRl#0?BBhX7{YD$$2sj{+G zk^5vtkz-AWA^j<3xOrDbPHIpT^s86()ar+UlXRA$;a1qTC9jK5QKG2ER!BfMrk?&< z-mqPln-`pdJy7`=q+vTKph5~y4|l>{a5vlo`{@GAmU_CFE}={5GP;h+v=5)~B9dS38S3wsl`!IKrZX<@#L#Y( z`%;SB8r>BijPI74QiJKJ5?52n)>KT6#MRtJOaoOTV(`x4%y2^PGJL8N+Di?m$+0m< z>r#Trn7nIkR0|*X|0${ijhxNC@q8zLj-Q@tnx`?Q{BmD(D3Q@`WrSmC_9(8#)0mgq zJ=ZGnK@5YI=x}N%6S0?OPp#DoiHbhVw8?2jR`DUK$K00um33LUz&Hlq(gNc+T{r?K zsMD}#XM5h1!HhhZ4TSH&z$iQf57R1ILucg}oP^UbeUMJxkq~ znv1BX+uzw9jG-R!zPPMx*51aD!H%z*$6BNP$#`ZcCU49qRe3}Fc0HDi(Ax~>N40>@ z$^9Yx=nHb6#K3uq)?%R4Y4~2K8`Fpl&5(R~!{(pqEW6gEtzz1t!u`*nyIx7Ha=49Rw42YQ>K*)QO^P2=`Q;d$sDzhI=%FJWK=F4E;= zmit$fTzMKU!@t25P-z48(MDQ+8eW87!M|g`H__E}Z8pS>06={a&vpM{s2FQ2(c74} zxY)Z*-K4o|H5LPG6LN-n1>S(lQ}8Oh2Cq{;ZKi=!@Egpm{d5H~*E7hW8N#P#S?MlE zSj>e!Zt4a>gZhUNnc}^<72{^VhxbO{UAmI4x`I}Gp9T%H+<-rJhQc8%(xY$#x{bvI z{ApCf3*+QRnoT~YEgHQ18P9$O|B1z-cL)I~nVE1sO()t)*Ib9cz<x(0nVr6R|PRmtlM!}*uF<88O6WW0XuM zC723i2AN4_k=eA3hG{$PI891P8JR=MX(!!Gx6lYJ-q0fV=@7rME#5z%KXn-pXyCOb zIFDU<1kH)5B)4i}7LbL+Nvi02x`A$_U8fN>_7gYEN8DISHz8_aQJK++^+Kz-h*k1V zt?sLB(VcqkBTP@9xT_a-ITr3srLq4iov^7NPbmoJYOfMcW3J-)DHBL^?ph@3SwR-V zdnf6toX$(has+6yjCPM;${Ga^J47{=kTI|_vZ7r)N9-qo9Ga6A^meVW!0wo=LgXf^ zNehkA-aP)0H6;9b1SQy_l1{XL5$&O#@&@Ik4wpIhU1ZA_PRzs;QS?_4jp--S`iY3$ zk*!Rc!`f52w{mRyNWancpdt3`al00ly7nzB-Bayx;bWb*X5YT6WE-lTAcI;)S*3|NuXyXY>$l%qe+$(95pmh)=E5*1y#gd1ig-6(2u=X5ZjD+5|K0%4#X7| zE3%qSVdJ1+b!gJY5(A9vd9H@ZRNU4(k=CfXO>h1TnfcB;=r_c!P|~^_4US{GurV{} zLPLW+vO)=EshPJ@#)_HGQHzAlw24Y~khp8-?T(x0-%`0?p|i@nblLLe)h(@S!^T8~ zq3?E;x=J-~XwJY#?ZsofbfT_{t6gi+znE!xjSRs!QF&`UHMQPAwX>$$<#l>+Y;o2% z)d!q4zFM!x-RSoC0*efI@MqC^Y}&bYtE<}WsnuNm8){Ad#l|}m&fOE)>YRn za(mrP0k@}a69%LQ1G3)b+IO|V*Vy!By*V0vy!_Ed&F@AJel4(~dS!4G7NVSE3>^(y zWoNaLiF@OD=@iBg^p$ynrrfhb!Mcxi41ZcHt)l38v%3dJBFv@Z#5kt=OznIEM58S)BX-9)5|<$?xDJB9JMhgj5k1 zaTAX|%WIST5`ut58VMp1S&5i)JL$vO{XTM-jF9Ka>*Q_n2l5$%8O)d%3u9#j#=$t5 zM#j$sn3YV5*~3ugKIRy6iaEoaXP#uPG9NM@GoLb_v6I*ZtczXFHnJ<&c6PlEGr$nz z7uvJG*&nu##*Jc?B56$L-1vl0a*CwLcId`5)f#{tCaGjMRGuLjGDLQeon#jorrT(O z4$>q|(exRzhwLT$$Q^o_*iKcNp+mV+G2QT}Hvc61W$ojDUU-7ZzLeH7W#il+(rQPx zQ#UH0-pr|il!CP!Hw$x3SDw7MP43NiLpf#!aZw{SwcFCEcrv5v!#VaVvD}5ePVUo6 zfkc@Ra+oT)QgBpjxo}ZyxwO*ofY!We@A-mrg8X%EDAfqC>&NjAqhcC<=~xKWuo!3X zb?Vh)$TY=NY?^MGX_{>+HO(Z=CKgb{D@8=)jkMk$^bNo;F zEBtl-75+8;4gM|u9sZB}r~F^6W~*Q=vQD*5v(B(qSeILU)+TGhdeC~#`V;HRHqPd; zt+ch<6kEo&!?w$|+qTzshmG3qwB2nxU^{9%V|&c@tnH%hP1`#H2o9k{m@iZc3xz7d zCDaQ`gr&lA!6!5cEkdUd6^4Za!cpOV;Q`^ea6&jKj0&fPGr}Xnqr&sTZ$(}#6D!39 zqElQfE)|!HjiO%+h+Sg8xK&JuDRH}~ihITV;$7lB;=STA@jK$f;`hW6@e%P+@tpX$ z_=I>t{DpW)yewW3uZh>im&I4b*Tvt6?-oEoLBUN0g#}VUWx=9?CDNdjl6FZ4q;E*a zq!Hq|4G3>6-K_=>rGnD03`wgdDO%aSSp0{%>^R~$;ds#TkmI|K#~kMzKX9CPJmt8M#VN-4B@a);DaVih7h>d>Q2+n{ diff --git a/example/netfox-zxkit.xcworkspace/xcuserdata/damon.xcuserdatad/UserInterfaceState.xcuserstate b/example/netfox-zxkit.xcworkspace/xcuserdata/damon.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index 1f2d67585ead7995e4183c089e3a926f248cfd05..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 33283 zcmeHwcYGAp`uChObpyhtl91j=-H_gBDVrq;>6=X@ESt?HyGhs$DOAxpR0~#AtVlu+ zU8;(Tid|8fAW|&Yv0)d>`^-)@A%b4+z24vZkMPMRJ9Fl==X;)Zp65(`TdSp`GdA`p zg(ytX6hpBTNAZ+XRmcoedxynltqw7?8_gE@Rvyx6YpV*e)i;}rogFR|TD(%P9A2cI zWSVVi$m}b0h!QA;PTOhdG>K@dGd@WTp@vc;C{N0ZilU+^6%|8`redi$DxON9@~C`j z5>-GIQbklTRYH|gWt5gOQVo=eYNVPdGi9N=s2S8uY8Ew{nnx|57E(7+H&eG!w^Mgh z_fjjVZmNgcLT#nCQQN6Us2$W!Y8Ul1^&<5u^#*m6I!3)oouuBTexQD&exiP+E>gcx zzf!+Zzat7Egb|Gx#G@f-81)2lL9WOj1)x9_go05R3P&+$G)h2;C<#qK87LEFp=^|g z@=+lwLgh$@>d+LVNAu8i=z1g~g65+IXdzmJ7NaHT26Q933EhtFK=+`Ps2la5RcJL@ zgSMh=XghiY?Ld3bOj7-47Z zf?cs2cE=ug1op&1I2ecEP#lHF;4GYvi*Pa4;&NPtt8pEkg6pvnH(@hw!L7I*ci|a$ zCZ2__#f$J#d?&sKFUR-d2k}bWjo09{xEDWzpT!68bNG4u0)7#{gkQ$5;8*b*_&7d+ z-@+&Hd-#2P4u6C{#-HE|_$T}ujcJbN=^^xRT1h+8F0?B>g7&6E=qNgtPNY-mG5jdMSMieII>4 z{Q&(S{Sdv1UQKVHchEcOUG!7*e)@U(1^N~Gb^0^`?X^b{IRHRkF^k3+u|d zv7W3y8^8v#L2NJ^!bYwh<%Ga$-d2g!+y(t$9~WL!2Zbo#Qw})WPf3Qj}T8I@=g)|{uC=;|oxu6p& zgi4`Gs1|C3T4AyyT}j} zE{5urA@OnX$*F1asVa3^TAC^`J26R>rAdxcB_w6%B&230B*bRL>XmMJ>YPejdrL=~ z!Dv$3j9t@A)=o#uBdH)NavkMO`B1);ALUO4P=O*Vaw0DZqC#{MhpeN5sSqlZ8U;nd zsZepKc#WtfXcUwgA!^0wDN^+oYlCg3rrj{jq*so=w7qgeeYVZo*=}oXHMQ$Av$9iD z;gcq!8=$ydMyd^+2EEcBie?%+LCE$`#o(?fy#`vf z*;?xj?Rkz?^-9lyd-fh(a?5M(+~nAl=z#dxmGHgUY0`sBB72<-nv*ggN#U zO=6>H5u3$Um~WdHtye0cKU%YGW|3irrO5!Jl`r*w&1^Tpn4O`NuG7+L>9m+SDlHA2 zX1Q3NwWAI63tRg@vHmCR#U@u+Of%J{`mUxXAez#(&@|1~K6_%jq0KyS)zOFk7V4n6 zoCZr@y$Z+h%c)u_axJB!DyT}TimIk+L@#lq=q>t)zM|h+YBE(vO`-JERLUUwiz+cw z)QM9?gEY*5Dxvt}2d8}M1h90J_qpqh!iqyzF#R_Y+O8(Q-F}X;qw!rGJSq<&8 zd!W?(sv>Q%T?>`LKd3)i8$b#QI@(x7EulQRsl{S=H+6#;A+aWD!Cdi~!@%v9QnygI z>XjpbxY8;uk@Vv-Q(L>K0~nJ*>V+63Mix7>q4f^k8DW}Xry827EuE%m_K^aVfi-q! z8i8sZrUqE$rYRjpiO-bSIsoxDYh6bl+4A6-j;%@$Zm9DJ?|_i7sF?VaF%z;U<`lhsy zclCAnS3w;K%C(6wgGtGQDw616Ga6bgb0pXV7;SB^TwDtVF2!_owu5x&IGmc6KICet zmXsF`Esj;L83!$n|5ptj&dAKV>cJ%C#X{9;<=PymS~GYswU-R#aBg1KRrD9?nlxl} zLE&G~{%~$E6?&m&e;D;+JtFFG5L>6kPQLd?#Mme~ix+(gr7?`|# zrrI{y|0uoSw!5dkp~q+pruzQ%m>PpKrpsS~Gj34Y|LQhFvleBKQ*$LOR^X2&FpQl+ zm5HIofyvtdhOHHh+Bv}X2(_5Hk6I4~><(%#^#t`YbsS9A_o$DkpOFI0(h{||o-lJgZy?_tmx51b@kAJ6!f#K#!htlzM3Y`yzT0Pwa#@Q?|$Zn?}rq|P(!Tj1! zKS!USKLTUxC;AuqcQCPrFm7O0`7Mm;jRhQQ*>-FWG6SFJglGPRE18sn`j87i;dP$Sz zv)fD^DSgf9E42EAxPfwZmZ=5R#oCnD04(3qXaO}t9>zV?a#+(v+QP0*slx+OX%%&k zB$pgA=RWE|Dzb;VpL#%y5l8n>4^b<`STRGAt6tN)OzpEv43ahq^0i|?|E!aRXo;Z{ zu3H^dtpZ?x$X-pYq1ICC#5gftOb`=SQyZvWY9qBtOcImD6fsq*+M`cMLC>|oeoWbB zo2^4qk$faslw;_aU2e;>g7g7tR4Vl%TTP zL1JbZI*n#Yb165?>a;&!-U#2`q;^w#0Jo1)kAd`joZ1Hnev*2M+Fxz38qGF|>Hzf|)b|MW0`$TJ z0J0b@ooY)*TdQHV*3M9?V7jJBBrWfRj)`O8@pMU$zXS{Em1;0oWWFnosVve|!R(r4 zTE0ddw0p1mXermVih7ND-L7BA-{qo*sKbAl0(tn*ZVz=tg6g38>A(4h>jU#o%w7f8oT&L=X4}8Yj|@fEtQ5=SM}{M%u1Kpj zb@rg))OT*Qh16LVx?FmRp5ZRol?iHd~g1$RQqw4Hl2ooU1S+9dnh8(y7Q* zCnQHWH-tYo4V0N(Jb{SunQzmNxP}h)ZT7t$Og&N1jc&KtWJ~N zKFL#e$Vi`LUmX3@>8P<7l}a_1h%MbzICvYNMsNGtEVj1J?&Cd@64A#z9FJ9?YLLIE z5><)QL~9Q)vQS`J;0^*F)&F>b$Om80Kql0PnvfY;P%~-)&1{<3CQcXI#SXDk>=I{)GsRirY;le_SG;yJvQZmA zb!$f*puTm%-!suHG#kx<&dmckexrDkc(Ztmcq{yUoA|J}k{}nk&(03Nh8DzMr!-!@ zGCs@HXlpkW8fIChS>~7|)@Eq8bl9wRn_LI8-Zwq6(?hn@1Ny#nwRT$Czyl>!SJG~o z2Ig{sVYaQSvu03f2QMG+o7kVolMGQwkOFwsrbYwQRwC^cbx4yo*i?pz9o}bY+pW>r zt$@Brx$9Tg<={5Ce~v!bx1t&bw=%^s3ld-NgcjT#rA-EVkL{PCFRsAG`+97jQrX26 z{+Cl}>FBTBfq|RREfOl1ir00cTgB@oSUH30*-st2NiXC2PQ>+~W#}$Z6c>vQ5sj9k z2PltK=w49Z?-z+UUtF*XJxGP472-kw`64m24yqf_J||1x2K;?W_$q;*(9i_hTvvms z8ipm0I5=a;{y|G}E$Y3jrH#rLj0$~$sj;)% zR%U53cPgnPXeZhQ^2~*L1nq{A7is$eQDCw*+5LEzT&pm&cA3PbvJl&g9<9CPUJrVV znt$m9#|-a7Pf(HI7>cebZZlc)tl$mpcoRL1oKJk7L41~-^n9}soqen}e zr(<-3VVcc4y2;Y1ho9W8`q6f$&*)2iPNPk;;Q3b5=sxpUZu&g>9F{2n+%fwOiuRx{ zq)}bz7AX7ZEA%zGP}2rXNuCYyA@M1%l#H0)5Z8@<7rXn}2gXaFYF7- z3m%ERv5(j*ZWK4I!hYBv`-_{!3-BLUsEf47Gdud4w)0R}*$x>5H|+=qex;rbwxh-9 zxMH6rJPI9Jg~M<-ju5wq&xs$2%TM5FtimyPG&LN@;y4_S6L2E+Bu)m`NGeXl>9Eut zm>xusBKt;BpoC~?dq%Pf`fSL-1ck1^8tA;l4FKAS)xPP`#|!>g-g(enshvw#6+G?e z&wzr|?}88?5uXOrcB^n>}0J{M~6q!0Twpmg3H5=10)6&@4$1iY+onP#f_=W7p zb==U|E7&bnAo-6Smuu{o_ez%sx!xT2_4fOZUE#i+^WX-F^N9Oo9#ecJ9y1X(-MZ@a z(pJosm<;r#@ABn?>f;-@8JNYBdS${OX7MlT?PFd?@H9Y|6;RcN8>B7LdT?!kK#OTN zwSpj;VFHTn7x&rO1@6F|V8H?V?7V<^Hx znU5FXbnzvC-XZaMfZm7V8-Ik}V!WgudI!Z921D-_X<6QiZ^O5XFN&{-uMR+N9=;18 z_mcRs1UWZJpBZq4$x{N{Ll%$t5*RryJ!D7DYk!KI9y@Ygmyt91KR}K{JPndrSL)`a z80fLn`*jD`+lY5lk-c~m-i){4t#}*Wjvv80@J_r-JS-j&kBY~{H^t-P3GprQr1*9( z-XmEmpq-7x`|uM~D1Hizo>O+qWds=T?}%sN?{{T0XygC}WMaq28%lOBp3mhs0VRbN zE2#QyV3b|)wgjha8^n1TngE9WS1glfogwdagED=2E#Q&^8={|gL7CvoYq9Tw*`-a4 zt+5eynXXimyjLcdk{rdL&Rkv-3@Nj#6I_hY(B-!!j-au%Hh}*K90r#?Jrnke3!rA% z{=~1LL*4kGcv@U8v&=*2&}w`bKOy~yXJF!`pXJI#WngfIr(MGa$Dchs0$k~5D32a| z3ZE9=6W{N_XYo7YIq?HARM!a2cT92cbXhr;tN#EUS}87f<{qrkx62|kJmRuth>qdU zfU|rK%kWG575*C3!7l+{AHy>ITKq!%YOnfTo7x7c^ zv;HM0Yn`%^*|)4{+Rot5_bY^hR6tqTy9Dp(BRk&j1DVms%i6o@XRCmEmNua4zsJfh znF=Mgcbj$t)rWQ$zXi7$?MV%%z37qPR5EsfFTvV*8IKdcBS?A0S)~1Ff1CpI>6pb| z#P4Aimt8iCuoE(>e-YrSlz}f-Z)wfKa-O3MYtn zunK~P0%L?Ym}~xF7WSBr7)eV0UCe@>3e18w5G3?*3%UWg1#O}m;m1snf*>dR=Mdl+ z3MHrX4SwpYK|F)D(d~AgK~ERoBWM^f4Z2f2N6>IF^bh>P8OgGpo=t;nm-ZP3;T~9| zv89K$3->GElnnenja@H4+Q+!)>*xjGIHs?sMVip_334UKjUab|JXX^S=|$89dI>=z z2=Woj34)-ID#;BXd!MAH`rRG)plorRM^qlt@JXfwcB80@ecYby`5}IT^Cv72wX2-2UMAFwKhMf8pYx*MN(MUQ4ed z$e*B~ek+acrMLXi^+Io@!s+b<1&A=MfnsR?j0R_rd+i8u^k6sr*kuntEo3hkygz+6g>DbT7qY^^3RWnrI8BF$m?MPQ{b(JxE-Y6BQJ5X;j0M}K+L ze;WUNR_P)roQ4dQLQ|Ywq)3wy5Jckbn&H~$($|9}C(k=z+bhO#P zJqeqhBcPCVn!yU%Ov5Ej#e;U9E$w^StuNS6=>(r-p`oJ%_M06|7uuhaEZ70R=74Vo zTI=tm40r&fSN|pG0{CMmnyjEm$$P4>VJvr`-v^bamPa+Qz0E!h$&_uF1v^4=xuULV z^`>?RsboY5{}E{gNLfl`ogpF*iGq@X;6_hp_V=wyuV_^a#IM9BBu>cDOe`!d)7I2Z z)*Bm4W;ucrqA-)QA7+!j+P3Zwa3nr=)V)Jbfyr6>cg;@|yW`QdK0d7

Ow3`?4Cwqvl9E$W$BdUi`6qFvY3UI2c}>sQaS)g2 zCXP6gk(rW}tp;#fb*+I9oKp81&R2&L3lc-Ke%}Q0rsxnh^ zGF91GYKo-55kG)zKb>^umB$)9wk05u@or5)(WFX#_Y zlR8;cthPr}+8a&QWX8v)rmB+SQj%10DRJ?t*u>04Rcc&n0&Ey&YvL1AYavcE5gJX4 zjh%P2T$fT&8CF#dG;+X09_FPj_QkgP4K8sx61@f&xMW$_!#te<$A20y3h@P(>}~eV zN*qLz!nD*)>Bp|zxt_WLd(WqaRn?0g5JBn=WU@c5ic60FLntaBVxVSu==Km*sJO9d zaPVJa!IaopDUGQq4NxMX(GY77su>9(z!8v7k^=c8Z4gPgn7SXrB{oAY$P@`b-#~9d=7m4x zSd?Q6ZU#g6Mtle4Osv9d@p=fP*$npFcCh6h!^iNa5K8j}{t7Z6Lg)y{ei%m=(8ZAV zpr;Lx?O>vp()ZHc^t1FihGH<}C~%OEFowxsikUK|mZ@X(jDfk9xr@0Eatt=eib8)t zjYavhoaZh2B>gshil7LBA_$-pg)9YppPYuGl?KI!OIA~hv4M|-zO#!ypG__1V2UaTe2kgl(*$&-NUi&!3!dZ z@xIL%`JUa}>(JQRrJIxGcxbKBY?3zMhdUmWF)KYQ|0V5~TbrPa6(l@tV&qvHZ6HQq z=ia`HHw#396chjt_?JO6OlPM7ZhNmyu`eo#WAyb1ycBYu z23Me0#uh+$jkKH93K2aG10qB2dlqEFO5lg1zhi(e3wOi(I8=>&}>Xgv64o+2oNpe(RX z20T*?FIi~>rRbHlS8{}0otysO@q;i!vJlh)%ulLz3W(3CAVBLGBh$c`m`0|FF*6pXnQ38K znQ4rbplJlnBM59xu+bhR=w*UV6ZAE~h+tQOg9wf%IE&y?f~OK}BY6Jc`R|bDA2ip- z|8D+U2ZF&zo2)UdZSA(^(b9DG1&uo*#4jcOEV=Qr|MN9BPj0yUPuASk35~y4>zA{a z`ErXDdgXuPum882Tp~AF^(TY;yBNzQB4nxDVvSz;cW-B1ikds*Rwn;n3#xnMcBlML z<^BV5BUAOtmcMU3&M~WUA!p|57UfF02laYo^?%R-01Z)M_|AXsS{@<^KeZri#Z#XcYNgEDxB^B=rNyWSN3L6f+4%O`& z<~Io%-!k7Z-!nfjKQcctKQkAZUzlGBx{jdh2@(k+aP9>`3kX_B&>~1mB4|l3^Sc8Y zEW@%?D9cOGxM2Vqw-5-N1U>Jzf3WfQV}o@EY_J{#-Pnf>)(fz~j%2;z$Csd+2)fz+ zxfHgbkybfe=^30MXRT4rsIZUvY$zLUhYTAgLFRUV3>zsy=8nrDle^aO&}bHd)O*=j zHja&F6WByHiA`ox*i<%+pk)NzMbO;@-9ylFg6<{gK7#Hi=mCNr>}ALFLnedG1juAd zka=hTGCc&Xk|4ACAISULkciu$AxwX4u07t+ao3!Yx%o+(WjS^tiUJjU1PdOfHVP{ByX=SIeR@TP0vD4Xhwu9|t zLCmZtXahmL1Z^Z}6G58^+CtD)g0>N~y_cQY514D&c>tK}CBQr~0GM3_?Un$u=O4iQ z4*&y!UES=h1nqDD<_;M!%K$L2&;c+zNDmWutc3>+Xa?t$&c7+U|r|af0>{^aMdq67&>7;O~5zpl1krwwK-3 zkCa_fumrnTLdt;wq&yGO5`gl;KS22(0OffJC@&E7oC7E?Ur|vBcIGfD;Zgx59O#jsI8ZWHLdiI8Jp5!3^eI7~*+0)qYHhKSR}Kr#7$vh6 zXO!=tel9mjhD^Q$nXe?i@+WGoym7}?v{XZGq;qxg}arz zjk}$@gS(Sk#@$6QCYUCeA($nYBbX;xAXq`L6Tw4zxqJE<%LCklz*trQQ1H-x#)5|v ztOUk_o&Q0~{{ShQB&0yh!Zi-0Y?BzvcG@ic5Il^aA@V1PAHU!XpFUky>7e^#+!Hcv z_5p0L%U?(##}m(TufeHn+yU-6?s@J7?nUk;?q%*3?p1=_2zDpfgWwSadlKwL@JNEa z3HI5*9dv-CkDI(nux~#^`XYWIp$fJrFAsPBCpo|f$qfyrzWv%uk^|(04BoSD?tOy& z91!>rAn>Q|H12cmE1BY7N)!)}D1HI-4h%7!m&NZ+cM$yt9!u=uNA4%?XYL~R3->Gc z8}~a;@vsjWOmGOnp#+a2IE-Le{SgF55*$TvbT3akD9_pr7=DPv9#jLgmkk&^`XBD_ z_j3mxoM+uUEW(&RXz;#&1r0ug53@sqA0xD&ET9A=CYK ziS8wTArBl+Ea!Vb81VP<_wo1h5AYB25AiGbhxwI!H^F5D1IEe;))8Dma3#T21XmMW zLvU>`zsf;;IZ2R*;~WT{>>$6KB}nj;e`LY`Ko&eIf#WfP>m1;C0>E*3o}h!s2ly9c zSUfMmLJzQT2k1_$}q`8W7O{9*nGf0RGQgQjO7xSn7m!3_kP2yP^} ziC{CqmJR#~2O#?7z&iv|nx*4zAZgTLW8&6-xWRwI4bDph|D50!2f@Drg3~6xO!|?M zynq$hKOy2)-caX%;D45h{*y#>$h>*2@(DR5Df4T zLI|GQ2M-|(;30$y5%2@5`?UnmvwvO(!s2^nx-zp5Bto2!Xa|XqAb~^#kO;{VNXX?N z37zYBXp8{oYxN3ag>k}oVSFOY~MQD}L(ITPa4)8+>R>=>A@4OryT(#q=4xtMU(-VM2+|?}ri?|!kk%CxdDbY>N zhZ=MQhh5td=0fKvXGk@3urJ|yfj}^_bgf&MPw>5Bv|Mr#_?ZWL~T97W+K z;bvhe!S@sV0KpHg5^fc46K*H?A%a1bSuLF~C7oP(Swe=K9U-Oj>6J-WDj;Q5z-dAa zgVQatX3G!SpOenwzpUcH<)sE36LgPoFAPmsPVkCu;XZ;N7NZAGiSQ6LTv#DIEG3~y zM;ry)PtJ}xx1QjY_M{u3Tj-JVYfL>tcmIK}!fIiyRP!2wd%A^n1h4vI&GLDq!X^>2 z6~;i;S6rMrE?K2XfXuVRxcEd>W@1W~DmEcoosyK5mX;cyqPMh}ZE!q+Wm*@UBm!sX z&q__!Cnq|FvPIY?HMo`FHQmB?g4aso{lBUBuzl>igoouZH&rq)W=Cs#g~y;ZoF+ci zEj&)}dWesfg`M!E@H8M*cuLq$@CJf=dxU3%X9?a&@Fq9_VWxDfe}&m39UK;%aii=v z3(i=)-u{=Pj+X`4>FX6<5ndHu6AlWm3vURAgu}uS;V8jd2!=6kBN)c`2*EoD-bwH- zf_D?Vr`_ecY09JRvQaKE%aQvPnM zek5Bc7(&<-&!3r63aO&0{o{me7NvyDxNC2&of5jz5$2;ix zjqoF6dJEqQ-wEFfKM)Mic$(m62!3|8@RRVfa8dY$-~$9dNAU9mzaSyk0~Ye&9I3v1 zVClry!8arb*`=${bN^YO)_xrOWEFv^G@6 zCFaD($JZ;H?JQ3LuftiT;1z-b)Vvo7K1lGP{`79eP=yjsv{GE77^VR4{7VGCOz9_3eRMErGWxea^1 zd~k-m@Tk&&J`yRs75-P~Je#2iR0I*!L-6Yazad5&sen*S1=usj6{F~vi=8q1$4v46 z{7qqkqP!gr;}cQukfE+_KE9!&qDS|=c}C72hb-E@VaTt7fLzebPB`VWT(v>ezr6qM4-W&oct5T6YPX3mB)E~n}8q)M{jaF@f7%N}{9jNrb8dLp9w zGl8M3DrRstt11dE#>Uyxl=}zPAP>1GKI)3sFH3kWfS0CesVR_l-2!RYbEzBP1!+sE zTjAws4^!*l-0YojKKEWYn|mLerTr=#T62ne9}al_lKPtZ1`S2da71t@ibkX1RM~O% zSDTf=d8W-WVEU6#6Z!zu_e+ZW40Av!LJ1Qba3;D`FI*?W^H1!AD?05DZNG z*jhy#bwQD!NQ6VBFA)5uSWfV9f=|E!Ddo}<3Hoa+%jYuxi$c;nHuTD{zphCtWY75j zmnF+V{M$-MxcDK|)R`hu4J64lr~E#HFMsB+Gmw%YK+GP|6G5 zUldKn!8>&(0F^4>Z8B3h4+uAifEQ|wg;!|ha`{{VR|*@;6|kjzJ$DbhB&FhjgTwk3k5=vPy#QZGQn%6mI@EUtEBb|Z^G-Meh_|yS38YRD7fOMe&;x<%FFWr)!*s zJ2^YKI=MTIaEfuta;kNj;k3YMq0=I#B~G_HJ>az3X}i;Ir>C4wI(_8ysndCpa!D-nqfq;@sjq&DrLBv-5q< zYn`_`Z+G6|yvuoy^M2=NoDVoZ@BE_k%g*n+V3%Po!7iaL<6N>_YF$h&Hka8h3tet= zxx;0d%Uv$_xZLYw~bvf_yt;?^j!(BaG{awRdGhB0A z>s-5B=eRC#UG2KT^<~#rTu-=u?fQ-DcdkFU{^WYm^;g&5-H;pY#=7xt3b!D)5Vuio z;ck&`(QYwrv2O8hiEhbmscz|RW8EgX8Qo^O-Ql*$?FF~@-Lbo~d#HQ5dy%`z-Rf?0 zpYA@#{YLlO-S2hpcJFat?Y`N4hx=alN8KNHf6@Jr`w{nJ?#JEVa(~bLoco9FAG?3* ze%^!j7~v7?G0CIKquQg!W3tCgkA)sfJZ|(@>T#>b?H(IFc6uE0IO1_^gg9c=h;1YG zjCgd!<0GCJabU#rBVHWw@`zVQeCz4uIo31Bv&>WHS?O8hIoWfH=X}qbJ(qgk>bcx= zwdXp|4W64kw|H*zJm~qh=R2P7d7kt9#Pc)H&pp5N;=LlglD$g3v|c)|O0R0KTCX}U zy_dnu=wTjO2hZS*#KH+#2wTfOIc&-Y&F zz1aH(@7uiZ@LuM9xA$`IHQtYSKj;0r_X+P0yw7`o;r*5O1@E7{FM9v#{ksqHarN=> ziStSD$?z%nY4Wl7wEJA=v%u#zp9g&&@>$`t(r2U30iWYOANu^}>+GxY9qk+Eo8X(| zo8p`1+v3~lJKJ}z?>yh@eV6(!_kGCsVc%}wRlXa2clsXjJ>mOQ%$Fa3WG7#0u` z5Fao;U`oK$fN24p0W$(-1z*_-t2mBJ~ z88|kuD6ln93|t!68@MTOOW?M^M*?>S?hf1=_*mePz+-{O1K$dKJMeVi*}#tjzX|*< z@Q1*k0xt&s8u)wA(4b*K${?4Zu%N`Cup)Rua6xc+@YLY?;D+GFU|Vok@SNb=gZBr& z7_d_K+t-_J=$Zavq5oQ`JoF#7l+;udQ<4q(C*Mxp=(0dg>DGl7`i!hYv}gS9ih8I_kfyxnYH2 z#bKpk6=79jHDQy(>cggo%?XDO7E?fwA4<8Zk7497#5UvUz9Ud2+5S|g96|N4~ zgx7}O9DYyuz2V*AtHalZuMgiI{%ZKa@I&Dj!oLmwKK#eLT0Z2P58yI2>^_;?0P+BHoTT9q~@YdlBa%QDi`*InKdO7O7sBfcDv{Upo(aLDoXpd=;-LA=)&l# z==x||^sMN)(bq+j=!Ma@MBf&DNA$AjyQ7y!?}|Pg{hex<%3I~93RH!t!c-BeaVm{! zlB!5ms?w^as+v?5Rf}qxs#7&nHCuJ9>N?dD)$OW>RI62MRqIu~s_m+ss@B(rZbtCml*Unshwrt)vf=K2G{H>GR}C$yLcU z$&9uACm%=&N*SFJmy(c@oN|B4x|9tm8&kHV2ByZO#-_%nCZ*n=x-NA? z>c-S9X+zVz()`i_(?ZfB(xTHwr^Tferp-&cDeacD+tZe%-II22+M2X=X&cfurTvnw zNFSE&obHzHmF}JHmmZKlHa$OGn_iJ#m0pwHl)g0mw)8vG?@qrr{ekoq>D}q8($}VM zNZ*vcHT{wFUFmz%A5VWW{r&V0(?3Z+pZ;a~h4k;ze@wra{@WNdh8e?;aT;^Y808q( zF&<+)$Apdv8xt`mdd%Hpdd93Cvv$mevBSoCkM$kvKQ?HrIQEvYw~f7H>|JBO8Apx7 zC4jGH~~m2oG=og8;++}ZKj<4eYujV~WxIez{4UE}wRe{}r536T?0 zCZtUmGhzIM`zNfMuwlZ+30pG!GNLk68KX1eGuCD7%-Ef=H{4s zA*(UVoV6%xb=HenpJorsPRy>#o|%15_Kxg**-vFZlYJojwd^;uPh_9WK9zkY`J)XldYn2#ovqfW^V9|EVs)8Xr*2lmQQ+$7>JD|6 zdX{>wdY)QT&sQ&0cdPfS&*gAAkvSzfojJ>L9?5w<=S0riIcIX-$@wJbLe6(NKjvJ_ z`AtJQOwq*ckb%kb-BH{n{&72?#SJp`)KaL+(WrXa*yR6&wVTRRPNc_cXQ9>ewh1l9-9}E zmz&p|cWd6xyc2mpF8{^+SMm?$AId+Pe?0$W{^|U8^54(@G5=!zulc`ELX+r8 z+$3R=)1+%A4WHyZDP~gPr0J8EP1-Z*bO9;|D40+%xxiFlE@&y3RxqRB`T|n0pkPtK zl7brx?ksq?V0FRTf(->*3bqyODA-kSpx}jqqXnN7oGM@n{;>?zq_@>0pGC9jtpE;&|myyRrbsgg4#AC-Js@G;yjQg!LX()`lG(vnhbX+>#u>EzPsrJbcSN@tbMDZRGz`chK5 zpmcHR4W&1gt}A`M^wYATWwB)yWpm2zE8AOktn5tLyJhFfJ}mpP?8mZ;Wxr{WmeF!r zSFNXZq}Ep(qz%=EYa_L3+AM9hHb+~gZPGStr)k@?9oiY%+1hKh*K6l%7isU;KBRqE z+pS%tU87yE-KgEH-KKp+yHk5e`&GGHd2)FTSc~ zxGqW;ql?wW>&EED>GE~Ox>8-au3A^Co1&Ylv+1tY-KM)!cen0d-2=K6x^CTS-8x;b z?g`y~-7~ray61H->R!>krh8p?Sa($Sb%nAbv7(}4PQ}WK0~POA;>sbF!z!ICT`PSm zLo357BPydRRh6SF$5v)mW>;z|Csh_!mQg=V_Tk!|+BLQ7Yd6+zsoh??v-XABmup|GJy`oj?cv&Ewa07Usy$VEruO3Gk(0+y zo;rEqguM} z)z?k0yRL3o-92^p)je4Ea9vN`n!5FM8|${zZLfR2?xng{>RzjRz3x!mk-B4b$Lmhk zovJ%icX7(dDdVS1ow9IB@05d6KGzS`N9g1AN%~ZMx;|T9pfA#w=*#rw`U<^KZ`L>K zr|H}Eo%$L2S^6dVyY%byz531iZTcPh-TFuM`}9xgpV1%FpU|JwpVFVvzoUO&|AGD^ z{ipi#Qx#Lgrxr}LPQ7#L-l?aiUNnp}1RF*fA`DT6M8h~kh9TRaG2|I08LA9*2EC!) z&}6U}S`AjiJcDSs#n59|V_0w4XxL)dZrEwqV|dK)gkitonBj!sq~Vm|jNu)_`-Tq; z9~nM1oHu+?KcqggzNo&f{;vAR>d(~wYVVPV z{JjA+&<$(@-=Jt1(lD$++2GPJx}m6{z2UBgy$xqf*c52WFxA1^dMx1Ewwh*|MALlJ zBGVGnO{S%$TTKs`R+@TDYfQbS&8BUpM@&zf4ww#^j+%~}PMS`e&YC_q{oF`5a*aZx zQ{#xnk&Ql${*6J6A&siW*v9zA#Kz3V+{Q_bMUAD6RgJZcQyLA8#>Rz>`x-xJywLbv z`2Xi9II&{WV=+*H=2YpQChX=-X}Yie)W*7QWv{-$S} zo^N`o=@qlW>|*vd`?34X7e`l4)bpFqvn0)L*^sqH_a!^C(WnL@0i~=e`x;1eBS(p`6r9g5@E@* z=-`MjV!7F}(z4g`vgK5>Z*xd5QS*xC zN1Knf@GaN0xVMaG31|sxiEL4|#J0q@OlZ-xd=X{B4aRz>U3R@YXKR!MTQ>{j8qqW02!#c}4 x*Ls~*w9dCKv~I8-wEk!dvPIbvZR2biwqjeAt-8;bhvnZ2b)OTj@0YFi{{eJ_HuC@g diff --git a/example/netfox-zxkit/.DS_Store b/example/netfox-zxkit/.DS_Store deleted file mode 100644 index 4a17452e1afeba69b23447534d9b13aded224365..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKT}s115T30?;t$wIUxYnDu{TIVd=;b@(EgxELV{KBFtAh3I$0As~U5Eh925ePKc JU<~{y1Me)iU1R_N diff --git a/example/netfox-zxkit/Assets.xcassets/.DS_Store b/example/netfox-zxkit/Assets.xcassets/.DS_Store deleted file mode 100644 index 1ca33549e7e580ccbbf371194f3d2b9c8d403900..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKO-sW-5S^_>qF#!4@Su>BN1-RLX^aOig7gp6wxUAPgj!Eta`T7zgZvA=`JkpW zLW>|MGhy~+XLquFZ%ZaiL?L~d_KA8#6u}ugduUpW$Jy7cV-X$<@{AcR=#omx;ckCH z0p7bK8qfsSJvH}lPUnc}Ue4(mql^5ZKb(|BWyD^$$t}t(8|UR1IZ?V_pWNKO54Ovn z{wTkCZ2orsztbUjSGcZ)=L~%Br2l077S6jDo8~q7p1pmX8sCl9EXpsg+vc|LWUg+m zfGgk%G!;P2W{VCKy>$g#0aswD0KXq%IAda1E6S?_jT`}hU4+GOFW*+cm;=DXuvSC_ z7Bm&8slkpILDLbBZC+wnD{49gSsBlzmV$9`Id<+*uJmwo UIImage? { @@ -25,14 +25,14 @@ extension String{ } } -open class NetFoxZXKit: ZXKitPluginProtocol { +open class NetFoxZXKit: DDKitSwiftPluginProtocol { public init() { NFX.sharedInstance().setGesture(.custom) NFX.sharedInstance().start() } public func start() { - ZXKit.hide() + DDKitSwift.hide() DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { if !self.isRunning { NFX.sharedInstance().start() @@ -53,7 +53,7 @@ open class NetFoxZXKit: ZXKitPluginProtocol { return "NetWork".ZXLocaleString } - public var pluginType: ZXKitPluginType { + public var pluginType: DDKitSwiftPluginType { return .other } @@ -62,7 +62,7 @@ open class NetFoxZXKit: ZXKitPluginProtocol { } public func stop() { - ZXKit.hide() + DDKitSwift.hide() DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { if !self.isRunning { NFX.sharedInstance().start()