Open hboon opened 7 years ago
@jjaffeux @Watson1978 @andrewhavens ?
note : the platform module of react-native https://facebook.github.io/react-native/docs/platform-specific-code.html#platform-module
I'm not convinced that an Application
class would be useful/necessary/intuitive. I kind of feel like build_number
is a config setting, or something related to the current build, but not ever something you would reference in your application code.
I think a Platform
class makes a lot of sense.
if Platform.iOS?
puts Platform.sdk_version
end
if Platform.android?
puts Platform.api_version
end
Though, a Device
class may also be a nice alternative:
Device.platform.iOS?
if Device.platform.android?
puts Device.api_version
puts Device.scale
puts Device.screen.width
end
Related to #58.
UI doesn't look like a place to add
build_number
andversion_string
. @jjaffeux suggestedApplication
orPlatform
. This might also be a place for "utility" functions such as retrieving the environment (test, prod, etc).Since Flow is marked as WIP, we can go ahead with something and refactor later? :)
Ideas?