dazhaxie2015 发表于 2015-10-25 14:24:06

越狱系统进程间通信方式之:CFNotificationCenter

客户端使用: notify_post("me.zaid.pandoravoteup"); 发送通知,参数为通知名字,这个要 系统唯一服务端使用:CFNotificationCenterAddObserver 来接收通知,

    CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), NULL, Reboot, CFSTR("me.zaid.pandoravoteup"), NULL, CFNotificationSuspensionBehaviorCoalesce);第三个参数为处理回调
具体例子看代码吧。
页: [1]
查看完整版本: 越狱系统进程间通信方式之:CFNotificationCenter