3

I am trying to integrate Crashlytics with Xamarin.iOS. I have successfully added a binding and started the logger with my API key. I'm able to crash the app but no reports are landing on the web dashboard. When adding Crashlytics to an xcode project it prompts you to add a build phase task to run a script (Which I believe uploads your symbol files to their website).

./Crashlytics.framework/run APIKEY

After creating a binding of the framework for Xamarin this doesn't work as expected... I haven't added a build task in Xamarain Studio but running the command from the terminal yeilds:

MacBook-Pro:Crashlytics.framework user$ ./run APIKEY
2013-09-04 16:10:49.941 run[9238:707] Crashlytics.framework/run 1.2.3
2013-09-04 16:10:49.943 run[9238:707] 

Crashlytics: Failed to Detect Build Environment

BUILT_PRODUCTS_DIR value not found in environment

So finally the question:

How do you integrate this build script into the Xamarin environment? Do I need to copy more assets around to trick the run command into thinking all is well?

4

2 回答 2

2

最新版本的 Xamarin Studio 开箱即用支持 Crashlytics:

在此处输入图像描述

于 2013-10-11T16:24:39.430 回答
0

我们一直在 Xamarin 项目中使用 Crashlytics。但是,似乎不再支持 Xamarin.iOS 8.6 和/或 Xamarin Studio 5.7,并且 Crashlytics API 已更改。

这是我使用的步骤。

  1. 在 Xamarin Studio 中,转到触摸容器并在Build -> Crash reporting 部分中添加 Crashlytics API 密钥。构建并运行该应用程序。证据表明,这足以将数据发送到 Crashlytics。我看到它知道我几周前构建并运行的应用程序的旧版本,并且 API 密钥已经存在。

  2. 转到 Xcode 并创建一个与 Xamarin 项目同名的新项目,com.{company}.{appname}. (您可能需要下载该配置文件。)顺便说一句,我是在 Swift 中完成的,没有任何问题。

  3. 转到 crashlytics.com com 并转到设置 -> 应用程序(或https://www.crashlytics.com/onboard

  4. 您将获得一个应用程序来下载和运行。该应用程序将逐步完成添加的步骤

    • 构建阶段运行脚本
    • 应用程序主代码Crashlytics.startWithAPIKey(“nnnn”)
  5. 运行应用程序的 Xcode 版本

Crashlytics 网页立即弹出。

于 2015-02-09T15:52:12.950 回答