You can use qualifiers _Nullable
and_Nonnull
@property (copy, nullable) NSString *name;
@property (copy, nonnull) NSArray *allItems;
nonnull: indicates that the pointer should / will never be zero. Pointers annotated with non-zero are imported into Swift as their optional base value (i.e., NSData).
nullable: indicates that the pointer may be null in normal practice. Imported into Swift as an optional value (NSURL?).
source
share