我正在使用 firebase 在应用程序 iOS 中进行标记。
我在 app、dev、prod、preprod、appStore 中有不同的配置。所以我在项目中有几个 GoogleService-Info.plist 。
我在 Resources 文件夹中将它们重命名为 GoogleService-Info-Prod.plist、GoogleService-Info-Dev.plist。
我在项目的构建短语中添加了一个运行脚本,
cp "${SRCROOT}/Test/Resourses/Firebase/GoogleService-Info-$CONFIGURATION.plist" "${SRCROOT}/Test/Resourses/Firebase/GoogleService-Info.plist" 我打算 cp GoogleService-Info 的内容-blabla.plist 到 GoogleService-Info.plist。
但显然,我遇到了这个错误:
2018-07-02 19:05:27.295083+0200 测试 [PROD][63021:19806839] *** 由于未捕获的异常“com.firebase.core”而终止应用程序,原因:“ [FIRApp configure];
(FirebaseApp.configure()
在 Swift 中)找不到有效的GoogleService-Info.plist 在您的项目中。请从https://console.firebase.google.com/下载一个。'
知道我在哪里犯错了吗?非常感谢您的关注。