Post not yet marked as solved
Post marked as unsolved with 1 replies, 1,936 views
I'm providing relevant shortcuts (INRelevantShortcut) according to Apple's SoupChef sample project, but they are not showing up anywhere. Is there a way to see recently provided relevant shortcuts? Should they show up in the Siri shortcut settings? I don't see any developer settings for this and documentation/tutorials are very sparse.Here is my sample code in objective-c:MyIntent *intent = [[MyIntent alloc] init];
// set params and suggestedInvocationPhrase on intent …
INShortcut *shortcut = [[INShortcut alloc] initWithIntent:intent];
INRelevantShortcut *relevantShortcut = [[INRelevantShortcut alloc] initWithShortcut:shortcut];
INDailyRoutineRelevanceProvider *relevanceProvider = [[INDailyRoutineRelevanceProvider alloc] initWithSituation:INDailyRoutineSituationWork];
relevantShortcut.relevanceProviders = @[relevanceProvider];
[INRelevantShortcutStore.defaultStore setRelevantShortcuts:@[relevantShortcut]
completionHandler:^(NSError * _Nullable error) {
if (error) {
NSLog(@"Providing relevant shortcut failed.\n%@", error);
} else {
NSLog(@“Successfully provided relevant shortcut for intent:\n%@", intent);
}
}];