You are not registering self
as an object. Moreover, when the block is pushed onto the stack by addObserverForName:
the method has not yet returned so the notification
is nil
.
Make a global object using block
, eg
__block __weak id notification;
then,
notification = [[NSNotificationCenter defaultCenter] addObserverForName:@"fetchDidCompleteNewData" object:nil queue:nil usingBlock:^(NSNotification *completed) {
//Remove Observers
[[NSNotificationCenter defaultCenter] removeObserver:notification];
}];