@edford - Thanks for your reply. You are absolutely correct about the error you found. However, I am so disappointed that I input an out of date implementation in my problem statement. After working through the SoupChef code, I had previously seen error you described and updated my code to remove the line of code you mentioned where an NSUserActivity is used to create a parts list shortcut. Then I replaced the INShortcut *shortcut line with the following:
CreatePartsListIntent *intentWithData = [[WoodPickerDonationManager sharedInstance] prepareCreatePartsListIntent : @"" withNumberOfAssemblies : 1];
INShortcut *shortcut = [[INShortcut alloc] initWithIntent:intentWithData];
The call to prepareCreatePartsListIntent does the following:
`-(CreatePartsListIntent *) prepareCreatePartsListIntent : (NSString *) partsListName withNumberOfAssemblies : (NSInteger) quantity {
CreatePartsListIntent *intentWithData = [[CreatePartsListIntent alloc] init];
intentWithData.projectName = partsListName;
intentWithData.quantity = [NSNumber numberWithInteger: quantity];
intentWithData.suggestedInvocationPhrase = @"Create Parts List";
return intentWithData;
}`
Sadly, even with this change, the intentHandler in my Intents Extension is not called. In your answer, you indicated that if I switch my implementation to using an intent, that my intentHandler in the app delegate will be called. That confuses me. Is there supposed to be an intentHandler in the app delegate in addition to the Intents Extension? Is there any thing else you see that might be wrong?
Topic:
App & System Services
SubTopic:
General
Tags: