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

Add safari dependency values #197

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

Conversation

d-date
Copy link

@d-date d-date commented Mar 22, 2024

Using SFSafariViewController in the context of SwiftUI does not work well around navigation.
Therefore, using it in the context of UIKIt works better.

In other platform, EnvironmentValues().openURL is used same as @Dependency(\.openURL) .

cf: https://sarunw.com/posts/sfsafariviewcontroller-in-swiftui/

Using `SFSafariViewController` in the context of SwiftUI does not work well around navigation. Therefore, using it in the context of UIKIt works better.
cf: https://sarunw.com/posts/sfsafariviewcontroller-in-swiftui/
@stephencelis
Copy link
Member

stephencelis commented Mar 23, 2024

Thanks for the PR @d-date! You're packing your schedule quite a lot 😄

Do you have a sample code showing the problem in UIKit using @Dependency(\.openURL)? If there's a problem there I wonder if we should even update openURL itself.

@d-date
Copy link
Author

d-date commented Mar 26, 2024

Hi @stephencelis and @mbrandonw,
Your talk and workshop are really awesome! I'll work with you as a contributor 😄

I mean @Dependency(\.openURL) works well, but when somebody wants to use SFSafariViewController, they lost way without workaround. This PR save them.

You can check our PR and how we modified.
tryswift/trySwiftTokyoApp#45

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.

None yet

2 participants