I have a class with a property which is a weak reference to a block.
@interface BlockTest : NSObject
@property (nonatomic, weak) void(^testBlock)();
@end
Blocks strongly capture objects within them regardless of how the block itself is referenced. The retain cycle warning is just that, a warning of the possibility. If you know based on the context of your app that this use will not cause a retain cycle you can safely ignore it. To get rid of the warning, you can pass self through an intermediary, strong or weak, as follows:
__weak typeof(self) weakSelf = self;
self.testBlock = ^{
[weakSelf doSomething];
};
I'd change your block property to be a strong reference and do the above.