ProMotion-iap
ProMotion-iap copied to clipboard
Will Not Allow a CDQ Model named Product
It appears that some sort of conflict happens between PM::IAP and CDQ if a CDQ model named Product exists. To reproduce:
Create a fresh ProMotion app.
Create a CDQ schema and model named Product
Enable the promotion-iap gem by uncommenting it in the Gemfile
Run rake to go into the simulator, and create a product
(main)> product=Product.create(title: "Test product") => #NSException:0x110d8ec80
A spec sheds a little more light. This creates a product. It prints the ancestors of class Product before doing so.
- creates a product[Product, CDQManagedObject, CDQ, CoreDataQueryManagedObjectBase, NSManagedObject, NSObject, Kernel] [ERROR: NSException - #NSException:0x10bee56e0] NSInternalInconsistencyException: "Product" is not a subclass of NSManagedObject.
And removing PM::IAP causes everything to work.
(main)> product=Product.create(title: "Test product") => <Product: 0x10bd5e7d0> (entity: Product; id: 0x10bd9ff20 x-coredata:///Product/t5E48D422-4DA9-4ED2-9768-B4B2EAFB58D02 ; data: { price = 0; title = "Test product"; })
That's really weird, @austinseraphin . So it's clashing with the PM-iap Product class?