Integrate Fabric/Crashlytics via CocoaPods

swalkner picture swalkner · Mar 16, 2015 · Viewed 34.6k times · Source

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?

Answer

Steven Hepting picture Steven Hepting · Jul 15, 2015

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'