I try to integrate Fabric/Crashlytics via CocoaPods, my Podfile looks like this:
pod \'Fabric/Core\', \'1.2\'
pod \'Fabric/Crashlytics\', \'1.2\'
If you relied on something specific to the older Podspecs and can't update to the official libraries yet, you can add
source 'https://github.com/orta/FabricSpecs.git'
source 'https://github.com/CocoaPods/Specs.git'
To the top of your Podfile, and it will look for the older -unofficial- versions before the new ones. See the FabricSpecs repo for more details.
I have meet this issue before. Here is my solution. to add the execution mode for the run file automatically before your run the script.
In the Build Phase -> Run Script
add following line:
chmod +x ./Pods/CrashlyticsFramework/Crashlytics.framework/run
./Pods/CrashlyticsFramework/Crashlytics.framework/run YOUR_API_KEY YOUR_BUILD_SECRET
The path to the script that is executed during the build phase is different when you use Cocoapods. The github page on https://github.com/bpoplauschi/CrashlyticsFramework advises to use ./Pods/CrashlyticsFramework/Crashlytics.framework/run
however, I found I had to use ./Pods/Fabric/Fabric.framework/run
for my installation. Anyways you will have to dig through the Pods directory to find what you are looking for.
Make sure to uninstall pod 'Answers', '~> 1.3' from your pods if you are using Fabric in your project before.
macOS Sierra, Swift 3
change
${PODS_ROOT}/Fabric/run
to
"${PODS_ROOT}/Fabric/run"
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.