Open nemupm opened 4 years ago
This issue does not seem to follow the issue template. Make sure you provide all the required information.
@nemupm
I am pretty sure our Firebase C++ SDK supports GoogleServices-Info.plist. Have you tried the instructions in our C++ quickstart? Remote config testapp here for example.
Currently C++ SDK does not have API to load config from a file like iOS SDK. However, you should still be able to create FirebaseApp with given ApiKey, AppId and ProjectId, like the example here.
Let us know if this works for you. If not, please describe your concern.
Shawn
Hey @nemupm. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
@chkuang-g Thanks for your reply!
Currently C++ SDK does not have API to load config from a file like iOS SDK. However, you should still be able to create FirebaseApp with given ApiKey, AppId and ProjectId, like the example here.
Yes, I understand that, but I think it is easier to load from plist.
But, I've resolved the problem by the following script in the build phases, so it is ok to close the issue.
origin_plist="${PROJECT_DIR}/plists/firebase/GoogleService-Info-${PRODUCT_BUNDLE_IDENTIFIER}.plist"
if [ -f "${origin_plist}" ]; then
cp "${origin_plist}" "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist"
fi
Hmm...I think this is a valid feature request.
iOS has API to load AppOption given a path. https://firebase.google.com/docs/reference/swift/firebasecore/api/reference/Classes/FirebaseOptions#/c:objc(cs)FIROptions(im)initWithContentsOfFile:
Android only have API to load AppOption from a string resource, but not from a path. https://firebase.google.com/docs/reference/android/com/google/firebase/FirebaseOptions#public-static-firebaseoptions-fromresource-context-context
To implement this feature, we will need to figure out the equivalent API in Android SDK side so that C++ SDK can wrap them properly.
I'll keep this as a feature request. Also your workaround is valuable for others in your situation as well.
Please up-vote this feature if this is consider critical to your team.
Thank you for reporting this.
Is there any way to load configs from GoogleService-Info.plist for multi projects?
Firebase's docs says
but firebase cpp sdk supports only json and we cannot download json for ios, so it seems we have to generate json manually, set each properties by setter or replace plist by shell script.