Pitfall With Using Anonymous User in Parse
Their Anonymous User feature is a great feature, but it lacks the last 10% to be awesome.
When I was using the feature and did a query, it crashed.
I found the same incident on Parse forum.
The reply from a Parse official rep is again disappointing.
Let me explain the pitfalls and shortcoming of Parse:
Parse will automatically save an Anonymous User when an a
PFUser(as an object or as a relation) is saved
PFQuery, it will trigger the error because no object was automatically saved (probably due to your logic flow)
Yet, strangely it seems, a
PFQuerydoes not handle an anonymous user situation at all, and caused the crash
I felt this is a bug, just like the 2 other developers in the forum. Unfortunately, the forum, yet again, is closed for comments.
Parse, please improve your library.
As suggested, one could check to make certain
PFUser is saved by checking the objectId. If it isn’t, save it, then perform the query:
1 2 3 4 5 6