diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2010-06-20 16:25:55 +0000 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2010-06-20 16:25:55 +0000 |
commit | 250ccb19b3104102d52a65de0065f6afaf2fc1a5 (patch) | |
tree | b7c550a874c9c5664de32743c8f93396323e8e3f /sbdidlaunch.mm | |
parent | 5ac04f0f1650731b68a285ed979cfedfa82b9f6c (diff) |
Added sbdidlaunch for Cydia bootstrap.
Diffstat (limited to 'sbdidlaunch.mm')
-rw-r--r-- | sbdidlaunch.mm | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/sbdidlaunch.mm b/sbdidlaunch.mm new file mode 100644 index 0000000..91dbcfe --- /dev/null +++ b/sbdidlaunch.mm @@ -0,0 +1,29 @@ +#import <CoreFoundation/CoreFoundation.h> + +extern "C" void *SBSSpringBoardServerPort(); + +void OnDidLaunch( + CFNotificationCenterRef center, + void *observer, + CFStringRef name, + const void *object, + CFDictionaryRef info +) { + CFRunLoopStop(CFRunLoopGetCurrent()); +} + +int main() { + CFNotificationCenterAddObserver( + CFNotificationCenterGetDarwinNotifyCenter(), + NULL, + &OnDidLaunch, + CFSTR("SBSpringBoardDidLaunchNotification"), + NULL, + NULL + ); + + if (SBSSpringBoardServerPort() == NULL) + CFRunLoopRun(); + + return 0; +} |