How to use nonnull and nullable Objective-C keywords in block-based API method

This seems to be working

- (void)methodWithArg:(nonnull NSString *)arg1 
  andArg:(nullable NSString *)arg2 completionHandler:(nullable void (^)
  (NSArray * _Nullable results, NSError * _Nonnull error))completionHandler

You need to specify nullability both for the block and its parameters…

EDIT: For more information, see Swift Blog

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)