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

openURL(_:) is deprecated #7448

Open
samtheprogram opened this issue Jul 2, 2019 · 2 comments
Open

openURL(_:) is deprecated #7448

samtheprogram opened this issue Jul 2, 2019 · 2 comments

Comments

@samtheprogram
Copy link

@samtheprogram samtheprogram commented Jul 2, 2019

Is your feature request related to a problem? Please describe.
UIApplication#openURL(_:) is deprecated since iOS 10. It appears to be available still in iOS 12, but it will eventually need to be replaced and I could not find an issue for this.

This is used by tns-core-modules/utils's openUrl here.

Describe the solution you'd like
Switch to the Apple recommended UIApplication#open(_:options:completionHandler:)

Describe alternatives you've considered

  • Continue using openURL until it is not available in a new iOS SDK release.
  • Use open(_:options:completionHandler:) directly (not necessary yet / with current SDKs)

Additional context
I have not downloaded the headers for iOS 13 developer preview to see if openURL(_:) unavailable in the next version, but I assume it will be since Apple's own documentation still references it in UIApplication's overview.

Also, there are implications that may have to surface up to the tns-core-modules API since the deprecated openURL is synchronous, but the replacement is asynchronous.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@NickIliev
Copy link
Member

@NickIliev NickIliev commented Jul 3, 2019

Although this is not actually a bug (yet) I will mark it as one so we that the issue can be prioritized. Marking as a good-first-issue - anyone interested in contributing and implementing the newly introduced API is welcome.

@manoldonev manoldonev changed the title [ios] openURL(_:) is deprecated openURL(_:) is deprecated Jul 3, 2019
@samtheprogram
Copy link
Author

@samtheprogram samtheprogram commented Jul 9, 2019

@NickIliev I'm willing to contribute here, but I'm not sure how to proceed regarding my comment on the API implications:

Also, there are implications that may have to surface up to the tns-core-modules API since the deprecated openURL is synchronous, but the replacement is asynchronous.

The current NS API passes on the success boolean for the call to openURL, however Android's call is still synchronous. Making the NS API asynchronous for either or (preferably) both Android & iOS would be a breaking change.

In the meantime I'll review the contributing document you link to. Thanks for the quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.