GertjanReynaert / react-native-device

A UIDevice class wrapper for React Native
179 stars 34 forks source link

[Suggestion] Using the UIDevice class #3

Closed paramaggarwal closed 9 years ago

paramaggarwal commented 9 years ago

Ideally given the use case for detecting the device, you'd want to use UIDevice, right? Moving to it would be a pretty big shift for the entire repo, but will keep the library relevant when new devices come out. It also fits in with the name of the repo itself. What do you think?

Imagine exposing all of this in JS: GBDeviceInfo

GertjanReynaert commented 9 years ago

@paramaggarwal Great suggestion, Since facebook uses UIScreen for the dimensions I currently use, I was thinking of combining both UIScreen and UIDevice.

However since my knowledge of objective-c (and integrating it with react native) is pretty basic, this could take a while.

Any help (hints or pr's) are definitely welcome.

pickhardt commented 9 years ago

I agree. That's how I found this repo, in fact. I am looking for the full name of the device (e.g. "John Smith's iPhone" If you could pass through the values from UIDevice that would fit with what I expected the repo to do. Any UIScreen stuff is a nice bonus.

kkjdaniel commented 9 years ago

11