3 Replies
      Latest reply on Apr 4, 2019 2:59 PM by KMT
      mrdarcy Level 1 Level 1 (0 points)

        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);
        • Re: How to test Siri relevant shortcuts on iOS device
          KMT Level 9 Level 9 (14,185 points)

               >documentation/tutorials are very sparse.


          I'd expect the docs to emphasize Swift in that example.


          Any help here? h ttps://www.raywenderlich.com/6462-siri-shortcuts-tutorial-in-ios-12


          Did you attempt to test via the simulator, instead?


          Simulator Helps says "Audio is not supported, except when using Siri by choosing Hardware > Siri."


          In thisthread an Apple engr. states that siri support via simulator was enabled in Xcode 10.2 beta, and mentioned in the beta release notes.


          Xcode 10.2 release release notes don't mention it at all that I can see...