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

[expo-constants] Add support for running on simulators on M1 #11445

Merged
merged 8 commits into from Dec 30, 2020

Conversation

sjchmiela
Copy link
Contributor

Why

devicePlatform on a simulator running on an M1 computer resolves to "arm64" for which a human-readable value isn't defined, thus returning nil which we don't expect when building a dictionary which causes ExponentConstants to not be available.

How

Added support for new device platform in all places I could find it (expo-constants, expo-device).

Test Plan

Applying this patch on an M1 computer does fix the issue.

@github-actions
Copy link
Contributor

Native Component List for this branch is ready

Copy link
Member

@tsapeta tsapeta left a comment

Choose a reason for hiding this comment

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

👍

sjchmiela added a commit that referenced this pull request Dec 29, 2020
# Why

New devices have been released.

# How

Compared our and [`react-native-device-info`'s list](https://github.com/react-native-device-info/react-native-device-info/blob/master/ios/RNDeviceInfo/RNDeviceInfo.m). It was a bit tough given ours is grouped by device and theirs by release date, I'm not sure if grouping makes it much easier to maintain the list.

Note that `arm64` simulator support is added in #11445.

# Test Plan

None.
@sjchmiela sjchmiela force-pushed the @sjchmiela/fix-expo-constants-m1 branch from 4788bbb to 8f08949 Compare December 29, 2020 11:38
@sjchmiela sjchmiela requested a review from ide December 29, 2020 11:39
Copy link
Member

@ide ide left a comment

Choose a reason for hiding this comment

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

Thank you!

docs/pages/versions/unversioned/sdk/constants.md Outdated Show resolved Hide resolved
Co-authored-by: James Ide <ide@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants