What is correct way to set value to undefined?

@ashish-naik Ashish
Thu, 17 Jul 2025 17:58:50 +0000

I tried nil as pointed out in PFObject.m, it is now allowed.
If i sent as NSNull() then property is set to (null). This is not nil so code is unable to check for nil.
Xcode doesnt allow using null.

so what is the correct way to undefined a property when saving an object?

- (void)_setObject:(id)object forKey:(NSString *)key onlyIfDifferent:(BOOL)onlyIfDifferent {
    PFParameterAssert(object != nil && key != nil,
                      @"Can't use nil for keys or values on PFObject. Use NSNull for values.");