Skip to content

Fix: iOS share text formatting for URLs#2

Open
wilsonatb wants to merge 1 commit intoNativePHP:mainfrom
wilsonatb:fix/ios-share-newline-format
Open

Fix: iOS share text formatting for URLs#2
wilsonatb wants to merge 1 commit intoNativePHP:mainfrom
wilsonatb:fix/ios-share-newline-format

Conversation

@wilsonatb
Copy link
Copy Markdown

Summary

  • make iOS share URL payload match Android behavior
  • send text and URL as a single string separated by \n\n
  • avoid duplicated title/message items in the iOS URL-sharing path

Problem

On iOS, UIActivityViewController was receiving separate items for title, text,
and URL. Some targets like WhatsApp concatenate them without preserving the expected
line breaks, causing the URL to appear attached to the last line of the message.

Fix

Build a single shared text block for URL-based sharing:

  • text + "\n\n" + url in Share.Url
  • message + "\n\n" + filePath in the URL branch of Share.File

This keeps the change minimal and aligns iOS behavior with Android.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant