It’s hard to believe it’s been two years (and a bit) since I blogged about AirPlay and the lack of API to display images from iOS.
Not a lot changed about it since then… my code still works (good news) and Apple did not release anything new, for developers at least, for the Apple TV (sad news) and, like each year, I still have hopes for the next WWDC (no news, only rumours).
Things also changed for Xamarin (more good news) and, as of today, we now have a stable unified API to target both 32bits and 64bits iOS devices (and satisfy Apple’s upcoming requirements for new iOS applications).
So the holidays were a good time to update my library (for another project of mine) to be build against the unified API : the shiny new Xamarin.iOS.dll (instead of monotouch.dll).
The upgrade process was quite simple. Xamarin Studio can handle a large part of it (e.g. new project types, assembly references, namespaces and API changes…). Only a few minor changes were required, in my case some (maybe 3) typecasts for native types.
Note: for classic API users I’ve kept a separate branch, named classic, to keep the old code.
3, 2, 1… action!
Something else also changed recently… it’s now possible, with iOS 8.x, to create extensions. Specifically this code could be used to create an action extension. That would be very similar, UI-wise, for the existing sample application. However it would also allow other, existing, applications (at least those using
UIActivity) to gain access the same image-on-AirPlay feature.
In fact that’s exactly what I wished when I wrote the original code… and now I could (and did) implement this in my github repo. Hopefully it will be useful to others, in itself or as another sample of how you can create extensions using Xamarin.iOS.
A call to arms
If you have popular samples, github repos… please consider updating them to the unified API so they can continue to be useful to the community 🙂