I am Working On XMPP. I want to get notification in background mode. And I implement this things also ,
- (void)xmppStream:(XMPPStream *)sender socketWillConnect:(GCDAsyncSocket *)socket
{
// Tell the socket to stay around if the app goes to the background (only works on apps with the VoIP background flag set)
[socket performBlock:^{
[socket enableBackgroundingOnSocket];
}];
}
in my code i set VOIP flag in background modes of app plist file. In this mode my app can run in the background completely. But apple reject that way.
So. i think other way is APNS(Push Notification) but In my app huge chatting users then how can handle messges using Push Notification ?
And one more thing can i set silent audio file play in background mode and set background mode working ? in this way any problem or regection problem from apple side ?
So, Give Me some proper idea and suggestion For this Question.
Thank x in Advance.