Android multiline properties don't work
ChristiaanWillemsen opened this issue · 2 comments
Describe the bug
So, I need an environment variable with multiline content. In my case a private key. In .env:
REACT_APP_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nAAAAA\n-----END PRIVATE KEY-----"
in code:
import {REACT_APP_PRIVATE_KEY} from '@env';
This seems to work fine in iOS, I get the whole string in perfect multiline glory.
In Android, however, I only get the first line, the rest is cut off.
To Reproduce
Steps to reproduce the behavior:
create a .env with the above contents, and some typescript file that prints out the environment variable.
Expected behavior
It to behave the same for both platforms
Smartphone (please complete the following information):
- Device: iPhone 13 ProiOS 163, Android emulator
- OS: iOS 16.4 vs Android API 33
- package version 3.4.8
Hey, thank you for opening this issue! 🙂 To boost priority on this issue and support open source please tip the team at https://issuehunt.io/r/goatandsheep/react-native-dotenv/issues/425
Please consider this as not send. There seems to have been an other issue.