Search code examples
iosgoogle-app-enginechannel-api

Google App Engine Channel API with iOS client?


I'm looking into using the Channel API to push messages to my iOS client. I haven't completely wrapped my head around it, but the only way would be to use a hidden UIWebView that triggers an Objective-C method.

Would this work? To have a hidden UIWebView listening to channel messages? How would the web view be notified of new messages by the channel? How would I trigger an Objective-C method when a new message is received, such as an alert saying "You've received a new message."?

Are there any downsides to this approach?


Solution

  • I'm doing the opposite. I'm using Urban Airship to send iOS notifications to my iOS app, which is really an iOS wrapper around a UIWebView.

    GAE Channels aren't particularly robust in my experience, I've noticed messages not get sent, especially when you have to re-establish a connection. I wonder if the UIWebView connection will get disconnected when the app goes to the background.