Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Integrate Fabric/Crashlytics via CocoaPods

I try to integrate Fabric/Crashlytics via CocoaPods, my Podfile looks like this:

pod 'Fabric/Core', '1.2' pod 'Fabric/Crashlytics', '1.2' 

But when I try to build my app, the build fails and I get a Shell Script Invocation Error that the run script isn't found:

.../Script-F8D74CB61AB5D7A50013D134.sh: line 2: ./Fabric.framework/run: No such file or directory 

Is it possible to install Fabric only using CocoaPods?

like image 739
swalkner Avatar asked Mar 16 '15 07:03

swalkner


People also ask

Is Crashlytics deprecated?

Old versions of your app still using the Fabric Crashlytics SDK will not break once it's deprecated, however they will no longer submit crash reports. But it seems like it will just continue to work as per normal after this date until further notice. Just leave it the way it is.

What is fabric Crashlytics?

Android Crash Reporting Tools Fabric - Crashlytics Fabric is a modular mobile platform that provides useful kits you can mix to build your application. Crashlytics is a crash and issue reporting tool provided by Fabric that allows you to track and monitor your applications in detail.


Video Answer


2 Answers

Fabric now supports installation with CocoaPods: http://docs.fabric.io/ios/fabric/cocoapods.html

If you are just looking for Crashlytics you can use these two pods:

pod 'Fabric' pod 'Crashlytics' 

Along with adding the following build phase script (note: In case the path to your repo contains spaces, you will need the quotes):

"${PODS_ROOT}"/Fabric/run <API Key> <Build Secret> 

Run Script Build Phase

If you are looking to use TwitterKit you will need to include:

pod 'TwitterKit' 
like image 57
Steven Hepting Avatar answered Nov 05 '22 15:11

Steven Hepting


Same problem for me was fixed by changing the line from:

./Pods/Fabric/Fabric.framework/run YOUR_API_KEY YOUR_BUILD_SECRET 

to:

../Pods/Fabric/Fabric.framework/run YOUR_API_KEY YOUR_BUILD_SECRET 

In other words, just prepend an extra '.' to designate that the 'Pods' directory is a sibling rather than a child of the build directory. YMMV.

like image 30
c3r34l Avatar answered Nov 05 '22 15:11

c3r34l