You need to ensure that port 2196 and 2195 are open to APNs and that you have created the database for STProxy. Take a read of http://collaborationben.com/2012/10/19/sametime-on-iphone-apns-test-application/
which I wrote years ago. It explains what happens to the IM when the iOS app is paused/backgrounded.
There are also additional tables that need to be created on the STProxy database http://www-01.ibm.com/support/docview.wss?uid=swg21663020