lugg / react-native-config

Bring some 12 factor love to your mobile apps!
MIT License
4.82k stars 657 forks source link

How to used with react-native code push??? #120

Open 2ducanhpham opened 7 years ago

2ducanhpham commented 7 years ago

I have error: screen shot 2017-05-24 at 9

ujwal-setlur commented 7 years ago

Did you try with --targetBinaryVersion <version>?

damathryx commented 7 years ago

Same here. this doesnt seem to be compatible with code push. Code push cant pick up the env variables

coreyar commented 7 years ago

I haven not tried with iOS but can confirm it does work with Android. I imagine the process is the same for iOS.

You will need to create a build and deploy it. After that, you can target that version with --targetBinaryVersion <version> and push your code updates.

code-push release-react <appName> android --targetBinaryVersion "<version>";'

acomito commented 6 years ago

sounds like I can change my current npm script from

"codepush-staging": "appcenter codepush release-react -a MyOrg/my-app -d Staging

to

"codepush-staging": "appcenter codepush release-react -a MyOrg/my-app -d Staging --targetBinaryVersion Staging

Does that seem right @CoreyAR ?

daominhsangvn commented 3 years ago

@acomito i just running into this issue and resolved by following command, in case someone having this issue, here the solution: Let's says the app version in the store is 1.0.1 then you run following command to push the update code to it

appcenter codepush release-react -a <owner>/<app-name> -d <environment> --target-binary-version "1.0.1" -m --description "some description"
mosef commented 3 years ago

@acomito i just running into this issue and resolved by following command, in case someone having this issue, here the solution: Let's says the app version in the store is 1.0.1 then you run following command to push the update code to it

appcenter codepush release-react -a <owner>/<app-name> -d <environment> --target-binary-version "1.0.1" -m --description "some description"

This worked perfectly for me. Thanks!!

oraci commented 3 years ago

Hey guys, could anyone give me some hints on why my code push stopped working when I try to configure react config? If I remove the line apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle", code push return to work. I just have create a new project react-native.

gabrielbezerra81 commented 3 years ago

Hey guys, could anyone give me some hints on why my code push stopped working when I try to configure react config? If I remove the line apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle", code push return to work. I just have create a new project react-native.

Does it alert updates but wont install? happened the same here. See this issue. Unfortunately only the first update worked here, subsequent updates are stuck in boot loop.