Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

[Bug] Xamarin.Essentials Share not working on iOS #2096

Open
LucioMSP opened this issue Jul 28, 2023 · 2 comments
Open

[Bug] Xamarin.Essentials Share not working on iOS #2096

LucioMSP opened this issue Jul 28, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@LucioMSP
Copy link

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 LucioMSP added the bug Something isn't working label Jul 28, 2023
@jamesmontemagno
Copy link
Collaborator

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.

@LucioMSP
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants