ios9 CFNotificationCenterAddObserver 不工作?

    CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), //center
                                NULL, // observer
                                displayStatusChanged, // callback
                                CFSTR("com.apple.springboard.lockcomplete"), // event name
                                NULL, // object
                                CFNotificationSuspensionBehaviorDeliverImmediately);

CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), //center
                                NULL, // observer
                                displayStatusChanged, // callback
                                CFSTR("com.apple.springboard.lockstate"), // event name
                                NULL, // object
                                CFNotificationSuspensionBehaviorDeliverImmediately);

static void displayStatusChanged(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef userInfo)
{
// the “com.apple.springboard.lockcomplete” notification will always come after the “com.apple.springboard.lockstate” notification
NSLog(@“HACKLOG:Darwin notification NAME = %@”,name);

}

写了个daemon 但是无法检测到 锁屏的状态 , 网上的例子都过时了么?