Official UrbanAirship example, ported to Swift