开发者

sendData (lib AsyncSocket) just before iPhone quit

开发者 https://www.devze.com 2022-12-25 09:32 出处:网络
I have an iPhone application that send datas via wifi on my mac. I would like to send a logout message to my mac when I quit the iPhone app.

I have an iPhone application that send datas via wifi on my mac. I would like to send a logout message to my mac when I quit the iPhone app. I tried to s开发者_Go百科end it on the :

-applicationWillTerminate methode

but it seems that the application shut down my service before. How and where can I send my message just before the exit ?

Thanks a lot !


-applicationWillTerminate: is the best possible place that for putting on-exit code for iPhone apps. But your app will be force-killed anyway if the termination takes too long.

Your server could just invalidate the session if there's no response for too long.

0

精彩评论

暂无评论...
验证码 换一张
取 消