You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know this is probably an underlying issue with the MPC framework, but I was wondering if there is a way in which users that leave the game (check email, answer a text or phone call), and then come back can be re-connected.
The text was updated successfully, but these errors were encountered:
I was just looking at this issue with some code I found on the web. When the user logs off, and reopens, a new instance of the MPC is created and so essentially there's a memory leak because the old instance doesn't release automatically. Apple gives a workaround at 32:00 in this video: https://developer.apple.com/videos/play/wwdc2014/709/. There might have been more on this in other videos too from wwdc2013.
Basically, if you persist the data like the PeerID using NSKeyedArchiver, you can have the app remember who it lost a connection to so that you're not constantly re-instantiating new MPC channels. Was going to eventually add this to some code I found by Ralph Ebert on MPCs.
I know this is probably an underlying issue with the MPC framework, but I was wondering if there is a way in which users that leave the game (check email, answer a text or phone call), and then come back can be re-connected.
The text was updated successfully, but these errors were encountered: