Question

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?

Was it helpful?

Solution

Latest versions of Xamarin Studio support Crashlytics out of the box:

enter image description here

OTHER TIPS

We had been using Crashlytics with our Xamarin project. But, it seems with Xamarin.iOS 8.6 and/or Xamarin Studio 5.7 it is no longer supported, and the Crashlytics APIs have changed.

Here are the steps I used.

  1. In the Xamarin Studio , go to the touch container and add the Crashlytics API key in the Build -> Crash reporting section. Build and run that app. The evidence suggests that is enough to get data sent to Crashlytics. I saw that it knew about older versions of the app I had built and ran weeks ago with the API key already in.

  2. Go to Xcode and create a new project with the same name as the Xamarin project, com.{company}.{appname}. (You probably need to have that profile downloaded.) I did it in Swift by the way with no issues.

  3. Go to crashlytics.com com and go to settings -> Apps (or https://www.crashlytics.com/onboard)

  4. You will get an app to download and run. The app walks through the steps of adding

    • A build phase run script
    • Code to the application main Crashlytics.startWithAPIKey(“nnnn”)
  5. Run your Xcode version of the app

The Crashlytics web page popped up immediately.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top