Resolve Promise to YES for Linking.openURL#24955
Resolve Promise to YES for Linking.openURL#24955thib92 wants to merge 1 commit intofacebook:masterfrom
Conversation
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
facebook-github-bot
left a comment
There was a problem hiding this comment.
@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
This pull request was successfully merged by @thib92 in 4a5d0bd. When will my fix make it into a release? | Upcoming Releases |
Summary: The `Linking.openURL()` method is supposed to resolve to a `true` `Promise` when the URL was properly open. However, in iOS, the `Promise` was resolving to `nil`. So I fixed this issue by making it resolve to `YES` (`true`), just like on Android. ## Changelog [iOS] [Fixed] - Fix return value of `Linking.openURL()` Pull Request resolved: facebook#24955 Differential Revision: D15411994 Pulled By: cpojer fbshipit-source-id: 90bdd6cfae8d69d7a239a0b4c84d75859e293b32
Summary
The
Linking.openURL()method is supposed to resolve to atruePromisewhen the URL was properly open. However, in iOS, thePromisewas resolving tonil. So I fixed this issue by making it resolve toYES(true), just like on Android.Changelog
[iOS] [Fixed] - Fix return value of
Linking.openURL()Test Plan
Create a sample app, and use the Linking API to open a URL (I use Uber deeplinks:
uber://, followingtheir deep-links docs). Make sure that the Promise resolves to
trueon the JS side.With the code from the version I use for my project (
0.59.1), I receivedundefined. With these changes, I receivedtrueon the JS side.