Forum Xamarin.iOS

Open file in default application in iOS app running on Apple Silicon M1 Mac

IllaniaIllania Member

Hi there,
I am working currently on adapting our Email application written on Xamarin iOS to run correctly on Apple Silicon M1. I have faced the following problem that I can't solve so far. The problem is that our code written for iOS that uses UIDocumentInteractionController on Apple Silicon opens "Share to" menu, also if I try to change this to Launcher.OpenAsync() call from Xamarin.Essentials it also opens "Share to" menu instead of opening the file with default application. I tried to use Launcher.OpenAsync() from Xamarin.Mac application and run it directly on Apple Silicon from VS Mac and it works as expected this way - opens file with default application. However when running from iOS application installed on Apple Silicon it always opens "share to" menu. It is a big problem for us as we need to allow user to open attachments files from our email editor. Any ideas what I can try to do to solve the problem?

Tagged:

Answers

  • LucasZhangLucasZhang Member, Xamarin Team Xamurai

    We could not re-set the action of share button directly as it is a private property . As a workaround , we could add a custom share button on the Toolbar of the UIDocumentInteractionController .You could share the relevant code so that I can improve and test it on my side directly .

Sign In or Register to comment.