I have an Intents.intentdeinition
file with a custom intent defined as OrderIntent
.
When I try to instantiate this intent and set its parameter like this:
#import "TransactionCart+Intents.h"
#import "OrderItemIntent.h"
@implementation TransactionCart (Intents)
- (nonnull INIntent *)getCartIntent;
{
ItemObject *item = self.itemManager.selectedItem;
OrderItemIntent *intent = [[OrderItemIntent alloc] init];
intent.quantity = item.quantity;
intent.name = item.name;
return intent;
}
@end
I get a run time console message on OrderItemIntent *intent = [[OrderItemIntent alloc]init];
with this message:
Unable to initialize 'OrderItemIntent'. Please make sure that your intent definition file is valid.
The app continues to run however getCartIntent
returns nil
I've tried recreating the intent definition file multiple times with various changes but still I can't get this to work.