You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
global.android is defined when the app is running on a Android. However global.ios is never defined. Either add global.ios or remove global.android to keep platform consistancy as when anyone sees a global.android they will assume the other global.PLATFORMS exists also.
The text was updated successfully, but these errors were encountered:
I believe that android comes from the native Android namespaces exposed while in the other hand there are no namespaces in iOS platform and that is why there is no global ios object defined.
If you want to check in your code what is the current platform you can use our platform module.
@NathanaelA: @enchev is correct - the Android Runtime injects these top-level packages directly into the global context. Consider for example the android.widget.Button expression - android here is actually global.android. In iOS there are no such top-level packages, the entire API is available at the global context and the equivalent of the previous expression is UIButton. So, global.android is not something that we do explicitly to mark the current execution context. It is just the way the native Android APIs work. With that said, adding an artificial global.ios property, be it at Runtime or at JS level, simply does not make sense to me. Still, you can always have your app.ios.js where you register it for your application.
global.android is defined when the app is running on a Android. However global.ios is never defined. Either add global.ios or remove global.android to keep platform consistancy as when anyone sees a global.android they will assume the other global.PLATFORMS exists also.
The text was updated successfully, but these errors were encountered: