iOS8中addobserver类方法可能失败的原因是什么

iOS8中addobserver类方法可能失败的原因是什么,ios8,apple-push-notifications,Ios8,Apple Push Notifications,上面是代码,我正在使用addobserver。我的应用程序因以下错误而崩溃 断言失败:12B411:libxpc.dylib+51947[DBA1E85F-5C4C-3026-9B98-A82D2E332ED6]:0x7d 但它在iOS7中运行良好 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(policyChanged:) name:@"notification" object:nil];

上面是代码,我正在使用addobserver。我的应用程序因以下错误而崩溃

断言失败:12B411:libxpc.dylib+51947[DBA1E85F-5C4C-3026-9B98-A82D2E332ED6]:0x7d

但它在iOS7中运行良好

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(policyChanged:) name:@"notification" object:nil];