Recently I wanted to add Dropbox access to a MonoTouch app that I am working on and came across the DropNet project. DropNet abstracts away all the plumbing involved to interact with Dropbox via their REST-based API and provides an easy-to-use C# API.
In order to be able to use DropNet in a MonoTouch app, a few of the libraries that DropNet depends on, RestSharp and JSON.Net, had to be ported so that they too would build and run on MonoTouch. Thankfully, the process of getting the DropNet dependencies ported didn’t require a lot of work. Chris Hardy had already done the JSON.Net port and John Sheehan, the maintainer of RestSharp, had already begun the process of porting RestSharp.
After making a few changes to get RestSharp to compile and adding a MonoTouch-specific project to DropNet, I was able to access my Dropbox via my MonoTouch app. Very cool and very easy thanks to the open source contributions made by the C# and MonoTouch communities. I hope to post a DropNet demo app soon. In the mean time, you can grab the libraries I used from these repositories: DropNet, RestSharp, and JSON.Net.
If you’re interested in just DropNet for MonoTouch, pre-compiled binaries of RestSharp and JSON.Net are already included in the repository. Enjoy!