iphone XMPP App run background

后端 未结 3 526
陌清茗
陌清茗 2020-11-30 05:05

I created a chat application using XMPP framework..when I quit the app(enter background mode) I want to receive the chat message..and also need to display the icon badge...H

3条回答
  •  既然无缘
    2020-11-30 05:49

    In the latest XMPP Framework you don't need to modify framework files.

    Just do this: 1. Add this to your connect method

    #if !TARGET_IPHONE_SIMULATOR
    {
        self.xmppStream.enableBackgroundingOnSocket = YES;
    }
    #endif
    

    2. Add voip key to your info plist file:

    enter image description here

提交回复
热议问题