Skip to content
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

Added a delegate to AdaWebHost to let apps have control over handling their Universal Link URLs #82

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

Conversation

neo-mo-poroushani
Copy link
Contributor

@neo-mo-poroushani neo-mo-poroushani commented Feb 3, 2023

Description

  • Added a new file for AdaWebHost delegate: AdaWebHost+Delegate.swift
  • Added a new Protocol: AdaWebHostDelegatel
  • Added a default implementation for func adaWebHost(_ host: AdaWebHost, shouldOpenUrl url: URL) -> Bool to have an all-pass implementation.
  • Added a weak reference to an instance of AdaWebHostDelegate to AdaWebHost
  • Updated func openUrl(webView: url:) -> Swift.Void to check if a delegate exists and if the delegate can/will handle the provided URL. If the delegate should handle the URL, it should also return false in response and this function will be bypassed.

This will be an opt-in solution for any framework user to adopt and doesn't have any breaking syntax or functionality changes.

Checklist

  • The steps for distribution have been follow here.
  • A Release Note has been drafted and published after merging to master.
  • PR has been labelled with its impact level

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