question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[iOS][ActionSheetIOS] Url is not shared when share from copy

See original GitHub issue

Description

Copy option in ActionSheetIOS#showShareActionSheetWithOptions() won’t share url and only share message when passing options with url and message .

when passing options like below

{
   url: "https://some.url.com",
   message: "message for share"
}

and click “Copy”, it will only copy “message for share” and not including url.

This occurs every time in simulator (iOS13.5 iPhone11) and in real device under some condition (not sure the exact condition).

As document of ActionSheetIOS#showShareActionSheetWithOptions() (https://reactnative.dev/docs/actionsheetios) says

Display the iOS share sheet. The options object should contain one or both of message and url and can additionally have a subject or excludedActivityTypes:

I thought this would be a some kind of bug. If not I want some link to document that describes this behavior.

React Native version:

0.61.4

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. use ActionSheetIOS#showShareActionSheetWithOptions()
  2. pass options with message and url
  3. click copy option
  4. only message is copied to clip board

Expected Results

Copied text is expected to be message and with url.

Snack, code example, screenshot, or link to a repository:

ActionSheetIOS.showShareActionSheetWithOptions(
  options,
  error => {
    // do some error handling
  },
  (success, activityType) => {
    // do some success option
  },
);

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
dhirajj14commented, Jul 24, 2020

So I was working on this issue and found out that the url is only copied when it has http:// or https: protocol. And I tried to reproduce the same bug using steps give by @omuomugin but it worked for me https://snack.expo.io/@dhirajj75/actionsheetios

0reactions
omuomugincommented, Aug 5, 2020

Closing this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

sharing urls broken on iOS 14? | Apple Developer Forums
My app uses UIActivityViewController to let the user share a URL. ... This doesn't happen if they choose Copy to send it to...
Read more >
iOS Share Sheet and Copy options paste link not working in ...
Has anyone experienced this issue in the paste? Is there some lifecycle/delegate that needs to be implemented to handle the shared text? ios ......
Read more >
IOS 13: How to Copy a Webpage Link To Share to ... - YouTube
Learn how you can copy a webpage link to share to another app on iPhone / iPad running iOS 13.iOS 13.FOLLOW US ON...
Read more >
Navigator.share() - Web APIs - MDN Web Docs
A URL is badly formatted. Files are specified but the implementation does not support file sharing. Sharing the specified data would be ...
Read more >
Share or copy link to current page in mobile app
Clicking the link would allow the url to the page to be shared to various applications or (am not sure if this is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found