简体   繁体   中英

Fabric API key not valid

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:

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

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?

After login in Fabric.io , select settings

在此输入图像描述

in that page select Organizations

在此输入图像描述

Select your app organization

在此输入图像描述

In your fabric organization page select API Key

在此输入图像描述

And add that number in your info.plist

在此输入图像描述

and here in your shell run script

在此输入图像描述

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!

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {  

//firebase init
[FIRApp configure];
[Crashlytics startWithAPIKey:@"YOUR API KEY HERE"];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM