NativeScript / NativeScript/firebase
[question] firebase-core function initializeAppWithPath(path) for Android
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 62
- 派生
- 53
- 平均合并
- 8 天 4 小时
- 30 天内合并 PR
- 2
描述
Hello,
I am trying to load a different firebase configuration per environment. I figured that using the initializeAppWithPath() I could point to the Google Services config files for dev and prod for Android and iOS.
For iOS It worked out of the box using the path res://, it points to the App_Resource/iOS folder.
However, for android I do not seem to be able to load the google-services.json at all.
I tried with path res://, ~/ and resolving the path myself and I always get the error firebase.init error: Error: com.tns.NativeScriptException: Failed to find module: "/data/data/com.nativescript/files/app/firebase/dev/google-services.json", relative to: app/
Would you guys be so kind and provide some examples for Android on to which folder the paths res://, ~/ point in the code base?
I am using Angular flavor.
Best
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先跟踪 initializeAppWithPath(path) 入口点以及 Android 如何解析 google-services.json,然后将该行为与正常工作的 iOS res:// 路径进行比较。检查能否从项目中确定 Android 路径示例;完成标准是提供经过验证的 Android 路径指导,或确定一个可复现的加载修复方案。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- android, angular, ios, typescript
- 领域
- mobile-dev
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100