stackmob/stackmob-ios-sdk — pull request #17 by MigrantP (2012-11-04 15:59:01+00:00)
Title: Fix SMUserManagedObject class hierarchy check

The "is a user being inserted check" is using "superclass" instead of "isKindOfClass" to see if the object is a SMUserManagedObject. The check fails if your User object isn't a direct descendant of SMUserManagedObject. For example, using mogenerator, the hierarchy goes SMUserManagedObject -> _User -> User.

This fix uses isKindOfClass to work with any level of subclassing.