Objective C 完成块没有被调用

Objective C completion block doesn't get called

我试图在单元测试中调用完成块,但它从未到达。 这是代码:

[vc configureRecorder:^{
    NSLog(@"Completion...");
}];

这是方法:

-(void)configureRecorder:(void(^)(void))callback {
    NSLog(@"Method");
}

您需要在方法结束时调用完成块。像这样:

-(void)configureRecorder:(void(^)(void))callback {
    //@"Method"
    callback()
}