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

Adding more precise detection of Expo Go #6523

Merged
merged 2 commits into from
Apr 10, 2024
Merged

Adding more precise detection of Expo Go #6523

merged 2 commits into from
Apr 10, 2024

Conversation

kraenhansen
Copy link
Member

@kraenhansen kraenhansen commented Mar 1, 2024

What, How & Why?

Many newcomers to Realm and Expo gets confused about the fact that Expo Go doesn't ship with native modules.
Instead of showing a generic error when failing to load our native module, I suggest adding an attempt to detect Expo Go and showing a more direct message, with actionable steps:

Screenshot 2024-03-01 at 21 57 20

☑️ ToDos

  • 📝 Changelog entry
  • 📝 Compatibility label is updated or copied from previous entry
  • 📝 Update COMPATIBILITY.md
  • 🚦 Tests (manually)
  • 📦 Updated internal package version in consuming package.jsons (if updating internal packages)
  • 📱 Check the React Native/other sample apps work if necessary
  • 💥 Breaking label has been applied or is not necessary

@kraenhansen kraenhansen self-assigned this Mar 1, 2024
@cla-bot cla-bot bot added the cla: yes label Mar 1, 2024
@kraenhansen kraenhansen changed the title Adding more precise detection Expo Go Adding more precise detection of Expo Go Mar 1, 2024
@kraenhansen kraenhansen added the no-jira-ticket Skip checking the PR title for Jira reference label Apr 10, 2024
Copy link
Contributor

@elle-j elle-j left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 🤓


import { Platform } from "react-native";

export function isExpoGo() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it need to be exported?

Suggested change
export function isExpoGo() {
function isExpoGo() {

@kraenhansen
Copy link
Member Author

Coverage test is still crashing (#6589) but that's not new - I'll go ahead and merge with it.

@kraenhansen kraenhansen merged commit 41cd501 into main Apr 10, 2024
30 of 31 checks passed
@kraenhansen kraenhansen deleted the kh/expo-go-error branch April 10, 2024 12:33
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes no-jira-ticket Skip checking the PR title for Jira reference T-Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants