pubnub / swift

PubNub native Swift SDK for iOS, MacOS, WatchOS, TvOS
Other
31 stars 28 forks source link

Leave PubNubPresenceChangeAction called when user goes to background. #156

Open rabinpun opened 8 months ago

rabinpun commented 8 months ago

After subscribing a channel, when my device goes on background after few seconds(within 5 seconds), i get Leave presence change action for that user which is not an expected output.

jguz-pubnub commented 8 months ago

Hi @rabinpun, this is because the Generate Leave on TCP FIN or RST checkmark is selected in your keyset configuration in the Admin Portal. However, this won't solve the issue you mentioned regarding the next heartbeat calls not being repeated in the background. Please note that handling background states is the responsibility of your application and not the SDK.