Skip to content

Conversation

@bikram0000
Copy link

ScreenRecording_06-14-2025 09-39-46_1

@bikram0000 bikram0000 changed the title Added IOS support [desktop_drop] Added IOS support Jun 14, 2025
@boyan01 boyan01 requested a review from Copilot July 22, 2025 03:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds iOS support to the desktop_drop Flutter plugin, extending its drag-and-drop functionality beyond desktop platforms to iOS devices. The implementation uses iOS UIDropInteraction APIs to handle file drops on mobile devices.

  • Adds comprehensive iOS platform support with Swift implementation
  • Updates Flutter plugin configuration to register iOS support
  • Modifies example app to demonstrate iOS functionality with Apple platform detection

Reviewed Changes

Copilot reviewed 29 out of 51 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/desktop_drop/pubspec.yaml Registers iOS platform with DesktopDropPlugin
packages/desktop_drop/lib/src/drop_item.dart Refactors bytes parameter handling for iOS compatibility
packages/desktop_drop/lib/src/channel.dart Adds iOS-specific drop handling case "performOperation_ios"
packages/desktop_drop/ios/desktop_drop/Sources/desktop_drop/DesktopDropPlugin.swift Complete iOS implementation with UIDropInteraction delegate
packages/desktop_drop/ios/desktop_drop.podspec iOS CocoaPods specification
packages/desktop_drop/example/lib/main.dart Updates example to support Apple platforms (iOS + macOS)
packages/desktop_drop/README.md Documents iOS platform support
Files not reviewed (2)
  • packages/desktop_drop/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: Language not supported
  • packages/desktop_drop/example/ios/Runner.xcworkspace/contents.xcworkspacedata: Language not supported
Comments suppressed due to low confidence (2)

packages/desktop_drop/README.md:12

  • The platform name should be 'iOS' instead of 'IOS' to match standard capitalization conventions.
| IOS     | ✅          |

@bikram0000
Copy link
Author

Resolved

@crossle crossle requested a review from Copilot September 27, 2025 05:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 31 out of 53 changed files in this pull request and generated 6 comments.

Files not reviewed (2)
  • packages/desktop_drop/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: Language not supported
  • packages/desktop_drop/example/ios/Runner.xcworkspace/contents.xcworkspacedata: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

/// In this case, the original source path is not available by design.
final bool fromPromise;


Copy link

Copilot AI Sep 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Remove the extra blank line. There should only be one blank line between the field declaration and the constructor.

Suggested change

Copilot uses AI. Check for mistakes.
let package = Package(
name: "desktop_drop",
platforms: [
.iOS("12.0")
Copy link

Copilot AI Sep 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The iOS deployment target should be consistent with the podspec file which specifies '11.0'. Consider updating to iOS 11.0 or ensure both files use the same minimum version.

Suggested change
.iOS("12.0")
.iOS("11.0")

Copilot uses AI. Check for mistakes.
s.dependency 'Flutter'
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }

s.platform = :ios, '11.0'
Copy link

Copilot AI Sep 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The iOS deployment target should be consistent with Package.swift which specifies '12.0'. Consider updating to iOS 12.0 or ensure both files use the same minimum version.

Suggested change
s.platform = :ios, '11.0'
s.platform = :ios, '12.0'

Copilot uses AI. Check for mistakes.
Comment on lines +6 to +7


Copy link

Copilot AI Sep 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Remove the extra blank line. There should only be one blank line between the imports and the class declaration.

Suggested change

Copilot uses AI. Check for mistakes.
Comment on lines +264 to +268




func mimeType(for url: URL) -> String {
Copy link

Copilot AI Sep 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Remove the excessive blank lines. There should only be one blank line between method declarations.

Copilot uses AI. Check for mistakes.
Comment on lines +295 to +298



}
Copy link

Copilot AI Sep 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Remove the extra blank lines before the closing brace. There should be no blank lines before the final closing brace.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant