Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/106.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone &引用;“动态库”;如何回拨主程序?_Iphone_Ios_Jailbreak - Fatal编程技术网

Iphone &引用;“动态库”;如何回拨主程序?

Iphone &引用;“动态库”;如何回拨主程序?,iphone,ios,jailbreak,Iphone,Ios,Jailbreak,我当时正在使用一个截获越狱iphone呼叫的程序。我使用动态库拦截系统调用事件,但我如何回调主程序并处理此事件?您可以使用CFNotificationCenter将Darwin通知从动态库发送到应用程序。它的局限性在于不能传递任何用户数据,但至少可以将事件通知应用程序。更多信息请访问 Example of registering and posting: CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyC

我当时正在使用一个截获越狱iphone呼叫的程序。我使用动态库拦截系统调用事件,但我如何回调主程序并处理此事件?

您可以使用CFNotificationCenter将Darwin通知从动态库发送到应用程序。它的局限性在于不能传递任何用户数据,但至少可以将事件通知应用程序。更多信息请访问

 Example of registering and posting:


CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(),NULL, &NotificationReceivedCallback,(CFStringRef)MyNotificationString, NULL, CFNotificationSuspensionBehaviorCoalesce);
CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter() , CFSTR(MyNotificationString), NULL, NULL, YES);