Bubble Foundry


Sending iOS Push Messages with Urban Airship and BFUrbanAirship

by Peter.

For iFebo I built a server last year to handle sending push messages to Urban Airship, which we use in front of the Apple Push Notification service due to its great scheduling features. To do this I needed a way to interact with the UA API and while it’s got lots of features it’s not terribly… consistent.

So, I wrote my own wrapper library which attempts to give you a more consistent and type-safe way to interact with the API. It’s taken me a long time to make it public and I’ve got some work to do to make it up to date, but I’m glad to give you BFUrbanAirship. You can use it like so:

import com.bubblefoundry.bfurbanairship._
 
val api = new UrbanAirship(app_token, app_secret, app_master_secret, appengine = false)
// schedule a message to be pushed
val message = SimplePushMessage(aps = Some(APS("A push message")))
api.push(message)
 
// get a Stream of all registered devices
api.devices