Skip to content

feat: added some options in Linking.addEventListener #52451

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hellohublot
Copy link
Contributor

@hellohublot hellohublot commented Jul 5, 2025

Summary:

Unifies openURL, openURL:sourceApplication:annotation:, and continueUserActivity: handling by routing all through postNotificationWithURL, allowing full context (sourceApplication, annotation, activityType, etc.) to be passed to JS.

Fixes: #31283

Changelog:

[IOS] [CHANGED] Unify URL handling in LinkingManager and include full options in event payload

Test Plan:

Tested opening URLs via:

  • Opened deep links from external apps (rntester://)
  • Confirmed full payload received in JS (url, sourceApplication, activityType, etc.)
const [event, setEvent] = useState({})
useEffect(() => {
  Linking.addEventListener('url', event => {
    setEvent(event)
  })
}, [])
return (<Text style={{ textAlign: 'center', marginTop: 200 }}>{JSON.stringify(event)}</Text>)

Expected Behavior:

_ios.mp4
  • sourceApplication is nil when the link is opened from a system app (e.g. Safari or Mail). It’s only available when opened via a third-party app due to iOS privacy behavior.
  • I’d suggest not including options in the official documentation, as its keys are not fixed.

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Jul 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deep Linking options
2 participants