Kevin McMahon


Blog Search

Monotouch: Flurry Demo App

Github repository can be found here: Flurry Test App.

Recently a request was made for a working example of a Monotouch app that uses the Flurry bindings, so I put one together. The sample, while trivial, shows the basics required to incorporate the Flurry SDK Objective-C libraries and their bindings into a Monotouch app and provide an example call pattern that shows how to use the Flurry API.

There are a couple of things to note about this demo app. You’ll need to register with Flurry and get a unique application key to use with the test app. In the example code, you will see that I have some comments about providing a real debug and release application key. A best practice is to have two separate keys so you can separate your production analytics from your test analytics. When testing your app, the app uses the testing application key. The release application key would replace the test key when submitting to the App Store.

The latest Flurry SDK works with iOS version 4.1. If you are looking to have your app run on devices running iOS 3.x, you can either add linker flags as additional arguments or use an older version (2.6) of the Flurry SDK. I plan on updating the demo example to include the linker flags needed to get 3.x support with the latest Flurry SDK.

Finally, I have included a line of code in the example that appears extraneous and out of place. This line ensures Monotouch does not remove an implicit dependency that Flurry has. Monotouch aggressively prunes unused code from assemblies to shrink the size of apps. This trivial demo app does not make explicit use of anything from a part of the CoreGraphics library that Flurry needs (something which almost all non-trivial iOS apps will do by necessity) so it gets excised during compilation.

I hope this helps get people started. Flurry analytics are straightforward to use and provides valuable data and insights. Please let me know if you have any questions or comments on the example.