I have this very simple setup for my subclasses of PFObject in Swift.
- Foo: PFObject
- Bar1: Foo
- Bar2: Foo
Here's what they look like in code:
Foo
import Foundation class Foo : PFObject, PFSubclassing { class func parseClassName() -> String! { return "Foo" } }
Bar1
import Foundation class Bar1 : Foo {}
BAR2
import Foundation class Bar2 : Foo {}
AppDelegate didFinishLaunching
Foo.registerSubclass() Bar1.registerSubclass() Bar2.registerSubclass() Parse.setApplicationId("APP_ID", clientKey: "CLIENT_KEY")
Then I get this error at runtime:
Tried to register both _TtC9CardForge4Bar1 and _TtC9CardForge4Bar2 as the native PFObject subclass of Foo. Cannot determine the right class to use because neither inherits from the other.
It seems like I can't have multiple subclasses of the same subclass of PFObject , but I don't see anything in the documentation. What's going on here? What is a custom subclass?
source share