开发者

iPhone Bonjour From Background

开发者 https://www.devze.com 2023-01-31 11:32 出处:网络
I\'m developing an iPhone app t开发者_如何学JAVAhat uses Bonjour Services, and I have the following question:

I'm developing an iPhone app t开发者_如何学JAVAhat uses Bonjour Services, and I have the following question:

When the app is sent to background, I need to close my Bonjour service; when the app comes to foreground, how do I restart my Bonjour service?

Thanks


You should be able to make use of the UIApplicationDelegate methods. Specifically, I would take a look at applicationDidBecomeActive: and applicationDidEnterBackground:. When it becomes active, start Bonjour; when it enters background, stop it.

0

精彩评论

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

关注公众号