-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[docs] Setup with staging / production project configurations #452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The may I do it is create multiple schemes and buildTypes on ios/Android. Then as a build step copy over the right GoogleService-info.plist file. Each scheme has a custom property that specifies the filename Build Phases then has a script to copy the right one over Here is the code for the build script: cp -r "${PROJECT_DIR}/thriller/SupportingFiles/${FIREBASE_CONFIG_FILE_PREFIX}-GoogleService-Info.plist" "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist"
echo "${FIREBASE_CONFIG_FILE_PREFIX} Firebase plist copied" For android its as easy as just create directories inside android/app/src/ and build script automatically picks up the right file. The debug json is android/app and is default. |
This is the approach we use too. I'll leave this issue open so we can add some information to the docs. |
New docs are at https://github.com/invertase/react-native-firebase-docs - will need adding there, not sure under what section yet though. |
Could you guys please create a step-by-step setup guide for this in the docs? It would be really helpful for most of us, since I haven't found any guide like this online. Thank you! |
I created a solution that works with App Center: |
Hi guys, thanks for the help on this... I have doubts about how to do this correctly. |
@pmarconi : Those names you see in the first image are targets. |
You can definitely do what they mention, but its much more easier if you want to build a target pointing to a different environment. Also that doc didn't exists when this issue was created. |
Thanks all for the solutions on this and the write-ups. Lets move this discussion over to invertase/react-native-firebase-docs#76 which is a duplicate of this. |
Any chance of reviving as issue #76 is a broken link? |
@krewllobster link is fine now, sorry about that. On a side note this functionality will be coming in a CLI later in the year. |
Hey there, |
@fhuel there are lots of ways to do it. Depends on your desires. Here is a big copy/splat from the Discord where I answered this recently.
|
Hey @mikehardy , thank you! |
Per the CodePush multi-deployment docs, the multi-deployment is only available for React. any ideas how others do it for Angular 8 and iOS ? |
@mikehardy or anyone else that might've done this, sorry I know it's an old issue but I'm trying to setup a prod environment but I'm running into an issue with the android part of the setup where when I'm adding the sha to to prod project I get this error. How did you guys set this up for multiple environments? Did you guys just use the release variant of the sha? |
my multi-backend builds use android package suffix, so the shas and package names are different, it avoids this problem e.g., com.kullki.kscore.dev com.kullki.kscore.staging and then just com.kullki.kscore for prod |
@KrisLau should have tagged you - replied above ☝️ |
Issue
Hi! I was wondering how one would go about settings this up with different GoogleService-info.plist files? I have two configurations (Staging & Production), and for these I want the different plist files.
According to this it's absolutely possible but I don't know how to do this with your wrapper.
Thanks in advance
Environment
The text was updated successfully, but these errors were encountered: