This may be an AppCode question, since Xcode doesn't mark this particular scenario.
I see this error in various places in AppCode:
Parameter type mismatch: Types 'nullable' and 'FooType' are not compatible
where FooType can be any type.
Here's a call that demonstrates the issue:
[self.view addConstraint:[NSLayoutConstraint constraintWithItem:spinnerBackgroundView attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
where the toItem value gets tagged with the warning.
Looking at the API, the toItem parameter is nullable:
+(instancetype)constraintWithItem:(id)view1 attribute:(NSLayoutAttribute)attr1 relatedBy:(NSLayoutRelation)relation toItem:(nullable id)view2 attribute:(NSLayoutAttribute)attr2 multiplier:(CGFloat)multiplier constant:(CGFloat)c;
Is this being caused by how I'm calling the API? Or is it a glitch in AppCode (which doesn't offer any suggestions beyond "switch to getter mode" which makes no difference.)