-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Feature/14 add support for simctl openurl #16
Feature/14 add support for simctl openurl #16
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 compiled & pushed the binary using make buildSimctlCLI
in order to help my testing against this branch. Happy to revert if you prefer compiling the binary which goes to master.
Hey @limey thanks for your contribution 🥳 |
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.
Will generate the binary again myself just to verify when I'm back. Otherwise LGTM 🚀
Description
The changes in this PR enable the
Simctl
client to open URLs directly in the simulator. This allows testing internal deep links by opening URLs which applications can register using custom URL shemes.The underlying simctl command invoked by the server is
simctl openurl <device> <URL>
.This PR aims to resolve Issue 14.
Detailed Design
The implementation follows the overall pattern used by other SimctlCLI commands.
func openUrl(_ url: URL, completion: @escaping DataTaskCallback)
. This function wraps the URL in aURLContainer
Codable type.func onOpenUrl(_ closure: @escaping (UUID, String?, URL) -> ...
case openURL(SimctlClientEnvironment, URLContainer)
.Documentation
README.md
now mentions the feature.SwiftSimctlExample
project to illustrate usage via code.Testing
Tested in SwiftSimctlExample project.
Performance
The feature adopts the same architecture as other commands and subjectively performs without issue in tests.
Source Impact
This will extend the public API so should result in a minor version increase.
Checklist