I want to send a PFObject
directly over a push notification. I send the Parse object directly inside the push (e.g. with a custom key "arg") but I couldn't figure out how to construct a real PFObject
from the received data. Received data is (obviously) an NSDictionary
, with all the keys (object ID, created at, ACLs etc) available. How do I convert it to a PFObject
instance?
I need a real way to construct a PFObject
with the available data, so don't come with obvious solutions like "send the object ID and then fetch that object at client with Parse's methods." etc. I already know that obvious solution, but it's time/bandwidth/quota inefficient as it requires a new query, while I can have everything I need in that query anyway.
I'm looking for an automatic way, if any. I am targeting iOS 8 so maximum push payload size is also not an issue (2KB is more than enough for my case).
UPDATE: I've tried [PFObject objectWithClassName:@"MyClassName" dictionary:receivedDictionaryObject];
but no avail. It just does not work, the fields are nil
even though the dictionary has all the data directly from Parse itself.