Essentials icon indicating copy to clipboard operation
Essentials copied to clipboard

[Bug] Xamarin.Essentials Share not working on iOS

Open LucioMSP opened this issue 1 year ago • 2 comments

Description

The share sheet does not show any icons of other apps on iOS 15.5 and iOS 15.7.6

Steps to Reproduce

  1. Create a Xamarin.Forms app to consume Xamarin.Essentials Share
  2. Click on that icon to show Share Sheet

Expected Behavior

Share Sheet with icons of other applications

Actual Behavior

Share Sheet is empty

Code Sample

if (Device.RuntimePlatform == Device.iOS) { await Share.RequestAsync(new ShareTextRequest { Title = "Name", Text = "", Subject = "", Uri = ViewModel.PersonalDetail.AccessUrl.ToString() }); }

Basic Information

It happens both on physical device and emulator.

  • Version with issue: N/A

  • Last known good version: N/A

  • IDE: Visual Studio for Mac ENTERPRISE

  • Platform Target Frameworks:

    • iOS: 15.5
  • Nuget Packages:

  • Affected Devices:

Screenshots

Screenshot 2023-07-28 at 2 30 19 PM

Reproduction Link

If I leave the following code in the Uri it displays as follows:

await Share.RequestAsync(new ShareTextRequest { Title = "Name", Text = "", Subject = "", Uri = "htttps.google.com" });

Screenshot 2023-07-28 at 4 21 20 PM

LucioMSP avatar Jul 28 '23 22:07 LucioMSP

Seems like the url isn't valid to share... can you just hard code it in to see what happens?

Also you will want to test it on a real device for sure.

jamesmontemagno avatar Jul 28 '23 22:07 jamesmontemagno

If I have tried physical (real) phones, that's why I dared to create the Issue. With respect to putting it directly, if it works, the detail is when I pass the ViewModel values to it, if it worked before but it seems that in the new version of iOS it doesn't. The code works perfectly on Android.

In fact, in a Console, if the text that I want to share appears. Screenshot 2023-07-28 at 6 20 08 PM

Screenshot 2023-07-28 at 6 19 20 PM

LucioMSP avatar Jul 29 '23 00:07 LucioMSP