Error "Can't useil for keys or values on PFObject.Use NSNull for values"

Asked 2 years ago, Updated 2 years ago, 54 views

I am using Parse to create a chat application, but I get the following error.
"Can't useil for keys or values on PFObject.Use NSNull for values."
Please tell me what kind of error you are referring to and what solutions you have experienced.

ios swift

2022-09-30 21:11

1 Answers

If an error has occurred, you can expect more answers if you post the code near where the error message is.

In , Parse is not used, so it is estimated from the reference that an error occurred in the setObject(_:forKey:) system method.This is also common to Apple-provided collection classes within Foundation, but nil cannot be a key or a value.The reference states that Parse has the same restriction.
-setObject:forKey:
I don't know because there's no code, but if the key is nil, it's usually a logic error, so if you're an object, you can't decide if you're intentionally trying to substitute nil, and if you want to debug the previous part, you can't use NSNull as an instance as shown in the message.

Please let me know if the error is caused by a completely different method that does not apply to the above description.
(You may have said that some of the code you wrote was implicitly called in the framework without setObject(_:forKey:).)


2022-09-30 21:11

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.