.Net MAUI Drag & Drop fails on Mac Catalyst

TL;DR — The Problem in a nutshell

Drag & Drop seems to be broken for .Net MAUI apps on Mac Catalyst, but only on Apple Silicon devices. I need a fix or workaround, but so far I’ve been unsuccessful.

Problem Details

I have built a non-trivial B2B app in .Net Maui 8 that relies heavily on “drag and drop” functionality to copy images from a list to a 2D layout. The client recently expanded project scope to include MacOS support (we previously supported iPad and Windows). Unfortunately, when running the app on Mac via Mac Catalyst, drag & drop is broken. When dragging begins, the following error message is displayed in debug output:

2024-07-16 06:31:15.674 MacCatalystDragDropTest[1058:13565] Cannot find representation conforming to type com.apple.uikit.private.drag-item

Dragging appears to begin (the dragged item moves with the mouse pointer as expected). When I attempt to drop on the target, the following error appears in the debug output:

2024-07-16 06:31:16.294 MacCatalystDragDropTest[1058:13565] *** Assertion failure in -[NSFilePromiseReceiver receivePromisedFilesAtDestination:options:operationQueue:reader:], NSFilePromiseReceiver.m:349

The events/commands on the DropGestureRecognizer of the target do not fire, and the source element cannot be dragged again until the app is restarted.

Reproducing the Problem

I have created an extremely basic test app to confirm that the problem was not related to application-specific code in the main app. You can find the test app at this repo. It is a stock .Net Maui app with the following elements added to MainPage.xaml:

<Image Source="dotnet_bot.png">
    <Image.GestureRecognizers>
        <DragGestureRecognizer/>
    </Image.GestureRecognizers>
</Image>

<Image Source="dotnet_bot.png">
    <Image.GestureRecognizers>
        <DropGestureRecognizer/>
    </Image.GestureRecognizers>
</Image>

This sample app displays identical behavior to my original app. Please note that this behavior has not yet been observed on Intel Macs. It has been confirmed on at least two devices using the Apple M2 processor.

My Mac Development Environment

  • Mac Mini with an Apple M2 processor
  • MacOS Sonoma 14.5 (also tested on 14.1.1)
  • Xcode 15.4
  • .Net SDK 8.0.303 (also observed in an earlier version)
  • .Net MAUI workload 8.0.61/8.0.100
  • .Net MAUI version 8.0.70 (also observed with 8.0.61 and another earlier version)

What I’ve Tried

  • Create a clean app to test (see above)
  • Completely uninstall .Net & Mono from my Mac and reinstall (same problems as before)
  • Attempt to bypass Gesture Recognizers and add UI interaction code directly to the native views following this and this example code. (The problem persists)
  • Report the problem to Microsoft. (They confirmed the behavior but then fell silent).

What I need

A way forward! Can you help? Is there an alternate method to working with the native views? Something I’m missing with the GestureRegonizers?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật