我创建了一个daemon轮询服务器,如果服务器有数据下发,就发送给我的应用。
我首先想到了用CFNotificationCenter发通知给我的应用,但使用CFNotificationCenterGetLocalCenter发送,应用端收不到,使用CFNotificationCenterGetDarwinNotifyCenter发送,虽然可以收到,但是无法传递userInfo,所以特来询问!
mach_msg
1 个赞
我是个新手额,没看过mach_msg,我看了rocketbootstrap,发现daemon无法发数据给app,要如何才能双向通信呢?
If you want to run a server inside a daemon, then you still need a simple SpringBoard tweak.
利用常驻的springboard来实现,rocketbootstrap