xcode Fabric API 密钥无效
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/50287216/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Fabric API key not valid
提问by Student
I am trying to install Fabric to my iOS app. I downloaded the Fabric app to install Crashlytics but when I add the run script in build phase provided by the app, after I build the project I get the error:
我正在尝试将 Fabric 安装到我的 iOS 应用程序。我下载了 Fabric 应用程序来安装 Crashlytics,但是当我在应用程序提供的构建阶段添加运行脚本时,在构建项目后出现错误:
line 2: 1:myfirebaseid:ios:myfirebaseid=1:my:app:id: command not found Fabric.framework/run 1.7.0 (208) error: Fabric: Configuration Issue
Fabric API key not valid. Your Fabric run script build phase should contain your API key: ./Fabric.framework/run INSERT_YOUR_API_KEY INSERT_YOUR_BUILD_SECRET
第 2 行:1:myfirebaseid:ios:myfirebaseid=1:my:app:id:未找到命令 Fabric.framework/run 1.7.0 (208) 错误:Fabric:配置问题
Fabric API 密钥无效。您的 Fabric 运行脚本构建阶段应包含您的 API 密钥:./Fabric.framework/run INSERT_YOUR_API_KEY INSERT_YOUR_BUILD_SECRET
Some answers suggested removing Fabric from plist which I did and the error got away. But later, I wasn't able to complete the installation of Fabric and I think that is the reason. So where can I find my Fabric API KEY and SECRET?
一些答案建议从 plist 中删除 Fabric,我这样做了并且错误消失了。但是后来,我无法完成Fabric的安装,我认为这就是原因。那么我在哪里可以找到我的 Fabric API KEY 和 SECRET?
回答by Reinier Melian
After login in Fabric.io, select settings
登录Fabric.io 后,选择设置
in that page select Organizations
在该页面中选择组织
Select your app organization
选择您的应用组织
In your fabric organization page select API Key
在您的结构组织页面中,选择 API 密钥
And add that number in your info.plist
并在您的 info.plist 中添加该数字
and here in your shell run script
在你的 shell 运行脚本中
回答by Diego
I've tried @Reinier-Melian solution above (https://stackoverflow.com/a/50287615/3804452), it solved the error but the crashes still didn't get to the either fabric nor firebase dashboards. I've added the old init line after initializing firebase and now it works!
我已经尝试了上面的@Reinier-Melian 解决方案(https://stackoverflow.com/a/50287615/3804452),它解决了错误,但崩溃仍然没有到达fabric 或 firebase 仪表板。我在初始化 firebase 后添加了旧的 init 行,现在它可以工作了!
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
//firebase init
[FIRApp configure];
[Crashlytics startWithAPIKey:@"YOUR API KEY HERE"];