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