diff --git a/packages/desktop_drop/example/.metadata b/packages/desktop_drop/example/.metadata index 37c89ee7..facf12b2 100644 --- a/packages/desktop_drop/example/.metadata +++ b/packages/desktop_drop/example/.metadata @@ -4,7 +4,27 @@ # This file should be version controlled and should not be manually edited. version: - revision: 01e10e793e2459e9e563d5f928e40452aecd80cc - channel: master + revision: "c23637390482d4cf9598c3ce3f2be31aa7332daf" + channel: "stable" project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf + base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf + - platform: web + create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf + base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/packages/desktop_drop/example/macos/Flutter/Flutter-Debug.xcconfig b/packages/desktop_drop/example/macos/Flutter/Flutter-Debug.xcconfig index 4b81f9b2..c2efd0b6 100644 --- a/packages/desktop_drop/example/macos/Flutter/Flutter-Debug.xcconfig +++ b/packages/desktop_drop/example/macos/Flutter/Flutter-Debug.xcconfig @@ -1,2 +1 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "ephemeral/Flutter-Generated.xcconfig" diff --git a/packages/desktop_drop/example/macos/Flutter/Flutter-Release.xcconfig b/packages/desktop_drop/example/macos/Flutter/Flutter-Release.xcconfig index 5caa9d15..c2efd0b6 100644 --- a/packages/desktop_drop/example/macos/Flutter/Flutter-Release.xcconfig +++ b/packages/desktop_drop/example/macos/Flutter/Flutter-Release.xcconfig @@ -1,2 +1 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "ephemeral/Flutter-Generated.xcconfig" diff --git a/packages/desktop_drop/example/macos/Podfile b/packages/desktop_drop/example/macos/Podfile deleted file mode 100644 index 049abe29..00000000 --- a/packages/desktop_drop/example/macos/Podfile +++ /dev/null @@ -1,40 +0,0 @@ -platform :osx, '10.14' - -# 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', 'ephemeral', '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 Flutter-Generated.xcconfig, then run \"flutter pub get\"" -end - -require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) - -flutter_macos_podfile_setup - -target 'Runner' do - use_frameworks! - use_modular_headers! - - flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) -end - -post_install do |installer| - installer.pods_project.targets.each do |target| - flutter_additional_macos_build_settings(target) - end -end diff --git a/packages/desktop_drop/example/macos/Podfile.lock b/packages/desktop_drop/example/macos/Podfile.lock deleted file mode 100644 index e35969e6..00000000 --- a/packages/desktop_drop/example/macos/Podfile.lock +++ /dev/null @@ -1,29 +0,0 @@ -PODS: - - desktop_drop (0.0.1): - - FlutterMacOS - - FlutterMacOS (1.0.0) - - shared_preferences_foundation (0.0.1): - - Flutter - - FlutterMacOS - -DEPENDENCIES: - - desktop_drop (from `Flutter/ephemeral/.symlinks/plugins/desktop_drop/macos`) - - FlutterMacOS (from `Flutter/ephemeral`) - - shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`) - -EXTERNAL SOURCES: - desktop_drop: - :path: Flutter/ephemeral/.symlinks/plugins/desktop_drop/macos - FlutterMacOS: - :path: Flutter/ephemeral - shared_preferences_foundation: - :path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin - -SPEC CHECKSUMS: - desktop_drop: 69eeff437544aa619c8db7f4481b3a65f7696898 - FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 - shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695 - -PODFILE CHECKSUM: 353c8bcc5d5b0994e508d035b5431cfe18c1dea7 - -COCOAPODS: 1.14.3 diff --git a/packages/desktop_drop/example/macos/Runner.xcodeproj/project.pbxproj b/packages/desktop_drop/example/macos/Runner.xcodeproj/project.pbxproj index 2c7b6f9d..e593eaf6 100644 --- a/packages/desktop_drop/example/macos/Runner.xcodeproj/project.pbxproj +++ b/packages/desktop_drop/example/macos/Runner.xcodeproj/project.pbxproj @@ -26,7 +26,7 @@ 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; - 7F93B8DF55C23585E8C7FC80 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B2AB02491CCC3DA14B1682F2 /* Pods_Runner.framework */; }; + 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -53,7 +53,6 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 1EAB4EFABC0020C99A5E6EE5 /* 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 = ""; }; 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; 33CC10ED2044A3C60003C045 /* desktop_drop_example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = desktop_drop_example.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -68,11 +67,8 @@ 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; - 79D1ABD8CD8F69FB7CE33E8C /* 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 = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; - B2AB02491CCC3DA14B1682F2 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - BBC5FF85C6C649BFDDAB61AE /* 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 = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -80,7 +76,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 7F93B8DF55C23585E8C7FC80 /* Pods_Runner.framework in Frameworks */, + 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -104,8 +100,6 @@ 33FAB671232836740065AC1E /* Runner */, 33CEB47122A05771004F2AC0 /* Flutter */, 33CC10EE2044A3C60003C045 /* Products */, - D73912EC22F37F3D000D13A0 /* Frameworks */, - 486033EBA7F1611C8978222E /* Pods */, ); sourceTree = ""; }; @@ -152,25 +146,6 @@ path = Runner; sourceTree = ""; }; - 486033EBA7F1611C8978222E /* Pods */ = { - isa = PBXGroup; - children = ( - 1EAB4EFABC0020C99A5E6EE5 /* Pods-Runner.debug.xcconfig */, - 79D1ABD8CD8F69FB7CE33E8C /* Pods-Runner.release.xcconfig */, - BBC5FF85C6C649BFDDAB61AE /* Pods-Runner.profile.xcconfig */, - ); - name = Pods; - path = Pods; - sourceTree = ""; - }; - D73912EC22F37F3D000D13A0 /* Frameworks */ = { - isa = PBXGroup; - children = ( - B2AB02491CCC3DA14B1682F2 /* Pods_Runner.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -178,13 +153,11 @@ isa = PBXNativeTarget; buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 611B812ADB71405F8B8F553B /* [CP] Check Pods Manifest.lock */, 33CC10E92044A3C60003C045 /* Sources */, 33CC10EA2044A3C60003C045 /* Frameworks */, 33CC10EB2044A3C60003C045 /* Resources */, 33CC110E2044A8840003C045 /* Bundle Framework */, 3399D490228B24CF009A79C7 /* ShellScript */, - CDD1715D9B642681869B9EA6 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -192,6 +165,9 @@ 33CC11202044C79F0003C045 /* PBXTargetDependency */, ); name = Runner; + packageProductDependencies = ( + 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */, + ); productName = Runner; productReference = 33CC10ED2044A3C60003C045 /* desktop_drop_example.app */; productType = "com.apple.product-type.application"; @@ -231,6 +207,9 @@ Base, ); mainGroup = 33CC10E42044A3C60003C045; + packageReferences = ( + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */, + ); productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; projectDirPath = ""; projectRoot = ""; @@ -292,45 +271,6 @@ shellPath = /bin/sh; shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; }; - 611B812ADB71405F8B8F553B /* [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 = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - 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"; - showEnvVarsInLog = 0; - }; - CDD1715D9B642681869B9EA6 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -628,6 +568,20 @@ defaultConfigurationName = Release; }; /* End XCConfigurationList section */ + +/* Begin XCLocalSwiftPackageReference section */ + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; + }; +/* End XCLocalSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = { + isa = XCSwiftPackageProductDependency; + productName = FlutterGeneratedPluginSwiftPackage; + }; +/* End XCSwiftPackageProductDependency section */ }; rootObject = 33CC10E52044A3C60003C045 /* Project object */; } diff --git a/packages/desktop_drop/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/desktop_drop/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index c2ec74d4..5271036b 100644 --- a/packages/desktop_drop/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/packages/desktop_drop/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -5,6 +5,24 @@ + + + + + + + + + + diff --git a/packages/desktop_drop/example/macos/Runner/AppDelegate.swift b/packages/desktop_drop/example/macos/Runner/AppDelegate.swift index 8e02df28..b3c17614 100644 --- a/packages/desktop_drop/example/macos/Runner/AppDelegate.swift +++ b/packages/desktop_drop/example/macos/Runner/AppDelegate.swift @@ -6,4 +6,8 @@ class AppDelegate: FlutterAppDelegate { override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { return true } + + override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool { + return true + } } diff --git a/packages/desktop_drop/example/pubspec.lock b/packages/desktop_drop/example/pubspec.lock index 10dab76e..a175f318 100644 --- a/packages/desktop_drop/example/pubspec.lock +++ b/packages/desktop_drop/example/pubspec.lock @@ -63,7 +63,7 @@ packages: path: ".." relative: true source: path - version: "0.5.0" + version: "0.5.1" fake_async: dependency: transitive description: diff --git a/packages/desktop_drop/example/web/index.html b/packages/desktop_drop/example/web/index.html index 8ae74f75..e64971d4 100644 --- a/packages/desktop_drop/example/web/index.html +++ b/packages/desktop_drop/example/web/index.html @@ -21,7 +21,7 @@ - + @@ -31,29 +31,8 @@ desktop_drop_example - - - - - + diff --git a/packages/desktop_drop/lib/src/channel.dart b/packages/desktop_drop/lib/src/channel.dart index ab2f72bd..a0913383 100644 --- a/packages/desktop_drop/lib/src/channel.dart +++ b/packages/desktop_drop/lib/src/channel.dart @@ -6,8 +6,6 @@ import 'package:flutter/widgets.dart'; import 'package:universal_platform/universal_platform.dart'; import 'events.dart'; -import 'utils/platform.dart' - if (dart.library.js_interop) 'utils/platform_web.dart'; import 'web_drop_item.dart'; typedef RawDropListener = void Function(DropEvent); diff --git a/packages/desktop_drop/lib/src/drop_target.dart b/packages/desktop_drop/lib/src/drop_target.dart index 029544c2..1ebf4675 100644 --- a/packages/desktop_drop/lib/src/drop_target.dart +++ b/packages/desktop_drop/lib/src/drop_target.dart @@ -4,8 +4,6 @@ import 'package:universal_platform/universal_platform.dart'; import 'channel.dart'; import 'drop_item.dart'; import 'events.dart'; -import 'utils/platform.dart' - if (dart.library.js_interop) 'utils/platform_web.dart'; @immutable class DropDoneDetails { diff --git a/packages/desktop_drop/macos/desktop_drop/Package.swift b/packages/desktop_drop/macos/desktop_drop/Package.swift new file mode 100644 index 00000000..68c10e3a --- /dev/null +++ b/packages/desktop_drop/macos/desktop_drop/Package.swift @@ -0,0 +1,24 @@ +// swift-tools-version: 5.9 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "desktop_drop", + platforms: [ + .macOS("10.11") + ], + products: [ + .library(name: "desktop-drop", targets: ["desktop_drop"]) + ], + dependencies: [], + targets: [ + .target( + name: "desktop_drop", + dependencies: [], + resources: [ + .process("PrivacyInfo.xcprivacy"), + ] + ) + ] +) \ No newline at end of file diff --git a/packages/desktop_drop/macos/Classes/DesktopDropPlugin.swift b/packages/desktop_drop/macos/desktop_drop/Sources/desktop_drop/DesktopDropPlugin.swift similarity index 100% rename from packages/desktop_drop/macos/Classes/DesktopDropPlugin.swift rename to packages/desktop_drop/macos/desktop_drop/Sources/desktop_drop/DesktopDropPlugin.swift diff --git a/packages/desktop_drop/macos/desktop_drop/Sources/desktop_drop/PrivacyInfo.xcprivacy b/packages/desktop_drop/macos/desktop_drop/Sources/desktop_drop/PrivacyInfo.xcprivacy new file mode 100644 index 00000000..918d80be --- /dev/null +++ b/packages/desktop_drop/macos/desktop_drop/Sources/desktop_drop/PrivacyInfo.xcprivacy @@ -0,0 +1,12 @@ + + + + + NSPrivacyTrackingDomains + + NSPrivacyCollectedDataTypes + + NSPrivacyTracking + + +