-
Notifications
You must be signed in to change notification settings - Fork 88
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
Add cross-origin redirect delegate #203
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this approach much better! I tested running against the demo PR and everything works as expected after adding the require delegate callback.
I added one suggestion to make the documentation even more obvious where the cross-origin redirect handling code should go.
navigationController.popViewController(animated: false) | ||
UIApplication.shared.open(url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
navigationController.popViewController(animated: false) | |
UIApplication.shared.open(url) | |
func session(_ session: Session, didProposeVisitToCrossOriginRedirect url: URL) { | |
navigationController.popViewController(animated: false) | |
UIApplication.shared.open(url) | |
} |
Hi @pfeiffer @joemasilotti , I was wondering if there is a reason this is not merged? Is this waiting for something, or just not merged yet because of time? |
We migrated to Hotwire Native before resolving this issue. Please open an issue/PR on that repo if you'd like to continue the discussion! |
I'm closing this since the approach does not work across all applications with the javascript We're going to bring this same approach to Hotwire Native iOS as well, shortly. |
Follow-up of #201.
As discussed in #201 it would be preferrable to handle cross-origin redirects in the
SessionDelegate
.This PR takes a stab at that to get the ball rolling so we can get feature parity between iOS and Android libs again :-)