diff --git a/.dart_tool/package_config.json b/.dart_tool/package_config.json new file mode 100644 index 0000000..7c2566a --- /dev/null +++ b/.dart_tool/package_config.json @@ -0,0 +1,59 @@ +{ + "configVersion": 2, + "packages": [ + { + "name": "characters", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/characters-1.3.0", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "collection", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/collection-1.18.0", + "packageUri": "lib/", + "languageVersion": "2.18" + }, + { + "name": "flutter", + "rootUri": "file:///Users/william/dev/flutter/packages/flutter", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "material_color_utilities", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/material_color_utilities-0.11.1", + "packageUri": "lib/", + "languageVersion": "2.17" + }, + { + "name": "meta", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/meta-1.15.0", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "sky_engine", + "rootUri": "file:///Users/william/dev/flutter/bin/cache/pkg/sky_engine", + "packageUri": "lib/", + "languageVersion": "3.2" + }, + { + "name": "vector_math", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/vector_math-2.1.4", + "packageUri": "lib/", + "languageVersion": "2.14" + }, + { + "name": "flutter_zip_archive", + "rootUri": "../", + "packageUri": "lib/", + "languageVersion": "3.0" + } + ], + "generated": "2024-11-01T07:28:46.757750Z", + "generator": "pub", + "generatorVersion": "3.5.0", + "flutterRoot": "file:///Users/william/dev/flutter", + "flutterVersion": "3.24.0", + "pubCache": "file:///Users/william/.pub-cache" +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e26e0b9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,76 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Web related +lib/generated_plugin_registrant.dart + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release + +#amplify-do-not-edit-begin +amplify/\#current-cloud-backend +amplify/.config/local-* +amplify/logs +amplify/mock-data +amplify/mock-api-resources +amplify/backend/amplify-meta.json +amplify/backend/.temp +build/ +dist/ +node_modules/ +aws-exports.js +awsconfiguration.json +amplifyconfiguration.json +amplifyconfiguration.dart +amplify-build-config.json +amplify-gradle-config.json +amplifytools.xcconfig +.secret-* +**.sample +#amplify-do-not-edit-end +/amplify/ +.fvm +.metadata +.flutter-plugins-dependencies +linux/flutter/ephemeral/.plugin_symlinks +.flutter-plugins +macos/Flutter/ephemeral diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/caches/deviceStreaming.xml b/.idea/caches/deviceStreaming.xml new file mode 100644 index 0000000..5a2f866 --- /dev/null +++ b/.idea/caches/deviceStreaming.xml @@ -0,0 +1,329 @@ + + + + + + \ No newline at end of file diff --git a/.idea/flutter_zip_archive.iml b/.idea/flutter_zip_archive.iml new file mode 100644 index 0000000..55d90fc --- /dev/null +++ b/.idea/flutter_zip_archive.iml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml new file mode 100644 index 0000000..f235aca --- /dev/null +++ b/.idea/libraries/Dart_SDK.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Flutter_Plugins.xml b/.idea/libraries/Flutter_Plugins.xml new file mode 100644 index 0000000..53449da --- /dev/null +++ b/.idea/libraries/Flutter_Plugins.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..1aef3c0 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/android/build.gradle b/android/build.gradle index 3b050ec..f3ce49f 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -29,7 +29,7 @@ if (flutterRoot == null) { } apply plugin: 'com.android.library' android { - compileSdkVersion 28 + compileSdkVersion 34 defaultConfig { minSdkVersion 16 diff --git a/android/src/main/java/com/jlcool/flutterziparchive/FlutterZipArchivePlugin.java b/android/src/main/java/com/jlcool/flutterziparchive/FlutterZipArchivePlugin.java index 40adb60..5825e63 100644 --- a/android/src/main/java/com/jlcool/flutterziparchive/FlutterZipArchivePlugin.java +++ b/android/src/main/java/com/jlcool/flutterziparchive/FlutterZipArchivePlugin.java @@ -1,5 +1,7 @@ package com.jlcool.flutterziparchive; +import androidx.annotation.NonNull; + import android.os.AsyncTask; import net.lingala.zip4j.core.ZipFile; @@ -17,22 +19,30 @@ import java.util.List; import java.util.Map; +import io.flutter.embedding.engine.plugins.FlutterPlugin; import io.flutter.plugin.common.MethodCall; import io.flutter.plugin.common.MethodChannel; import io.flutter.plugin.common.MethodChannel.MethodCallHandler; import io.flutter.plugin.common.MethodChannel.Result; -import io.flutter.plugin.common.PluginRegistry.Registrar; /** * FlutterZipArchivePlugin */ -public class FlutterZipArchivePlugin implements MethodCallHandler { +public class FlutterZipArchivePlugin implements FlutterPlugin, MethodCallHandler { + private MethodChannel channel; + /** * Plugin registration. */ - public static void registerWith(Registrar registrar) { - final MethodChannel channel = new MethodChannel(registrar.messenger(), "flutter_zip_archive"); - channel.setMethodCallHandler(new FlutterZipArchivePlugin()); + @Override + public void onAttachedToEngine(@NonNull FlutterPlugin.FlutterPluginBinding flutterPluginBinding) { + channel = new MethodChannel(flutterPluginBinding.getBinaryMessenger(), "flutter_zip_archive"); + channel.setMethodCallHandler(this); + } + + @Override + public void onDetachedFromEngine(@NonNull FlutterPlugin.FlutterPluginBinding binding) { + channel.setMethodCallHandler(null); } @Override diff --git a/example/.dart_tool/package_config.json b/example/.dart_tool/package_config.json new file mode 100644 index 0000000..607e879 --- /dev/null +++ b/example/.dart_tool/package_config.json @@ -0,0 +1,353 @@ +{ + "configVersion": 2, + "packages": [ + { + "name": "async", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/async-2.11.0", + "packageUri": "lib/", + "languageVersion": "2.18" + }, + { + "name": "boolean_selector", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/boolean_selector-2.1.1", + "packageUri": "lib/", + "languageVersion": "2.17" + }, + { + "name": "characters", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/characters-1.3.0", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "clock", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/clock-1.1.1", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "collection", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/collection-1.18.0", + "packageUri": "lib/", + "languageVersion": "2.18" + }, + { + "name": "cross_file", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/cross_file-0.3.4+2", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "cupertino_icons", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/cupertino_icons-1.0.8", + "packageUri": "lib/", + "languageVersion": "3.1" + }, + { + "name": "fake_async", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/fake_async-1.3.1", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "ffi", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/ffi-2.1.3", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "file_selector_linux", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/file_selector_linux-0.9.3", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "file_selector_macos", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/file_selector_macos-0.9.4+2", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "file_selector_platform_interface", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/file_selector_platform_interface-2.6.2", + "packageUri": "lib/", + "languageVersion": "3.0" + }, + { + "name": "file_selector_windows", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/file_selector_windows-0.9.3+3", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "flutter", + "rootUri": "file:///Users/william/dev/flutter/packages/flutter", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "flutter_plugin_android_lifecycle", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.23", + "packageUri": "lib/", + "languageVersion": "3.5" + }, + { + "name": "flutter_test", + "rootUri": "file:///Users/william/dev/flutter/packages/flutter_test", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "flutter_web_plugins", + "rootUri": "file:///Users/william/dev/flutter/packages/flutter_web_plugins", + "packageUri": "lib/", + "languageVersion": "3.2" + }, + { + "name": "flutter_zip_archive", + "rootUri": "../../", + "packageUri": "lib/", + "languageVersion": "3.0" + }, + { + "name": "http", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/http-1.2.2", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "http_parser", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/http_parser-4.0.2", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "image_picker", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/image_picker-1.1.2", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "image_picker_android", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/image_picker_android-0.8.12+17", + "packageUri": "lib/", + "languageVersion": "3.5" + }, + { + "name": "image_picker_for_web", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/image_picker_for_web-3.0.6", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "image_picker_ios", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+1", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "image_picker_linux", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/image_picker_linux-0.2.1+1", + "packageUri": "lib/", + "languageVersion": "2.19" + }, + { + "name": "image_picker_macos", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/image_picker_macos-0.2.1+1", + "packageUri": "lib/", + "languageVersion": "2.19" + }, + { + "name": "image_picker_platform_interface", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/image_picker_platform_interface-2.10.0", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "image_picker_windows", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/image_picker_windows-0.2.1+1", + "packageUri": "lib/", + "languageVersion": "2.19" + }, + { + "name": "leak_tracker", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/leak_tracker-10.0.5", + "packageUri": "lib/", + "languageVersion": "3.2" + }, + { + "name": "leak_tracker_flutter_testing", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/leak_tracker_flutter_testing-3.0.5", + "packageUri": "lib/", + "languageVersion": "3.2" + }, + { + "name": "leak_tracker_testing", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/leak_tracker_testing-3.0.1", + "packageUri": "lib/", + "languageVersion": "3.2" + }, + { + "name": "matcher", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/matcher-0.12.16+1", + "packageUri": "lib/", + "languageVersion": "3.0" + }, + { + "name": "material_color_utilities", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/material_color_utilities-0.11.1", + "packageUri": "lib/", + "languageVersion": "2.17" + }, + { + "name": "meta", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/meta-1.15.0", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "mime", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/mime-2.0.0", + "packageUri": "lib/", + "languageVersion": "3.2" + }, + { + "name": "path", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/path-1.9.0", + "packageUri": "lib/", + "languageVersion": "3.0" + }, + { + "name": "path_provider", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/path_provider-2.1.5", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "path_provider_android", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/path_provider_android-2.2.12", + "packageUri": "lib/", + "languageVersion": "3.5" + }, + { + "name": "path_provider_foundation", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0", + "packageUri": "lib/", + "languageVersion": "3.2" + }, + { + "name": "path_provider_linux", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1", + "packageUri": "lib/", + "languageVersion": "2.19" + }, + { + "name": "path_provider_platform_interface", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/path_provider_platform_interface-2.1.2", + "packageUri": "lib/", + "languageVersion": "3.0" + }, + { + "name": "path_provider_windows", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0", + "packageUri": "lib/", + "languageVersion": "3.2" + }, + { + "name": "platform", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/platform-3.1.6", + "packageUri": "lib/", + "languageVersion": "3.2" + }, + { + "name": "plugin_platform_interface", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/plugin_platform_interface-2.1.8", + "packageUri": "lib/", + "languageVersion": "3.0" + }, + { + "name": "sky_engine", + "rootUri": "file:///Users/william/dev/flutter/bin/cache/pkg/sky_engine", + "packageUri": "lib/", + "languageVersion": "3.2" + }, + { + "name": "source_span", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/source_span-1.10.0", + "packageUri": "lib/", + "languageVersion": "2.18" + }, + { + "name": "stack_trace", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/stack_trace-1.11.1", + "packageUri": "lib/", + "languageVersion": "2.18" + }, + { + "name": "stream_channel", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/stream_channel-2.1.2", + "packageUri": "lib/", + "languageVersion": "2.19" + }, + { + "name": "string_scanner", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/string_scanner-1.2.0", + "packageUri": "lib/", + "languageVersion": "2.18" + }, + { + "name": "term_glyph", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/term_glyph-1.2.1", + "packageUri": "lib/", + "languageVersion": "2.12" + }, + { + "name": "test_api", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/test_api-0.7.2", + "packageUri": "lib/", + "languageVersion": "3.2" + }, + { + "name": "typed_data", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/typed_data-1.4.0", + "packageUri": "lib/", + "languageVersion": "3.5" + }, + { + "name": "vector_math", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/vector_math-2.1.4", + "packageUri": "lib/", + "languageVersion": "2.14" + }, + { + "name": "vm_service", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/vm_service-14.2.4", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "web", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/web-1.1.0", + "packageUri": "lib/", + "languageVersion": "3.4" + }, + { + "name": "xdg_directories", + "rootUri": "file:///Users/william/.pub-cache/hosted/pub.dev/xdg_directories-1.1.0", + "packageUri": "lib/", + "languageVersion": "3.3" + }, + { + "name": "flutter_zip_archive_example", + "rootUri": "../", + "packageUri": "lib/", + "languageVersion": "3.0" + } + ], + "generated": "2024-11-01T11:55:08.559654Z", + "generator": "pub", + "generatorVersion": "3.5.0", + "flutterRoot": "file:///Users/william/dev/flutter", + "flutterVersion": "3.24.0", + "pubCache": "file:///Users/william/.pub-cache" +} diff --git a/example/.dart_tool/package_config_subset b/example/.dart_tool/package_config_subset new file mode 100644 index 0000000..10226c5 --- /dev/null +++ b/example/.dart_tool/package_config_subset @@ -0,0 +1,229 @@ +async +2.18 +file:///Users/william/.pub-cache/hosted/pub.dev/async-2.11.0/ +file:///Users/william/.pub-cache/hosted/pub.dev/async-2.11.0/lib/ +boolean_selector +2.17 +file:///Users/william/.pub-cache/hosted/pub.dev/boolean_selector-2.1.1/ +file:///Users/william/.pub-cache/hosted/pub.dev/boolean_selector-2.1.1/lib/ +characters +2.12 +file:///Users/william/.pub-cache/hosted/pub.dev/characters-1.3.0/ +file:///Users/william/.pub-cache/hosted/pub.dev/characters-1.3.0/lib/ +clock +2.12 +file:///Users/william/.pub-cache/hosted/pub.dev/clock-1.1.1/ +file:///Users/william/.pub-cache/hosted/pub.dev/clock-1.1.1/lib/ +collection +2.18 +file:///Users/william/.pub-cache/hosted/pub.dev/collection-1.18.0/ +file:///Users/william/.pub-cache/hosted/pub.dev/collection-1.18.0/lib/ +cross_file +3.3 +file:///Users/william/.pub-cache/hosted/pub.dev/cross_file-0.3.4+2/ +file:///Users/william/.pub-cache/hosted/pub.dev/cross_file-0.3.4+2/lib/ +cupertino_icons +3.1 +file:///Users/william/.pub-cache/hosted/pub.dev/cupertino_icons-1.0.8/ +file:///Users/william/.pub-cache/hosted/pub.dev/cupertino_icons-1.0.8/lib/ +fake_async +2.12 +file:///Users/william/.pub-cache/hosted/pub.dev/fake_async-1.3.1/ +file:///Users/william/.pub-cache/hosted/pub.dev/fake_async-1.3.1/lib/ +ffi +3.3 +file:///Users/william/.pub-cache/hosted/pub.dev/ffi-2.1.3/ +file:///Users/william/.pub-cache/hosted/pub.dev/ffi-2.1.3/lib/ +file_selector_linux +3.3 +file:///Users/william/.pub-cache/hosted/pub.dev/file_selector_linux-0.9.3/ +file:///Users/william/.pub-cache/hosted/pub.dev/file_selector_linux-0.9.3/lib/ +file_selector_macos +3.3 +file:///Users/william/.pub-cache/hosted/pub.dev/file_selector_macos-0.9.4+2/ +file:///Users/william/.pub-cache/hosted/pub.dev/file_selector_macos-0.9.4+2/lib/ +file_selector_platform_interface +3.0 +file:///Users/william/.pub-cache/hosted/pub.dev/file_selector_platform_interface-2.6.2/ +file:///Users/william/.pub-cache/hosted/pub.dev/file_selector_platform_interface-2.6.2/lib/ +file_selector_windows +3.3 +file:///Users/william/.pub-cache/hosted/pub.dev/file_selector_windows-0.9.3+3/ +file:///Users/william/.pub-cache/hosted/pub.dev/file_selector_windows-0.9.3+3/lib/ +flutter_plugin_android_lifecycle +3.5 +file:///Users/william/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.23/ +file:///Users/william/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.23/lib/ +http +3.3 +file:///Users/william/.pub-cache/hosted/pub.dev/http-1.2.2/ +file:///Users/william/.pub-cache/hosted/pub.dev/http-1.2.2/lib/ +http_parser +2.12 +file:///Users/william/.pub-cache/hosted/pub.dev/http_parser-4.0.2/ +file:///Users/william/.pub-cache/hosted/pub.dev/http_parser-4.0.2/lib/ +image_picker +3.3 +file:///Users/william/.pub-cache/hosted/pub.dev/image_picker-1.1.2/ +file:///Users/william/.pub-cache/hosted/pub.dev/image_picker-1.1.2/lib/ +image_picker_android +3.5 +file:///Users/william/.pub-cache/hosted/pub.dev/image_picker_android-0.8.12+17/ +file:///Users/william/.pub-cache/hosted/pub.dev/image_picker_android-0.8.12+17/lib/ +image_picker_for_web +3.4 +file:///Users/william/.pub-cache/hosted/pub.dev/image_picker_for_web-3.0.6/ +file:///Users/william/.pub-cache/hosted/pub.dev/image_picker_for_web-3.0.6/lib/ +image_picker_ios +3.3 +file:///Users/william/.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+1/ +file:///Users/william/.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+1/lib/ +image_picker_linux +2.19 +file:///Users/william/.pub-cache/hosted/pub.dev/image_picker_linux-0.2.1+1/ +file:///Users/william/.pub-cache/hosted/pub.dev/image_picker_linux-0.2.1+1/lib/ +image_picker_macos +2.19 +file:///Users/william/.pub-cache/hosted/pub.dev/image_picker_macos-0.2.1+1/ +file:///Users/william/.pub-cache/hosted/pub.dev/image_picker_macos-0.2.1+1/lib/ +image_picker_platform_interface +3.3 +file:///Users/william/.pub-cache/hosted/pub.dev/image_picker_platform_interface-2.10.0/ +file:///Users/william/.pub-cache/hosted/pub.dev/image_picker_platform_interface-2.10.0/lib/ +image_picker_windows +2.19 +file:///Users/william/.pub-cache/hosted/pub.dev/image_picker_windows-0.2.1+1/ +file:///Users/william/.pub-cache/hosted/pub.dev/image_picker_windows-0.2.1+1/lib/ +leak_tracker +3.2 +file:///Users/william/.pub-cache/hosted/pub.dev/leak_tracker-10.0.5/ +file:///Users/william/.pub-cache/hosted/pub.dev/leak_tracker-10.0.5/lib/ +leak_tracker_flutter_testing +3.2 +file:///Users/william/.pub-cache/hosted/pub.dev/leak_tracker_flutter_testing-3.0.5/ +file:///Users/william/.pub-cache/hosted/pub.dev/leak_tracker_flutter_testing-3.0.5/lib/ +leak_tracker_testing +3.2 +file:///Users/william/.pub-cache/hosted/pub.dev/leak_tracker_testing-3.0.1/ +file:///Users/william/.pub-cache/hosted/pub.dev/leak_tracker_testing-3.0.1/lib/ +matcher +3.0 +file:///Users/william/.pub-cache/hosted/pub.dev/matcher-0.12.16+1/ +file:///Users/william/.pub-cache/hosted/pub.dev/matcher-0.12.16+1/lib/ +material_color_utilities +2.17 +file:///Users/william/.pub-cache/hosted/pub.dev/material_color_utilities-0.11.1/ +file:///Users/william/.pub-cache/hosted/pub.dev/material_color_utilities-0.11.1/lib/ +meta +2.12 +file:///Users/william/.pub-cache/hosted/pub.dev/meta-1.15.0/ +file:///Users/william/.pub-cache/hosted/pub.dev/meta-1.15.0/lib/ +mime +3.2 +file:///Users/william/.pub-cache/hosted/pub.dev/mime-2.0.0/ +file:///Users/william/.pub-cache/hosted/pub.dev/mime-2.0.0/lib/ +path +3.0 +file:///Users/william/.pub-cache/hosted/pub.dev/path-1.9.0/ +file:///Users/william/.pub-cache/hosted/pub.dev/path-1.9.0/lib/ +path_provider +3.4 +file:///Users/william/.pub-cache/hosted/pub.dev/path_provider-2.1.5/ +file:///Users/william/.pub-cache/hosted/pub.dev/path_provider-2.1.5/lib/ +path_provider_android +3.5 +file:///Users/william/.pub-cache/hosted/pub.dev/path_provider_android-2.2.12/ +file:///Users/william/.pub-cache/hosted/pub.dev/path_provider_android-2.2.12/lib/ +path_provider_foundation +3.2 +file:///Users/william/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/ +file:///Users/william/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/lib/ +path_provider_linux +2.19 +file:///Users/william/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/ +file:///Users/william/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/lib/ +path_provider_platform_interface +3.0 +file:///Users/william/.pub-cache/hosted/pub.dev/path_provider_platform_interface-2.1.2/ +file:///Users/william/.pub-cache/hosted/pub.dev/path_provider_platform_interface-2.1.2/lib/ +path_provider_windows +3.2 +file:///Users/william/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/ +file:///Users/william/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/lib/ +platform +3.2 +file:///Users/william/.pub-cache/hosted/pub.dev/platform-3.1.6/ +file:///Users/william/.pub-cache/hosted/pub.dev/platform-3.1.6/lib/ +plugin_platform_interface +3.0 +file:///Users/william/.pub-cache/hosted/pub.dev/plugin_platform_interface-2.1.8/ +file:///Users/william/.pub-cache/hosted/pub.dev/plugin_platform_interface-2.1.8/lib/ +source_span +2.18 +file:///Users/william/.pub-cache/hosted/pub.dev/source_span-1.10.0/ +file:///Users/william/.pub-cache/hosted/pub.dev/source_span-1.10.0/lib/ +stack_trace +2.18 +file:///Users/william/.pub-cache/hosted/pub.dev/stack_trace-1.11.1/ +file:///Users/william/.pub-cache/hosted/pub.dev/stack_trace-1.11.1/lib/ +stream_channel +2.19 +file:///Users/william/.pub-cache/hosted/pub.dev/stream_channel-2.1.2/ +file:///Users/william/.pub-cache/hosted/pub.dev/stream_channel-2.1.2/lib/ +string_scanner +2.18 +file:///Users/william/.pub-cache/hosted/pub.dev/string_scanner-1.2.0/ +file:///Users/william/.pub-cache/hosted/pub.dev/string_scanner-1.2.0/lib/ +term_glyph +2.12 +file:///Users/william/.pub-cache/hosted/pub.dev/term_glyph-1.2.1/ +file:///Users/william/.pub-cache/hosted/pub.dev/term_glyph-1.2.1/lib/ +test_api +3.2 +file:///Users/william/.pub-cache/hosted/pub.dev/test_api-0.7.2/ +file:///Users/william/.pub-cache/hosted/pub.dev/test_api-0.7.2/lib/ +typed_data +3.5 +file:///Users/william/.pub-cache/hosted/pub.dev/typed_data-1.4.0/ +file:///Users/william/.pub-cache/hosted/pub.dev/typed_data-1.4.0/lib/ +vector_math +2.14 +file:///Users/william/.pub-cache/hosted/pub.dev/vector_math-2.1.4/ +file:///Users/william/.pub-cache/hosted/pub.dev/vector_math-2.1.4/lib/ +vm_service +3.3 +file:///Users/william/.pub-cache/hosted/pub.dev/vm_service-14.2.4/ +file:///Users/william/.pub-cache/hosted/pub.dev/vm_service-14.2.4/lib/ +web +3.4 +file:///Users/william/.pub-cache/hosted/pub.dev/web-1.1.0/ +file:///Users/william/.pub-cache/hosted/pub.dev/web-1.1.0/lib/ +xdg_directories +3.3 +file:///Users/william/.pub-cache/hosted/pub.dev/xdg_directories-1.1.0/ +file:///Users/william/.pub-cache/hosted/pub.dev/xdg_directories-1.1.0/lib/ +sky_engine +3.2 +file:///Users/william/dev/flutter/bin/cache/pkg/sky_engine/ +file:///Users/william/dev/flutter/bin/cache/pkg/sky_engine/lib/ +flutter +3.3 +file:///Users/william/dev/flutter/packages/flutter/ +file:///Users/william/dev/flutter/packages/flutter/lib/ +flutter_test +3.3 +file:///Users/william/dev/flutter/packages/flutter_test/ +file:///Users/william/dev/flutter/packages/flutter_test/lib/ +flutter_web_plugins +3.2 +file:///Users/william/dev/flutter/packages/flutter_web_plugins/ +file:///Users/william/dev/flutter/packages/flutter_web_plugins/lib/ +flutter_zip_archive +3.0 +file:///Users/william/dev/flutter_zip_archive/ +file:///Users/william/dev/flutter_zip_archive/lib/ +flutter_zip_archive_example +3.0 +file:///Users/william/dev/flutter_zip_archive/example/ +file:///Users/william/dev/flutter_zip_archive/example/lib/ +2 diff --git a/example/.dart_tool/version b/example/.dart_tool/version new file mode 100644 index 0000000..b7bc73b --- /dev/null +++ b/example/.dart_tool/version @@ -0,0 +1 @@ +3.24.0 \ No newline at end of file diff --git a/example/.flutter-plugins b/example/.flutter-plugins new file mode 100644 index 0000000..88101a7 --- /dev/null +++ b/example/.flutter-plugins @@ -0,0 +1,18 @@ +# This is a generated file; do not edit or check into version control. +file_selector_linux=/Users/william/.pub-cache/hosted/pub.dev/file_selector_linux-0.9.3/ +file_selector_macos=/Users/william/.pub-cache/hosted/pub.dev/file_selector_macos-0.9.4+2/ +file_selector_windows=/Users/william/.pub-cache/hosted/pub.dev/file_selector_windows-0.9.3+3/ +flutter_plugin_android_lifecycle=/Users/william/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.23/ +flutter_zip_archive=/Users/william/dev/flutter_zip_archive/ +image_picker=/Users/william/.pub-cache/hosted/pub.dev/image_picker-1.1.2/ +image_picker_android=/Users/william/.pub-cache/hosted/pub.dev/image_picker_android-0.8.12+17/ +image_picker_for_web=/Users/william/.pub-cache/hosted/pub.dev/image_picker_for_web-3.0.6/ +image_picker_ios=/Users/william/.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+1/ +image_picker_linux=/Users/william/.pub-cache/hosted/pub.dev/image_picker_linux-0.2.1+1/ +image_picker_macos=/Users/william/.pub-cache/hosted/pub.dev/image_picker_macos-0.2.1+1/ +image_picker_windows=/Users/william/.pub-cache/hosted/pub.dev/image_picker_windows-0.2.1+1/ +path_provider=/Users/william/.pub-cache/hosted/pub.dev/path_provider-2.1.5/ +path_provider_android=/Users/william/.pub-cache/hosted/pub.dev/path_provider_android-2.2.12/ +path_provider_foundation=/Users/william/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/ +path_provider_linux=/Users/william/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/ +path_provider_windows=/Users/william/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/ diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies new file mode 100644 index 0000000..5999dbd --- /dev/null +++ b/example/.flutter-plugins-dependencies @@ -0,0 +1 @@ +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_zip_archive","path":"/Users/william/dev/flutter_zip_archive/","native_build":true,"dependencies":[]},{"name":"image_picker_ios","path":"/Users/william/.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+1/","native_build":true,"dependencies":[]},{"name":"path_provider_foundation","path":"/Users/william/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"flutter_plugin_android_lifecycle","path":"/Users/william/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.23/","native_build":true,"dependencies":[]},{"name":"flutter_zip_archive","path":"/Users/william/dev/flutter_zip_archive/","native_build":true,"dependencies":[]},{"name":"image_picker_android","path":"/Users/william/.pub-cache/hosted/pub.dev/image_picker_android-0.8.12+17/","native_build":true,"dependencies":["flutter_plugin_android_lifecycle"]},{"name":"path_provider_android","path":"/Users/william/.pub-cache/hosted/pub.dev/path_provider_android-2.2.12/","native_build":true,"dependencies":[]}],"macos":[{"name":"file_selector_macos","path":"/Users/william/.pub-cache/hosted/pub.dev/file_selector_macos-0.9.4+2/","native_build":true,"dependencies":[]},{"name":"image_picker_macos","path":"/Users/william/.pub-cache/hosted/pub.dev/image_picker_macos-0.2.1+1/","native_build":false,"dependencies":["file_selector_macos"]},{"name":"path_provider_foundation","path":"/Users/william/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"file_selector_linux","path":"/Users/william/.pub-cache/hosted/pub.dev/file_selector_linux-0.9.3/","native_build":true,"dependencies":[]},{"name":"image_picker_linux","path":"/Users/william/.pub-cache/hosted/pub.dev/image_picker_linux-0.2.1+1/","native_build":false,"dependencies":["file_selector_linux"]},{"name":"path_provider_linux","path":"/Users/william/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]}],"windows":[{"name":"file_selector_windows","path":"/Users/william/.pub-cache/hosted/pub.dev/file_selector_windows-0.9.3+3/","native_build":true,"dependencies":[]},{"name":"image_picker_windows","path":"/Users/william/.pub-cache/hosted/pub.dev/image_picker_windows-0.2.1+1/","native_build":false,"dependencies":["file_selector_windows"]},{"name":"path_provider_windows","path":"/Users/william/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]}],"web":[{"name":"image_picker_for_web","path":"/Users/william/.pub-cache/hosted/pub.dev/image_picker_for_web-3.0.6/","dependencies":[]}]},"dependencyGraph":[{"name":"file_selector_linux","dependencies":[]},{"name":"file_selector_macos","dependencies":[]},{"name":"file_selector_windows","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"flutter_zip_archive","dependencies":[]},{"name":"image_picker","dependencies":["image_picker_android","image_picker_for_web","image_picker_ios","image_picker_linux","image_picker_macos","image_picker_windows"]},{"name":"image_picker_android","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"image_picker_for_web","dependencies":[]},{"name":"image_picker_ios","dependencies":[]},{"name":"image_picker_linux","dependencies":["file_selector_linux"]},{"name":"image_picker_macos","dependencies":["file_selector_macos"]},{"name":"image_picker_windows","dependencies":["file_selector_windows"]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2024-11-01 22:06:47.519982","version":"3.24.0","swift_package_manager_enabled":false} \ No newline at end of file diff --git a/example/.gitignore b/example/.gitignore new file mode 100644 index 0000000..24476c5 --- /dev/null +++ b/example/.gitignore @@ -0,0 +1,44 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java b/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java new file mode 100644 index 0000000..1da69db --- /dev/null +++ b/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java @@ -0,0 +1,34 @@ +package io.flutter.plugins; + +import androidx.annotation.Keep; +import androidx.annotation.NonNull; +import io.flutter.Log; + +import io.flutter.embedding.engine.FlutterEngine; + +/** + * Generated file. Do not edit. + * This file is generated by the Flutter tool based on the + * plugins that support the Android platform. + */ +@Keep +public final class GeneratedPluginRegistrant { + private static final String TAG = "GeneratedPluginRegistrant"; + public static void registerWith(@NonNull FlutterEngine flutterEngine) { + try { + flutterEngine.getPlugins().add(new io.flutter.plugins.flutter_plugin_android_lifecycle.FlutterAndroidLifecyclePlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin flutter_plugin_android_lifecycle, io.flutter.plugins.flutter_plugin_android_lifecycle.FlutterAndroidLifecyclePlugin", e); + } + try { + flutterEngine.getPlugins().add(new io.flutter.plugins.imagepicker.ImagePickerPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin image_picker_android, io.flutter.plugins.imagepicker.ImagePickerPlugin", e); + } + try { + flutterEngine.getPlugins().add(new io.flutter.plugins.pathprovider.PathProviderPlugin()); + } catch (Exception e) { + Log.e(TAG, "Error registering plugin path_provider_android, io.flutter.plugins.pathprovider.PathProviderPlugin", e); + } + } +} diff --git a/example/android/local.properties b/example/android/local.properties new file mode 100644 index 0000000..72225c3 --- /dev/null +++ b/example/android/local.properties @@ -0,0 +1,2 @@ +sdk.dir=/Users/william/Library/Android/sdk +flutter.sdk=/Users/william/dev/flutter \ No newline at end of file diff --git a/example/build/ios/Runner.build/Release-iphoneos/Runner.build/dgph b/example/build/ios/Runner.build/Release-iphoneos/Runner.build/dgph new file mode 100644 index 0000000..25a5898 Binary files /dev/null and b/example/build/ios/Runner.build/Release-iphoneos/Runner.build/dgph differ diff --git a/example/ios/.symlinks/plugins/flutter_zip_archive b/example/ios/.symlinks/plugins/flutter_zip_archive new file mode 120000 index 0000000..1c3c981 --- /dev/null +++ b/example/ios/.symlinks/plugins/flutter_zip_archive @@ -0,0 +1 @@ +/Users/william/dev/flutter_zip_archive/ \ No newline at end of file diff --git a/example/ios/.symlinks/plugins/image_picker_ios b/example/ios/.symlinks/plugins/image_picker_ios new file mode 120000 index 0000000..6bff9e3 --- /dev/null +++ b/example/ios/.symlinks/plugins/image_picker_ios @@ -0,0 +1 @@ +/Users/william/.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+1/ \ No newline at end of file diff --git a/example/ios/.symlinks/plugins/path_provider_foundation b/example/ios/.symlinks/plugins/path_provider_foundation new file mode 120000 index 0000000..0848228 --- /dev/null +++ b/example/ios/.symlinks/plugins/path_provider_foundation @@ -0,0 +1 @@ +/Users/william/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/ \ No newline at end of file diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist index 9367d48..7c56964 100644 --- a/example/ios/Flutter/AppFrameworkInfo.plist +++ b/example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 8.0 + 12.0 diff --git a/example/ios/Flutter/Flutter.podspec b/example/ios/Flutter/Flutter.podspec new file mode 100644 index 0000000..98e1633 --- /dev/null +++ b/example/ios/Flutter/Flutter.podspec @@ -0,0 +1,18 @@ +# +# This podspec is NOT to be published. It is only used as a local source! +# This is a generated file; do not edit or check into version control. +# + +Pod::Spec.new do |s| + s.name = 'Flutter' + s.version = '1.0.0' + s.summary = 'A UI toolkit for beautiful and fast apps.' + s.homepage = 'https://flutter.dev' + s.license = { :type => 'BSD' } + s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } + s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s } + s.ios.deployment_target = '12.0' + # Framework linking is handled by Flutter tooling, not CocoaPods. + # Add a placeholder to satisfy `s.dependency 'Flutter'` plugin podspecs. + s.vendored_frameworks = 'path/to/nothing' +end diff --git a/example/ios/Flutter/Generated.xcconfig b/example/ios/Flutter/Generated.xcconfig index cbd0746..ba36383 100644 --- a/example/ios/Flutter/Generated.xcconfig +++ b/example/ios/Flutter/Generated.xcconfig @@ -1,8 +1,15 @@ // This is a generated file; do not edit or check into version control. -FLUTTER_ROOT=/Users/jiangliang/development/flutter -FLUTTER_APPLICATION_PATH=/Users/jiangliang/flutterproject/flutter_zip_archive/example -FLUTTER_TARGET=/Users/jiangliang/flutterproject/flutter_zip_archive/example/lib/main.dart +FLUTTER_ROOT=/Users/william/dev/flutter +FLUTTER_APPLICATION_PATH=/Users/william/dev/flutter_zip_archive/example +COCOAPODS_PARALLEL_CODE_SIGN=true +FLUTTER_TARGET=/Users/william/dev/flutter_zip_archive/example/lib/main.dart FLUTTER_BUILD_DIR=build -SYMROOT=${SOURCE_ROOT}/../build/ios -FLUTTER_FRAMEWORK_DIR=/Users/jiangliang/development/flutter/bin/cache/artifacts/engine/ios +FLUTTER_BUILD_NAME=1.0.0 +FLUTTER_BUILD_NUMBER=1 +EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386 +EXCLUDED_ARCHS[sdk=iphoneos*]=armv7 +DART_DEFINES=Zmx1dHRlci5pbnNwZWN0b3Iuc3RydWN0dXJlZEVycm9ycz10cnVl +DART_OBFUSCATION=false TRACK_WIDGET_CREATION=true +TREE_SHAKE_ICONS=false +PACKAGE_CONFIG=/Users/william/dev/flutter_zip_archive/example/.dart_tool/package_config.json diff --git a/example/ios/Flutter/flutter_export_environment.sh b/example/ios/Flutter/flutter_export_environment.sh new file mode 100755 index 0000000..28ddb3b --- /dev/null +++ b/example/ios/Flutter/flutter_export_environment.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# This is a generated file; do not edit or check into version control. +export "FLUTTER_ROOT=/Users/william/dev/flutter" +export "FLUTTER_APPLICATION_PATH=/Users/william/dev/flutter_zip_archive/example" +export "COCOAPODS_PARALLEL_CODE_SIGN=true" +export "FLUTTER_TARGET=/Users/william/dev/flutter_zip_archive/example/lib/main.dart" +export "FLUTTER_BUILD_DIR=build" +export "FLUTTER_BUILD_NAME=1.0.0" +export "FLUTTER_BUILD_NUMBER=1" +export "DART_DEFINES=Zmx1dHRlci5pbnNwZWN0b3Iuc3RydWN0dXJlZEVycm9ycz10cnVl" +export "DART_OBFUSCATION=false" +export "TRACK_WIDGET_CREATION=true" +export "TREE_SHAKE_ICONS=false" +export "PACKAGE_CONFIG=/Users/william/dev/flutter_zip_archive/example/.dart_tool/package_config.json" diff --git a/example/ios/Podfile b/example/ios/Podfile new file mode 100644 index 0000000..b331c7b --- /dev/null +++ b/example/ios/Podfile @@ -0,0 +1,38 @@ +# Uncomment this line to define a global platform for your project +platform :ios, '12.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock new file mode 100644 index 0000000..53b0785 --- /dev/null +++ b/example/ios/Podfile.lock @@ -0,0 +1,42 @@ +PODS: + - Flutter (1.0.0) + - flutter_zip_archive (0.0.1): + - Flutter + - SSZipArchive + - image_picker_ios (0.0.1): + - Flutter + - path_provider_foundation (0.0.1): + - Flutter + - FlutterMacOS + - SSZipArchive (2.4.3) + +DEPENDENCIES: + - Flutter (from `Flutter`) + - flutter_zip_archive (from `.symlinks/plugins/flutter_zip_archive/ios`) + - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`) + - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) + +SPEC REPOS: + trunk: + - SSZipArchive + +EXTERNAL SOURCES: + Flutter: + :path: Flutter + flutter_zip_archive: + :path: ".symlinks/plugins/flutter_zip_archive/ios" + image_picker_ios: + :path: ".symlinks/plugins/image_picker_ios/ios" + path_provider_foundation: + :path: ".symlinks/plugins/path_provider_foundation/darwin" + +SPEC CHECKSUMS: + Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 + flutter_zip_archive: 0720df756f6e5eee393e52da24877d0b7bb90fab + image_picker_ios: c560581cceedb403a6ff17f2f816d7fea1421fc1 + path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 + SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef + +PODFILE CHECKSUM: cf0c950f7e9a456b4e325f5b8fc0f98906a3705a + +COCOAPODS: 1.16.2 diff --git a/example/ios/Pods/Headers/Private/SSZipArchive/SSZipArchive.h b/example/ios/Pods/Headers/Private/SSZipArchive/SSZipArchive.h new file mode 120000 index 0000000..951d734 --- /dev/null +++ b/example/ios/Pods/Headers/Private/SSZipArchive/SSZipArchive.h @@ -0,0 +1 @@ +../../../SSZipArchive/SSZipArchive/SSZipArchive.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Private/SSZipArchive/SSZipCommon.h b/example/ios/Pods/Headers/Private/SSZipArchive/SSZipCommon.h new file mode 120000 index 0000000..1ef5dd6 --- /dev/null +++ b/example/ios/Pods/Headers/Private/SSZipArchive/SSZipCommon.h @@ -0,0 +1 @@ +../../../SSZipArchive/SSZipArchive/SSZipCommon.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Private/SSZipArchive/ZipArchive.h b/example/ios/Pods/Headers/Private/SSZipArchive/ZipArchive.h new file mode 120000 index 0000000..bb00547 --- /dev/null +++ b/example/ios/Pods/Headers/Private/SSZipArchive/ZipArchive.h @@ -0,0 +1 @@ +../../../SSZipArchive/SSZipArchive/include/ZipArchive.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Private/SSZipArchive/mz.h b/example/ios/Pods/Headers/Private/SSZipArchive/mz.h new file mode 120000 index 0000000..0c15c50 --- /dev/null +++ b/example/ios/Pods/Headers/Private/SSZipArchive/mz.h @@ -0,0 +1 @@ +../../../SSZipArchive/SSZipArchive/minizip/mz.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Private/SSZipArchive/mz_compat.h b/example/ios/Pods/Headers/Private/SSZipArchive/mz_compat.h new file mode 120000 index 0000000..1dc2332 --- /dev/null +++ b/example/ios/Pods/Headers/Private/SSZipArchive/mz_compat.h @@ -0,0 +1 @@ +../../../SSZipArchive/SSZipArchive/minizip/mz_compat.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Private/SSZipArchive/mz_crypt.h b/example/ios/Pods/Headers/Private/SSZipArchive/mz_crypt.h new file mode 120000 index 0000000..095e038 --- /dev/null +++ b/example/ios/Pods/Headers/Private/SSZipArchive/mz_crypt.h @@ -0,0 +1 @@ +../../../SSZipArchive/SSZipArchive/minizip/mz_crypt.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Private/SSZipArchive/mz_os.h b/example/ios/Pods/Headers/Private/SSZipArchive/mz_os.h new file mode 120000 index 0000000..1bd59bd --- /dev/null +++ b/example/ios/Pods/Headers/Private/SSZipArchive/mz_os.h @@ -0,0 +1 @@ +../../../SSZipArchive/SSZipArchive/minizip/mz_os.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Private/SSZipArchive/mz_strm.h b/example/ios/Pods/Headers/Private/SSZipArchive/mz_strm.h new file mode 120000 index 0000000..7ac6185 --- /dev/null +++ b/example/ios/Pods/Headers/Private/SSZipArchive/mz_strm.h @@ -0,0 +1 @@ +../../../SSZipArchive/SSZipArchive/minizip/mz_strm.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Private/SSZipArchive/mz_strm_buf.h b/example/ios/Pods/Headers/Private/SSZipArchive/mz_strm_buf.h new file mode 120000 index 0000000..d319c85 --- /dev/null +++ b/example/ios/Pods/Headers/Private/SSZipArchive/mz_strm_buf.h @@ -0,0 +1 @@ +../../../SSZipArchive/SSZipArchive/minizip/mz_strm_buf.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Private/SSZipArchive/mz_strm_mem.h b/example/ios/Pods/Headers/Private/SSZipArchive/mz_strm_mem.h new file mode 120000 index 0000000..a94de59 --- /dev/null +++ b/example/ios/Pods/Headers/Private/SSZipArchive/mz_strm_mem.h @@ -0,0 +1 @@ +../../../SSZipArchive/SSZipArchive/minizip/mz_strm_mem.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Private/SSZipArchive/mz_strm_os.h b/example/ios/Pods/Headers/Private/SSZipArchive/mz_strm_os.h new file mode 120000 index 0000000..459faef --- /dev/null +++ b/example/ios/Pods/Headers/Private/SSZipArchive/mz_strm_os.h @@ -0,0 +1 @@ +../../../SSZipArchive/SSZipArchive/minizip/mz_strm_os.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Private/SSZipArchive/mz_strm_pkcrypt.h b/example/ios/Pods/Headers/Private/SSZipArchive/mz_strm_pkcrypt.h new file mode 120000 index 0000000..9f555ed --- /dev/null +++ b/example/ios/Pods/Headers/Private/SSZipArchive/mz_strm_pkcrypt.h @@ -0,0 +1 @@ +../../../SSZipArchive/SSZipArchive/minizip/mz_strm_pkcrypt.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Private/SSZipArchive/mz_strm_split.h b/example/ios/Pods/Headers/Private/SSZipArchive/mz_strm_split.h new file mode 120000 index 0000000..7498841 --- /dev/null +++ b/example/ios/Pods/Headers/Private/SSZipArchive/mz_strm_split.h @@ -0,0 +1 @@ +../../../SSZipArchive/SSZipArchive/minizip/mz_strm_split.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Private/SSZipArchive/mz_strm_wzaes.h b/example/ios/Pods/Headers/Private/SSZipArchive/mz_strm_wzaes.h new file mode 120000 index 0000000..a4902ce --- /dev/null +++ b/example/ios/Pods/Headers/Private/SSZipArchive/mz_strm_wzaes.h @@ -0,0 +1 @@ +../../../SSZipArchive/SSZipArchive/minizip/mz_strm_wzaes.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Private/SSZipArchive/mz_strm_zlib.h b/example/ios/Pods/Headers/Private/SSZipArchive/mz_strm_zlib.h new file mode 120000 index 0000000..652c1d6 --- /dev/null +++ b/example/ios/Pods/Headers/Private/SSZipArchive/mz_strm_zlib.h @@ -0,0 +1 @@ +../../../SSZipArchive/SSZipArchive/minizip/mz_strm_zlib.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Private/SSZipArchive/mz_zip.h b/example/ios/Pods/Headers/Private/SSZipArchive/mz_zip.h new file mode 120000 index 0000000..5e4dcdb --- /dev/null +++ b/example/ios/Pods/Headers/Private/SSZipArchive/mz_zip.h @@ -0,0 +1 @@ +../../../SSZipArchive/SSZipArchive/minizip/mz_zip.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Private/SSZipArchive/mz_zip_rw.h b/example/ios/Pods/Headers/Private/SSZipArchive/mz_zip_rw.h new file mode 120000 index 0000000..dc81298 --- /dev/null +++ b/example/ios/Pods/Headers/Private/SSZipArchive/mz_zip_rw.h @@ -0,0 +1 @@ +../../../SSZipArchive/SSZipArchive/minizip/mz_zip_rw.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Private/flutter_zip_archive/FlutterZipArchivePlugin.h b/example/ios/Pods/Headers/Private/flutter_zip_archive/FlutterZipArchivePlugin.h new file mode 120000 index 0000000..3629b10 --- /dev/null +++ b/example/ios/Pods/Headers/Private/flutter_zip_archive/FlutterZipArchivePlugin.h @@ -0,0 +1 @@ +../../../../.symlinks/plugins/flutter_zip_archive/ios/Classes/FlutterZipArchivePlugin.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Private/image_picker_ios/FLTImagePickerImageUtil.h b/example/ios/Pods/Headers/Private/image_picker_ios/FLTImagePickerImageUtil.h new file mode 120000 index 0000000..3cdc079 --- /dev/null +++ b/example/ios/Pods/Headers/Private/image_picker_ios/FLTImagePickerImageUtil.h @@ -0,0 +1 @@ +../../../../.symlinks/plugins/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/FLTImagePickerImageUtil.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Private/image_picker_ios/FLTImagePickerMetaDataUtil.h b/example/ios/Pods/Headers/Private/image_picker_ios/FLTImagePickerMetaDataUtil.h new file mode 120000 index 0000000..f496814 --- /dev/null +++ b/example/ios/Pods/Headers/Private/image_picker_ios/FLTImagePickerMetaDataUtil.h @@ -0,0 +1 @@ +../../../../.symlinks/plugins/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/FLTImagePickerMetaDataUtil.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Private/image_picker_ios/FLTImagePickerPhotoAssetUtil.h b/example/ios/Pods/Headers/Private/image_picker_ios/FLTImagePickerPhotoAssetUtil.h new file mode 120000 index 0000000..c287b03 --- /dev/null +++ b/example/ios/Pods/Headers/Private/image_picker_ios/FLTImagePickerPhotoAssetUtil.h @@ -0,0 +1 @@ +../../../../.symlinks/plugins/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/FLTImagePickerPhotoAssetUtil.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Private/image_picker_ios/FLTImagePickerPlugin.h b/example/ios/Pods/Headers/Private/image_picker_ios/FLTImagePickerPlugin.h new file mode 120000 index 0000000..b5a2d16 --- /dev/null +++ b/example/ios/Pods/Headers/Private/image_picker_ios/FLTImagePickerPlugin.h @@ -0,0 +1 @@ +../../../../.symlinks/plugins/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/FLTImagePickerPlugin.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Private/image_picker_ios/FLTImagePickerPlugin_Test.h b/example/ios/Pods/Headers/Private/image_picker_ios/FLTImagePickerPlugin_Test.h new file mode 120000 index 0000000..0604814 --- /dev/null +++ b/example/ios/Pods/Headers/Private/image_picker_ios/FLTImagePickerPlugin_Test.h @@ -0,0 +1 @@ +../../../../.symlinks/plugins/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/FLTImagePickerPlugin_Test.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Private/image_picker_ios/FLTPHPickerSaveImageToPathOperation.h b/example/ios/Pods/Headers/Private/image_picker_ios/FLTPHPickerSaveImageToPathOperation.h new file mode 120000 index 0000000..1f17fef --- /dev/null +++ b/example/ios/Pods/Headers/Private/image_picker_ios/FLTPHPickerSaveImageToPathOperation.h @@ -0,0 +1 @@ +../../../../.symlinks/plugins/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/FLTPHPickerSaveImageToPathOperation.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Private/image_picker_ios/image_picker_ios-umbrella.h b/example/ios/Pods/Headers/Private/image_picker_ios/image_picker_ios-umbrella.h new file mode 120000 index 0000000..b233980 --- /dev/null +++ b/example/ios/Pods/Headers/Private/image_picker_ios/image_picker_ios-umbrella.h @@ -0,0 +1 @@ +../../../../.symlinks/plugins/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios-umbrella.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Private/image_picker_ios/image_picker_ios.modulemap b/example/ios/Pods/Headers/Private/image_picker_ios/image_picker_ios.modulemap new file mode 120000 index 0000000..7d60ea7 --- /dev/null +++ b/example/ios/Pods/Headers/Private/image_picker_ios/image_picker_ios.modulemap @@ -0,0 +1 @@ +../../../Target Support Files/image_picker_ios/image_picker_ios.modulemap \ No newline at end of file diff --git a/example/ios/Pods/Headers/Private/image_picker_ios/messages.g.h b/example/ios/Pods/Headers/Private/image_picker_ios/messages.g.h new file mode 120000 index 0000000..57116c8 --- /dev/null +++ b/example/ios/Pods/Headers/Private/image_picker_ios/messages.g.h @@ -0,0 +1 @@ +../../../../.symlinks/plugins/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/messages.g.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Public/SSZipArchive/SSZipArchive-umbrella.h b/example/ios/Pods/Headers/Public/SSZipArchive/SSZipArchive-umbrella.h new file mode 120000 index 0000000..637dd5e --- /dev/null +++ b/example/ios/Pods/Headers/Public/SSZipArchive/SSZipArchive-umbrella.h @@ -0,0 +1 @@ +../../../Target Support Files/SSZipArchive/SSZipArchive-umbrella.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Public/SSZipArchive/SSZipArchive.h b/example/ios/Pods/Headers/Public/SSZipArchive/SSZipArchive.h new file mode 120000 index 0000000..951d734 --- /dev/null +++ b/example/ios/Pods/Headers/Public/SSZipArchive/SSZipArchive.h @@ -0,0 +1 @@ +../../../SSZipArchive/SSZipArchive/SSZipArchive.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Public/SSZipArchive/SSZipArchive.modulemap b/example/ios/Pods/Headers/Public/SSZipArchive/SSZipArchive.modulemap new file mode 120000 index 0000000..1e05535 --- /dev/null +++ b/example/ios/Pods/Headers/Public/SSZipArchive/SSZipArchive.modulemap @@ -0,0 +1 @@ +../../../Target Support Files/SSZipArchive/SSZipArchive.modulemap \ No newline at end of file diff --git a/example/ios/Pods/Headers/Public/SSZipArchive/SSZipCommon.h b/example/ios/Pods/Headers/Public/SSZipArchive/SSZipCommon.h new file mode 120000 index 0000000..1ef5dd6 --- /dev/null +++ b/example/ios/Pods/Headers/Public/SSZipArchive/SSZipCommon.h @@ -0,0 +1 @@ +../../../SSZipArchive/SSZipArchive/SSZipCommon.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Public/flutter_zip_archive/FlutterZipArchivePlugin.h b/example/ios/Pods/Headers/Public/flutter_zip_archive/FlutterZipArchivePlugin.h new file mode 120000 index 0000000..3629b10 --- /dev/null +++ b/example/ios/Pods/Headers/Public/flutter_zip_archive/FlutterZipArchivePlugin.h @@ -0,0 +1 @@ +../../../../.symlinks/plugins/flutter_zip_archive/ios/Classes/FlutterZipArchivePlugin.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Public/image_picker_ios/FLTImagePickerImageUtil.h b/example/ios/Pods/Headers/Public/image_picker_ios/FLTImagePickerImageUtil.h new file mode 120000 index 0000000..3cdc079 --- /dev/null +++ b/example/ios/Pods/Headers/Public/image_picker_ios/FLTImagePickerImageUtil.h @@ -0,0 +1 @@ +../../../../.symlinks/plugins/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/FLTImagePickerImageUtil.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Public/image_picker_ios/FLTImagePickerMetaDataUtil.h b/example/ios/Pods/Headers/Public/image_picker_ios/FLTImagePickerMetaDataUtil.h new file mode 120000 index 0000000..f496814 --- /dev/null +++ b/example/ios/Pods/Headers/Public/image_picker_ios/FLTImagePickerMetaDataUtil.h @@ -0,0 +1 @@ +../../../../.symlinks/plugins/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/FLTImagePickerMetaDataUtil.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Public/image_picker_ios/FLTImagePickerPhotoAssetUtil.h b/example/ios/Pods/Headers/Public/image_picker_ios/FLTImagePickerPhotoAssetUtil.h new file mode 120000 index 0000000..c287b03 --- /dev/null +++ b/example/ios/Pods/Headers/Public/image_picker_ios/FLTImagePickerPhotoAssetUtil.h @@ -0,0 +1 @@ +../../../../.symlinks/plugins/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/FLTImagePickerPhotoAssetUtil.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Public/image_picker_ios/FLTImagePickerPlugin.h b/example/ios/Pods/Headers/Public/image_picker_ios/FLTImagePickerPlugin.h new file mode 120000 index 0000000..b5a2d16 --- /dev/null +++ b/example/ios/Pods/Headers/Public/image_picker_ios/FLTImagePickerPlugin.h @@ -0,0 +1 @@ +../../../../.symlinks/plugins/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/FLTImagePickerPlugin.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Public/image_picker_ios/FLTImagePickerPlugin_Test.h b/example/ios/Pods/Headers/Public/image_picker_ios/FLTImagePickerPlugin_Test.h new file mode 120000 index 0000000..0604814 --- /dev/null +++ b/example/ios/Pods/Headers/Public/image_picker_ios/FLTImagePickerPlugin_Test.h @@ -0,0 +1 @@ +../../../../.symlinks/plugins/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/FLTImagePickerPlugin_Test.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Public/image_picker_ios/FLTPHPickerSaveImageToPathOperation.h b/example/ios/Pods/Headers/Public/image_picker_ios/FLTPHPickerSaveImageToPathOperation.h new file mode 120000 index 0000000..1f17fef --- /dev/null +++ b/example/ios/Pods/Headers/Public/image_picker_ios/FLTPHPickerSaveImageToPathOperation.h @@ -0,0 +1 @@ +../../../../.symlinks/plugins/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/FLTPHPickerSaveImageToPathOperation.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Public/image_picker_ios/image_picker_ios-umbrella.h b/example/ios/Pods/Headers/Public/image_picker_ios/image_picker_ios-umbrella.h new file mode 120000 index 0000000..b233980 --- /dev/null +++ b/example/ios/Pods/Headers/Public/image_picker_ios/image_picker_ios-umbrella.h @@ -0,0 +1 @@ +../../../../.symlinks/plugins/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios-umbrella.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Public/image_picker_ios/messages.g.h b/example/ios/Pods/Headers/Public/image_picker_ios/messages.g.h new file mode 120000 index 0000000..57116c8 --- /dev/null +++ b/example/ios/Pods/Headers/Public/image_picker_ios/messages.g.h @@ -0,0 +1 @@ +../../../../.symlinks/plugins/image_picker_ios/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/messages.g.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Public/path_provider_foundation/path_provider_foundation-umbrella.h b/example/ios/Pods/Headers/Public/path_provider_foundation/path_provider_foundation-umbrella.h new file mode 120000 index 0000000..f83361e --- /dev/null +++ b/example/ios/Pods/Headers/Public/path_provider_foundation/path_provider_foundation-umbrella.h @@ -0,0 +1 @@ +../../../Target Support Files/path_provider_foundation/path_provider_foundation-umbrella.h \ No newline at end of file diff --git a/example/ios/Pods/Headers/Public/path_provider_foundation/path_provider_foundation.modulemap b/example/ios/Pods/Headers/Public/path_provider_foundation/path_provider_foundation.modulemap new file mode 120000 index 0000000..707c655 --- /dev/null +++ b/example/ios/Pods/Headers/Public/path_provider_foundation/path_provider_foundation.modulemap @@ -0,0 +1 @@ +../../../Target Support Files/path_provider_foundation/path_provider_foundation.modulemap \ No newline at end of file diff --git a/example/ios/Pods/Local Podspecs/Flutter.podspec.json b/example/ios/Pods/Local Podspecs/Flutter.podspec.json new file mode 100644 index 0000000..fbd4762 --- /dev/null +++ b/example/ios/Pods/Local Podspecs/Flutter.podspec.json @@ -0,0 +1,20 @@ +{ + "name": "Flutter", + "version": "1.0.0", + "summary": "A UI toolkit for beautiful and fast apps.", + "homepage": "https://flutter.dev", + "license": { + "type": "BSD" + }, + "authors": { + "Flutter Dev Team": "flutter-dev@googlegroups.com" + }, + "source": { + "git": "https://github.com/flutter/engine", + "tag": "1.0.0" + }, + "platforms": { + "ios": "12.0" + }, + "vendored_frameworks": "path/to/nothing" +} diff --git a/example/ios/Pods/Local Podspecs/flutter_zip_archive.podspec.json b/example/ios/Pods/Local Podspecs/flutter_zip_archive.podspec.json new file mode 100644 index 0000000..3aafec4 --- /dev/null +++ b/example/ios/Pods/Local Podspecs/flutter_zip_archive.podspec.json @@ -0,0 +1,29 @@ +{ + "name": "flutter_zip_archive", + "version": "0.0.1", + "summary": "A new Flutter plugin.", + "description": "A new Flutter plugin.", + "homepage": "http://example.com", + "license": { + "file": "../LICENSE" + }, + "authors": { + "Your Company": "email@example.com" + }, + "source": { + "path": "." + }, + "source_files": "Classes/**/*", + "public_header_files": "Classes/**/*.h", + "dependencies": { + "Flutter": [ + + ], + "SSZipArchive": [ + + ] + }, + "platforms": { + "ios": "8.0" + } +} diff --git a/example/ios/Pods/Local Podspecs/image_picker_ios.podspec.json b/example/ios/Pods/Local Podspecs/image_picker_ios.podspec.json new file mode 100644 index 0000000..d3aad25 --- /dev/null +++ b/example/ios/Pods/Local Podspecs/image_picker_ios.podspec.json @@ -0,0 +1,37 @@ +{ + "name": "image_picker_ios", + "version": "0.0.1", + "summary": "Flutter plugin that shows an image picker.", + "description": "A Flutter plugin for picking images from the image library, and taking new pictures with the camera.\nDownloaded by pub (not CocoaPods).", + "homepage": "https://github.com/flutter/packages", + "license": { + "type": "BSD", + "file": "../LICENSE" + }, + "authors": { + "Flutter Dev Team": "flutter-dev@googlegroups.com" + }, + "source": { + "http": "https://github.com/flutter/packages/tree/main/packages/image_picker_ios" + }, + "documentation_url": "https://pub.dev/packages/image_picker_ios", + "source_files": "image_picker_ios/Sources/image_picker_ios/**/*.{h,m}", + "public_header_files": "image_picker_ios/Sources/image_picker_ios/**/*.h", + "module_map": "image_picker_ios/Sources/image_picker_ios/include/ImagePickerPlugin.modulemap", + "dependencies": { + "Flutter": [ + + ] + }, + "platforms": { + "ios": "12.0" + }, + "pod_target_xcconfig": { + "DEFINES_MODULE": "YES" + }, + "resource_bundles": { + "image_picker_ios_privacy": [ + "image_picker_ios/Sources/image_picker_ios/Resources/PrivacyInfo.xcprivacy" + ] + } +} diff --git a/example/ios/Pods/Local Podspecs/path_provider_foundation.podspec.json b/example/ios/Pods/Local Podspecs/path_provider_foundation.podspec.json new file mode 100644 index 0000000..f28fa3b --- /dev/null +++ b/example/ios/Pods/Local Podspecs/path_provider_foundation.podspec.json @@ -0,0 +1,47 @@ +{ + "name": "path_provider_foundation", + "version": "0.0.1", + "summary": "An iOS and macOS implementation of the path_provider plugin.", + "description": "An iOS and macOS implementation of the Flutter plugin for getting commonly used locations on the filesystem.", + "homepage": "https://github.com/flutter/packages/tree/main/packages/path_provider/path_provider_foundation", + "license": { + "type": "BSD", + "file": "../LICENSE" + }, + "authors": { + "Flutter Dev Team": "flutter-dev@googlegroups.com" + }, + "source": { + "http": "https://github.com/flutter/packages/tree/main/packages/path_provider/path_provider_foundation" + }, + "source_files": "path_provider_foundation/Sources/path_provider_foundation/**/*.swift", + "ios": { + "dependencies": { + "Flutter": [ + + ] + }, + "xcconfig": { + "LIBRARY_SEARCH_PATHS": "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)/ $(SDKROOT)/usr/lib/swift", + "LD_RUNPATH_SEARCH_PATHS": "/usr/lib/swift" + } + }, + "osx": { + "dependencies": { + "FlutterMacOS": [ + + ] + } + }, + "platforms": { + "ios": "12.0", + "osx": "10.14" + }, + "swift_versions": "5.0", + "resource_bundles": { + "path_provider_foundation_privacy": [ + "path_provider_foundation/Sources/path_provider_foundation/Resources/PrivacyInfo.xcprivacy" + ] + }, + "swift_version": "5.0" +} diff --git a/example/ios/Pods/Manifest.lock b/example/ios/Pods/Manifest.lock new file mode 100644 index 0000000..53b0785 --- /dev/null +++ b/example/ios/Pods/Manifest.lock @@ -0,0 +1,42 @@ +PODS: + - Flutter (1.0.0) + - flutter_zip_archive (0.0.1): + - Flutter + - SSZipArchive + - image_picker_ios (0.0.1): + - Flutter + - path_provider_foundation (0.0.1): + - Flutter + - FlutterMacOS + - SSZipArchive (2.4.3) + +DEPENDENCIES: + - Flutter (from `Flutter`) + - flutter_zip_archive (from `.symlinks/plugins/flutter_zip_archive/ios`) + - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`) + - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) + +SPEC REPOS: + trunk: + - SSZipArchive + +EXTERNAL SOURCES: + Flutter: + :path: Flutter + flutter_zip_archive: + :path: ".symlinks/plugins/flutter_zip_archive/ios" + image_picker_ios: + :path: ".symlinks/plugins/image_picker_ios/ios" + path_provider_foundation: + :path: ".symlinks/plugins/path_provider_foundation/darwin" + +SPEC CHECKSUMS: + Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 + flutter_zip_archive: 0720df756f6e5eee393e52da24877d0b7bb90fab + image_picker_ios: c560581cceedb403a6ff17f2f816d7fea1421fc1 + path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 + SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef + +PODFILE CHECKSUM: cf0c950f7e9a456b4e325f5b8fc0f98906a3705a + +COCOAPODS: 1.16.2 diff --git a/example/ios/Pods/Pods.xcodeproj/project.pbxproj b/example/ios/Pods/Pods.xcodeproj/project.pbxproj new file mode 100644 index 0000000..3838445 --- /dev/null +++ b/example/ios/Pods/Pods.xcodeproj/project.pbxproj @@ -0,0 +1,2799 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXAggregateTarget section */ + 1EFDDC32A34D56D411E640A81DCD9E73 /* Flutter */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 94078A06C17E946ADC1F2C06726219E5 /* Build configuration list for PBXAggregateTarget "Flutter" */; + buildPhases = ( + ); + dependencies = ( + ); + name = Flutter; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 0192BB9B3BC3A59C1D31AD402E61043F /* mz_strm_os_posix.c in Sources */ = {isa = PBXBuildFile; fileRef = AE46C19BAF608ECBFE3A261E55A55146 /* mz_strm_os_posix.c */; }; + 06B24173AC8ECEDC8E89DFD65AA55B14 /* mz_zip.c in Sources */ = {isa = PBXBuildFile; fileRef = 0E1683B145EF5BCFF5482D4CD507DF88 /* mz_zip.c */; }; + 0726FD424B30BA6D4953EBBE43186222 /* mz_strm_buf.h in Headers */ = {isa = PBXBuildFile; fileRef = 12C1AA8FDF002ECA9A168A7FD3BBA23E /* mz_strm_buf.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 0DE0005A94CFDFAA880537475881D042 /* FLTImagePickerPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 709F18E4309532A00BD0112361BEE2EF /* FLTImagePickerPlugin.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 0F005B941A20C60BD12B3353442823F2 /* FLTImagePickerPhotoAssetUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 067AFCF9FC0C8C24434A57F462A58D8A /* FLTImagePickerPhotoAssetUtil.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 16E0CF48AEA2E552D793E4CEFDF01E03 /* mz_crypt.h in Headers */ = {isa = PBXBuildFile; fileRef = 140776F73E38427DC826D566FC1E72BE /* mz_crypt.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 1A0D211BBEE177C411B300863AECAE8A /* FLTImagePickerMetaDataUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = AE0B441E96C7552881B83BCEC18DBF4B /* FLTImagePickerMetaDataUtil.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 1B014EF7EB190969927DEA276BC6B23C /* SSZipArchive-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = D797162278B1BC724D7DE9D436D831AD /* SSZipArchive-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 1F925986C363812371A165656DA4D93F /* FLTImagePickerPlugin_Test.h in Headers */ = {isa = PBXBuildFile; fileRef = 0D3A665945D0563245B5CC659D2EC58C /* FLTImagePickerPlugin_Test.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 21B10195ABE74EAF434F3F7D47A6D4AE /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = BCEBE7D9429E751E0A99672605582CB4 /* PrivacyInfo.xcprivacy */; }; + 22449638C213B5879C5B0B4252349AC6 /* messages.g.h in Headers */ = {isa = PBXBuildFile; fileRef = D894AC797DD0D23757AD88B7711E8AF4 /* messages.g.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 26197AB013F17A90E969D40F21F2E5E7 /* FLTImagePickerMetaDataUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 97ADF2784597063A17C58E45F2C2A416 /* FLTImagePickerMetaDataUtil.m */; }; + 282FE044A7AC0F5E2C8F0AF3BAAF4995 /* FLTImagePickerImageUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C5931DDBC42B9AEAB6AFFFAF36B2478 /* FLTImagePickerImageUtil.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 2CFEF86D4F0B45C07E56F11DE92AA58B /* messages.g.m in Sources */ = {isa = PBXBuildFile; fileRef = F3DB0289041E933D8516A59825CF0E72 /* messages.g.m */; }; + 3C665714AF5342FDE72D5FFBAFA00552 /* messages.g.swift in Sources */ = {isa = PBXBuildFile; fileRef = F915055814568C413135E9700435C981 /* messages.g.swift */; }; + 3D90816169AAE962AD743B9601F824CD /* mz_strm_mem.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A10E12604CB5C2D813D323D1D92B021 /* mz_strm_mem.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 434EC36C5177F72BF11115258608DAD9 /* mz_zip.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E3FFEDA320B82FC971B0FD2DA459F92 /* mz_zip.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 471E735F2F2DEE1682B67FCDEBD5525B /* mz_crypt_apple.c in Sources */ = {isa = PBXBuildFile; fileRef = 8235FDE1F794FE1F3260A46F04BAE115 /* mz_crypt_apple.c */; }; + 4C77C2E3005AF4EEAF3C854CB70DE8DB /* mz_strm_split.h in Headers */ = {isa = PBXBuildFile; fileRef = CB01A475948313A6E0E57AF9EE9F6A70 /* mz_strm_split.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 5062CC339370B5ADC7009EA190F6C243 /* Pods-Runner-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 98FF0987742F984F89345FC7E0684408 /* Pods-Runner-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 550E15099AECC9BC8F323C48776B4734 /* mz_os.c in Sources */ = {isa = PBXBuildFile; fileRef = 992B637598E94EF7B9929AC99D658C95 /* mz_os.c */; }; + 55816DD001D0AA0ECB507615972E6B09 /* FLTImagePickerPhotoAssetUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 94B07FEAE5C1BF297EEBCAE2DCF763E1 /* FLTImagePickerPhotoAssetUtil.m */; }; + 60E71E745458AF617C07B8F7F51214BD /* image_picker_ios-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 7CD2C64EC2B10B70C6AE18B29A5AEC62 /* image_picker_ios-dummy.m */; }; + 63ED7BD0781FCECB07CADC10155E0590 /* SSZipArchive.h in Headers */ = {isa = PBXBuildFile; fileRef = E2412D89F4357131B08AB7522D938AF5 /* SSZipArchive.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 646C51151B4A85B239DC529A58F7C0F4 /* mz_strm_pkcrypt.c in Sources */ = {isa = PBXBuildFile; fileRef = DBE66489982C4D1E2D6B92BDA3537A4F /* mz_strm_pkcrypt.c */; }; + 66EACCCF47434ED3AB231E350BA3E9E0 /* mz.h in Headers */ = {isa = PBXBuildFile; fileRef = 39447AE6C30B64C6A84908E6C646DE06 /* mz.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 6C2811D8C830C6F00017A5ED41C14F67 /* mz_zip_rw.c in Sources */ = {isa = PBXBuildFile; fileRef = 25A5B6154FD369610C5DFF5DF65D5295 /* mz_zip_rw.c */; }; + 71896C684AD84CB7F4B06DE4734947FE /* PathProviderPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 93A3805C91988CA261FEAE5F5DA3D97B /* PathProviderPlugin.swift */; }; + 75DCDE92C2AB8A88200BEC7988D31C2C /* mz_os_posix.c in Sources */ = {isa = PBXBuildFile; fileRef = 72C645BF4E7B7ED9A6B11CC0B506EB4B /* mz_os_posix.c */; }; + 77B3DAD6979ED9910299B33B1F9A3BFC /* mz_strm_mem.c in Sources */ = {isa = PBXBuildFile; fileRef = 6A171354B2B1BA93EF7DEFFCBB790477 /* mz_strm_mem.c */; }; + 819B3A2ECFD498AD81599AB11612D616 /* mz_compat.h in Headers */ = {isa = PBXBuildFile; fileRef = 16E18E7D08B76D974DD42CFCF4F7165C /* mz_compat.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 876816E2BD73E81B54660A2B2602F906 /* mz_strm.c in Sources */ = {isa = PBXBuildFile; fileRef = 4262217E492BAB38179734C77694A382 /* mz_strm.c */; }; + 8AE8A3427C00305B52EA9D00953E3B98 /* flutter_zip_archive-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E4FCB7CBC4ED76DE82325CF594B542CF /* flutter_zip_archive-dummy.m */; }; + 8BAF240113D4B39583D15B2B2D0EB81E /* mz_strm_wzaes.c in Sources */ = {isa = PBXBuildFile; fileRef = AF5520E9DC8EAFAFBEB3FF39E2B6B824 /* mz_strm_wzaes.c */; }; + 8FB2CBCFCAE38820BC13123E51B34E04 /* mz_strm_buf.c in Sources */ = {isa = PBXBuildFile; fileRef = F1E5C2958C967B4F3F2C3D049D0488D7 /* mz_strm_buf.c */; }; + 91B7AEB0D5A36D5C02BEE073F273356E /* FlutterZipArchivePlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D33587834896F778D61ED56852E782A /* FlutterZipArchivePlugin.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 931A7AB36F8ABEC096488088BFF9F493 /* mz_strm.h in Headers */ = {isa = PBXBuildFile; fileRef = AEEA9F462777A969324BA2658C7F1127 /* mz_strm.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 93E2AFE812DAB37F6091635672C243BC /* path_provider_foundation-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 770186A4CFB5E3E6389C70EA531A5CA0 /* path_provider_foundation-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + AF351EFE2094088F8790557786CF31F8 /* mz_compat.c in Sources */ = {isa = PBXBuildFile; fileRef = 469BDCEA09E97D5798D6DDC30C01B03E /* mz_compat.c */; }; + B2B03A67A856155E9C97D8789A14DCB0 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = D7D3CBA6A138DA7AC7571F2ABF928263 /* PrivacyInfo.xcprivacy */; }; + B9B6975C3190E6A4F26340EF8DC6984F /* mz_os.h in Headers */ = {isa = PBXBuildFile; fileRef = 5B93CF1983A6E099ECD1D3602A9C717A /* mz_os.h */; settings = {ATTRIBUTES = (Project, ); }; }; + BA6E799C9BE2570442050507F3EDE21F /* SSZipArchive-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = DA232AA1C887644730470CAB01C6B6E5 /* SSZipArchive-dummy.m */; }; + BAC8DCAC5526DDDFA2F67FB4847E6832 /* image_picker_ios-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 103FF19F34B7AED6A0CBBC74BB25E40B /* image_picker_ios-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; }; + C865F14E7408C4999313606383EC72D0 /* mz_strm_wzaes.h in Headers */ = {isa = PBXBuildFile; fileRef = 6ACFE43EE056FEEFEF34BDE7018DFFFF /* mz_strm_wzaes.h */; settings = {ATTRIBUTES = (Project, ); }; }; + CBB5E1014FBF20396CCC331BEFE8D5AA /* mz_strm_zlib.c in Sources */ = {isa = PBXBuildFile; fileRef = EBDAD1C3CC0465744ADBD8D65715A4B5 /* mz_strm_zlib.c */; }; + D19F4D5D0225A7C4347D5771D9F954BD /* FLTImagePickerPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 39D33BA8E235006E17873CAD05228874 /* FLTImagePickerPlugin.m */; }; + D420F9BB5AF33832432457F0E4453045 /* SSZipCommon.h in Headers */ = {isa = PBXBuildFile; fileRef = 60CECCF5D210691DFC111FB05E37872B /* SSZipCommon.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D59034B379A06B9595AE3AE84C34ABC0 /* mz_strm_os.h in Headers */ = {isa = PBXBuildFile; fileRef = DD0382BA266BAEC1CD021B1F0A8BF6CD /* mz_strm_os.h */; settings = {ATTRIBUTES = (Project, ); }; }; + D8F2EA319AB00D3CFA57AD207D813FEF /* mz_strm_split.c in Sources */ = {isa = PBXBuildFile; fileRef = 845CC09BE46F79E82C14446D6AB4FF9F /* mz_strm_split.c */; }; + DC249EFACF88D684359E95FBF6E0066E /* mz_strm_zlib.h in Headers */ = {isa = PBXBuildFile; fileRef = F4EC6EBB4C1222EE0ECF52722419D227 /* mz_strm_zlib.h */; settings = {ATTRIBUTES = (Project, ); }; }; + E552B5094CD15C1C3C072997E6297080 /* SSZipArchive.m in Sources */ = {isa = PBXBuildFile; fileRef = 4DF0F2EAF67E2AABC8EF321105441FEA /* SSZipArchive.m */; }; + E7E3A346B2D08A0E7915A8923510B252 /* mz_zip_rw.h in Headers */ = {isa = PBXBuildFile; fileRef = 16E839C8ADDF9AA566CC73A1CFA93F24 /* mz_zip_rw.h */; settings = {ATTRIBUTES = (Project, ); }; }; + ECC89551CC74B2C246409BF811FA7093 /* FLTImagePickerImageUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = EEDDA1BEF4DCC4F15AA1DD18FED35185 /* FLTImagePickerImageUtil.m */; }; + EE5381408A40FD39E00B742E7D33269D /* FLTPHPickerSaveImageToPathOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 3FAD94D323A5738B1BE2F02B71040439 /* FLTPHPickerSaveImageToPathOperation.m */; }; + F000C5D6B12A26D2175D104D7734FB2C /* mz_crypt.c in Sources */ = {isa = PBXBuildFile; fileRef = 24ECDBE9B26A33172E58094D02056633 /* mz_crypt.c */; }; + F1238BE7B56A8E019FF9DD839A888D68 /* mz_strm_pkcrypt.h in Headers */ = {isa = PBXBuildFile; fileRef = 9C2E066FF80424B701668B2D77C560BD /* mz_strm_pkcrypt.h */; settings = {ATTRIBUTES = (Project, ); }; }; + F24496385662469D1EE2E39E85765007 /* ZipArchive.h in Headers */ = {isa = PBXBuildFile; fileRef = 21B82B6050EDF009E9F30A4CCBE6B724 /* ZipArchive.h */; settings = {ATTRIBUTES = (Project, ); }; }; + F3DBE7CCD5C5E2704963FB8CA7D0FD81 /* FLTPHPickerSaveImageToPathOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 883DD6C406A539B3BB1859251D3F7E63 /* FLTPHPickerSaveImageToPathOperation.h */; settings = {ATTRIBUTES = (Project, ); }; }; + F84C0DCBD29CD0DD24B675C56D0CCD58 /* Pods-Runner-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 840D0754C1B8831C9E84C7A7777BF023 /* Pods-Runner-dummy.m */; }; + FCFD96DD03A6347A2ED70D1601A5C4AE /* FlutterZipArchivePlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 082D546C6165E063230F10157D155E58 /* FlutterZipArchivePlugin.m */; }; + FFF7B54CBF6B2E14645E5433FB8B1CE3 /* path_provider_foundation-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D64E456DA5B76A11960FCE200795B399 /* path_provider_foundation-dummy.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 1C6D73177350C6FA73948AC00A3DA25C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 90EC34F1BB6A4F41C55C258475A7E651; + remoteInfo = flutter_zip_archive; + }; + 5277806C7E4F7A9929BCBABEF8C31608 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = F60E38364AFF5E1349FF07415B944396; + remoteInfo = SSZipArchive; + }; + 5352423135DFD0ED0C0AB93CA143E1AE /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 1EFDDC32A34D56D411E640A81DCD9E73; + remoteInfo = Flutter; + }; + 7505BF6DFD02F82267E2AED7E06DEB34 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 1EFDDC32A34D56D411E640A81DCD9E73; + remoteInfo = Flutter; + }; + 95AB7DA0A04A84289AAD37E5B981E401 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 1EFDDC32A34D56D411E640A81DCD9E73; + remoteInfo = Flutter; + }; + 9FBF5A48CDF9B6D8C0AC4CEC488976EB /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = F60E38364AFF5E1349FF07415B944396; + remoteInfo = SSZipArchive; + }; + A3371431D724C1CD78E3CD5695DF82F8 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 56F581DDCB0A032454E604885E17AE3C; + remoteInfo = path_provider_foundation; + }; + B4A16B3509BFAB92A7328F84B9DF6B63 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 845DF30C6C93A1F35C6DCEBAFECA8F8A; + remoteInfo = image_picker_ios; + }; + FB666CDF21EB3604328DE9218749F0D6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = CACE6618E7996464E38687E13F67D945; + remoteInfo = "path_provider_foundation-path_provider_foundation_privacy"; + }; + FD6C345D0107FBC705F3DEA05839FC5A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = A450BF39E3E5256209A256E278D71BFD; + remoteInfo = "image_picker_ios-image_picker_ios_privacy"; + }; + FF13E394381A8B43931D45A67230039D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 1EFDDC32A34D56D411E640A81DCD9E73; + remoteInfo = Flutter; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 0606E77F294E1D7BC110559CB2C788C7 /* ResourceBundle-image_picker_ios_privacy-image_picker_ios-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ResourceBundle-image_picker_ios_privacy-image_picker_ios-Info.plist"; sourceTree = ""; }; + 067AFCF9FC0C8C24434A57F462A58D8A /* FLTImagePickerPhotoAssetUtil.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FLTImagePickerPhotoAssetUtil.h; path = "../../../../../../../../../../../../../.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+1/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/FLTImagePickerPhotoAssetUtil.h"; sourceTree = ""; }; + 082D546C6165E063230F10157D155E58 /* FlutterZipArchivePlugin.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FlutterZipArchivePlugin.m; path = ../../../../../../../ios/Classes/FlutterZipArchivePlugin.m; sourceTree = ""; }; + 0D3A665945D0563245B5CC659D2EC58C /* FLTImagePickerPlugin_Test.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FLTImagePickerPlugin_Test.h; path = "../../../../../../../../../../../../../.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+1/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/FLTImagePickerPlugin_Test.h"; sourceTree = ""; }; + 0E1683B145EF5BCFF5482D4CD507DF88 /* mz_zip.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_zip.c; path = SSZipArchive/minizip/mz_zip.c; sourceTree = ""; }; + 103FF19F34B7AED6A0CBBC74BB25E40B /* image_picker_ios-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "image_picker_ios-umbrella.h"; path = "../../../../../../../../../../../../.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+1/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios-umbrella.h"; sourceTree = ""; }; + 12C1AA8FDF002ECA9A168A7FD3BBA23E /* 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 = ""; }; + 13BB4A0B3CA6FA687133605FFD01F357 /* path_provider_foundation-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "path_provider_foundation-prefix.pch"; sourceTree = ""; }; + 140776F73E38427DC826D566FC1E72BE /* mz_crypt.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mz_crypt.h; path = SSZipArchive/minizip/mz_crypt.h; sourceTree = ""; }; + 158505A03770AF2DB76FF314D677B516 /* SSZipArchive-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SSZipArchive-prefix.pch"; sourceTree = ""; }; + 16E18E7D08B76D974DD42CFCF4F7165C /* mz_compat.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mz_compat.h; path = SSZipArchive/minizip/mz_compat.h; sourceTree = ""; }; + 16E839C8ADDF9AA566CC73A1CFA93F24 /* 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 = ""; }; + 1A10E12604CB5C2D813D323D1D92B021 /* 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 = ""; }; + 1E3FFEDA320B82FC971B0FD2DA459F92 /* mz_zip.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mz_zip.h; path = SSZipArchive/minizip/mz_zip.h; sourceTree = ""; }; + 217547AD3D570440139C696437026792 /* flutter_zip_archive.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = flutter_zip_archive.podspec; path = ../../../../../../ios/flutter_zip_archive.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 21B82B6050EDF009E9F30A4CCBE6B724 /* ZipArchive.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ZipArchive.h; path = SSZipArchive/include/ZipArchive.h; sourceTree = ""; }; + 2299047366EA7545B2EAF71D0FB66359 /* flutter_zip_archive.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = flutter_zip_archive.debug.xcconfig; sourceTree = ""; }; + 2385FC5B4FBB60D7FA9CCDDE76795971 /* Flutter.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Flutter.debug.xcconfig; sourceTree = ""; }; + 24ECDBE9B26A33172E58094D02056633 /* mz_crypt.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_crypt.c; path = SSZipArchive/minizip/mz_crypt.c; sourceTree = ""; }; + 25A5B6154FD369610C5DFF5DF65D5295 /* mz_zip_rw.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_zip_rw.c; path = SSZipArchive/minizip/mz_zip_rw.c; sourceTree = ""; }; + 2C5931DDBC42B9AEAB6AFFFAF36B2478 /* FLTImagePickerImageUtil.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FLTImagePickerImageUtil.h; path = "../../../../../../../../../../../../../.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+1/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/FLTImagePickerImageUtil.h"; sourceTree = ""; }; + 341C2BD787A5690B04A8F1D36334DA98 /* flutter_zip_archive */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = flutter_zip_archive; path = libflutter_zip_archive.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 39447AE6C30B64C6A84908E6C646DE06 /* mz.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mz.h; path = SSZipArchive/minizip/mz.h; sourceTree = ""; }; + 39D33BA8E235006E17873CAD05228874 /* FLTImagePickerPlugin.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FLTImagePickerPlugin.m; path = "../../../../../../../../../../../.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+1/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerPlugin.m"; sourceTree = ""; }; + 3D4D3DC9F2C625816586F125624834D0 /* image_picker_ios.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = image_picker_ios.debug.xcconfig; sourceTree = ""; }; + 3DBD4BADE27F8B91024E4B4B4DD75DB5 /* path_provider_foundation-path_provider_foundation_privacy */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = "path_provider_foundation-path_provider_foundation_privacy"; path = path_provider_foundation_privacy.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; + 3FAD94D323A5738B1BE2F02B71040439 /* FLTPHPickerSaveImageToPathOperation.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FLTPHPickerSaveImageToPathOperation.m; path = "../../../../../../../../../../../.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+1/ios/image_picker_ios/Sources/image_picker_ios/FLTPHPickerSaveImageToPathOperation.m"; sourceTree = ""; }; + 3FD43EC7081C2C90F8E6F58F55FECEBD /* SSZipArchive.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = SSZipArchive.modulemap; sourceTree = ""; }; + 4262217E492BAB38179734C77694A382 /* mz_strm.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_strm.c; path = SSZipArchive/minizip/mz_strm.c; sourceTree = ""; }; + 439236E296E8D08D89FD7B07C053DFBA /* image_picker_ios.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = image_picker_ios.modulemap; sourceTree = ""; }; + 469BDCEA09E97D5798D6DDC30C01B03E /* mz_compat.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_compat.c; path = SSZipArchive/minizip/mz_compat.c; sourceTree = ""; }; + 4CC30F89F4EA2AD764170CD84C70E5E1 /* path_provider_foundation.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = path_provider_foundation.release.xcconfig; sourceTree = ""; }; + 4DF0F2EAF67E2AABC8EF321105441FEA /* SSZipArchive.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = SSZipArchive.m; path = SSZipArchive/SSZipArchive.m; sourceTree = ""; }; + 4FE1C6CD74E6C15C72E75C3C1FEA98BB /* Flutter.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Flutter.release.xcconfig; sourceTree = ""; }; + 51426DEED975E10237DEFF6AD33A0171 /* ResourceBundle-path_provider_foundation_privacy-path_provider_foundation-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ResourceBundle-path_provider_foundation_privacy-path_provider_foundation-Info.plist"; sourceTree = ""; }; + 53AF3AF6DD7CF1B1E6D7C60883746A1A /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 584170740CE9B7206E96909A68C0A5F3 /* path_provider_foundation.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = path_provider_foundation.podspec; path = "../../../../../../../../.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/darwin/path_provider_foundation.podspec"; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 5B93CF1983A6E099ECD1D3602A9C717A /* mz_os.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mz_os.h; path = SSZipArchive/minizip/mz_os.h; sourceTree = ""; }; + 60CECCF5D210691DFC111FB05E37872B /* SSZipCommon.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SSZipCommon.h; path = SSZipArchive/SSZipCommon.h; sourceTree = ""; }; + 644471312FE5602F4F4038271385798A /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; name = LICENSE; path = "../../../../../../../../.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+1/LICENSE"; sourceTree = ""; }; + 669E8F25E1897672BDB80B7EB784DA24 /* Pods-Runner */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "Pods-Runner"; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 68DF6F3260591385AC62D1C8BDD71142 /* flutter_zip_archive-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "flutter_zip_archive-prefix.pch"; sourceTree = ""; }; + 6A171354B2B1BA93EF7DEFFCBB790477 /* mz_strm_mem.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_strm_mem.c; path = SSZipArchive/minizip/mz_strm_mem.c; sourceTree = ""; }; + 6ACFE43EE056FEEFEF34BDE7018DFFFF /* 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 = ""; }; + 6D33587834896F778D61ED56852E782A /* FlutterZipArchivePlugin.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FlutterZipArchivePlugin.h; path = ../../../../../../../ios/Classes/FlutterZipArchivePlugin.h; sourceTree = ""; }; + 708CDCBECE19528A113F0606FCF4F7CE /* Pods-Runner.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-Runner.modulemap"; sourceTree = ""; }; + 709F18E4309532A00BD0112361BEE2EF /* FLTImagePickerPlugin.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FLTImagePickerPlugin.h; path = "../../../../../../../../../../../../../.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+1/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/FLTImagePickerPlugin.h"; sourceTree = ""; }; + 72C645BF4E7B7ED9A6B11CC0B506EB4B /* mz_os_posix.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_os_posix.c; path = SSZipArchive/minizip/mz_os_posix.c; sourceTree = ""; }; + 73DCC14566E642D9CCAD72545235B838 /* ImagePickerPlugin.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; name = ImagePickerPlugin.modulemap; path = "../../../../../../../../.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+1/ios/image_picker_ios/Sources/image_picker_ios/include/ImagePickerPlugin.modulemap"; sourceTree = ""; }; + 768975E636D1D2FB85622FB67DB04E5A /* image_picker_ios */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = image_picker_ios; path = libimage_picker_ios.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 770186A4CFB5E3E6389C70EA531A5CA0 /* path_provider_foundation-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "path_provider_foundation-umbrella.h"; sourceTree = ""; }; + 7C64684685E94ADC2FCA3B5985315959 /* Pods-Runner-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Runner-acknowledgements.plist"; sourceTree = ""; }; + 7CD2C64EC2B10B70C6AE18B29A5AEC62 /* image_picker_ios-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "image_picker_ios-dummy.m"; sourceTree = ""; }; + 7DA0F6D59470A9CDD3582043D2861F7F /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; name = LICENSE; path = "../../../../../../../../.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/LICENSE"; sourceTree = ""; }; + 7F76DED38DDBDEDE2413B263B130FF71 /* flutter_zip_archive.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = flutter_zip_archive.release.xcconfig; sourceTree = ""; }; + 8235FDE1F794FE1F3260A46F04BAE115 /* mz_crypt_apple.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_crypt_apple.c; path = SSZipArchive/minizip/mz_crypt_apple.c; sourceTree = ""; }; + 840D0754C1B8831C9E84C7A7777BF023 /* Pods-Runner-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Runner-dummy.m"; sourceTree = ""; }; + 845CC09BE46F79E82C14446D6AB4FF9F /* mz_strm_split.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_strm_split.c; path = SSZipArchive/minizip/mz_strm_split.c; sourceTree = ""; }; + 883DD6C406A539B3BB1859251D3F7E63 /* FLTPHPickerSaveImageToPathOperation.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FLTPHPickerSaveImageToPathOperation.h; path = "../../../../../../../../../../../../../.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+1/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/FLTPHPickerSaveImageToPathOperation.h"; sourceTree = ""; }; + 8C96D5272304FF91397AE6FF1D7F1D4F /* image_picker_ios-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "image_picker_ios-prefix.pch"; sourceTree = ""; }; + 91B23470DEB9A986332BEB5034234BC7 /* SSZipArchive */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = SSZipArchive; path = libSSZipArchive.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 93A3805C91988CA261FEAE5F5DA3D97B /* PathProviderPlugin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PathProviderPlugin.swift; path = "../../../../../../../../../../../.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/darwin/path_provider_foundation/Sources/path_provider_foundation/PathProviderPlugin.swift"; sourceTree = ""; }; + 94B07FEAE5C1BF297EEBCAE2DCF763E1 /* FLTImagePickerPhotoAssetUtil.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FLTImagePickerPhotoAssetUtil.m; path = "../../../../../../../../../../../.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+1/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerPhotoAssetUtil.m"; sourceTree = ""; }; + 97ADF2784597063A17C58E45F2C2A416 /* FLTImagePickerMetaDataUtil.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FLTImagePickerMetaDataUtil.m; path = "../../../../../../../../../../../.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+1/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerMetaDataUtil.m"; sourceTree = ""; }; + 98FF0987742F984F89345FC7E0684408 /* Pods-Runner-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Runner-umbrella.h"; sourceTree = ""; }; + 992B637598E94EF7B9929AC99D658C95 /* mz_os.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_os.c; path = SSZipArchive/minizip/mz_os.c; sourceTree = ""; }; + 9C2E066FF80424B701668B2D77C560BD /* 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 = ""; }; + 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; }; + A3B27A72CBE2C688B0471E28255E900C /* SSZipArchive.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SSZipArchive.debug.xcconfig; sourceTree = ""; }; + A921150CCFA681F261E38B07F3A17837 /* Pods-Runner-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Runner-acknowledgements.markdown"; sourceTree = ""; }; + AB2A8D89ADB96D5E82D66CFF5F3798FA /* image_picker_ios.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = image_picker_ios.podspec; path = "../../../../../../../../.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+1/ios/image_picker_ios.podspec"; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + AE0B441E96C7552881B83BCEC18DBF4B /* FLTImagePickerMetaDataUtil.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FLTImagePickerMetaDataUtil.h; path = "../../../../../../../../../../../../../.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+1/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/FLTImagePickerMetaDataUtil.h"; sourceTree = ""; }; + AE157A33FEF959A214796BFF348717F6 /* path_provider_foundation */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = path_provider_foundation; path = libpath_provider_foundation.a; sourceTree = BUILT_PRODUCTS_DIR; }; + AE46C19BAF608ECBFE3A261E55A55146 /* mz_strm_os_posix.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_strm_os_posix.c; path = SSZipArchive/minizip/mz_strm_os_posix.c; sourceTree = ""; }; + AEEA9F462777A969324BA2658C7F1127 /* mz_strm.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mz_strm.h; path = SSZipArchive/minizip/mz_strm.h; sourceTree = ""; }; + AF5520E9DC8EAFAFBEB3FF39E2B6B824 /* mz_strm_wzaes.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_strm_wzaes.c; path = SSZipArchive/minizip/mz_strm_wzaes.c; sourceTree = ""; }; + B18DD32EAE0DE5C4F096D91B809FD483 /* path_provider_foundation.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = path_provider_foundation.debug.xcconfig; sourceTree = ""; }; + BCEBE7D9429E751E0A99672605582CB4 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = "../../../../../../../../../../../../.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/darwin/path_provider_foundation/Sources/path_provider_foundation/Resources/PrivacyInfo.xcprivacy"; sourceTree = ""; }; + CB01A475948313A6E0E57AF9EE9F6A70 /* 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 = ""; }; + D64E456DA5B76A11960FCE200795B399 /* path_provider_foundation-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "path_provider_foundation-dummy.m"; sourceTree = ""; }; + D797162278B1BC724D7DE9D436D831AD /* SSZipArchive-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SSZipArchive-umbrella.h"; sourceTree = ""; }; + D7D3CBA6A138DA7AC7571F2ABF928263 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = "../../../../../../../../../../../../.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+1/ios/image_picker_ios/Sources/image_picker_ios/Resources/PrivacyInfo.xcprivacy"; sourceTree = ""; }; + D894AC797DD0D23757AD88B7711E8AF4 /* messages.g.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = messages.g.h; path = "../../../../../../../../../../../../../.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+1/ios/image_picker_ios/Sources/image_picker_ios/include/image_picker_ios/messages.g.h"; sourceTree = ""; }; + DA232AA1C887644730470CAB01C6B6E5 /* SSZipArchive-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SSZipArchive-dummy.m"; sourceTree = ""; }; + DA4E0315C7C9BA3E35027274EF1FA4E3 /* path_provider_foundation.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = path_provider_foundation.modulemap; sourceTree = ""; }; + DBE66489982C4D1E2D6B92BDA3537A4F /* mz_strm_pkcrypt.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_strm_pkcrypt.c; path = SSZipArchive/minizip/mz_strm_pkcrypt.c; sourceTree = ""; }; + DD0382BA266BAEC1CD021B1F0A8BF6CD /* 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 = ""; }; + E2412D89F4357131B08AB7522D938AF5 /* SSZipArchive.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SSZipArchive.h; path = SSZipArchive/SSZipArchive.h; sourceTree = ""; }; + E3BC2E4F8C93222C90102645FA30BA6D /* image_picker_ios.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = image_picker_ios.release.xcconfig; sourceTree = ""; }; + E4FCB7CBC4ED76DE82325CF594B542CF /* flutter_zip_archive-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "flutter_zip_archive-dummy.m"; sourceTree = ""; }; + EBDAD1C3CC0465744ADBD8D65715A4B5 /* mz_strm_zlib.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_strm_zlib.c; path = SSZipArchive/minizip/mz_strm_zlib.c; sourceTree = ""; }; + EBE9BF3E22F65735A1D716F2DBFBA401 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + EEDDA1BEF4DCC4F15AA1DD18FED35185 /* FLTImagePickerImageUtil.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FLTImagePickerImageUtil.m; path = "../../../../../../../../../../../.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+1/ios/image_picker_ios/Sources/image_picker_ios/FLTImagePickerImageUtil.m"; sourceTree = ""; }; + F0C7EFBFF01CFAAB52BA74E6CB40CE2C /* image_picker_ios-image_picker_ios_privacy */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; name = "image_picker_ios-image_picker_ios_privacy"; path = image_picker_ios_privacy.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; + F1E5C2958C967B4F3F2C3D049D0488D7 /* mz_strm_buf.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mz_strm_buf.c; path = SSZipArchive/minizip/mz_strm_buf.c; sourceTree = ""; }; + F3DB0289041E933D8516A59825CF0E72 /* messages.g.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = messages.g.m; path = "../../../../../../../../../../../.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+1/ios/image_picker_ios/Sources/image_picker_ios/messages.g.m"; sourceTree = ""; }; + F43B80528735A38882F1D084CF2C460C /* Flutter.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; path = Flutter.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + F4EC6EBB4C1222EE0ECF52722419D227 /* 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 = ""; }; + F915055814568C413135E9700435C981 /* messages.g.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = messages.g.swift; path = "../../../../../../../../../../../.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/darwin/path_provider_foundation/Sources/path_provider_foundation/messages.g.swift"; sourceTree = ""; }; + F98D0085EF3B9B9109CBC5C64C58BBDF /* SSZipArchive.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SSZipArchive.release.xcconfig; sourceTree = ""; }; + F9D86489E6638235A6B5928C4F86E442 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Runner.release.xcconfig"; sourceTree = ""; }; + FAF038EEB68D0EC0DAB29C47E30038A8 /* Pods-Runner-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Runner-resources.sh"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2558E69F5F906900B52771793F417FC6 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3F713938A0EA00D55E1828FD3B738493 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3F8134C2F82DCA6560431B0D844A29F8 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4D071340C394C92AD06E860781CA86C2 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7FE851FEA4B64A032B471684F996BA74 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A23E9B00FB6D769A35A4FA244ACC3313 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B3D0BCB641402CFFA762DFCC930BEAF2 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 050CCC446AD8397B64791D09CDB713ED /* ios */ = { + isa = PBXGroup; + children = ( + B270286653AD4D9D884DA2550893844A /* .symlinks */, + ); + name = ios; + path = ios; + sourceTree = ""; + }; + 061BDC2041CEEFCF9C5D51B863F5C0E3 /* Sources */ = { + isa = PBXGroup; + children = ( + CB9A21A948E2BA51501E33BAAE387026 /* path_provider_foundation */, + ); + name = Sources; + path = Sources; + sourceTree = ""; + }; + 0691C08F65D0B79E160211081DB0C9DE /* .. */ = { + isa = PBXGroup; + children = ( + 4DDC995352EAE304934A1100C89ED60B /* .. */, + ); + name = ..; + path = ..; + sourceTree = ""; + }; + 079C0A470C450E6C8821EF189823888F /* ios */ = { + isa = PBXGroup; + children = ( + 36FDABBC4AB0C57D3E3366A6C9143989 /* image_picker_ios */, + ); + name = ios; + path = ios; + sourceTree = ""; + }; + 0FB6A10962409C0C9499BEC0AE7F142D /* plugins */ = { + isa = PBXGroup; + children = ( + 1B9DEB5E3EB46006CDD4F23BF0937F6B /* image_picker_ios */, + ); + name = plugins; + path = plugins; + sourceTree = ""; + }; + 0FF45EB29649E5A212D590382F24ECA5 /* Support Files */ = { + isa = PBXGroup; + children = ( + E4FCB7CBC4ED76DE82325CF594B542CF /* flutter_zip_archive-dummy.m */, + 68DF6F3260591385AC62D1C8BDD71142 /* flutter_zip_archive-prefix.pch */, + 2299047366EA7545B2EAF71D0FB66359 /* flutter_zip_archive.debug.xcconfig */, + 7F76DED38DDBDEDE2413B263B130FF71 /* flutter_zip_archive.release.xcconfig */, + ); + name = "Support Files"; + path = "../../../../Pods/Target Support Files/flutter_zip_archive"; + sourceTree = ""; + }; + 1352E865F13A006E5ED23FF083D07F52 /* flutter_zip_archive */ = { + isa = PBXGroup; + children = ( + 4BA3C1EAFD12CE6CCF1EED95F7B235A9 /* .. */, + B836B16159999F53B3B4736171C7867C /* Pod */, + 0FF45EB29649E5A212D590382F24ECA5 /* Support Files */, + ); + name = flutter_zip_archive; + path = ../.symlinks/plugins/flutter_zip_archive/ios; + sourceTree = ""; + }; + 1452E94B118FED372BC6273707DC270C /* Sources */ = { + isa = PBXGroup; + children = ( + AD9241FFC6B34963968DB076263E8661 /* image_picker_ios */, + ); + name = Sources; + path = Sources; + sourceTree = ""; + }; + 153A146CA0C4EFCC863255F04B440F53 /* flutter_zip_archive */ = { + isa = PBXGroup; + children = ( + 634ABE7F1B5E8F98757A0B77CF5D980C /* example */, + ); + name = flutter_zip_archive; + path = flutter_zip_archive; + sourceTree = ""; + }; + 1B9DEB5E3EB46006CDD4F23BF0937F6B /* image_picker_ios */ = { + isa = PBXGroup; + children = ( + F42A4A2E567E25A23E3FE0D274252AFD /* ios */, + ); + name = image_picker_ios; + path = image_picker_ios; + sourceTree = ""; + }; + 1C1569DFD7F21873AA22A4663871F688 /* ios */ = { + isa = PBXGroup; + children = ( + E23AA46A8BDA8FB8A198D2C626A0E946 /* .symlinks */, + ); + name = ios; + path = ios; + sourceTree = ""; + }; + 1EB0A114D1B6EC4A0DE29CDF6760882F /* image_picker_ios */ = { + isa = PBXGroup; + children = ( + 079C0A470C450E6C8821EF189823888F /* ios */, + ); + name = image_picker_ios; + path = image_picker_ios; + sourceTree = ""; + }; + 201D74558EEBCF43AB3F42BBA3EA1C42 /* ios */ = { + isa = PBXGroup; + children = ( + F433B2A002E64BBE97214420F4E9E5D0 /* .symlinks */, + ); + name = ios; + path = ios; + sourceTree = ""; + }; + 20D93F62CFED6DED5456E0E8DF0E267C /* image_picker_ios */ = { + isa = PBXGroup; + children = ( + F09C2277063031D3D80AFFCD32B3C05F /* Resources */, + ); + name = image_picker_ios; + path = image_picker_ios; + sourceTree = ""; + }; + 22AFF333E28583DBB11C82AA1148C2FB /* flutter_zip_archive */ = { + isa = PBXGroup; + children = ( + E6071BD31E7B58F0563EB2D84D935B34 /* ios */, + ); + name = flutter_zip_archive; + path = flutter_zip_archive; + sourceTree = ""; + }; + 23AF029445B7AA8903D94BDA0FC3D8DE /* .. */ = { + isa = PBXGroup; + children = ( + 532CA28822875ADFEB45A95E4E55D60D /* .. */, + ); + name = ..; + path = "../../../../../../../../.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.0/darwin/path_provider_foundation/Sources"; + sourceTree = ""; + }; + 26582F6BC95F370ECD4002A515904C00 /* ios */ = { + isa = PBXGroup; + children = ( + 5B1ACF143BE2978CAA0E148988201501 /* .symlinks */, + ); + name = ios; + path = ios; + sourceTree = ""; + }; + 283E5EB695104DCEB45224F4F6F0214F /* .. */ = { + isa = PBXGroup; + children = ( + 9953E85D09E6A526A8887267B58CEDEB /* .. */, + BFD386F038BEC96036E029043332EED0 /* dev */, + ); + name = ..; + path = ..; + sourceTree = ""; + }; + 2E2513E2422DA3842532E6DD2D95E015 /* path_provider_foundation */ = { + isa = PBXGroup; + children = ( + 23AF029445B7AA8903D94BDA0FC3D8DE /* .. */, + D5EA7285BCBC0F5E7D79770CB8F5D40D /* Pod */, + CF283A4F9D242FF63C728E266E35715D /* Support Files */, + ); + name = path_provider_foundation; + path = ../.symlinks/plugins/path_provider_foundation/darwin; + sourceTree = ""; + }; + 33AB56846534011043388CEEA763C1A1 /* Classes */ = { + isa = PBXGroup; + children = ( + 6D33587834896F778D61ED56852E782A /* FlutterZipArchivePlugin.h */, + 082D546C6165E063230F10157D155E58 /* FlutterZipArchivePlugin.m */, + ); + name = Classes; + path = Classes; + sourceTree = ""; + }; + 36FDABBC4AB0C57D3E3366A6C9143989 /* image_picker_ios */ = { + isa = PBXGroup; + children = ( + 1452E94B118FED372BC6273707DC270C /* Sources */, + ); + name = image_picker_ios; + path = image_picker_ios; + sourceTree = ""; + }; + 39AF616777DC6EAE47518948A2228751 /* example */ = { + isa = PBXGroup; + children = ( + 201D74558EEBCF43AB3F42BBA3EA1C42 /* ios */, + ); + name = example; + path = example; + sourceTree = ""; + }; + 3EE20779ECE61B143A6265D74E3A6C9B /* path_provider_foundation */ = { + isa = PBXGroup; + children = ( + F0E631F8F22A2C24EEAB328F71A51A79 /* darwin */, + ); + name = path_provider_foundation; + path = path_provider_foundation; + sourceTree = ""; + }; + 412B8E0AF9543F19EFC5CFB821D0A641 /* path_provider_foundation */ = { + isa = PBXGroup; + children = ( + 82A4F9F99BF998D718A91E6127842907 /* darwin */, + ); + name = path_provider_foundation; + path = path_provider_foundation; + sourceTree = ""; + }; + 44A37E02E67D958D193BB2DD29B21A24 /* .. */ = { + isa = PBXGroup; + children = ( + 7B766461644193AAF7096EE2E9B660A0 /* .. */, + ); + name = ..; + path = ..; + sourceTree = ""; + }; + 46013C3650369B7D38202CDB2A4D8FE1 /* .. */ = { + isa = PBXGroup; + children = ( + 44A37E02E67D958D193BB2DD29B21A24 /* .. */, + ); + name = ..; + path = "../../../../../../../../.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+1/ios/image_picker_ios/Sources"; + sourceTree = ""; + }; + 47EF5D2AC0E5F009E2E1D24A0C20FF0C /* .. */ = { + isa = PBXGroup; + children = ( + 283E5EB695104DCEB45224F4F6F0214F /* .. */, + ); + name = ..; + path = ..; + sourceTree = ""; + }; + 4BA3C1EAFD12CE6CCF1EED95F7B235A9 /* .. */ = { + isa = PBXGroup; + children = ( + E91C4F5172EFEED2FB1C17CAB784F1E4 /* .. */, + ); + name = ..; + path = ../../../../../../ios; + sourceTree = ""; + }; + 4C2EFC1AA7AA397C59A05B54BB923DDA /* Pods */ = { + isa = PBXGroup; + children = ( + A990A7D0D664D8BDCCFE4964562EB581 /* SSZipArchive */, + ); + name = Pods; + sourceTree = ""; + }; + 4DDC995352EAE304934A1100C89ED60B /* .. */ = { + isa = PBXGroup; + children = ( + 9494788E72A2A3012FF5567F1B641E6A /* .. */, + ); + name = ..; + path = ..; + sourceTree = ""; + }; + 532CA28822875ADFEB45A95E4E55D60D /* .. */ = { + isa = PBXGroup; + children = ( + 0691C08F65D0B79E160211081DB0C9DE /* .. */, + ); + name = ..; + path = ..; + sourceTree = ""; + }; + 593E1B8B4FD58F8E691E810B071E6628 /* plugins */ = { + isa = PBXGroup; + children = ( + 1EB0A114D1B6EC4A0DE29CDF6760882F /* image_picker_ios */, + ); + name = plugins; + path = plugins; + sourceTree = ""; + }; + 5B1ACF143BE2978CAA0E148988201501 /* .symlinks */ = { + isa = PBXGroup; + children = ( + A170FAE710F781F3C4450FDC4638154A /* plugins */, + ); + name = .symlinks; + path = .symlinks; + sourceTree = ""; + }; + 5C8AC46181FD14A3127D3A19EEBE13EF /* Pod */ = { + isa = PBXGroup; + children = ( + F43B80528735A38882F1D084CF2C460C /* Flutter.podspec */, + ); + name = Pod; + sourceTree = ""; + }; + 61CE431C0649244BE4B5FB7564B6D4C9 /* Sources */ = { + isa = PBXGroup; + children = ( + C2B2B17AAF01CC02B82798AB740080F1 /* path_provider_foundation */, + ); + name = Sources; + path = Sources; + sourceTree = ""; + }; + 634ABE7F1B5E8F98757A0B77CF5D980C /* example */ = { + isa = PBXGroup; + children = ( + 26582F6BC95F370ECD4002A515904C00 /* ios */, + ); + name = example; + path = example; + sourceTree = ""; + }; + 639FBDC226910778F94DE91EC433E306 /* Support Files */ = { + isa = PBXGroup; + children = ( + 2385FC5B4FBB60D7FA9CCDDE76795971 /* Flutter.debug.xcconfig */, + 4FE1C6CD74E6C15C72E75C3C1FEA98BB /* Flutter.release.xcconfig */, + ); + name = "Support Files"; + path = "../Pods/Target Support Files/Flutter"; + sourceTree = ""; + }; + 67C577D79F999CAB4EFEBF7BC0AF2CD5 /* flutter_zip_archive */ = { + isa = PBXGroup; + children = ( + B60D3862D28260940B440369BB923ED8 /* example */, + ); + name = flutter_zip_archive; + path = flutter_zip_archive; + sourceTree = ""; + }; + 6A4E3AFD2C2C4FA1564954976A530EBA /* .. */ = { + isa = PBXGroup; + children = ( + ACC1563071833CAFAFD73FAAD87C411D /* .. */, + B726B4460A6BB11F21C930DEA0088BE2 /* dev */, + ); + name = ..; + path = ..; + sourceTree = ""; + }; + 6C5F8FAEB16297D0596233DF23001E99 /* .. */ = { + isa = PBXGroup; + children = ( + A0A2F00B326E64E83D34E88F2AA35CF5 /* .. */, + ); + name = ..; + path = ..; + sourceTree = ""; + }; + 6F3C68E30F3193F43FA60B20E3456D68 /* Sources */ = { + isa = PBXGroup; + children = ( + 20D93F62CFED6DED5456E0E8DF0E267C /* image_picker_ios */, + ); + name = Sources; + path = Sources; + sourceTree = ""; + }; + 7AF5770871520CFE5CC9A61A52CE9B5D /* Flutter */ = { + isa = PBXGroup; + children = ( + 5C8AC46181FD14A3127D3A19EEBE13EF /* Pod */, + 639FBDC226910778F94DE91EC433E306 /* Support Files */, + ); + name = Flutter; + path = ../Flutter; + sourceTree = ""; + }; + 7B7375E6309BE56C9BC4EA9E109CEB2B /* Pods-Runner */ = { + isa = PBXGroup; + children = ( + 708CDCBECE19528A113F0606FCF4F7CE /* Pods-Runner.modulemap */, + A921150CCFA681F261E38B07F3A17837 /* Pods-Runner-acknowledgements.markdown */, + 7C64684685E94ADC2FCA3B5985315959 /* Pods-Runner-acknowledgements.plist */, + 840D0754C1B8831C9E84C7A7777BF023 /* Pods-Runner-dummy.m */, + FAF038EEB68D0EC0DAB29C47E30038A8 /* Pods-Runner-resources.sh */, + 98FF0987742F984F89345FC7E0684408 /* Pods-Runner-umbrella.h */, + 53AF3AF6DD7CF1B1E6D7C60883746A1A /* Pods-Runner.debug.xcconfig */, + EBE9BF3E22F65735A1D716F2DBFBA401 /* Pods-Runner.profile.xcconfig */, + F9D86489E6638235A6B5928C4F86E442 /* Pods-Runner.release.xcconfig */, + ); + name = "Pods-Runner"; + path = "Target Support Files/Pods-Runner"; + sourceTree = ""; + }; + 7B766461644193AAF7096EE2E9B660A0 /* .. */ = { + isa = PBXGroup; + children = ( + 6C5F8FAEB16297D0596233DF23001E99 /* .. */, + ); + name = ..; + path = ..; + sourceTree = ""; + }; + 7C35E8E55BE7EA49540C8D07C9C1B024 /* Targets Support Files */ = { + isa = PBXGroup; + children = ( + 7B7375E6309BE56C9BC4EA9E109CEB2B /* Pods-Runner */, + ); + name = "Targets Support Files"; + sourceTree = ""; + }; + 805F3B907650CF0435EC79DF10F3FA1C /* image_picker_ios */ = { + isa = PBXGroup; + children = ( + 46013C3650369B7D38202CDB2A4D8FE1 /* .. */, + 9D59A5ACFABD84927F912C7F39DB697F /* Pod */, + F01486F893F6B5AF5649235E5D6BF76C /* Support Files */, + ); + name = image_picker_ios; + path = ../.symlinks/plugins/image_picker_ios/ios; + sourceTree = ""; + }; + 81143D9E5271BC75B30C46A69D454D69 /* .. */ = { + isa = PBXGroup; + children = ( + 47EF5D2AC0E5F009E2E1D24A0C20FF0C /* .. */, + ); + name = ..; + path = ..; + sourceTree = ""; + }; + 82A4F9F99BF998D718A91E6127842907 /* darwin */ = { + isa = PBXGroup; + children = ( + D3FDD342C5DC52F1F9583F5BE1B5602E /* path_provider_foundation */, + ); + name = darwin; + path = darwin; + sourceTree = ""; + }; + 8B2064A2B1BA17742AF3DB80CB516809 /* plugins */ = { + isa = PBXGroup; + children = ( + 22AFF333E28583DBB11C82AA1148C2FB /* flutter_zip_archive */, + ); + name = plugins; + path = plugins; + sourceTree = ""; + }; + 9494788E72A2A3012FF5567F1B641E6A /* .. */ = { + isa = PBXGroup; + children = ( + E5923B3F40B414A17545815DE366E83C /* .. */, + ); + name = ..; + path = ..; + sourceTree = ""; + }; + 97757596F6F3874132363C4E6247F6B5 /* flutter_zip_archive */ = { + isa = PBXGroup; + children = ( + E700618BC19058430698E4475F4F08E9 /* example */, + ); + name = flutter_zip_archive; + path = flutter_zip_archive; + sourceTree = ""; + }; + 9953E85D09E6A526A8887267B58CEDEB /* .. */ = { + isa = PBXGroup; + children = ( + D84ECCE7A7C4F5E689425D9E4D66383B /* dev */, + ); + name = ..; + path = .; + sourceTree = ""; + }; + 9D59A5ACFABD84927F912C7F39DB697F /* Pod */ = { + isa = PBXGroup; + children = ( + AB2A8D89ADB96D5E82D66CFF5F3798FA /* image_picker_ios.podspec */, + 73DCC14566E642D9CCAD72545235B838 /* ImagePickerPlugin.modulemap */, + 644471312FE5602F4F4038271385798A /* LICENSE */, + ); + name = Pod; + sourceTree = ""; + }; + A0A2F00B326E64E83D34E88F2AA35CF5 /* .. */ = { + isa = PBXGroup; + children = ( + 81143D9E5271BC75B30C46A69D454D69 /* .. */, + ); + name = ..; + path = ..; + sourceTree = ""; + }; + A170FAE710F781F3C4450FDC4638154A /* plugins */ = { + isa = PBXGroup; + children = ( + 412B8E0AF9543F19EFC5CFB821D0A641 /* path_provider_foundation */, + ); + name = plugins; + path = plugins; + sourceTree = ""; + }; + A990A7D0D664D8BDCCFE4964562EB581 /* SSZipArchive */ = { + isa = PBXGroup; + children = ( + 39447AE6C30B64C6A84908E6C646DE06 /* mz.h */, + 469BDCEA09E97D5798D6DDC30C01B03E /* mz_compat.c */, + 16E18E7D08B76D974DD42CFCF4F7165C /* mz_compat.h */, + 24ECDBE9B26A33172E58094D02056633 /* mz_crypt.c */, + 140776F73E38427DC826D566FC1E72BE /* mz_crypt.h */, + 8235FDE1F794FE1F3260A46F04BAE115 /* mz_crypt_apple.c */, + 992B637598E94EF7B9929AC99D658C95 /* mz_os.c */, + 5B93CF1983A6E099ECD1D3602A9C717A /* mz_os.h */, + 72C645BF4E7B7ED9A6B11CC0B506EB4B /* mz_os_posix.c */, + 4262217E492BAB38179734C77694A382 /* mz_strm.c */, + AEEA9F462777A969324BA2658C7F1127 /* mz_strm.h */, + F1E5C2958C967B4F3F2C3D049D0488D7 /* mz_strm_buf.c */, + 12C1AA8FDF002ECA9A168A7FD3BBA23E /* mz_strm_buf.h */, + 6A171354B2B1BA93EF7DEFFCBB790477 /* mz_strm_mem.c */, + 1A10E12604CB5C2D813D323D1D92B021 /* mz_strm_mem.h */, + DD0382BA266BAEC1CD021B1F0A8BF6CD /* mz_strm_os.h */, + AE46C19BAF608ECBFE3A261E55A55146 /* mz_strm_os_posix.c */, + DBE66489982C4D1E2D6B92BDA3537A4F /* mz_strm_pkcrypt.c */, + 9C2E066FF80424B701668B2D77C560BD /* mz_strm_pkcrypt.h */, + 845CC09BE46F79E82C14446D6AB4FF9F /* mz_strm_split.c */, + CB01A475948313A6E0E57AF9EE9F6A70 /* mz_strm_split.h */, + AF5520E9DC8EAFAFBEB3FF39E2B6B824 /* mz_strm_wzaes.c */, + 6ACFE43EE056FEEFEF34BDE7018DFFFF /* mz_strm_wzaes.h */, + EBDAD1C3CC0465744ADBD8D65715A4B5 /* mz_strm_zlib.c */, + F4EC6EBB4C1222EE0ECF52722419D227 /* mz_strm_zlib.h */, + 0E1683B145EF5BCFF5482D4CD507DF88 /* mz_zip.c */, + 1E3FFEDA320B82FC971B0FD2DA459F92 /* mz_zip.h */, + 25A5B6154FD369610C5DFF5DF65D5295 /* mz_zip_rw.c */, + 16E839C8ADDF9AA566CC73A1CFA93F24 /* mz_zip_rw.h */, + E2412D89F4357131B08AB7522D938AF5 /* SSZipArchive.h */, + 4DF0F2EAF67E2AABC8EF321105441FEA /* SSZipArchive.m */, + 60CECCF5D210691DFC111FB05E37872B /* SSZipCommon.h */, + 21B82B6050EDF009E9F30A4CCBE6B724 /* ZipArchive.h */, + ED377D8D646867F13FBCC6A8BD82D2AC /* Support Files */, + ); + name = SSZipArchive; + path = SSZipArchive; + sourceTree = ""; + }; + ACC1563071833CAFAFD73FAAD87C411D /* .. */ = { + isa = PBXGroup; + children = ( + C9BB4672065A1875E1BF3EF4C250E3FF /* dev */, + ); + name = ..; + path = .; + sourceTree = ""; + }; + AD9241FFC6B34963968DB076263E8661 /* image_picker_ios */ = { + isa = PBXGroup; + children = ( + EEDDA1BEF4DCC4F15AA1DD18FED35185 /* FLTImagePickerImageUtil.m */, + 97ADF2784597063A17C58E45F2C2A416 /* FLTImagePickerMetaDataUtil.m */, + 94B07FEAE5C1BF297EEBCAE2DCF763E1 /* FLTImagePickerPhotoAssetUtil.m */, + 39D33BA8E235006E17873CAD05228874 /* FLTImagePickerPlugin.m */, + 3FAD94D323A5738B1BE2F02B71040439 /* FLTPHPickerSaveImageToPathOperation.m */, + F3DB0289041E933D8516A59825CF0E72 /* messages.g.m */, + F9425C1275484307C97826F27F5BF2D9 /* include */, + ); + name = image_picker_ios; + path = image_picker_ios; + sourceTree = ""; + }; + B087CAB42A19F5510EA5349F2E9847B8 /* path_provider_foundation */ = { + isa = PBXGroup; + children = ( + 061BDC2041CEEFCF9C5D51B863F5C0E3 /* Sources */, + ); + name = path_provider_foundation; + path = path_provider_foundation; + sourceTree = ""; + }; + B270286653AD4D9D884DA2550893844A /* .symlinks */ = { + isa = PBXGroup; + children = ( + 0FB6A10962409C0C9499BEC0AE7F142D /* plugins */, + ); + name = .symlinks; + path = .symlinks; + sourceTree = ""; + }; + B434A998CF44C503C51ABEE9DDCAA0FB /* example */ = { + isa = PBXGroup; + children = ( + 1C1569DFD7F21873AA22A4663871F688 /* ios */, + ); + name = example; + path = example; + sourceTree = ""; + }; + B60D3862D28260940B440369BB923ED8 /* example */ = { + isa = PBXGroup; + children = ( + 050CCC446AD8397B64791D09CDB713ED /* ios */, + ); + name = example; + path = example; + sourceTree = ""; + }; + B726B4460A6BB11F21C930DEA0088BE2 /* dev */ = { + isa = PBXGroup; + children = ( + DB1326F9E6665E49CD565AC07E8211E8 /* flutter_zip_archive */, + ); + name = dev; + path = dev; + sourceTree = ""; + }; + B836B16159999F53B3B4736171C7867C /* Pod */ = { + isa = PBXGroup; + children = ( + 217547AD3D570440139C696437026792 /* flutter_zip_archive.podspec */, + ); + name = Pod; + sourceTree = ""; + }; + B8B161D2BB67E34352AEE22E41DCE367 /* .. */ = { + isa = PBXGroup; + children = ( + 6A4E3AFD2C2C4FA1564954976A530EBA /* .. */, + ); + name = ..; + path = ..; + sourceTree = ""; + }; + BFD386F038BEC96036E029043332EED0 /* dev */ = { + isa = PBXGroup; + children = ( + 97757596F6F3874132363C4E6247F6B5 /* flutter_zip_archive */, + ); + name = dev; + path = dev; + sourceTree = ""; + }; + C052E631D4F815059F6EFB9CD57B1B25 /* .symlinks */ = { + isa = PBXGroup; + children = ( + 593E1B8B4FD58F8E691E810B071E6628 /* plugins */, + ); + name = .symlinks; + path = .symlinks; + sourceTree = ""; + }; + C2B2B17AAF01CC02B82798AB740080F1 /* path_provider_foundation */ = { + isa = PBXGroup; + children = ( + E1B50A4270F497D4D11023451E7D91F2 /* Resources */, + ); + name = path_provider_foundation; + path = path_provider_foundation; + sourceTree = ""; + }; + C416394DCD30AECB26464CBCC1726E77 /* image_picker_ios */ = { + isa = PBXGroup; + children = ( + 2C5931DDBC42B9AEAB6AFFFAF36B2478 /* FLTImagePickerImageUtil.h */, + AE0B441E96C7552881B83BCEC18DBF4B /* FLTImagePickerMetaDataUtil.h */, + 067AFCF9FC0C8C24434A57F462A58D8A /* FLTImagePickerPhotoAssetUtil.h */, + 709F18E4309532A00BD0112361BEE2EF /* FLTImagePickerPlugin.h */, + 0D3A665945D0563245B5CC659D2EC58C /* FLTImagePickerPlugin_Test.h */, + 883DD6C406A539B3BB1859251D3F7E63 /* FLTPHPickerSaveImageToPathOperation.h */, + D894AC797DD0D23757AD88B7711E8AF4 /* messages.g.h */, + ); + name = image_picker_ios; + path = image_picker_ios; + sourceTree = ""; + }; + C9BB4672065A1875E1BF3EF4C250E3FF /* dev */ = { + isa = PBXGroup; + children = ( + 153A146CA0C4EFCC863255F04B440F53 /* flutter_zip_archive */, + ); + name = dev; + path = dev; + sourceTree = ""; + }; + CB9A21A948E2BA51501E33BAAE387026 /* path_provider_foundation */ = { + isa = PBXGroup; + children = ( + F915055814568C413135E9700435C981 /* messages.g.swift */, + 93A3805C91988CA261FEAE5F5DA3D97B /* PathProviderPlugin.swift */, + ); + name = path_provider_foundation; + path = path_provider_foundation; + sourceTree = ""; + }; + CF1408CF629C7361332E53B88F7BD30C = { + isa = PBXGroup; + children = ( + 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, + F24667DC3A1506C9DCB0B7873063E33F /* Development Pods */, + D89477F20FB1DE18A04690586D7808C4 /* Frameworks */, + 4C2EFC1AA7AA397C59A05B54BB923DDA /* Pods */, + F2417E9B39050709CD37B4BF8933A8DC /* Products */, + 7C35E8E55BE7EA49540C8D07C9C1B024 /* Targets Support Files */, + ); + sourceTree = ""; + }; + CF283A4F9D242FF63C728E266E35715D /* Support Files */ = { + isa = PBXGroup; + children = ( + DA4E0315C7C9BA3E35027274EF1FA4E3 /* path_provider_foundation.modulemap */, + D64E456DA5B76A11960FCE200795B399 /* path_provider_foundation-dummy.m */, + 13BB4A0B3CA6FA687133605FFD01F357 /* path_provider_foundation-prefix.pch */, + 770186A4CFB5E3E6389C70EA531A5CA0 /* path_provider_foundation-umbrella.h */, + B18DD32EAE0DE5C4F096D91B809FD483 /* path_provider_foundation.debug.xcconfig */, + 4CC30F89F4EA2AD764170CD84C70E5E1 /* path_provider_foundation.release.xcconfig */, + 51426DEED975E10237DEFF6AD33A0171 /* ResourceBundle-path_provider_foundation_privacy-path_provider_foundation-Info.plist */, + ); + name = "Support Files"; + path = "../../../../Pods/Target Support Files/path_provider_foundation"; + sourceTree = ""; + }; + D3FDD342C5DC52F1F9583F5BE1B5602E /* path_provider_foundation */ = { + isa = PBXGroup; + children = ( + 61CE431C0649244BE4B5FB7564B6D4C9 /* Sources */, + ); + name = path_provider_foundation; + path = path_provider_foundation; + sourceTree = ""; + }; + D4E3FCCDA265A41571C8A0AAED9FAF7A /* plugins */ = { + isa = PBXGroup; + children = ( + 3EE20779ECE61B143A6265D74E3A6C9B /* path_provider_foundation */, + ); + name = plugins; + path = plugins; + sourceTree = ""; + }; + D5EA7285BCBC0F5E7D79770CB8F5D40D /* Pod */ = { + isa = PBXGroup; + children = ( + 7DA0F6D59470A9CDD3582043D2861F7F /* LICENSE */, + 584170740CE9B7206E96909A68C0A5F3 /* path_provider_foundation.podspec */, + ); + name = Pod; + sourceTree = ""; + }; + D84ECCE7A7C4F5E689425D9E4D66383B /* dev */ = { + isa = PBXGroup; + children = ( + 67C577D79F999CAB4EFEBF7BC0AF2CD5 /* flutter_zip_archive */, + ); + name = dev; + path = dev; + sourceTree = ""; + }; + D89477F20FB1DE18A04690586D7808C4 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; + DB1326F9E6665E49CD565AC07E8211E8 /* flutter_zip_archive */ = { + isa = PBXGroup; + children = ( + 39AF616777DC6EAE47518948A2228751 /* example */, + ); + name = flutter_zip_archive; + path = flutter_zip_archive; + sourceTree = ""; + }; + E1B50A4270F497D4D11023451E7D91F2 /* Resources */ = { + isa = PBXGroup; + children = ( + BCEBE7D9429E751E0A99672605582CB4 /* PrivacyInfo.xcprivacy */, + ); + name = Resources; + path = Resources; + sourceTree = ""; + }; + E23AA46A8BDA8FB8A198D2C626A0E946 /* .symlinks */ = { + isa = PBXGroup; + children = ( + 8B2064A2B1BA17742AF3DB80CB516809 /* plugins */, + ); + name = .symlinks; + path = .symlinks; + sourceTree = ""; + }; + E5923B3F40B414A17545815DE366E83C /* .. */ = { + isa = PBXGroup; + children = ( + B8B161D2BB67E34352AEE22E41DCE367 /* .. */, + ); + name = ..; + path = ..; + sourceTree = ""; + }; + E6071BD31E7B58F0563EB2D84D935B34 /* ios */ = { + isa = PBXGroup; + children = ( + 33AB56846534011043388CEEA763C1A1 /* Classes */, + ); + name = ios; + path = ios; + sourceTree = ""; + }; + E700618BC19058430698E4475F4F08E9 /* example */ = { + isa = PBXGroup; + children = ( + FFDD9CC066EB6E482577CF0630665451 /* ios */, + ); + name = example; + path = example; + sourceTree = ""; + }; + E91C4F5172EFEED2FB1C17CAB784F1E4 /* .. */ = { + isa = PBXGroup; + children = ( + B434A998CF44C503C51ABEE9DDCAA0FB /* example */, + ); + name = ..; + path = ..; + sourceTree = ""; + }; + ED2110787BD76C3CEF736A393360440A /* image_picker_ios */ = { + isa = PBXGroup; + children = ( + 6F3C68E30F3193F43FA60B20E3456D68 /* Sources */, + ); + name = image_picker_ios; + path = image_picker_ios; + sourceTree = ""; + }; + ED377D8D646867F13FBCC6A8BD82D2AC /* Support Files */ = { + isa = PBXGroup; + children = ( + 3FD43EC7081C2C90F8E6F58F55FECEBD /* SSZipArchive.modulemap */, + DA232AA1C887644730470CAB01C6B6E5 /* SSZipArchive-dummy.m */, + 158505A03770AF2DB76FF314D677B516 /* SSZipArchive-prefix.pch */, + D797162278B1BC724D7DE9D436D831AD /* SSZipArchive-umbrella.h */, + A3B27A72CBE2C688B0471E28255E900C /* SSZipArchive.debug.xcconfig */, + F98D0085EF3B9B9109CBC5C64C58BBDF /* SSZipArchive.release.xcconfig */, + ); + name = "Support Files"; + path = "../Target Support Files/SSZipArchive"; + sourceTree = ""; + }; + F01486F893F6B5AF5649235E5D6BF76C /* Support Files */ = { + isa = PBXGroup; + children = ( + 439236E296E8D08D89FD7B07C053DFBA /* image_picker_ios.modulemap */, + 7CD2C64EC2B10B70C6AE18B29A5AEC62 /* image_picker_ios-dummy.m */, + 8C96D5272304FF91397AE6FF1D7F1D4F /* image_picker_ios-prefix.pch */, + 3D4D3DC9F2C625816586F125624834D0 /* image_picker_ios.debug.xcconfig */, + E3BC2E4F8C93222C90102645FA30BA6D /* image_picker_ios.release.xcconfig */, + 0606E77F294E1D7BC110559CB2C788C7 /* ResourceBundle-image_picker_ios_privacy-image_picker_ios-Info.plist */, + ); + name = "Support Files"; + path = "../../../../Pods/Target Support Files/image_picker_ios"; + sourceTree = ""; + }; + F09C2277063031D3D80AFFCD32B3C05F /* Resources */ = { + isa = PBXGroup; + children = ( + D7D3CBA6A138DA7AC7571F2ABF928263 /* PrivacyInfo.xcprivacy */, + ); + name = Resources; + path = Resources; + sourceTree = ""; + }; + F0E631F8F22A2C24EEAB328F71A51A79 /* darwin */ = { + isa = PBXGroup; + children = ( + B087CAB42A19F5510EA5349F2E9847B8 /* path_provider_foundation */, + ); + name = darwin; + path = darwin; + sourceTree = ""; + }; + F2417E9B39050709CD37B4BF8933A8DC /* Products */ = { + isa = PBXGroup; + children = ( + 341C2BD787A5690B04A8F1D36334DA98 /* flutter_zip_archive */, + 768975E636D1D2FB85622FB67DB04E5A /* image_picker_ios */, + F0C7EFBFF01CFAAB52BA74E6CB40CE2C /* image_picker_ios-image_picker_ios_privacy */, + AE157A33FEF959A214796BFF348717F6 /* path_provider_foundation */, + 3DBD4BADE27F8B91024E4B4B4DD75DB5 /* path_provider_foundation-path_provider_foundation_privacy */, + 669E8F25E1897672BDB80B7EB784DA24 /* Pods-Runner */, + 91B23470DEB9A986332BEB5034234BC7 /* SSZipArchive */, + ); + name = Products; + sourceTree = ""; + }; + F24667DC3A1506C9DCB0B7873063E33F /* Development Pods */ = { + isa = PBXGroup; + children = ( + 7AF5770871520CFE5CC9A61A52CE9B5D /* Flutter */, + 1352E865F13A006E5ED23FF083D07F52 /* flutter_zip_archive */, + 805F3B907650CF0435EC79DF10F3FA1C /* image_picker_ios */, + 2E2513E2422DA3842532E6DD2D95E015 /* path_provider_foundation */, + ); + name = "Development Pods"; + sourceTree = ""; + }; + F42A4A2E567E25A23E3FE0D274252AFD /* ios */ = { + isa = PBXGroup; + children = ( + ED2110787BD76C3CEF736A393360440A /* image_picker_ios */, + ); + name = ios; + path = ios; + sourceTree = ""; + }; + F433B2A002E64BBE97214420F4E9E5D0 /* .symlinks */ = { + isa = PBXGroup; + children = ( + D4E3FCCDA265A41571C8A0AAED9FAF7A /* plugins */, + ); + name = .symlinks; + path = .symlinks; + sourceTree = ""; + }; + F9425C1275484307C97826F27F5BF2D9 /* include */ = { + isa = PBXGroup; + children = ( + 103FF19F34B7AED6A0CBBC74BB25E40B /* image_picker_ios-umbrella.h */, + C416394DCD30AECB26464CBCC1726E77 /* image_picker_ios */, + ); + name = include; + path = include; + sourceTree = ""; + }; + FFDD9CC066EB6E482577CF0630665451 /* ios */ = { + isa = PBXGroup; + children = ( + C052E631D4F815059F6EFB9CD57B1B25 /* .symlinks */, + ); + name = ios; + path = ios; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 222B621D1F9C1B20F20DFA1685AE17BA /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 66EACCCF47434ED3AB231E350BA3E9E0 /* mz.h in Headers */, + 819B3A2ECFD498AD81599AB11612D616 /* mz_compat.h in Headers */, + 16E0CF48AEA2E552D793E4CEFDF01E03 /* mz_crypt.h in Headers */, + B9B6975C3190E6A4F26340EF8DC6984F /* mz_os.h in Headers */, + 931A7AB36F8ABEC096488088BFF9F493 /* mz_strm.h in Headers */, + 0726FD424B30BA6D4953EBBE43186222 /* mz_strm_buf.h in Headers */, + 3D90816169AAE962AD743B9601F824CD /* mz_strm_mem.h in Headers */, + D59034B379A06B9595AE3AE84C34ABC0 /* mz_strm_os.h in Headers */, + F1238BE7B56A8E019FF9DD839A888D68 /* mz_strm_pkcrypt.h in Headers */, + 4C77C2E3005AF4EEAF3C854CB70DE8DB /* mz_strm_split.h in Headers */, + C865F14E7408C4999313606383EC72D0 /* mz_strm_wzaes.h in Headers */, + DC249EFACF88D684359E95FBF6E0066E /* mz_strm_zlib.h in Headers */, + 434EC36C5177F72BF11115258608DAD9 /* mz_zip.h in Headers */, + E7E3A346B2D08A0E7915A8923510B252 /* mz_zip_rw.h in Headers */, + 63ED7BD0781FCECB07CADC10155E0590 /* SSZipArchive.h in Headers */, + 1B014EF7EB190969927DEA276BC6B23C /* SSZipArchive-umbrella.h in Headers */, + D420F9BB5AF33832432457F0E4453045 /* SSZipCommon.h in Headers */, + F24496385662469D1EE2E39E85765007 /* ZipArchive.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 61CBC4E54636C2621ABA81AD8D848EE0 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 282FE044A7AC0F5E2C8F0AF3BAAF4995 /* FLTImagePickerImageUtil.h in Headers */, + 1A0D211BBEE177C411B300863AECAE8A /* FLTImagePickerMetaDataUtil.h in Headers */, + 0F005B941A20C60BD12B3353442823F2 /* FLTImagePickerPhotoAssetUtil.h in Headers */, + 0DE0005A94CFDFAA880537475881D042 /* FLTImagePickerPlugin.h in Headers */, + 1F925986C363812371A165656DA4D93F /* FLTImagePickerPlugin_Test.h in Headers */, + F3DBE7CCD5C5E2704963FB8CA7D0FD81 /* FLTPHPickerSaveImageToPathOperation.h in Headers */, + BAC8DCAC5526DDDFA2F67FB4847E6832 /* image_picker_ios-umbrella.h in Headers */, + 22449638C213B5879C5B0B4252349AC6 /* messages.g.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 91D3343BF3CC2D832D4C7CC7CBCF46B5 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 5062CC339370B5ADC7009EA190F6C243 /* Pods-Runner-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DC9A979F7047F6865E13B87906336977 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 91B7AEB0D5A36D5C02BEE073F273356E /* FlutterZipArchivePlugin.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + FF2F25E5DFF1C25F61DB4965B6BEFE3F /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 93E2AFE812DAB37F6091635672C243BC /* path_provider_foundation-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 56F581DDCB0A032454E604885E17AE3C /* path_provider_foundation */ = { + isa = PBXNativeTarget; + buildConfigurationList = 137DF6EB8A85C6355521BB058DBA254A /* Build configuration list for PBXNativeTarget "path_provider_foundation" */; + buildPhases = ( + FF2F25E5DFF1C25F61DB4965B6BEFE3F /* Headers */, + F933F8017C1C37E783A177F4E7848E24 /* Sources */, + 2558E69F5F906900B52771793F417FC6 /* Frameworks */, + 2B0D5E326E9C01E599D12A6FDC0EE7C2 /* Copy generated compatibility header */, + ); + buildRules = ( + ); + dependencies = ( + B3D42755DACDDDFBB17111C10A301D86 /* PBXTargetDependency */, + 40E9839A3F8982D20CFD95CC1DEF38F4 /* PBXTargetDependency */, + ); + name = path_provider_foundation; + productName = path_provider_foundation; + productReference = AE157A33FEF959A214796BFF348717F6 /* path_provider_foundation */; + productType = "com.apple.product-type.library.static"; + }; + 845DF30C6C93A1F35C6DCEBAFECA8F8A /* image_picker_ios */ = { + isa = PBXNativeTarget; + buildConfigurationList = 5B880EE3869032F8259AEFBB0A656E74 /* Build configuration list for PBXNativeTarget "image_picker_ios" */; + buildPhases = ( + 61CBC4E54636C2621ABA81AD8D848EE0 /* Headers */, + 3CDF1C39688B3E6201228E11384FDCA4 /* Sources */, + 3F713938A0EA00D55E1828FD3B738493 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 5360319D3FB366253352933EDF631BC7 /* PBXTargetDependency */, + E452C4BA3592D2F41E25891DB2D8C8E7 /* PBXTargetDependency */, + ); + name = image_picker_ios; + productName = image_picker_ios; + productReference = 768975E636D1D2FB85622FB67DB04E5A /* image_picker_ios */; + productType = "com.apple.product-type.library.static"; + }; + 8B74B458B450D74B75744B87BD747314 /* Pods-Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = A6F336FF3519C47857372EC19548EAB1 /* Build configuration list for PBXNativeTarget "Pods-Runner" */; + buildPhases = ( + 91D3343BF3CC2D832D4C7CC7CBCF46B5 /* Headers */, + 7C47DE67EA3F18A187D1E7BF6A91B7D7 /* Sources */, + 3F8134C2F82DCA6560431B0D844A29F8 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 7923FE97955F7BF203CD7F5FDC1CC3C4 /* PBXTargetDependency */, + 6FFCAC9544D8DEF0FAEA13605C96C3F3 /* PBXTargetDependency */, + 31254088AE3BB748F33864E7DC7AC330 /* PBXTargetDependency */, + 22C7D9B04C7AC3AD2F0355B583D38394 /* PBXTargetDependency */, + 4E1BFD91DE107EFB4C8176E9978E6F63 /* PBXTargetDependency */, + ); + name = "Pods-Runner"; + productName = "Pods-Runner"; + productReference = 669E8F25E1897672BDB80B7EB784DA24 /* Pods-Runner */; + productType = "com.apple.product-type.library.static"; + }; + 90EC34F1BB6A4F41C55C258475A7E651 /* flutter_zip_archive */ = { + isa = PBXNativeTarget; + buildConfigurationList = 32BFB2019674B7AE1876D4B4B24D5553 /* Build configuration list for PBXNativeTarget "flutter_zip_archive" */; + buildPhases = ( + DC9A979F7047F6865E13B87906336977 /* Headers */, + CB10262DC131B1D9498F3DE235BA8C96 /* Sources */, + 7FE851FEA4B64A032B471684F996BA74 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 1A8885151E3E383947694EBF8B83E4D7 /* PBXTargetDependency */, + B0FA67D12183D71021A6257E19255BE3 /* PBXTargetDependency */, + ); + name = flutter_zip_archive; + productName = flutter_zip_archive; + productReference = 341C2BD787A5690B04A8F1D36334DA98 /* flutter_zip_archive */; + productType = "com.apple.product-type.library.static"; + }; + A450BF39E3E5256209A256E278D71BFD /* image_picker_ios-image_picker_ios_privacy */ = { + isa = PBXNativeTarget; + buildConfigurationList = 141E73221CA08545B6147F4A7A55EFC1 /* Build configuration list for PBXNativeTarget "image_picker_ios-image_picker_ios_privacy" */; + buildPhases = ( + DF0C0CEF7B5564B72097A94F7CF7EE03 /* Sources */, + 4D071340C394C92AD06E860781CA86C2 /* Frameworks */, + E51FD13F35EBC53BDDAF702FC6E9993F /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "image_picker_ios-image_picker_ios_privacy"; + productName = image_picker_ios_privacy; + productReference = F0C7EFBFF01CFAAB52BA74E6CB40CE2C /* image_picker_ios-image_picker_ios_privacy */; + productType = "com.apple.product-type.bundle"; + }; + CACE6618E7996464E38687E13F67D945 /* path_provider_foundation-path_provider_foundation_privacy */ = { + isa = PBXNativeTarget; + buildConfigurationList = E36BFA8FF115BE5EC0C9F37E4B5C3E44 /* Build configuration list for PBXNativeTarget "path_provider_foundation-path_provider_foundation_privacy" */; + buildPhases = ( + EE732A8E6041D847CED54ADBE75459ED /* Sources */, + B3D0BCB641402CFFA762DFCC930BEAF2 /* Frameworks */, + A451DB4D14EED841898FE0F84C598348 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "path_provider_foundation-path_provider_foundation_privacy"; + productName = path_provider_foundation_privacy; + productReference = 3DBD4BADE27F8B91024E4B4B4DD75DB5 /* path_provider_foundation-path_provider_foundation_privacy */; + productType = "com.apple.product-type.bundle"; + }; + F60E38364AFF5E1349FF07415B944396 /* SSZipArchive */ = { + isa = PBXNativeTarget; + buildConfigurationList = 005080B948893987FCCFE8FF88AB389B /* Build configuration list for PBXNativeTarget "SSZipArchive" */; + buildPhases = ( + 222B621D1F9C1B20F20DFA1685AE17BA /* Headers */, + 783280306C9731EE1046B170A19E10B6 /* Sources */, + A23E9B00FB6D769A35A4FA244ACC3313 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = SSZipArchive; + productName = SSZipArchive; + productReference = 91B23470DEB9A986332BEB5034234BC7 /* SSZipArchive */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + BFDFE7DC352907FC980B868725387E98 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1600; + LastUpgradeCheck = 1600; + }; + buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; + compatibilityVersion = "Xcode 12.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + Base, + en, + ); + mainGroup = CF1408CF629C7361332E53B88F7BD30C; + minimizedProjectReferenceProxies = 0; + preferredProjectObjectVersion = 77; + productRefGroup = F2417E9B39050709CD37B4BF8933A8DC /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 1EFDDC32A34D56D411E640A81DCD9E73 /* Flutter */, + 90EC34F1BB6A4F41C55C258475A7E651 /* flutter_zip_archive */, + 845DF30C6C93A1F35C6DCEBAFECA8F8A /* image_picker_ios */, + A450BF39E3E5256209A256E278D71BFD /* image_picker_ios-image_picker_ios_privacy */, + 56F581DDCB0A032454E604885E17AE3C /* path_provider_foundation */, + CACE6618E7996464E38687E13F67D945 /* path_provider_foundation-path_provider_foundation_privacy */, + 8B74B458B450D74B75744B87BD747314 /* Pods-Runner */, + F60E38364AFF5E1349FF07415B944396 /* SSZipArchive */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + A451DB4D14EED841898FE0F84C598348 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 21B10195ABE74EAF434F3F7D47A6D4AE /* PrivacyInfo.xcprivacy in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E51FD13F35EBC53BDDAF702FC6E9993F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B2B03A67A856155E9C97D8789A14DCB0 /* PrivacyInfo.xcprivacy in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 2B0D5E326E9C01E599D12A6FDC0EE7C2 /* Copy generated compatibility header */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h", + "${PODS_ROOT}/Headers/Public/path_provider_foundation/path_provider_foundation.modulemap", + "${PODS_ROOT}/Headers/Public/path_provider_foundation/path_provider_foundation-umbrella.h", + ); + name = "Copy generated compatibility header"; + outputFileListPaths = ( + ); + outputPaths = ( + "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap", + "${BUILT_PRODUCTS_DIR}/path_provider_foundation-umbrella.h", + "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/path_provider_foundation/path_provider_foundation.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/path_provider_foundation/path_provider_foundation-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 3CDF1C39688B3E6201228E11384FDCA4 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ECC89551CC74B2C246409BF811FA7093 /* FLTImagePickerImageUtil.m in Sources */, + 26197AB013F17A90E969D40F21F2E5E7 /* FLTImagePickerMetaDataUtil.m in Sources */, + 55816DD001D0AA0ECB507615972E6B09 /* FLTImagePickerPhotoAssetUtil.m in Sources */, + D19F4D5D0225A7C4347D5771D9F954BD /* FLTImagePickerPlugin.m in Sources */, + EE5381408A40FD39E00B742E7D33269D /* FLTPHPickerSaveImageToPathOperation.m in Sources */, + 60E71E745458AF617C07B8F7F51214BD /* image_picker_ios-dummy.m in Sources */, + 2CFEF86D4F0B45C07E56F11DE92AA58B /* messages.g.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 783280306C9731EE1046B170A19E10B6 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AF351EFE2094088F8790557786CF31F8 /* mz_compat.c in Sources */, + F000C5D6B12A26D2175D104D7734FB2C /* mz_crypt.c in Sources */, + 471E735F2F2DEE1682B67FCDEBD5525B /* mz_crypt_apple.c in Sources */, + 550E15099AECC9BC8F323C48776B4734 /* mz_os.c in Sources */, + 75DCDE92C2AB8A88200BEC7988D31C2C /* mz_os_posix.c in Sources */, + 876816E2BD73E81B54660A2B2602F906 /* mz_strm.c in Sources */, + 8FB2CBCFCAE38820BC13123E51B34E04 /* mz_strm_buf.c in Sources */, + 77B3DAD6979ED9910299B33B1F9A3BFC /* mz_strm_mem.c in Sources */, + 0192BB9B3BC3A59C1D31AD402E61043F /* mz_strm_os_posix.c in Sources */, + 646C51151B4A85B239DC529A58F7C0F4 /* mz_strm_pkcrypt.c in Sources */, + D8F2EA319AB00D3CFA57AD207D813FEF /* mz_strm_split.c in Sources */, + 8BAF240113D4B39583D15B2B2D0EB81E /* mz_strm_wzaes.c in Sources */, + CBB5E1014FBF20396CCC331BEFE8D5AA /* mz_strm_zlib.c in Sources */, + 06B24173AC8ECEDC8E89DFD65AA55B14 /* mz_zip.c in Sources */, + 6C2811D8C830C6F00017A5ED41C14F67 /* mz_zip_rw.c in Sources */, + E552B5094CD15C1C3C072997E6297080 /* SSZipArchive.m in Sources */, + BA6E799C9BE2570442050507F3EDE21F /* SSZipArchive-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7C47DE67EA3F18A187D1E7BF6A91B7D7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + F84C0DCBD29CD0DD24B675C56D0CCD58 /* Pods-Runner-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + CB10262DC131B1D9498F3DE235BA8C96 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8AE8A3427C00305B52EA9D00953E3B98 /* flutter_zip_archive-dummy.m in Sources */, + FCFD96DD03A6347A2ED70D1601A5C4AE /* FlutterZipArchivePlugin.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DF0C0CEF7B5564B72097A94F7CF7EE03 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EE732A8E6041D847CED54ADBE75459ED /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F933F8017C1C37E783A177F4E7848E24 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3C665714AF5342FDE72D5FFBAFA00552 /* messages.g.swift in Sources */, + FFF7B54CBF6B2E14645E5433FB8B1CE3 /* path_provider_foundation-dummy.m in Sources */, + 71896C684AD84CB7F4B06DE4734947FE /* PathProviderPlugin.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 1A8885151E3E383947694EBF8B83E4D7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Flutter; + target = 1EFDDC32A34D56D411E640A81DCD9E73 /* Flutter */; + targetProxy = FF13E394381A8B43931D45A67230039D /* PBXContainerItemProxy */; + }; + 22C7D9B04C7AC3AD2F0355B583D38394 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = image_picker_ios; + target = 845DF30C6C93A1F35C6DCEBAFECA8F8A /* image_picker_ios */; + targetProxy = B4A16B3509BFAB92A7328F84B9DF6B63 /* PBXContainerItemProxy */; + }; + 31254088AE3BB748F33864E7DC7AC330 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = flutter_zip_archive; + target = 90EC34F1BB6A4F41C55C258475A7E651 /* flutter_zip_archive */; + targetProxy = 1C6D73177350C6FA73948AC00A3DA25C /* PBXContainerItemProxy */; + }; + 40E9839A3F8982D20CFD95CC1DEF38F4 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "path_provider_foundation-path_provider_foundation_privacy"; + target = CACE6618E7996464E38687E13F67D945 /* path_provider_foundation-path_provider_foundation_privacy */; + targetProxy = FB666CDF21EB3604328DE9218749F0D6 /* PBXContainerItemProxy */; + }; + 4E1BFD91DE107EFB4C8176E9978E6F63 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = path_provider_foundation; + target = 56F581DDCB0A032454E604885E17AE3C /* path_provider_foundation */; + targetProxy = A3371431D724C1CD78E3CD5695DF82F8 /* PBXContainerItemProxy */; + }; + 5360319D3FB366253352933EDF631BC7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Flutter; + target = 1EFDDC32A34D56D411E640A81DCD9E73 /* Flutter */; + targetProxy = 95AB7DA0A04A84289AAD37E5B981E401 /* PBXContainerItemProxy */; + }; + 6FFCAC9544D8DEF0FAEA13605C96C3F3 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = SSZipArchive; + target = F60E38364AFF5E1349FF07415B944396 /* SSZipArchive */; + targetProxy = 5277806C7E4F7A9929BCBABEF8C31608 /* PBXContainerItemProxy */; + }; + 7923FE97955F7BF203CD7F5FDC1CC3C4 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Flutter; + target = 1EFDDC32A34D56D411E640A81DCD9E73 /* Flutter */; + targetProxy = 7505BF6DFD02F82267E2AED7E06DEB34 /* PBXContainerItemProxy */; + }; + B0FA67D12183D71021A6257E19255BE3 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = SSZipArchive; + target = F60E38364AFF5E1349FF07415B944396 /* SSZipArchive */; + targetProxy = 9FBF5A48CDF9B6D8C0AC4CEC488976EB /* PBXContainerItemProxy */; + }; + B3D42755DACDDDFBB17111C10A301D86 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Flutter; + target = 1EFDDC32A34D56D411E640A81DCD9E73 /* Flutter */; + targetProxy = 5352423135DFD0ED0C0AB93CA143E1AE /* PBXContainerItemProxy */; + }; + E452C4BA3592D2F41E25891DB2D8C8E7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "image_picker_ios-image_picker_ios_privacy"; + target = A450BF39E3E5256209A256E278D71BFD /* image_picker_ios-image_picker_ios_privacy */; + targetProxy = FD6C345D0107FBC705F3DEA05839FC5A /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 03C2C2C858DA703836C5C5AE6CAB8770 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 4CC30F89F4EA2AD764170CD84C70E5E1 /* path_provider_foundation.release.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + ENABLE_BITCODE = NO; + ENABLE_MODULE_VERIFIER = NO; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + "EXCLUDED_ARCHS[sdk=iphoneos*]" = "$(inherited) armv7"; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "$(inherited) i386"; + "FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]" = ( + "\"/Users/william/dev/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64\"", + "$(inherited)", + ); + "FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]" = ( + "\"/Users/william/dev/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64_x86_64-simulator\"", + "$(inherited)", + ); + GCC_PREFIX_HEADER = "Target Support Files/path_provider_foundation/path_provider_foundation-prefix.pch"; + GENERATE_INFOPLIST_FILE = NO; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MODULEMAP_FILE = Headers/Public/path_provider_foundation/path_provider_foundation.modulemap; + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + Flutter, + ); + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = path_provider_foundation; + PRODUCT_NAME = path_provider_foundation; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_INSTALL_OBJC_HEADER = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + "VALID_ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD)"; + }; + name = Release; + }; + 06A8ADFC21B5D8D7339269BAD24145C3 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = B18DD32EAE0DE5C4F096D91B809FD483 /* path_provider_foundation.debug.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + ENABLE_BITCODE = NO; + ENABLE_MODULE_VERIFIER = NO; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + "EXCLUDED_ARCHS[sdk=iphoneos*]" = "$(inherited) armv7"; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "$(inherited) i386"; + "FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]" = ( + "\"/Users/william/dev/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework/ios-arm64\"", + "$(inherited)", + ); + "FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]" = ( + "\"/Users/william/dev/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework/ios-arm64_x86_64-simulator\"", + "$(inherited)", + ); + GCC_PREFIX_HEADER = "Target Support Files/path_provider_foundation/path_provider_foundation-prefix.pch"; + GENERATE_INFOPLIST_FILE = NO; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MODULEMAP_FILE = Headers/Public/path_provider_foundation/path_provider_foundation.modulemap; + ONLY_ACTIVE_ARCH = NO; + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + Flutter, + ); + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = path_provider_foundation; + PRODUCT_NAME = path_provider_foundation; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_INSTALL_OBJC_HEADER = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + "VALID_ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD)"; + }; + name = Debug; + }; + 1E8B0F6E1BD9FD7D7A2E2D84E0F8344E /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = B18DD32EAE0DE5C4F096D91B809FD483 /* path_provider_foundation.debug.xcconfig */; + buildSettings = { + CODE_SIGNING_ALLOWED = NO; + CODE_SIGNING_IDENTITY = "-"; + CODE_SIGNING_REQUIRED = NO; + CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/path_provider_foundation"; + EXPANDED_CODE_SIGN_IDENTITY = "-"; + IBSC_MODULE = path_provider_foundation; + INFOPLIST_FILE = "Target Support Files/path_provider_foundation/ResourceBundle-path_provider_foundation_privacy-path_provider_foundation-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + ONLY_ACTIVE_ARCH = NO; + PRODUCT_NAME = path_provider_foundation_privacy; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + WRAPPER_EXTENSION = bundle; + }; + name = Debug; + }; + 23EA69A07D0FC5E283A081AF03775A8D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F98D0085EF3B9B9109CBC5C64C58BBDF /* SSZipArchive.release.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + ENABLE_MODULE_VERIFIER = NO; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_PREFIX_HEADER = "Target Support Files/SSZipArchive/SSZipArchive-prefix.pch"; + GENERATE_INFOPLIST_FILE = NO; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MODULEMAP_FILE = Headers/Public/SSZipArchive/SSZipArchive.modulemap; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = SSZipArchive; + PRODUCT_NAME = SSZipArchive; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_INSTALL_OBJC_HEADER = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 2B9E26EAE2CD392AD762421F663075A1 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRIP_INSTALLED_PRODUCT = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; + 49F92FA6CE93BF7DDA16306C80D69CE1 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 2299047366EA7545B2EAF71D0FB66359 /* flutter_zip_archive.debug.xcconfig */; + buildSettings = { + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + ENABLE_BITCODE = NO; + ENABLE_MODULE_VERIFIER = NO; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + "EXCLUDED_ARCHS[sdk=iphoneos*]" = "$(inherited) armv7"; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "$(inherited) i386"; + "FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]" = ( + "\"/Users/william/dev/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework/ios-arm64\"", + "$(inherited)", + ); + "FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]" = ( + "\"/Users/william/dev/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework/ios-arm64_x86_64-simulator\"", + "$(inherited)", + ); + GCC_PREFIX_HEADER = "Target Support Files/flutter_zip_archive/flutter_zip_archive-prefix.pch"; + GENERATE_INFOPLIST_FILE = NO; + ONLY_ACTIVE_ARCH = NO; + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + Flutter, + ); + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = flutter_zip_archive; + PRODUCT_NAME = flutter_zip_archive; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_INSTALL_OBJC_HEADER = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + "VALID_ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD)"; + }; + name = Debug; + }; + 53C02DA0C92ECAD41A6C0C3FE4A4AE89 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 4CC30F89F4EA2AD764170CD84C70E5E1 /* path_provider_foundation.release.xcconfig */; + buildSettings = { + CODE_SIGNING_ALLOWED = NO; + CODE_SIGNING_IDENTITY = "-"; + CODE_SIGNING_REQUIRED = NO; + CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/path_provider_foundation"; + EXPANDED_CODE_SIGN_IDENTITY = "-"; + IBSC_MODULE = path_provider_foundation; + INFOPLIST_FILE = "Target Support Files/path_provider_foundation/ResourceBundle-path_provider_foundation_privacy-path_provider_foundation-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + PRODUCT_NAME = path_provider_foundation_privacy; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + WRAPPER_EXTENSION = bundle; + }; + name = Release; + }; + 55564A5995DF7967D1A36E2BD095BAFC /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F9D86489E6638235A6B5928C4F86E442 /* Pods-Runner.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CLANG_ENABLE_OBJC_WEAK = NO; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + ENABLE_BITCODE = NO; + ENABLE_MODULE_VERIFIER = NO; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + "EXCLUDED_ARCHS[sdk=iphoneos*]" = "$(inherited) armv7"; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "$(inherited) i386"; + "FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]" = ( + "\"/Users/william/dev/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64\"", + "$(inherited)", + ); + "FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]" = ( + "\"/Users/william/dev/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64_x86_64-simulator\"", + "$(inherited)", + ); + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-Runner/Pods-Runner.modulemap"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + Flutter, + ); + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + "VALID_ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD)"; + }; + name = Release; + }; + 5AF1AC88E5F655C93D1E3B5012F6FDC8 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_PROFILE=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRIP_INSTALLED_PRODUCT = NO; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 5.0; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Profile; + }; + 604CAC68347BB5069C15EBD08CD7E2B2 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E3BC2E4F8C93222C90102645FA30BA6D /* image_picker_ios.release.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + ENABLE_BITCODE = NO; + ENABLE_MODULE_VERIFIER = NO; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + "EXCLUDED_ARCHS[sdk=iphoneos*]" = "$(inherited) armv7"; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "$(inherited) i386"; + "FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]" = ( + "\"/Users/william/dev/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64\"", + "$(inherited)", + ); + "FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]" = ( + "\"/Users/william/dev/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64_x86_64-simulator\"", + "$(inherited)", + ); + GCC_PREFIX_HEADER = "Target Support Files/image_picker_ios/image_picker_ios-prefix.pch"; + GENERATE_INFOPLIST_FILE = NO; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MODULEMAP_FILE = Headers/Private/image_picker_ios/image_picker_ios.modulemap; + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + Flutter, + ); + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = image_picker_ios; + PRODUCT_NAME = image_picker_ios; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_INSTALL_OBJC_HEADER = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + "VALID_ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD)"; + }; + name = Profile; + }; + 6126B6CC09C1037CA3FF87CF43AC319C /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E3BC2E4F8C93222C90102645FA30BA6D /* image_picker_ios.release.xcconfig */; + buildSettings = { + CODE_SIGNING_ALLOWED = NO; + CODE_SIGNING_IDENTITY = "-"; + CODE_SIGNING_REQUIRED = NO; + CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/image_picker_ios"; + EXPANDED_CODE_SIGN_IDENTITY = "-"; + IBSC_MODULE = image_picker_ios; + INFOPLIST_FILE = "Target Support Files/image_picker_ios/ResourceBundle-image_picker_ios_privacy-image_picker_ios-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + PRODUCT_NAME = image_picker_ios_privacy; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + WRAPPER_EXTENSION = bundle; + }; + name = Release; + }; + 63FAF33E1C55B71A5F5A8B3CC8749F99 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_RELEASE=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRIP_INSTALLED_PRODUCT = NO; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 5.0; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Release; + }; + 6E21DD5B4EA5A8BE990FF477061EC64E /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E3BC2E4F8C93222C90102645FA30BA6D /* image_picker_ios.release.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + ENABLE_BITCODE = NO; + ENABLE_MODULE_VERIFIER = NO; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + "EXCLUDED_ARCHS[sdk=iphoneos*]" = "$(inherited) armv7"; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "$(inherited) i386"; + "FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]" = ( + "\"/Users/william/dev/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64\"", + "$(inherited)", + ); + "FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]" = ( + "\"/Users/william/dev/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64_x86_64-simulator\"", + "$(inherited)", + ); + GCC_PREFIX_HEADER = "Target Support Files/image_picker_ios/image_picker_ios-prefix.pch"; + GENERATE_INFOPLIST_FILE = NO; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MODULEMAP_FILE = Headers/Private/image_picker_ios/image_picker_ios.modulemap; + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + Flutter, + ); + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = image_picker_ios; + PRODUCT_NAME = image_picker_ios; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_INSTALL_OBJC_HEADER = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + "VALID_ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD)"; + }; + name = Release; + }; + 7056DBD584B8196073F85D3B74DC62BB /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 4CC30F89F4EA2AD764170CD84C70E5E1 /* path_provider_foundation.release.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + ENABLE_BITCODE = NO; + ENABLE_MODULE_VERIFIER = NO; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + "EXCLUDED_ARCHS[sdk=iphoneos*]" = "$(inherited) armv7"; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "$(inherited) i386"; + "FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]" = ( + "\"/Users/william/dev/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64\"", + "$(inherited)", + ); + "FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]" = ( + "\"/Users/william/dev/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64_x86_64-simulator\"", + "$(inherited)", + ); + GCC_PREFIX_HEADER = "Target Support Files/path_provider_foundation/path_provider_foundation-prefix.pch"; + GENERATE_INFOPLIST_FILE = NO; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MODULEMAP_FILE = Headers/Public/path_provider_foundation/path_provider_foundation.modulemap; + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + Flutter, + ); + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = path_provider_foundation; + PRODUCT_NAME = path_provider_foundation; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_INSTALL_OBJC_HEADER = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + "VALID_ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD)"; + }; + name = Profile; + }; + 70F1E3D053D812E3D7E8E74934CC9053 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 2385FC5B4FBB60D7FA9CCDDE76795971 /* Flutter.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CLANG_ENABLE_OBJC_WEAK = NO; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + ONLY_ACTIVE_ARCH = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 76E053E47C7357CFF4EA96DF8337031F /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 4FE1C6CD74E6C15C72E75C3C1FEA98BB /* Flutter.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CLANG_ENABLE_OBJC_WEAK = NO; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 7FA3B6A53C0307938616EF71011BED8F /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 53AF3AF6DD7CF1B1E6D7C60883746A1A /* Pods-Runner.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CLANG_ENABLE_OBJC_WEAK = NO; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + ENABLE_BITCODE = NO; + ENABLE_MODULE_VERIFIER = NO; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + "EXCLUDED_ARCHS[sdk=iphoneos*]" = "$(inherited) armv7"; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "$(inherited) i386"; + "FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]" = ( + "\"/Users/william/dev/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework/ios-arm64\"", + "$(inherited)", + ); + "FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]" = ( + "\"/Users/william/dev/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework/ios-arm64_x86_64-simulator\"", + "$(inherited)", + ); + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-Runner/Pods-Runner.modulemap"; + ONLY_ACTIVE_ARCH = NO; + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + Flutter, + ); + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + "VALID_ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD)"; + }; + name = Debug; + }; + 9F19BB11585FF1A946F5FC799C5C12E5 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 4CC30F89F4EA2AD764170CD84C70E5E1 /* path_provider_foundation.release.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGNING_ALLOWED = NO; + CODE_SIGNING_IDENTITY = "-"; + CODE_SIGNING_REQUIRED = NO; + CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/path_provider_foundation"; + EXPANDED_CODE_SIGN_IDENTITY = "-"; + IBSC_MODULE = path_provider_foundation; + INFOPLIST_FILE = "Target Support Files/path_provider_foundation/ResourceBundle-path_provider_foundation_privacy-path_provider_foundation-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + PRODUCT_NAME = path_provider_foundation_privacy; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + WRAPPER_EXTENSION = bundle; + }; + name = Profile; + }; + A4B090C63F1D344BD8853CEF2DBE83DF /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = F98D0085EF3B9B9109CBC5C64C58BBDF /* SSZipArchive.release.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + ENABLE_MODULE_VERIFIER = NO; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_PREFIX_HEADER = "Target Support Files/SSZipArchive/SSZipArchive-prefix.pch"; + GENERATE_INFOPLIST_FILE = NO; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MODULEMAP_FILE = Headers/Public/SSZipArchive/SSZipArchive.modulemap; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = SSZipArchive; + PRODUCT_NAME = SSZipArchive; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_INSTALL_OBJC_HEADER = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + AA09EBB112E91AEA7286986E224CA0A1 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E3BC2E4F8C93222C90102645FA30BA6D /* image_picker_ios.release.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + CODE_SIGNING_ALLOWED = NO; + CODE_SIGNING_IDENTITY = "-"; + CODE_SIGNING_REQUIRED = NO; + CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/image_picker_ios"; + EXPANDED_CODE_SIGN_IDENTITY = "-"; + IBSC_MODULE = image_picker_ios; + INFOPLIST_FILE = "Target Support Files/image_picker_ios/ResourceBundle-image_picker_ios_privacy-image_picker_ios-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + PRODUCT_NAME = image_picker_ios_privacy; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + WRAPPER_EXTENSION = bundle; + }; + name = Profile; + }; + B2CEAD07B5F5486F6FB9F29277041E5E /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = A3B27A72CBE2C688B0471E28255E900C /* SSZipArchive.debug.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + ENABLE_MODULE_VERIFIER = NO; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_PREFIX_HEADER = "Target Support Files/SSZipArchive/SSZipArchive-prefix.pch"; + GENERATE_INFOPLIST_FILE = NO; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MODULEMAP_FILE = Headers/Public/SSZipArchive/SSZipArchive.modulemap; + ONLY_ACTIVE_ARCH = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = SSZipArchive; + PRODUCT_NAME = SSZipArchive; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_INSTALL_OBJC_HEADER = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + B60D6D9B99547026EDE222EAEEA8E652 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7F76DED38DDBDEDE2413B263B130FF71 /* flutter_zip_archive.release.xcconfig */; + buildSettings = { + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + ENABLE_BITCODE = NO; + ENABLE_MODULE_VERIFIER = NO; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + "EXCLUDED_ARCHS[sdk=iphoneos*]" = "$(inherited) armv7"; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "$(inherited) i386"; + "FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]" = ( + "\"/Users/william/dev/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64\"", + "$(inherited)", + ); + "FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]" = ( + "\"/Users/william/dev/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64_x86_64-simulator\"", + "$(inherited)", + ); + GCC_PREFIX_HEADER = "Target Support Files/flutter_zip_archive/flutter_zip_archive-prefix.pch"; + GENERATE_INFOPLIST_FILE = NO; + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + Flutter, + ); + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = flutter_zip_archive; + PRODUCT_NAME = flutter_zip_archive; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_INSTALL_OBJC_HEADER = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + "VALID_ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD)"; + }; + name = Release; + }; + B98074557765BD39463EF2359AB155A3 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7F76DED38DDBDEDE2413B263B130FF71 /* flutter_zip_archive.release.xcconfig */; + buildSettings = { + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + ENABLE_BITCODE = NO; + ENABLE_MODULE_VERIFIER = NO; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + "EXCLUDED_ARCHS[sdk=iphoneos*]" = "$(inherited) armv7"; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "$(inherited) i386"; + "FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]" = ( + "\"/Users/william/dev/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64\"", + "$(inherited)", + ); + "FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]" = ( + "\"/Users/william/dev/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64_x86_64-simulator\"", + "$(inherited)", + ); + GCC_PREFIX_HEADER = "Target Support Files/flutter_zip_archive/flutter_zip_archive-prefix.pch"; + GENERATE_INFOPLIST_FILE = NO; + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + Flutter, + ); + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = flutter_zip_archive; + PRODUCT_NAME = flutter_zip_archive; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_INSTALL_OBJC_HEADER = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + "VALID_ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD)"; + }; + name = Profile; + }; + BCD56993E292B885BC95CCEA7D9EEC4E /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3D4D3DC9F2C625816586F125624834D0 /* image_picker_ios.debug.xcconfig */; + buildSettings = { + CODE_SIGNING_ALLOWED = NO; + CODE_SIGNING_IDENTITY = "-"; + CODE_SIGNING_REQUIRED = NO; + CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/image_picker_ios"; + EXPANDED_CODE_SIGN_IDENTITY = "-"; + IBSC_MODULE = image_picker_ios; + INFOPLIST_FILE = "Target Support Files/image_picker_ios/ResourceBundle-image_picker_ios_privacy-image_picker_ios-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + ONLY_ACTIVE_ARCH = NO; + PRODUCT_NAME = image_picker_ios_privacy; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + WRAPPER_EXTENSION = bundle; + }; + name = Debug; + }; + C8B9562D5DE5582809D6D532A59DAB38 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3D4D3DC9F2C625816586F125624834D0 /* image_picker_ios.debug.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + ENABLE_BITCODE = NO; + ENABLE_MODULE_VERIFIER = NO; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + "EXCLUDED_ARCHS[sdk=iphoneos*]" = "$(inherited) armv7"; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "$(inherited) i386"; + "FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]" = ( + "\"/Users/william/dev/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework/ios-arm64\"", + "$(inherited)", + ); + "FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]" = ( + "\"/Users/william/dev/flutter/bin/cache/artifacts/engine/ios/Flutter.xcframework/ios-arm64_x86_64-simulator\"", + "$(inherited)", + ); + GCC_PREFIX_HEADER = "Target Support Files/image_picker_ios/image_picker_ios-prefix.pch"; + GENERATE_INFOPLIST_FILE = NO; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MODULEMAP_FILE = Headers/Private/image_picker_ios/image_picker_ios.modulemap; + ONLY_ACTIVE_ARCH = NO; + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + Flutter, + ); + OTHER_LIBTOOLFLAGS = ""; + PRIVATE_HEADERS_FOLDER_PATH = ""; + PRODUCT_MODULE_NAME = image_picker_ios; + PRODUCT_NAME = image_picker_ios; + PUBLIC_HEADERS_FOLDER_PATH = ""; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_INSTALL_OBJC_HEADER = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + "VALID_ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD)"; + }; + name = Debug; + }; + E46E3C835464CCAA801C31C1B1216B80 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = EBE9BF3E22F65735A1D716F2DBFBA401 /* Pods-Runner.profile.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CLANG_ENABLE_OBJC_WEAK = NO; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + ENABLE_BITCODE = NO; + ENABLE_MODULE_VERIFIER = NO; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + "EXCLUDED_ARCHS[sdk=iphoneos*]" = "$(inherited) armv7"; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "$(inherited) i386"; + "FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]" = ( + "\"/Users/william/dev/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64\"", + "$(inherited)", + ); + "FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]" = ( + "\"/Users/william/dev/flutter/bin/cache/artifacts/engine/ios-release/Flutter.xcframework/ios-arm64_x86_64-simulator\"", + "$(inherited)", + ); + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-Runner/Pods-Runner.modulemap"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-framework", + Flutter, + ); + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + "VALID_ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD)"; + }; + name = Profile; + }; + FB4B781D3E4B2E85C6448C7B77E40A53 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 4FE1C6CD74E6C15C72E75C3C1FEA98BB /* Flutter.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CLANG_ENABLE_OBJC_WEAK = NO; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 005080B948893987FCCFE8FF88AB389B /* Build configuration list for PBXNativeTarget "SSZipArchive" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + B2CEAD07B5F5486F6FB9F29277041E5E /* Debug */, + A4B090C63F1D344BD8853CEF2DBE83DF /* Profile */, + 23EA69A07D0FC5E283A081AF03775A8D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 137DF6EB8A85C6355521BB058DBA254A /* Build configuration list for PBXNativeTarget "path_provider_foundation" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 06A8ADFC21B5D8D7339269BAD24145C3 /* Debug */, + 7056DBD584B8196073F85D3B74DC62BB /* Profile */, + 03C2C2C858DA703836C5C5AE6CAB8770 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 141E73221CA08545B6147F4A7A55EFC1 /* Build configuration list for PBXNativeTarget "image_picker_ios-image_picker_ios_privacy" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + BCD56993E292B885BC95CCEA7D9EEC4E /* Debug */, + AA09EBB112E91AEA7286986E224CA0A1 /* Profile */, + 6126B6CC09C1037CA3FF87CF43AC319C /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 32BFB2019674B7AE1876D4B4B24D5553 /* Build configuration list for PBXNativeTarget "flutter_zip_archive" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 49F92FA6CE93BF7DDA16306C80D69CE1 /* Debug */, + B98074557765BD39463EF2359AB155A3 /* Profile */, + B60D6D9B99547026EDE222EAEEA8E652 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2B9E26EAE2CD392AD762421F663075A1 /* Debug */, + 5AF1AC88E5F655C93D1E3B5012F6FDC8 /* Profile */, + 63FAF33E1C55B71A5F5A8B3CC8749F99 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 5B880EE3869032F8259AEFBB0A656E74 /* Build configuration list for PBXNativeTarget "image_picker_ios" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C8B9562D5DE5582809D6D532A59DAB38 /* Debug */, + 604CAC68347BB5069C15EBD08CD7E2B2 /* Profile */, + 6E21DD5B4EA5A8BE990FF477061EC64E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 94078A06C17E946ADC1F2C06726219E5 /* Build configuration list for PBXAggregateTarget "Flutter" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 70F1E3D053D812E3D7E8E74934CC9053 /* Debug */, + 76E053E47C7357CFF4EA96DF8337031F /* Profile */, + FB4B781D3E4B2E85C6448C7B77E40A53 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A6F336FF3519C47857372EC19548EAB1 /* Build configuration list for PBXNativeTarget "Pods-Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7FA3B6A53C0307938616EF71011BED8F /* Debug */, + E46E3C835464CCAA801C31C1B1216B80 /* Profile */, + 55564A5995DF7967D1A36E2BD095BAFC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E36BFA8FF115BE5EC0C9F37E4B5C3E44 /* Build configuration list for PBXNativeTarget "path_provider_foundation-path_provider_foundation_privacy" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1E8B0F6E1BD9FD7D7A2E2D84E0F8344E /* Debug */, + 9F19BB11585FF1A946F5FC799C5C12E5 /* Profile */, + 53C02DA0C92ECAD41A6C0C3FE4A4AE89 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; +} diff --git a/example/ios/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Flutter.xcscheme b/example/ios/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Flutter.xcscheme new file mode 100644 index 0000000..0461e6a --- /dev/null +++ b/example/ios/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Flutter.xcscheme @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/ios/Pods/Pods.xcodeproj/xcshareddata/xcschemes/flutter_zip_archive.xcscheme b/example/ios/Pods/Pods.xcodeproj/xcshareddata/xcschemes/flutter_zip_archive.xcscheme new file mode 100644 index 0000000..b507546 --- /dev/null +++ b/example/ios/Pods/Pods.xcodeproj/xcshareddata/xcschemes/flutter_zip_archive.xcscheme @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/ios/Pods/Pods.xcodeproj/xcuserdata/william.xcuserdatad/xcschemes/Flutter.xcscheme b/example/ios/Pods/Pods.xcodeproj/xcuserdata/william.xcuserdatad/xcschemes/Flutter.xcscheme new file mode 100644 index 0000000..efb76cc --- /dev/null +++ b/example/ios/Pods/Pods.xcodeproj/xcuserdata/william.xcuserdatad/xcschemes/Flutter.xcscheme @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/ios/Pods/Pods.xcodeproj/xcuserdata/william.xcuserdatad/xcschemes/Pods-Runner.xcscheme b/example/ios/Pods/Pods.xcodeproj/xcuserdata/william.xcuserdatad/xcschemes/Pods-Runner.xcscheme new file mode 100644 index 0000000..79fafd1 --- /dev/null +++ b/example/ios/Pods/Pods.xcodeproj/xcuserdata/william.xcuserdatad/xcschemes/Pods-Runner.xcscheme @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/ios/Pods/Pods.xcodeproj/xcuserdata/william.xcuserdatad/xcschemes/SSZipArchive.xcscheme b/example/ios/Pods/Pods.xcodeproj/xcuserdata/william.xcuserdatad/xcschemes/SSZipArchive.xcscheme new file mode 100644 index 0000000..3df68ec --- /dev/null +++ b/example/ios/Pods/Pods.xcodeproj/xcuserdata/william.xcuserdatad/xcschemes/SSZipArchive.xcscheme @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/ios/Pods/Pods.xcodeproj/xcuserdata/william.xcuserdatad/xcschemes/flutter_zip_archive.xcscheme b/example/ios/Pods/Pods.xcodeproj/xcuserdata/william.xcuserdatad/xcschemes/flutter_zip_archive.xcscheme new file mode 100644 index 0000000..38c9eab --- /dev/null +++ b/example/ios/Pods/Pods.xcodeproj/xcuserdata/william.xcuserdatad/xcschemes/flutter_zip_archive.xcscheme @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/ios/Pods/Pods.xcodeproj/xcuserdata/william.xcuserdatad/xcschemes/image_picker_ios-image_picker_ios_privacy.xcscheme b/example/ios/Pods/Pods.xcodeproj/xcuserdata/william.xcuserdatad/xcschemes/image_picker_ios-image_picker_ios_privacy.xcscheme new file mode 100644 index 0000000..95a7ce1 --- /dev/null +++ b/example/ios/Pods/Pods.xcodeproj/xcuserdata/william.xcuserdatad/xcschemes/image_picker_ios-image_picker_ios_privacy.xcscheme @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/ios/Pods/Pods.xcodeproj/xcuserdata/william.xcuserdatad/xcschemes/image_picker_ios.xcscheme b/example/ios/Pods/Pods.xcodeproj/xcuserdata/william.xcuserdatad/xcschemes/image_picker_ios.xcscheme new file mode 100644 index 0000000..5858e18 --- /dev/null +++ b/example/ios/Pods/Pods.xcodeproj/xcuserdata/william.xcuserdatad/xcschemes/image_picker_ios.xcscheme @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/ios/Pods/Pods.xcodeproj/xcuserdata/william.xcuserdatad/xcschemes/path_provider_foundation-path_provider_foundation_privacy.xcscheme b/example/ios/Pods/Pods.xcodeproj/xcuserdata/william.xcuserdatad/xcschemes/path_provider_foundation-path_provider_foundation_privacy.xcscheme new file mode 100644 index 0000000..9caa789 --- /dev/null +++ b/example/ios/Pods/Pods.xcodeproj/xcuserdata/william.xcuserdatad/xcschemes/path_provider_foundation-path_provider_foundation_privacy.xcscheme @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/ios/Pods/Pods.xcodeproj/xcuserdata/william.xcuserdatad/xcschemes/path_provider_foundation.xcscheme b/example/ios/Pods/Pods.xcodeproj/xcuserdata/william.xcuserdatad/xcschemes/path_provider_foundation.xcscheme new file mode 100644 index 0000000..6ea46c6 --- /dev/null +++ b/example/ios/Pods/Pods.xcodeproj/xcuserdata/william.xcuserdatad/xcschemes/path_provider_foundation.xcscheme @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/ios/Pods/Pods.xcodeproj/xcuserdata/william.xcuserdatad/xcschemes/xcschememanagement.plist b/example/ios/Pods/Pods.xcodeproj/xcuserdata/william.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..25284e7 --- /dev/null +++ b/example/ios/Pods/Pods.xcodeproj/xcuserdata/william.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,92 @@ + + + + + SchemeUserState + + Flutter.xcscheme + + isShown + + orderHint + 0 + + Flutter.xcscheme_^#shared#^_ + + isShown + + orderHint + 8 + + Pods-Runner.xcscheme + + isShown + + orderHint + 6 + + SSZipArchive.xcscheme + + isShown + + orderHint + 7 + + flutter_zip_archive.xcscheme + + isShown + + orderHint + 1 + + flutter_zip_archive.xcscheme_^#shared#^_ + + isShown + + orderHint + 9 + + image_picker_ios-image_picker_ios_privacy.xcscheme + + isShown + + orderHint + 3 + + image_picker_ios.xcscheme + + isShown + + orderHint + 2 + + path_provider_foundation-path_provider_foundation_privacy.xcscheme + + isShown + + orderHint + 5 + + path_provider_foundation.xcscheme + + isShown + + orderHint + 4 + + + SuppressBuildableAutocreation + + 1EFDDC32A34D56D411E640A81DCD9E73 + + primary + + + 90EC34F1BB6A4F41C55C258475A7E651 + + primary + + + + + diff --git a/example/ios/Pods/SSZipArchive/LICENSE.txt b/example/ios/Pods/SSZipArchive/LICENSE.txt new file mode 100644 index 0000000..1cc4a4a --- /dev/null +++ b/example/ios/Pods/SSZipArchive/LICENSE.txt @@ -0,0 +1,20 @@ +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/ios/Pods/SSZipArchive/README.md b/example/ios/Pods/SSZipArchive/README.md new file mode 100644 index 0000000..7e038c3 --- /dev/null +++ b/example/ios/Pods/SSZipArchive/README.md @@ -0,0 +1,88 @@ +[![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/ios/Pods/SSZipArchive/SSZipArchive/SSZipArchive.h b/example/ios/Pods/SSZipArchive/SSZipArchive/SSZipArchive.h new file mode 100644 index 0000000..242b9a7 --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/SSZipArchive.h @@ -0,0 +1,165 @@ +// +// 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/ios/Pods/SSZipArchive/SSZipArchive/SSZipArchive.m b/example/ios/Pods/SSZipArchive/SSZipArchive/SSZipArchive.m new file mode 100644 index 0000000..7184d10 --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/SSZipArchive.m @@ -0,0 +1,1433 @@ +// +// 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/ios/Pods/SSZipArchive/SSZipArchive/SSZipCommon.h b/example/ios/Pods/SSZipArchive/SSZipArchive/SSZipCommon.h new file mode 100644 index 0000000..78fa282 --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/SSZipCommon.h @@ -0,0 +1,68 @@ +#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/ios/Pods/SSZipArchive/SSZipArchive/include/ZipArchive.h b/example/ios/Pods/SSZipArchive/SSZipArchive/include/ZipArchive.h new file mode 100644 index 0000000..e81fc9b --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/include/ZipArchive.h @@ -0,0 +1,25 @@ +// +// 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/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz.h b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz.h new file mode 100644 index 0000000..82a14a2 --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz.h @@ -0,0 +1,274 @@ +/* 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/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_compat.c b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_compat.c new file mode 100644 index 0000000..759e30b --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_compat.c @@ -0,0 +1,991 @@ +/* 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/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_compat.h b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_compat.h new file mode 100644 index 0000000..3253eb9 --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_compat.h @@ -0,0 +1,250 @@ +/* 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/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_crypt.c b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_crypt.c new file mode 100644 index 0000000..dd2cd42 --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_crypt.c @@ -0,0 +1,196 @@ +/* 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/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_crypt.h b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_crypt.h new file mode 100644 index 0000000..59a193c --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_crypt.h @@ -0,0 +1,65 @@ +/* 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/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_crypt_apple.c b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_crypt_apple.c new file mode 100644 index 0000000..4519753 --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_crypt_apple.c @@ -0,0 +1,487 @@ +/* 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/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_os.c b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_os.c new file mode 100644 index 0000000..f96befe --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_os.c @@ -0,0 +1,354 @@ +/* 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/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_os.h b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_os.h new file mode 100644 index 0000000..b3e2a58 --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_os.h @@ -0,0 +1,175 @@ +/* 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/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_os_posix.c b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_os_posix.c new file mode 100644 index 0000000..576943d --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_os_posix.c @@ -0,0 +1,367 @@ +/* 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/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm.c b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm.c new file mode 100644 index 0000000..da7d587 --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm.c @@ -0,0 +1,560 @@ +/* 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/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm.h b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm.h new file mode 100644 index 0000000..8b0027c --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm.h @@ -0,0 +1,132 @@ +/* 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/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_buf.c b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_buf.c new file mode 100644 index 0000000..1dfdfdf --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_buf.c @@ -0,0 +1,385 @@ +/* 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/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_buf.h b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_buf.h new file mode 100644 index 0000000..b71e6e4 --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_buf.h @@ -0,0 +1,42 @@ +/* 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/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_mem.c b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_mem.c new file mode 100644 index 0000000..f4a882d --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_mem.c @@ -0,0 +1,272 @@ +/* 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/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_mem.h b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_mem.h new file mode 100644 index 0000000..5bfa13d --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_mem.h @@ -0,0 +1,48 @@ +/* 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/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_os.h b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_os.h new file mode 100644 index 0000000..614e255 --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_os.h @@ -0,0 +1,40 @@ +/* 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/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_os_posix.c b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_os_posix.c new file mode 100644 index 0000000..f0b5bd3 --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_os_posix.c @@ -0,0 +1,206 @@ +/* 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/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_pkcrypt.c b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_pkcrypt.c new file mode 100644 index 0000000..41c762f --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_pkcrypt.c @@ -0,0 +1,338 @@ +/* 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/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_pkcrypt.h b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_pkcrypt.h new file mode 100644 index 0000000..453f1f9 --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_pkcrypt.h @@ -0,0 +1,46 @@ +/* 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/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_split.c b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_split.c new file mode 100644 index 0000000..12c8bda --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_split.c @@ -0,0 +1,438 @@ +/* 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/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_split.h b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_split.h new file mode 100644 index 0000000..da404da --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_split.h @@ -0,0 +1,43 @@ +/* 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/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_wzaes.c b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_wzaes.c new file mode 100644 index 0000000..fd01199 --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_wzaes.c @@ -0,0 +1,362 @@ +/* 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/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_wzaes.h b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_wzaes.h new file mode 100644 index 0000000..e27f112 --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_wzaes.h @@ -0,0 +1,46 @@ +/* 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/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_zlib.c b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_zlib.c new file mode 100644 index 0000000..e83bbac --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_zlib.c @@ -0,0 +1,393 @@ +/* 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/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_zlib.h b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_zlib.h new file mode 100644 index 0000000..47f7480 --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_strm_zlib.h @@ -0,0 +1,43 @@ +/* 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/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_zip.c b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_zip.c new file mode 100644 index 0000000..cc4f57d --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_zip.c @@ -0,0 +1,2771 @@ +/* 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/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_zip.h b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_zip.h new file mode 100644 index 0000000..e3d1fbd --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_zip.h @@ -0,0 +1,259 @@ +/* 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/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_zip_rw.c b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_zip_rw.c new file mode 100644 index 0000000..464e559 --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_zip_rw.c @@ -0,0 +1,1943 @@ +/* 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/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_zip_rw.h b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_zip_rw.h new file mode 100644 index 0000000..e507f94 --- /dev/null +++ b/example/ios/Pods/SSZipArchive/SSZipArchive/minizip/mz_zip_rw.h @@ -0,0 +1,285 @@ +/* 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/ios/Pods/Target Support Files/Flutter/Flutter.debug.xcconfig b/example/ios/Pods/Target Support Files/Flutter/Flutter.debug.xcconfig new file mode 100644 index 0000000..1d192c5 --- /dev/null +++ b/example/ios/Pods/Target Support Files/Flutter/Flutter.debug.xcconfig @@ -0,0 +1,12 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Flutter +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +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}/../Flutter +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/ios/Pods/Target Support Files/Flutter/Flutter.release.xcconfig b/example/ios/Pods/Target Support Files/Flutter/Flutter.release.xcconfig new file mode 100644 index 0000000..1d192c5 --- /dev/null +++ b/example/ios/Pods/Target Support Files/Flutter/Flutter.release.xcconfig @@ -0,0 +1,12 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Flutter +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +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}/../Flutter +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/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-acknowledgements.markdown b/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-acknowledgements.markdown new file mode 100644 index 0000000..d745b52 --- /dev/null +++ b/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-acknowledgements.markdown @@ -0,0 +1,291 @@ +# 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. + + +## image_picker_ios + +image_picker + +Copyright 2013 The Flutter Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +aFileChooser + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2011 - 2013 Paul Burke + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +## path_provider_foundation + +Copyright 2013 The Flutter Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Generated by CocoaPods - https://cocoapods.org diff --git a/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-acknowledgements.plist b/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-acknowledgements.plist new file mode 100644 index 0000000..d7c7c76 --- /dev/null +++ b/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-acknowledgements.plist @@ -0,0 +1,335 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + 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 + image_picker + +Copyright 2013 The Flutter Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-------------------------------------------------------------------------------- +aFileChooser + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2011 - 2013 Paul Burke + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + License + BSD + Title + image_picker_ios + Type + PSGroupSpecifier + + + FooterText + Copyright 2013 The Flutter Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + License + BSD + Title + path_provider_foundation + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-dummy.m b/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-dummy.m new file mode 100644 index 0000000..0b73bc1 --- /dev/null +++ b/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_Runner : NSObject +@end +@implementation PodsDummy_Pods_Runner +@end diff --git a/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-resources.sh b/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-resources.sh new file mode 100755 index 0000000..9885bc0 --- /dev/null +++ b/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-resources.sh @@ -0,0 +1,135 @@ +#!/bin/sh +set -e +set -u +set -o pipefail + +function on_error { + echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" +} +trap 'on_error $LINENO' ERR + +if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then + # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy + # resources to, so exit 0 (signalling the script phase was successful). + exit 0 +fi + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +case "${TARGETED_DEVICE_FAMILY:-}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + 3) + TARGET_DEVICE_ARGS="--target-device tv" + ;; + 4) + TARGET_DEVICE_ARGS="--target-device watch" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; +esac + +install_resource() +{ + if [[ "$1" = /* ]] ; then + RESOURCE_PATH="$1" + else + RESOURCE_PATH="${PODS_ROOT}/$1" + fi + if [[ ! -e "$RESOURCE_PATH" ]] ; then + cat << EOM +error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. +EOM + exit 1 + fi + case $RESOURCE_PATH in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.framework) + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true + xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + *) + echo "$RESOURCE_PATH" || true + echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" + ;; + esac +} +if [[ "$CONFIGURATION" == "Debug" ]]; then + install_resource "${PODS_CONFIGURATION_BUILD_DIR}/image_picker_ios/image_picker_ios_privacy.bundle" + install_resource "${PODS_CONFIGURATION_BUILD_DIR}/path_provider_foundation/path_provider_foundation_privacy.bundle" +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_resource "${PODS_CONFIGURATION_BUILD_DIR}/image_picker_ios/image_picker_ios_privacy.bundle" + install_resource "${PODS_CONFIGURATION_BUILD_DIR}/path_provider_foundation/path_provider_foundation_privacy.bundle" +fi +if [[ "$CONFIGURATION" == "Profile" ]]; then + install_resource "${PODS_CONFIGURATION_BUILD_DIR}/image_picker_ios/image_picker_ios_privacy.bundle" + install_resource "${PODS_CONFIGURATION_BUILD_DIR}/path_provider_foundation/path_provider_foundation_privacy.bundle" +fi + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] +then + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find -L "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "${PODS_ROOT}*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + else + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" + fi +fi diff --git a/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-umbrella.h b/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-umbrella.h new file mode 100644 index 0000000..5bf0aab --- /dev/null +++ b/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-umbrella.h @@ -0,0 +1,16 @@ +#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 Pods_RunnerVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_RunnerVersionString[]; + diff --git a/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig b/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig new file mode 100644 index 0000000..008c29f --- /dev/null +++ b/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig @@ -0,0 +1,17 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +EMBEDDED_CONTENT_CONTAINS_SWIFT = YES +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/SSZipArchive" "${PODS_ROOT}/Headers/Public/flutter_zip_archive" "${PODS_ROOT}/Headers/Public/image_picker_ios" +LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift +LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SSZipArchive" "${PODS_CONFIGURATION_BUILD_DIR}/flutter_zip_archive" "${PODS_CONFIGURATION_BUILD_DIR}/image_picker_ios" "${PODS_CONFIGURATION_BUILD_DIR}/path_provider_foundation" "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)/ $(SDKROOT)/usr/lib/swift +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/path_provider_foundation/path_provider_foundation.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Private/image_picker_ios/image_picker_ios.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/SSZipArchive/SSZipArchive.modulemap" +OTHER_LDFLAGS = $(inherited) -ObjC -l"SSZipArchive" -l"flutter_zip_archive" -l"iconv" -l"image_picker_ios" -l"path_provider_foundation" -l"z" -framework "Security" +OTHER_MODULE_VERIFIER_FLAGS = $(inherited) "-F${PODS_CONFIGURATION_BUILD_DIR}/Flutter" "-F${PODS_CONFIGURATION_BUILD_DIR}/SSZipArchive" "-F${PODS_CONFIGURATION_BUILD_DIR}/flutter_zip_archive" "-F${PODS_CONFIGURATION_BUILD_DIR}/image_picker_ios" "-F${PODS_CONFIGURATION_BUILD_DIR}/path_provider_foundation" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/path_provider_foundation/path_provider_foundation.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Private/image_picker_ios/image_picker_ios.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/SSZipArchive/SSZipArchive.modulemap" +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 +SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/path_provider_foundation" +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner.modulemap b/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner.modulemap new file mode 100644 index 0000000..2530ac8 --- /dev/null +++ b/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner.modulemap @@ -0,0 +1,6 @@ +module Pods_Runner { + umbrella header "Pods-Runner-umbrella.h" + + export * + module * { export * } +} diff --git a/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig b/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig new file mode 100644 index 0000000..008c29f --- /dev/null +++ b/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig @@ -0,0 +1,17 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +EMBEDDED_CONTENT_CONTAINS_SWIFT = YES +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/SSZipArchive" "${PODS_ROOT}/Headers/Public/flutter_zip_archive" "${PODS_ROOT}/Headers/Public/image_picker_ios" +LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift +LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SSZipArchive" "${PODS_CONFIGURATION_BUILD_DIR}/flutter_zip_archive" "${PODS_CONFIGURATION_BUILD_DIR}/image_picker_ios" "${PODS_CONFIGURATION_BUILD_DIR}/path_provider_foundation" "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)/ $(SDKROOT)/usr/lib/swift +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/path_provider_foundation/path_provider_foundation.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Private/image_picker_ios/image_picker_ios.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/SSZipArchive/SSZipArchive.modulemap" +OTHER_LDFLAGS = $(inherited) -ObjC -l"SSZipArchive" -l"flutter_zip_archive" -l"iconv" -l"image_picker_ios" -l"path_provider_foundation" -l"z" -framework "Security" +OTHER_MODULE_VERIFIER_FLAGS = $(inherited) "-F${PODS_CONFIGURATION_BUILD_DIR}/Flutter" "-F${PODS_CONFIGURATION_BUILD_DIR}/SSZipArchive" "-F${PODS_CONFIGURATION_BUILD_DIR}/flutter_zip_archive" "-F${PODS_CONFIGURATION_BUILD_DIR}/image_picker_ios" "-F${PODS_CONFIGURATION_BUILD_DIR}/path_provider_foundation" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/path_provider_foundation/path_provider_foundation.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Private/image_picker_ios/image_picker_ios.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/SSZipArchive/SSZipArchive.modulemap" +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 +SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/path_provider_foundation" +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig b/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig new file mode 100644 index 0000000..008c29f --- /dev/null +++ b/example/ios/Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig @@ -0,0 +1,17 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +EMBEDDED_CONTENT_CONTAINS_SWIFT = YES +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/SSZipArchive" "${PODS_ROOT}/Headers/Public/flutter_zip_archive" "${PODS_ROOT}/Headers/Public/image_picker_ios" +LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift +LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SSZipArchive" "${PODS_CONFIGURATION_BUILD_DIR}/flutter_zip_archive" "${PODS_CONFIGURATION_BUILD_DIR}/image_picker_ios" "${PODS_CONFIGURATION_BUILD_DIR}/path_provider_foundation" "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)/ $(SDKROOT)/usr/lib/swift +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/path_provider_foundation/path_provider_foundation.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Private/image_picker_ios/image_picker_ios.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/SSZipArchive/SSZipArchive.modulemap" +OTHER_LDFLAGS = $(inherited) -ObjC -l"SSZipArchive" -l"flutter_zip_archive" -l"iconv" -l"image_picker_ios" -l"path_provider_foundation" -l"z" -framework "Security" +OTHER_MODULE_VERIFIER_FLAGS = $(inherited) "-F${PODS_CONFIGURATION_BUILD_DIR}/Flutter" "-F${PODS_CONFIGURATION_BUILD_DIR}/SSZipArchive" "-F${PODS_CONFIGURATION_BUILD_DIR}/flutter_zip_archive" "-F${PODS_CONFIGURATION_BUILD_DIR}/image_picker_ios" "-F${PODS_CONFIGURATION_BUILD_DIR}/path_provider_foundation" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/path_provider_foundation/path_provider_foundation.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Private/image_picker_ios/image_picker_ios.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/SSZipArchive/SSZipArchive.modulemap" +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 +SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/path_provider_foundation" +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/example/ios/Pods/Target Support Files/SSZipArchive/SSZipArchive-dummy.m b/example/ios/Pods/Target Support Files/SSZipArchive/SSZipArchive-dummy.m new file mode 100644 index 0000000..9fabf79 --- /dev/null +++ b/example/ios/Pods/Target Support Files/SSZipArchive/SSZipArchive-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_SSZipArchive : NSObject +@end +@implementation PodsDummy_SSZipArchive +@end diff --git a/example/ios/Pods/Target Support Files/SSZipArchive/SSZipArchive-prefix.pch b/example/ios/Pods/Target Support Files/SSZipArchive/SSZipArchive-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/example/ios/Pods/Target Support Files/SSZipArchive/SSZipArchive-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/example/ios/Pods/Target Support Files/SSZipArchive/SSZipArchive-umbrella.h b/example/ios/Pods/Target Support Files/SSZipArchive/SSZipArchive-umbrella.h new file mode 100644 index 0000000..332a149 --- /dev/null +++ b/example/ios/Pods/Target Support Files/SSZipArchive/SSZipArchive-umbrella.h @@ -0,0 +1,18 @@ +#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/ios/Pods/Target Support Files/SSZipArchive/SSZipArchive.debug.xcconfig b/example/ios/Pods/Target Support Files/SSZipArchive/SSZipArchive.debug.xcconfig new file mode 100644 index 0000000..12424d7 --- /dev/null +++ b/example/ios/Pods/Target Support Files/SSZipArchive/SSZipArchive.debug.xcconfig @@ -0,0 +1,14 @@ +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 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SSZipArchive" "${PODS_ROOT}/Headers/Public" +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}/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/ios/Pods/Target Support Files/SSZipArchive/SSZipArchive.modulemap b/example/ios/Pods/Target Support Files/SSZipArchive/SSZipArchive.modulemap new file mode 100644 index 0000000..340f922 --- /dev/null +++ b/example/ios/Pods/Target Support Files/SSZipArchive/SSZipArchive.modulemap @@ -0,0 +1,6 @@ +module SSZipArchive { + umbrella header "SSZipArchive-umbrella.h" + + export * + module * { export * } +} diff --git a/example/ios/Pods/Target Support Files/SSZipArchive/SSZipArchive.release.xcconfig b/example/ios/Pods/Target Support Files/SSZipArchive/SSZipArchive.release.xcconfig new file mode 100644 index 0000000..12424d7 --- /dev/null +++ b/example/ios/Pods/Target Support Files/SSZipArchive/SSZipArchive.release.xcconfig @@ -0,0 +1,14 @@ +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 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SSZipArchive" "${PODS_ROOT}/Headers/Public" +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}/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/ios/Pods/Target Support Files/flutter_zip_archive/flutter_zip_archive-dummy.m b/example/ios/Pods/Target Support Files/flutter_zip_archive/flutter_zip_archive-dummy.m new file mode 100644 index 0000000..7f479b8 --- /dev/null +++ b/example/ios/Pods/Target Support Files/flutter_zip_archive/flutter_zip_archive-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_flutter_zip_archive : NSObject +@end +@implementation PodsDummy_flutter_zip_archive +@end diff --git a/example/ios/Pods/Target Support Files/flutter_zip_archive/flutter_zip_archive-prefix.pch b/example/ios/Pods/Target Support Files/flutter_zip_archive/flutter_zip_archive-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/example/ios/Pods/Target Support Files/flutter_zip_archive/flutter_zip_archive-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/example/ios/Pods/Target Support Files/flutter_zip_archive/flutter_zip_archive.debug.xcconfig b/example/ios/Pods/Target Support Files/flutter_zip_archive/flutter_zip_archive.debug.xcconfig new file mode 100644 index 0000000..6deb49a --- /dev/null +++ b/example/ios/Pods/Target Support Files/flutter_zip_archive/flutter_zip_archive.debug.xcconfig @@ -0,0 +1,14 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/flutter_zip_archive +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/flutter_zip_archive" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/SSZipArchive" "${PODS_ROOT}/Headers/Public/flutter_zip_archive" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_ROOT}/Headers/Public/SSZipArchive/SSZipArchive.modulemap" +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}/../.symlinks/plugins/flutter_zip_archive/ios +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/ios/Pods/Target Support Files/flutter_zip_archive/flutter_zip_archive.release.xcconfig b/example/ios/Pods/Target Support Files/flutter_zip_archive/flutter_zip_archive.release.xcconfig new file mode 100644 index 0000000..6deb49a --- /dev/null +++ b/example/ios/Pods/Target Support Files/flutter_zip_archive/flutter_zip_archive.release.xcconfig @@ -0,0 +1,14 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/flutter_zip_archive +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/flutter_zip_archive" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/SSZipArchive" "${PODS_ROOT}/Headers/Public/flutter_zip_archive" +OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_ROOT}/Headers/Public/SSZipArchive/SSZipArchive.modulemap" +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}/../.symlinks/plugins/flutter_zip_archive/ios +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/ios/Pods/Target Support Files/image_picker_ios/ResourceBundle-image_picker_ios_privacy-image_picker_ios-Info.plist b/example/ios/Pods/Target Support Files/image_picker_ios/ResourceBundle-image_picker_ios_privacy-image_picker_ios-Info.plist new file mode 100644 index 0000000..e22a9aa --- /dev/null +++ b/example/ios/Pods/Target Support Files/image_picker_ios/ResourceBundle-image_picker_ios_privacy-image_picker_ios-Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + ${PODS_DEVELOPMENT_LANGUAGE} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + BNDL + CFBundleShortVersionString + 0.0.1 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSPrincipalClass + + + diff --git a/example/ios/Pods/Target Support Files/image_picker_ios/image_picker_ios-dummy.m b/example/ios/Pods/Target Support Files/image_picker_ios/image_picker_ios-dummy.m new file mode 100644 index 0000000..bdfb4b7 --- /dev/null +++ b/example/ios/Pods/Target Support Files/image_picker_ios/image_picker_ios-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_image_picker_ios : NSObject +@end +@implementation PodsDummy_image_picker_ios +@end diff --git a/example/ios/Pods/Target Support Files/image_picker_ios/image_picker_ios-prefix.pch b/example/ios/Pods/Target Support Files/image_picker_ios/image_picker_ios-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/example/ios/Pods/Target Support Files/image_picker_ios/image_picker_ios-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/example/ios/Pods/Target Support Files/image_picker_ios/image_picker_ios.debug.xcconfig b/example/ios/Pods/Target Support Files/image_picker_ios/image_picker_ios.debug.xcconfig new file mode 100644 index 0000000..2eb75a2 --- /dev/null +++ b/example/ios/Pods/Target Support Files/image_picker_ios/image_picker_ios.debug.xcconfig @@ -0,0 +1,14 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/image_picker_ios +DEFINES_MODULE = YES +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/image_picker_ios" "${PODS_ROOT}/Headers/Public" +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}/../.symlinks/plugins/image_picker_ios/ios +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/ios/Pods/Target Support Files/image_picker_ios/image_picker_ios.modulemap b/example/ios/Pods/Target Support Files/image_picker_ios/image_picker_ios.modulemap new file mode 100644 index 0000000..a249908 --- /dev/null +++ b/example/ios/Pods/Target Support Files/image_picker_ios/image_picker_ios.modulemap @@ -0,0 +1,14 @@ +module image_picker_ios { + umbrella header "image_picker_ios-umbrella.h" + + export * + module * { export * } + + explicit module Test { + header "FLTImagePickerPlugin_Test.h" + header "FLTImagePickerImageUtil.h" + header "FLTImagePickerMetaDataUtil.h" + header "FLTImagePickerPhotoAssetUtil.h" + header "FLTPHPickerSaveImageToPathOperation.h" + } +} diff --git a/example/ios/Pods/Target Support Files/image_picker_ios/image_picker_ios.release.xcconfig b/example/ios/Pods/Target Support Files/image_picker_ios/image_picker_ios.release.xcconfig new file mode 100644 index 0000000..2eb75a2 --- /dev/null +++ b/example/ios/Pods/Target Support Files/image_picker_ios/image_picker_ios.release.xcconfig @@ -0,0 +1,14 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/image_picker_ios +DEFINES_MODULE = YES +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/image_picker_ios" "${PODS_ROOT}/Headers/Public" +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}/../.symlinks/plugins/image_picker_ios/ios +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/ios/Pods/Target Support Files/path_provider_foundation/ResourceBundle-path_provider_foundation_privacy-path_provider_foundation-Info.plist b/example/ios/Pods/Target Support Files/path_provider_foundation/ResourceBundle-path_provider_foundation_privacy-path_provider_foundation-Info.plist new file mode 100644 index 0000000..e22a9aa --- /dev/null +++ b/example/ios/Pods/Target Support Files/path_provider_foundation/ResourceBundle-path_provider_foundation_privacy-path_provider_foundation-Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + ${PODS_DEVELOPMENT_LANGUAGE} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + BNDL + CFBundleShortVersionString + 0.0.1 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSPrincipalClass + + + diff --git a/example/ios/Pods/Target Support Files/path_provider_foundation/path_provider_foundation-dummy.m b/example/ios/Pods/Target Support Files/path_provider_foundation/path_provider_foundation-dummy.m new file mode 100644 index 0000000..ef3b0d0 --- /dev/null +++ b/example/ios/Pods/Target Support Files/path_provider_foundation/path_provider_foundation-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_path_provider_foundation : NSObject +@end +@implementation PodsDummy_path_provider_foundation +@end diff --git a/example/ios/Pods/Target Support Files/path_provider_foundation/path_provider_foundation-prefix.pch b/example/ios/Pods/Target Support Files/path_provider_foundation/path_provider_foundation-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/example/ios/Pods/Target Support Files/path_provider_foundation/path_provider_foundation-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/example/ios/Pods/Target Support Files/path_provider_foundation/path_provider_foundation-umbrella.h b/example/ios/Pods/Target Support Files/path_provider_foundation/path_provider_foundation-umbrella.h new file mode 100644 index 0000000..f62757e --- /dev/null +++ b/example/ios/Pods/Target Support Files/path_provider_foundation/path_provider_foundation-umbrella.h @@ -0,0 +1,16 @@ +#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 path_provider_foundationVersionNumber; +FOUNDATION_EXPORT const unsigned char path_provider_foundationVersionString[]; + diff --git a/example/ios/Pods/Target Support Files/path_provider_foundation/path_provider_foundation.debug.xcconfig b/example/ios/Pods/Target Support Files/path_provider_foundation/path_provider_foundation.debug.xcconfig new file mode 100644 index 0000000..4c35803 --- /dev/null +++ b/example/ios/Pods/Target Support Files/path_provider_foundation/path_provider_foundation.debug.xcconfig @@ -0,0 +1,15 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/path_provider_foundation +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift +LIBRARY_SEARCH_PATHS = $(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)/ $(SDKROOT)/usr/lib/swift +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -import-underlying-module -Xcc -fmodule-map-file="${SRCROOT}/${MODULEMAP_FILE}" +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}/../.symlinks/plugins/path_provider_foundation/darwin +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/ios/Pods/Target Support Files/path_provider_foundation/path_provider_foundation.modulemap b/example/ios/Pods/Target Support Files/path_provider_foundation/path_provider_foundation.modulemap new file mode 100644 index 0000000..566832d --- /dev/null +++ b/example/ios/Pods/Target Support Files/path_provider_foundation/path_provider_foundation.modulemap @@ -0,0 +1,6 @@ +module path_provider_foundation { + umbrella header "path_provider_foundation-umbrella.h" + + export * + module * { export * } +} diff --git a/example/ios/Pods/Target Support Files/path_provider_foundation/path_provider_foundation.release.xcconfig b/example/ios/Pods/Target Support Files/path_provider_foundation/path_provider_foundation.release.xcconfig new file mode 100644 index 0000000..4c35803 --- /dev/null +++ b/example/ios/Pods/Target Support Files/path_provider_foundation/path_provider_foundation.release.xcconfig @@ -0,0 +1,15 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/path_provider_foundation +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift +LIBRARY_SEARCH_PATHS = $(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)/ $(SDKROOT)/usr/lib/swift +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -import-underlying-module -Xcc -fmodule-map-file="${SRCROOT}/${MODULEMAP_FILE}" +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}/../.symlinks/plugins/path_provider_foundation/darwin +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/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index 5c5fb00..226d4b5 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -3,24 +3,19 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; - 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; - 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - CE8B81325DE4F5C9594D3F37 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F32D43471C1DC4D22BE22DA /* libPods-Runner.a */; }; + F275904510D41BD360F3E9E0 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C989873CB5C9444D3C3E1099 /* libPods-Runner.a */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -30,8 +25,6 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, - 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -41,22 +34,22 @@ /* Begin PBXFileReference section */ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; }; + 1AC4E9B47BAE9E098899ABBE /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; - 5F32D43471C1DC4D22BE22DA /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 4C92FBD990DC97AED9401CA2 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + 68D8520BE79CCCD0B112884D /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + C989873CB5C9444D3C3E1099 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -64,37 +57,17 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, - 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, - CE8B81325DE4F5C9594D3F37 /* libPods-Runner.a in Frameworks */, + F275904510D41BD360F3E9E0 /* libPods-Runner.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 50F185450184E48705E43E18 /* Pods */ = { - isa = PBXGroup; - children = ( - ); - name = Pods; - sourceTree = ""; - }; - 679503EDD8E46678B0AFEDCA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 5F32D43471C1DC4D22BE22DA /* libPods-Runner.a */, - ); - name = Frameworks; - sourceTree = ""; - }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( - 2D5378251FAA1A9400D5DBA9 /* flutter_assets */, - 3B80C3931E831B6300D905FE /* App.framework */, 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEBA1CF902C7004384FC /* Flutter.framework */, 9740EEB21CF90195004384FC /* Debug.xcconfig */, 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 9740EEB31CF90195004384FC /* Generated.xcconfig */, @@ -108,8 +81,8 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, - 50F185450184E48705E43E18 /* Pods */, - 679503EDD8E46678B0AFEDCA /* Frameworks */, + 9A0C909D53B0258FC768F657 /* Pods */, + D5C3078EE54F791D56ED575F /* Frameworks */, ); sourceTree = ""; }; @@ -145,6 +118,25 @@ name = "Supporting Files"; sourceTree = ""; }; + 9A0C909D53B0258FC768F657 /* Pods */ = { + isa = PBXGroup; + children = ( + 68D8520BE79CCCD0B112884D /* Pods-Runner.debug.xcconfig */, + 1AC4E9B47BAE9E098899ABBE /* Pods-Runner.release.xcconfig */, + 4C92FBD990DC97AED9401CA2 /* Pods-Runner.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; + D5C3078EE54F791D56ED575F /* Frameworks */ = { + isa = PBXGroup; + children = ( + C989873CB5C9444D3C3E1099 /* libPods-Runner.a */, + ); + name = Frameworks; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -152,14 +144,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 8F9E75DE7E04BE8B12932EE9 /* [CP] Check Pods Manifest.lock */, + EC90BF41B1B5DB15B1CB7146 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 1F5F0FE41B132CBF48E3E29D /* [CP] Embed Pods Frameworks */, + A98C6A6561B485AB41A3C88C /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -176,7 +168,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0910; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = "The Chromium Authors"; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -212,7 +204,6 @@ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */, 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -220,77 +211,78 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 1F5F0FE41B132CBF48E3E29D /* [CP] Embed Pods Frameworks */ = { + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - ); inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", - "${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); + name = "Thin Binary"; outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Thin Binary"; + name = "Run Script"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; - 8F9E75DE7E04BE8B12932EE9 /* [CP] Check Pods Manifest.lock */ = { + A98C6A6561B485AB41A3C88C /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh", + "${PODS_CONFIGURATION_BUILD_DIR}/image_picker_ios/image_picker_ios_privacy.bundle", + "${PODS_CONFIGURATION_BUILD_DIR}/path_provider_foundation/path_provider_foundation_privacy.bundle", ); + name = "[CP] Copy Pods Resources"; outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/image_picker_ios_privacy.bundle", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/path_provider_foundation_privacy.bundle", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 9740EEB61CF901F6004384FC /* Run Script */ = { + EC90BF41B1B5DB15B1CB7146 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( ); - name = "Run Script"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -329,7 +321,6 @@ /* Begin XCBuildConfiguration section */ 249021D3217E4FDB00AE95B9 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -367,7 +358,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -388,7 +379,10 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", @@ -401,7 +395,6 @@ }; 97C147031CF9000F007C117D /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -445,7 +438,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -455,7 +448,6 @@ }; 97C147041CF9000F007C117D /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -493,7 +485,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; @@ -514,7 +506,10 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", @@ -538,7 +533,10 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); LIBRARY_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 1d526a1..919434a 100644 --- a/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/xcuserdata/william.xcuserdatad/UserInterfaceState.xcuserstate b/example/ios/Runner.xcodeproj/project.xcworkspace/xcuserdata/william.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..de2b10b Binary files /dev/null and b/example/ios/Runner.xcodeproj/project.xcworkspace/xcuserdata/william.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 786d6aa..5e31d3d 100644 --- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ - - - - + + - - + + + + IDEDidComputeMac32BitWarning + + + diff --git a/example/ios/Runner.xcworkspace/xcuserdata/william.xcuserdatad/UserInterfaceState.xcuserstate b/example/ios/Runner.xcworkspace/xcuserdata/william.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..bb15e41 Binary files /dev/null and b/example/ios/Runner.xcworkspace/xcuserdata/william.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/example/ios/Runner/GeneratedPluginRegistrant.h b/example/ios/Runner/GeneratedPluginRegistrant.h index 3b700eb..7a89092 100644 --- a/example/ios/Runner/GeneratedPluginRegistrant.h +++ b/example/ios/Runner/GeneratedPluginRegistrant.h @@ -2,13 +2,18 @@ // Generated file. Do not edit. // +// clang-format off + #ifndef GeneratedPluginRegistrant_h #define GeneratedPluginRegistrant_h #import +NS_ASSUME_NONNULL_BEGIN + @interface GeneratedPluginRegistrant : NSObject + (void)registerWithRegistry:(NSObject*)registry; @end +NS_ASSUME_NONNULL_END #endif /* GeneratedPluginRegistrant_h */ diff --git a/example/ios/Runner/GeneratedPluginRegistrant.m b/example/ios/Runner/GeneratedPluginRegistrant.m index 2607ab3..726795b 100644 --- a/example/ios/Runner/GeneratedPluginRegistrant.m +++ b/example/ios/Runner/GeneratedPluginRegistrant.m @@ -2,17 +2,34 @@ // Generated file. Do not edit. // +// clang-format off + #import "GeneratedPluginRegistrant.h" + +#if __has_include() #import -#import -#import +#else +@import flutter_zip_archive; +#endif + +#if __has_include() +#import +#else +@import image_picker_ios; +#endif + +#if __has_include() +#import +#else +@import path_provider_foundation; +#endif @implementation GeneratedPluginRegistrant + (void)registerWithRegistry:(NSObject*)registry { [FlutterZipArchivePlugin registerWithRegistrar:[registry registrarForPlugin:@"FlutterZipArchivePlugin"]]; [FLTImagePickerPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTImagePickerPlugin"]]; - [FLTPathProviderPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTPathProviderPlugin"]]; + [PathProviderPlugin registerWithRegistrar:[registry registrarForPlugin:@"PathProviderPlugin"]]; } @end diff --git a/example/ios/Runner/Info.plist b/example/ios/Runner/Info.plist index 943f027..130b5f6 100644 --- a/example/ios/Runner/Info.plist +++ b/example/ios/Runner/Info.plist @@ -41,5 +41,11 @@ UIViewControllerBasedStatusBarAppearance + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + NSPhotoLibraryUsageDescription + Access to the photo library to select images to be processed diff --git a/example/lib/main.dart b/example/lib/main.dart index c443875..54544bc 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -15,7 +15,7 @@ class MyApp extends StatefulWidget { } class _MyAppState extends State { - TextEditingController _controller; + late TextEditingController _controller; @override void initState() { @@ -37,7 +37,7 @@ class _MyAppState extends State { children: [ Row( children: [ - Text("密码:"), + Text("Password:"), Expanded(child: TextField( controller: _controller, )) @@ -47,11 +47,11 @@ class _MyAppState extends State { MaterialButton( color: Theme.of(context).primaryColor, onPressed: _selectFile, - child: Text("压缩"),), + child: Text("Compress"),), MaterialButton( color: Theme.of(context).primaryColor, onPressed:_unzip, - child: Text("解压"),) + child: Text("Unzip"),) ], ), ), @@ -60,7 +60,7 @@ class _MyAppState extends State { } Future _selectFile() async { - var file = await ImagePicker.pickImage(source: ImageSource.gallery); + var file = await ImagePicker().pickImage(source: ImageSource.gallery); Directory _cacheDir = await getTemporaryDirectory(); if (file == null) { return; diff --git a/example/pubspec.lock b/example/pubspec.lock new file mode 100644 index 0000000..2825421 --- /dev/null +++ b/example/pubspec.lock @@ -0,0 +1,441 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + collection: + dependency: transitive + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + cross_file: + dependency: transitive + description: + name: cross_file + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" + url: "https://pub.dev" + source: hosted + version: "0.3.4+2" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" + source: hosted + version: "1.0.8" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" + url: "https://pub.dev" + source: hosted + version: "2.1.3" + file_selector_linux: + dependency: transitive + description: + name: file_selector_linux + sha256: "712ce7fab537ba532c8febdb1a8f167b32441e74acd68c3ccb2e36dcb52c4ab2" + url: "https://pub.dev" + source: hosted + version: "0.9.3" + file_selector_macos: + dependency: transitive + description: + name: file_selector_macos + sha256: "271ab9986df0c135d45c3cdb6bd0faa5db6f4976d3e4b437cf7d0f258d941bfc" + url: "https://pub.dev" + source: hosted + version: "0.9.4+2" + file_selector_platform_interface: + dependency: transitive + description: + name: file_selector_platform_interface + sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b + url: "https://pub.dev" + source: hosted + version: "2.6.2" + file_selector_windows: + dependency: transitive + description: + name: file_selector_windows + sha256: "8f5d2f6590d51ecd9179ba39c64f722edc15226cc93dcc8698466ad36a4a85a4" + url: "https://pub.dev" + source: hosted + version: "0.9.3+3" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_plugin_android_lifecycle: + dependency: transitive + description: + name: flutter_plugin_android_lifecycle + sha256: "9b78450b89f059e96c9ebb355fa6b3df1d6b330436e0b885fb49594c41721398" + url: "https://pub.dev" + source: hosted + version: "2.0.23" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_zip_archive: + dependency: "direct dev" + description: + path: ".." + relative: true + source: path + version: "0.0.1" + http: + dependency: transitive + description: + name: http + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 + url: "https://pub.dev" + source: hosted + version: "1.2.2" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + image_picker: + dependency: "direct main" + description: + name: image_picker + sha256: "021834d9c0c3de46bf0fe40341fa07168407f694d9b2bb18d532dc1261867f7a" + url: "https://pub.dev" + source: hosted + version: "1.1.2" + image_picker_android: + dependency: transitive + description: + name: image_picker_android + sha256: "8faba09ba361d4b246dc0a17cb4289b3324c2b9f6db7b3d457ee69106a86bd32" + url: "https://pub.dev" + source: hosted + version: "0.8.12+17" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + sha256: "717eb042ab08c40767684327be06a5d8dbb341fe791d514e4b92c7bbe1b7bb83" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + image_picker_ios: + dependency: transitive + description: + name: image_picker_ios + sha256: "4f0568120c6fcc0aaa04511cb9f9f4d29fc3d0139884b1d06be88dcec7641d6b" + url: "https://pub.dev" + source: hosted + version: "0.8.12+1" + image_picker_linux: + dependency: transitive + description: + name: image_picker_linux + sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_macos: + dependency: transitive + description: + name: image_picker_macos + sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_platform_interface: + dependency: transitive + description: + name: image_picker_platform_interface + sha256: "9ec26d410ff46f483c5519c29c02ef0e02e13a543f882b152d4bfd2f06802f80" + url: "https://pub.dev" + source: hosted + version: "2.10.0" + image_picker_windows: + dependency: transitive + description: + name: image_picker_windows + sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + url: "https://pub.dev" + source: hosted + version: "10.0.5" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + url: "https://pub.dev" + source: hosted + version: "3.0.5" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + url: "https://pub.dev" + source: hosted + version: "1.15.0" + mime: + dependency: transitive + description: + name: mime + sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + path: + dependency: transitive + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + path_provider: + dependency: "direct main" + description: + name: path_provider + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" + url: "https://pub.dev" + source: hosted + version: "2.1.5" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: c464428172cb986b758c6d1724c603097febb8fb855aa265aeecc9280c294d4a + url: "https://pub.dev" + source: hosted + version: "2.2.12" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 + url: "https://pub.dev" + source: hosted + version: "2.4.0" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 + url: "https://pub.dev" + source: hosted + version: "2.3.0" + platform: + dependency: transitive + description: + name: platform + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" + url: "https://pub.dev" + source: hosted + version: "3.1.6" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + url: "https://pub.dev" + source: hosted + version: "0.7.2" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc + url: "https://pub.dev" + source: hosted + version: "14.2.4" + web: + dependency: transitive + description: + name: web + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb + url: "https://pub.dev" + source: hosted + version: "1.1.0" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" + url: "https://pub.dev" + source: hosted + version: "1.1.0" +sdks: + dart: ">=3.5.0 <4.0.0" + flutter: ">=3.24.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index a5feb09..aa4170a 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,9 +1,10 @@ name: flutter_zip_archive_example description: Demonstrates how to use the flutter_zip_archive plugin. publish_to: 'none' +version: 1.0.0+1 environment: - sdk: ">=2.0.0-dev.68.0 <3.0.0" + sdk: '>=3.0.0 <4.0.0' dependencies: flutter: @@ -11,9 +12,9 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^0.1.2 - image_picker: ^0.4.10 - path_provider: ^0.4.1 + cupertino_icons: ^1.0.2 + image_picker: ^1.0.4 + path_provider: ^2.0.11 dev_dependencies: flutter_test: diff --git a/example/test/widget_test.dart b/example/test/widget_test.dart index 29272f6..66eb0ee 100644 --- a/example/test/widget_test.dart +++ b/example/test/widget_test.dart @@ -19,7 +19,7 @@ void main() { expect( find.byWidgetPredicate( (Widget widget) => widget is Text && - widget.data.startsWith('Running on:'), + widget.data!.startsWith('Running on:'), ), findsOneWidget, ); diff --git a/pubspec.lock b/pubspec.lock new file mode 100644 index 0000000..417d01f --- /dev/null +++ b/pubspec.lock @@ -0,0 +1,55 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + collection: + dependency: transitive + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + url: "https://pub.dev" + source: hosted + version: "1.15.0" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" +sdks: + dart: ">=3.3.0-0 <4.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 8bc9c08..6fd0f6a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,11 +1,10 @@ name: flutter_zip_archive description: A new Flutter plugin. version: 0.0.1 -author: homepage: environment: - sdk: ">=2.0.0-dev.68.0 <3.0.0" + sdk: '>=3.0.0 <4.0.0' dependencies: flutter: