react-native-keys
react-native-keys copied to clipboard
Read env from Fastfile
Hi Guys, is possible to read env from keys to fastfile for fastlane feature?
I've try with ENV["APPCENTER_KEY"] is not working yet, same way with react-native-config.
Thanks in advance
π @detatsatrio Thanks for opening your issue here! If you find this package useful hit the starπ!
Hi Guys, is possible to read env from keys to fastfile for fastlane feature?
I've try with ENV["APPCENTER_KEY"] is not working yet, same way with react-native-config.
Thanks in advance
U can use this function to load env:
lane :load_env_from_json do |params|
# Load environment variables from the JSON file
json_data = JSON.parse(File.read(params[:file]))
# Set the environment variables
json_data.each do |key, value|
json_data.each do |scope, values|
values.each do |key, value|
ENV["#{key}"] = value
end
end
end
end