Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

iPhone 12 Pro Max not being recognized #32

Open
castrolem opened this issue Nov 23, 2020 · 8 comments
Open

iPhone 12 Pro Max not being recognized #32

castrolem opened this issue Nov 23, 2020 · 8 comments

Comments

@castrolem
Copy link

Issue

We have an app that has support for all iPhone sizes, and we use the plug in to set a consistent marginTop layout from the notch on one of our UI components.

How to reproduce

  • Install npm package on a create-react-native-app project.
  • console.log(isIphoneX()) on App.js.
  • Run a new iPhone 12 Pro Max simulator.
  • console output is always false.
@osikes
Copy link

osikes commented Dec 2, 2020

Seeing the same thing + 1

@ptelad
Copy link
Owner

ptelad commented Dec 2, 2020

Are you using the latest 1.3.0?

@castrolem
Copy link
Author

Are you using the latest 1.3.0?

Yup, using ^1.3.1

@ptelad
Copy link
Owner

ptelad commented Dec 2, 2020

What value are you getting from Dimensions.get('window').width and height?

@castrolem
Copy link
Author

castrolem commented Dec 2, 2020

@ptelad just tested, {height: 926, width: 428 } and asked around about it when we upgraded to 1.3.1 that fixed the issue for us. (sorry, another team in my company ended up taking this one)

@osikes
Copy link

osikes commented Dec 3, 2020

1.3.1 resolved for me as well.

@daaashleywch
Copy link

@castrolem The original comment points this out as a problem but semantically, based on the library name, this would be correct behavior. The iPhone 12 is not an iPhone X. This gave me a lot of confusion just now while updating my orgs legacy app. Maybe you could consider adding a custom isIphone12() function?

@castrolem
Copy link
Author

@daaashleywch I agree, the name of the library hasn't aged well, but the description of the library is accurate

A library to help you design your react-native app for notched iPhones

And the 12 Pro Max is a notched iPhone, previous versions (before 1.3.1) worked with other 12 versions, just the Pro Max had the issue, no longer an issue after 1.3.1. 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants