robbiehanson / XMPPFramework

An XMPP Framework in Objective-C for Mac and iOS
Other
5.91k stars 2.09k forks source link

Change in iOS 13 XCode 11 #1169

Open tiendaik opened 4 years ago

tiendaik commented 4 years ago

Hi all, In previous iOS version, when an user is offline (app is not running) and receive message from other user, we send a VOIP push to wake up app, connect XMPP to receive message, insert it to database and local push to user. Due to change in iOS 13 from here, we cannot using VOIP for non-voip call anymore. So we change to use Notification Service Extension(NSE) as they recommend. The problem is, how to manage connect/disconnect XMPP in NSE, specially when user receive many messages at a very short of time? Connect is quite simple, we can check if XMPP is not connected then we can connect it, but when we can disconnect? Can we disconnect right after deliver notification to user? Is there any problem if we connect/disconnect repeatly?