Bring iPhone app to front when Node.js emits something

Hi I am developing an iPhone app using phonegap I have my Node.js server in place and is working fine.

I have designed a simple chat application and its working fine as well...

Now what I want to do is, If I press the round button on iPhone the app goes in background. And it keeps receiving messages while running in background. I want to bring this app to the front (maximize) when the app receives event while running in background.

How to do that?

You can't. which is the short answer.

Apps can only be bought to the foreground by the user, most apps use PuchNotification to alert the user that the app wants attention.

Most app can't run in background, they are suspended when going to the background. With exceptions for VOIP, audio, location and accessory app.