Essentials icon indicating copy to clipboard operation
Essentials copied to clipboard

[Bug] Share.RequestAsync does not open a share sheet on iPad iOS 13.3

Open Burgler-dev opened this issue 6 years ago • 14 comments

Description

The sharing works fine on iPhone and even on iPad iOS10, but not on iPad's with iOS13.3 No share sheet appears.

Steps to Reproduce

  1. Just call a Share.RequestAsync, optionally on the main thread. await Share.RequestAsync(new ShareTextRequest { Uri = "http://myurl", Title = "My Title" }); I supplied an example forms project.

Expected Behavior

a share sheet should appear

Actual Behavior

nothing appears

Basic Information

  • Version with issue: Xamarin.Essentials 1.3.1
  • Last known good version: none
  • IDE: Visual Studio for Mac 8.4 build 2637
  • Platform Target Frameworks:
    • iOS: 11.3
  • Nuget Packages: Xamarin.Essentials 1.3.1
  • Affected Devices: iPad

Reproduction Link

ShareTest.zip

Burgler-dev avatar Dec 18 '19 08:12 Burgler-dev

Duplicate of #942

jamesmontemagno avatar Dec 18 '19 19:12 jamesmontemagno

I think the problem is addressed in #1002 and will be available in the 1.4.0 release.

Burgler-dev avatar Dec 19 '19 07:12 Burgler-dev

@jamesmontemagno Is #942 the same issue? That appears to be related to the title and URL not appearing in reminders, this bug is related to the share sheet not appearing at all.

FYI I am also having the issue, I will have to rollback to a version without this bug for now.

RuddyOne avatar Dec 19 '19 09:12 RuddyOne

@jamesmontemagno I think it's more a duplicate of #979

Burgler-dev avatar Dec 19 '19 09:12 Burgler-dev

Ah yea, looks like duplicate of https://github.com/xamarin/Essentials/pull/1002 and #979

jamesmontemagno avatar Dec 19 '19 16:12 jamesmontemagno

@Ruddy2007 are you saying that a previous version works but a new version does not? I would like to know the version numbers so I can go through and look at code changes.

jamesmontemagno avatar Dec 19 '19 16:12 jamesmontemagno

@jamesmontemagno I was wrong, I tested the previous plugin versions assuming it would be an update that causes the bug. Turns out it is, in fact, iOS 13.2+ that causes the issue, not a code change.

RuddyOne avatar Dec 19 '19 16:12 RuddyOne

@jamesmontemagno This issue is back.

g4mb10r avatar Apr 23 '20 19:04 g4mb10r

with file have I issue too. await Share.RequestAsync(new ShareFileRequest { Title = Title, File = new ShareFile(filepath) });

maschunya avatar May 19 '20 12:05 maschunya

Was fixed in 1.5.3.2: https://github.com/xamarin/Essentials/issues/1247 also has best practice on how to handle on iPad to set the rect.

jamesmontemagno avatar May 21 '20 16:05 jamesmontemagno

It appears to be back in 1.7.0 for iOS 13.2+.

najak3d avatar Sep 16 '21 06:09 najak3d

I have it again on iPad iOS 15.2 & Xamarin.Essentials 1.7.0

ArtjomP avatar Jan 11 '22 18:01 ArtjomP

I still have this issue with Xamarin.Essentials 1.7.3 on iOS platform.

cdefgah avatar May 12 '22 08:05 cdefgah

To overcome this bug you should pass View instance as Command parameter. And make sure that there are no additional views appear in time between you clicked on the Command and the "Share" window has appeared. I.e no confirmation popups, etc. Otherwise View parameter will be null or incorrect.

For more information check Xamarin.Essentials samples, "Share" sample in "Sharing file" part.

cdefgah avatar May 15 '22 12:05 cdefgah