【问题标题】:How to use environment variables for Android and iOS in React Native?如何在 React Native 中使用 Android 和 iOS 的环境变量?
【发布时间】:2020-08-10 21:57:34
【问题描述】:

我目前正在 React Native 中构建一个应用程序并使用 Auth0 进行身份验证。配置需要在 Android 代码中使用一些变量。我对部署不太了解,但我想知道在 Android 和 iOS 中为不同的开发和生产替换环境变量的最简单方法是什么。

【问题讨论】:

    标签: android ios react-native


    【解决方案1】:

    查看react-native-config

    在 React Native 中向您的 javascript 代码公开配置变量的模块,同时支持 iOS 和 Android。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-02-04
      • 2022-12-19
      • 2016-01-12
      • 1970-01-01
      • 2022-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多