This library has been created by www.guarana.io
This is a library to solve all the crashes due to Parse's (arguably) poor handling of
PFObject & co. to always check for
nil, before passing them over to Parse.
pod 'GRNPFObject', '~> 0.0.3'
Click here more information about cocoapods and how to install it
Drag the folder GRNPFObject into your project.
PFQuery cannot do a comparison query for type: (null)
Consider, for example, the following query:
PFQuery *query = [PFComment query]; [query whereKey:@"post" equalTo:post]; [query findInBackground];
post == nil, the call to
findInBackground would crash, due to a
When subclassing your
@interface PFComment : GRNPFObject <PFSubclassing>
Don't forget to import the headers.
If you don't like subclassing
PFObject (I hear you, my friend), then this library will work as long as you use
PFQuery *query = [PFSafeQuery queryWithClassName:@"Comment"];
NSInvalidArgumentException: Can't use nil for keys or values on PFObject. Use NSNull for values.
You will get this crash when you are trying to insert a
nil into one of your
PFObject. This can happen, for example, when you are expecting a
facebook_id, but you don't get one.
Same solution as before: subclass
nil will auto-magically be converted into
[NSNull null]. This will show up as
undefined in your Parse table.