0

我正在尝试使用 MobileSubstrate 在各种 UIKit 应用程序的端口上监听一个套接字。但是,当我的扩展程序连接到 MobileSafari、MobileMail 或 MobileMaps 时,它无法成功创建套接字。我在 iPhone Dev Wiki 上找到了这个页面,它澄清了这个问题:http: //iphonedevwiki.net/index.php/Seatbelt

有没有办法让内置应用程序能够在套接字上侦听(或完全打开一个?)如果没有,那么在 iOS 上进行进程间通信的另一种好的(和简单的)方法是什么?

4

1 回答 1

1

就个人而言,对于设备间通信,我使用 CFMessagePorts,它很像 mach 端口。 http://developer.apple.com/mac/library/documentation/CoreFoundation/Reference/CFMessagePortRef/Reference/reference.html

如果您只需要通知 - 没有数据,那么我建议您查看达尔文通知中心(基于 CFNotificationCenter)

于 2010-08-21T03:39:55.270 回答