通过CocoaPods集成Fabric / Crashlytics [英] Integrate Fabric/Crashlytics via CocoaPods

查看:1300
本文介绍了通过CocoaPods集成Fabric / Crashlytics的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试通过CocoaPods集成Fabric / Crashlytics,我的Podfile如下所示:

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

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

但是当我尝试构建我的应用程序,构建失败,我得到一个 Shell脚本调用错误,找不到运行脚本:

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

是否可以仅使用CocoaPods安装Fabric?

Is it possible to install Fabric only using CocoaPods?

推荐答案

Fabric现在支持使用CocoaPods进行安装: http://docs.fabric.io/ios/ fabric / cocoapods.html

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

如果你只是在寻找 Crashlytics 你可以使用这两个豆荚:

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

pod 'Fabric'
pod 'Crashlytics'

除了添加以下构建阶段脚本(注意:如果您的repo的路径包含空格,您将需要引号):

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>

如果您要使用 TwitterKit ,则需要包括:

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

pod 'TwitterKit'

这篇关于通过CocoaPods集成Fabric / Crashlytics的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆