Update readme.md - different env in ios (#281)

The use of /tmp/envfile is a bad idea, especially when there is one machine doing multiple builds on the same machine in parallel (eg. build server). 

IMHO it is much better to copy the correct .env.staging file to the default .env file. In this way we are not modifying system-wide files like /tmp/envfile.

Do you guys agree?

Co-authored-by: luancurti <luancurti@gmail.com>
This commit is contained in:
Jelle Slowack 2020-06-13 03:19:54 +02:00 committed by GitHub
parent 23497bd3ee
commit 9740d5faf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -253,11 +253,9 @@ Then edit the newly created scheme to make it use a different env file. From the
- Click "Pre-actions", and under the plus sign select "New Run Script Action"
- Where it says "Type a script or drag a script file", type:
```
echo ".env.staging" > /tmp/envfile # replace .env.staging for your file
cp ${PROJECT_DIR}/../.env.staging .env # replace .env.staging for your file
```
This is still a bit experimental and dirty  let us know if you have a better idea on how to make iOS use different configurations opening a pull request or issue!
## Troubleshooting
### Problems with Proguard