-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Linking.openUrl with a telephone number throws an error #26554
Comments
It looks like you are using an older version of React Native. Please update to the latest release, v0.61 and verify if the issue still exists. The "Resolution: Old Version" label will be removed automatically once you edit your original post with the results of running `react-native info` on a project using the latest release.
|
This is expected, you can not make phone calls on simulator, if you test this on a real device you will see that it works. |
@lucasbento That makes sense. Thanks! Would it be possible to throw an error message indicating that to prevent any confusion? |
Maybe instead of an error it could be a warning? (since Hacktoberfest is close and I think that it's not too complicated - but I may be wrong - I'll also add the good first issue label) |
Yeah, this definitely would benefit from a better error message! |
Summary: This PR, tries to fix the problem at #26554 ## Changelog iOS Fixed - Now it will show a warning when trying to use it inside a simulator, instead of throwing a red screen error. ## Notes Docs PR opened as well at: facebook/react-native-website#1295 <img width="418" alt="image" src="https://user-images.githubusercontent.com/12865914/65734976-532ebc00-e0cd-11e9-8e8c-2b4a5a7b8aea.png"> Pull Request resolved: #26607 Differential Revision: D17661091 Pulled By: cpojer fbshipit-source-id: 3d660f25546374adfa3436e2954c9c27750039b7
@kelset I think this can be closed now 😺 |
awesome, thanks! |
React Native version:
System:
OS: macOS Mojave 10.14.6
CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
Memory: 37.91 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.4.0 - ~/.nvm/versions/node/v12.4.0/bin/node
Yarn: 1.12.1 - ~/.yarn/bin/yarn
npm: 6.9.0 - ~/.nvm/versions/node/v12.4.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
Android SDK:
API Levels: 27, 28
Build Tools: 27.0.3, 28.0.0, 28.0.2, 28.0.3
System Images: android-28 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5791312
Xcode: 10.3/10G8 - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.0 => 0.61.0
Steps To Reproduce
react-native init phonetest
react-native run-ios
Describe what you expected to happen:
Dialog box asking whether to call the number or cancel
Instead, received the following error:
The text was updated successfully, but these errors were encountered: