Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Feature] Platform specific variables #757

Open
ste7en opened this issue May 24, 2023 · 0 comments
Open

[Feature] Platform specific variables #757

ste7en opened this issue May 24, 2023 · 0 comments

Comments

@ste7en
Copy link

ste7en commented May 24, 2023

A feature that can be useful is to support platform-specific secrets by prepending a platform prefix as ANDROID_ or IOS_, and later stripping them at build time in order to reference both variations with the same name.
E.g.

ANDROID_API_KEY = my_android_key
IOS_API_KEY = my_ios_key
import Config from 'react-native-config'

const { API_KEY: apiKey } = Config;

PRs #753, #754, #755, #756 add this feature

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant