-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[docs] In Contacts' PhoneNumber, the example countryCode doesn't match iOS values #20746
Comments
This issue is stale because it has been open for 60 days with no activity. If there is no activity in the next 7 days, the issue will be closed. |
This issue is stale because it has been open for 60 days with no activity. If there is no activity in the next 7 days, the issue will be closed. |
This issue is stale because it has been open for 90 days with no activity. If there is no activity in the next 7 days, the issue will be closed. |
# Why <!-- disable:changelog-checks --> <!-- Please describe the motivation for this PR, and link to relevant GitHub issues, forums posts, or feature requests. --> Reference #20746 There is a typo in example. The `countryCode` as pointed out in the issue is a two letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code. # How <!-- How did you build this feature or fix this bug and why? --> This PR updates the example under `PhoneNumber` > `countryCode`. Changes backported to `unversioned` and SDK 49. # Test Plan <!-- Please describe how you tested this change and how a reviewer could reproduce your test, especially if this PR does not include automated tests! If possible, please also provide terminal output and/or screenshots demonstrating your test/reproduction. --> Ran the Snack example locally and using a device. # Checklist <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [ ] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin).
This is now fixed in our latest versioned docs. Thank you for catching this! |
# Why <!-- disable:changelog-checks --> <!-- Please describe the motivation for this PR, and link to relevant GitHub issues, forums posts, or feature requests. --> Reference expo#20746 There is a typo in example. The `countryCode` as pointed out in the issue is a two letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code. # How <!-- How did you build this feature or fix this bug and why? --> This PR updates the example under `PhoneNumber` > `countryCode`. Changes backported to `unversioned` and SDK 49. # Test Plan <!-- Please describe how you tested this change and how a reviewer could reproduce your test, especially if this PR does not include automated tests! If possible, please also provide terminal output and/or screenshots demonstrating your test/reproduction. --> Ran the Snack example locally and using a device. # Checklist <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [ ] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin).
Summary
Hi Expo Team,
I noticed in PhoneNumber that the countryCode example provide is
+1
which seems to indicate that this field should be expected to yield the calling code for the associated phone number's presumed country. As it turns out, testing out the library on iOS I've thus far found that countryCode actually provides the country's ISO 3166-1 alpha-2 country code.As an example, if you create a contact with this Republic of the Congo phone number, you'll find that the library provides the countryCode 'cg' rather than
+242
Should the example maybe instead be
us
?Thanks!
Link to the related docs page
https://docs.expo.dev/versions/latest/sdk/contacts/#phonenumber
Anything else?
No response
The text was updated successfully, but these errors were encountered: