Handle requests for your app’s services from users using Siri or Maps.

Posts under SiriKit tag

200 Posts

Post

Replies

Boosts

Views

Activity

Issues with SiriKit and recognizing voice commands meant for out App
Our main issue seems to be getting Siri to recognize the name of the App, which is a bit of a mouthful. Currently only about 40-50% of voice commands get recognized by Siri as being meant for out app and reach the INPlayMediaIntentHandling code we have set up. The app name currently consists of an acronym/initials, I won't post the name here, but something similar to the app name would be “BBCV Ember”. I’ve set up a pronunciation hint in the info.plist, and have also set up localized alternative app names and pronunciations. The pronunciation hints I've set for the acronym look like "B B C V Ember". As well as a "AppIntentVocabulary.plist" file with Intent Examples. For example: Play trending videos in BBCV Ember and Play popular audio with BBCV Ember As you can see above, we’re really only looking for the “play” verb with our SiriKit extension. The app is configured with for INPlayMediaIntent and INSearchForMediaIntent so that we can get access to an INMediaSearch object when parsing out the voice commands that do actually reach our SiriKit code. Half the time one of the intent examples above will trigger Apple Music or YouTube instead of our app. I’ve also registered “podcast” names in the app that match the examples above, but that hasn’t helped much either.    static func updateSiriVocabulary() {      let context = INMediaUserContext()      context.numberOfLibraryItems = 20      context.subscriptionStatus = .subscribed      context.becomeCurrent()      let vocabulary = INVocabulary.shared()      vocabulary.setVocabularyStrings(IntentMediaType.playlistNames, of: .mediaPlaylistTitle)    } In the code above, IntentMediaType.playlistNames would resolve to the following: {(    audio,    "trending audio",    "top audio",    "popular audio",    podcast,    "trending podcast",    "top podcast",    "popular podcast",    podcasts,    "trending podcasts",    "top podcasts",    "popular podcasts",    video,    "trending video",    "top video",    "popular video",    videos,    "trending videos",    "top videos",    "popular videos" )}
0
1
956
Nov ’22
AppShortcuts are not showing up when using CustomIntentMigratedAppIntent with Xcode 14.1 beta 3.
I am using CustomIntentMigratedAppIntent shortcuts actions. When I want to show them in a SiriTipView, then it does not show up. I get two messages in the console: "[Metadata] Couldn't read autoShortcutProviderMangledName key from metadata." "Provided AppIntent does not match an App Shortcut, SiriTipView will not display." In the previous Xcode it worked well.
3
2
3.2k
Nov ’22
build disappear on testflight with siri shortcut feature
Problem : When i upload build to testflight, build uploaded successfully from xcode, we can see app is in processing but after some time build is disappeared. In my application i used siri shortcut to open the app. tried removed siri part from the app, it uploaded successfully on testflight. So issue is siri shortcut intergration with app. Could you please suggest me what kind of changes need to upload app with siri shortcut?
0
0
949
Oct ’22
macOS Shortcut stuck halfway
I'm trying to implement an app Shortcut (Custom Intent) for a macOS app on Monterey. Shortcuts.app finds the shortcut, but when I run it, the progress bar goes to 50% and stops. My handler and resolution code is not called. I'm implementing the handling in-app (not in an extension) I'm following instructions from the WWDC 2021 video "Meet Shortcuts for macOS" and this link https://developer.apple.com/documentation/sirikit/adding_user_interactivity_with_siri_shortcuts_and_the_shortcuts_app?language=objc If I filter on "shortcuts" in the Console app, and press the run button in Shortcuts.app for my Shortcut, I see this message (amongst others) -[WFAction processParameterStates:withInput:skippingHiddenParameters:askForValuesIfNecessary:workQueue:completionHandler:]_block_invoke Action <WFHandleCustomIntentAction: 0x15c1305b0, identifier: finished processing parameter states. Values: which looks sort of promising but I also see this Sandbox: Shortcuts(9856) deny(1) file-read-data /Users/stu/Library/Developer/Xcode/DerivedData/-hghdaydxzeamopexvfsgfeuvsejw/Build/Products/Debug/.app I've tried moving my app to /Applications and launching it from there, I see a similar message in the log, but the path leads to the app in /Applications. I've tried deleting all copies of my app aside from the one I'm currently building and debugging. I've tried deleting the derived data folder, restarting the Mac, re-launching the Shortcuts app. I've tried sandboxing my app. Other Shortcuts (for other apps) work on this machine. I'm probably missing something extremely simple - does anyone have a suggestion? Some related questions: At WWDC 2022, Apple introduced "App Intents", without adequately explaining how these differ from the intents described in the WWDC 2021 video. Can anyone tell me what the difference is? In the Xcode editor for the .intentdefinition file, there's a button "Convert to App Intent". Clicking it produces some new Swift files in my app, but the thing is an intent handled by an app, and now it is an App Intent - what's the difference? Is one better than the other? Do I have to click the convert button again if I subsequently modify the .intentdefinition file, or is this conversion process intended to replace the .intentdefinition file with those .swift files?
1
0
2.3k
Oct ’22
Intent Classification
I have the following intents: PlayMusic StopMusic NextSound PreviousSound With the following utterances: Play "I'm the one": PlayMusic Play music: PlayMusic Stop the sound: StopMusic Play the Next sound: NextSound Next sound: NextSound Play the previous sound: PreviousSound Previous sound "I'm the one": PreviousSound There are a lot of NLP techniques like Bert (google), Roberta (facebook) etc. who are able to classify those intents. But I couldn't find a framework/technology from Apple, that classifies those intents. Are there technologies from Apple to extend my iOS app?
0
0
980
Oct ’22
Localizing display string of custom INObject
If the language used by Siri is different than the language settings of the user’s device I get mixed language responses when handling intents. How can I create an instance of a custom INObject with a localized display string and have it use the language used by Siri rather than the language set for the device.With the following code I always get the language of the device and not the language used by SiriINObject(identifier: nyId, display: NSLocalizedString("display", comment: "localizable display string")Also tried to get the language used by Siri using INPreferences.siriLanguageCode(), but it returns an empty string.
3
0
1.9k
Sep ’22
INVoiceShortcutCenter.shared.setShortcutSuggestions error: Cannot create shortcut from intent ... because it has no valid parameter combinations
I am new to using Siri Shortcuts. I can't figure out what I'm doing wrong. I have a custom intent in aSiriKit Intents Definition File. The intent has one parameter. The parameter type is a custom type The custom type has only an identifier and display string. I am trying to set Shortcut Suggestions using my custom intent. I first create the shortcut with the intent. Then suggest it. This is the feedback in the output window. The only place where "combinations" are mentioned is under the "Shortcuts app" and "Suggestions" section in the definitions file. I on'y have one supported combination, which is the vehicleParameter. I would appreciate some guidance on what I'm doing wrong. Thanks
1
0
1.7k
Sep ’22
SiriKit Authorization
Our App is trying to support Siri suggestion by donating user's activity. And I follow the document to ask for user‘s authorization. https://developer.apple.com/documentation/sirikit/intent_handling_infrastructure/requesting_authorization_to_use_siri In iOS15.5, the alert did prompt as expected; but in iOS 15.4, the alert did not prompt, and the authorization result is default authorized; in iOS 15.0,the alert did not prompt and the authorization result is default denied. I have two questions: 1、using requestSiriAuthorization, and the alert doesn't prompt, does it fit the expectation, or it's a system bug? 2、when our app only uses MediaIntent, do we need ask for Siri authorization?
0
0
891
Sep ’22
LAContext.evaluatePolicy returns "Caller is not running foreground." from within shortcut
Hi! I'm developing a custom intent for a medical iOS application. Since this intent (and future intents) has to deal with sensitive patient information, I need to guarantee that the person accessing the shortcut is someone allowed to do so. Asking for the user to log in every time they use the shortcut would defeat its nimble purpose, so the solution I came up with is to save the user credentials into Keychain the first time they log in the app, and then use LAContext().evaluatePolicy from within the shortcut to verify the user's identity. Once it's confirmed, I just log in using the stored credentials and everything is good to go. I actually managed to get this working, but only when the shortcut is called via Siri. For some reason, whenever I try to use this authentication procedure by calling it via Search or the Shortcuts App, I get the following error: Error Domain=com.apple.LocalAuthentication Code=-1004 "Caller is not running foreground." I'm aware there's also the "Restricted While Locked" Authentication flag for intents, I just want to make sure that if an unauthorised person were to get their hands on an unlocked device, they still would have to deal with another security barrier.
0
0
1.7k
Sep ’22
Shortcuts app and "Open App"
If I open the Shortcuts App, edit a shortcut, tap on Apps under Content Types, tap on Open App, then then click choose, why can't I find my app on the long list of apps? I implemented shortcuts in my app and they work fine. In the Shortcuts app I can search for my specific app shortcuts and use them. However, if I try to use Open App my app doesn't show up. In looking through the long list of apps that do show up, only some of them have implemented shortcuts, soI can't figure out what makes an app show up, and how to make my app show up.
2
1
4.8k
Sep ’22
Custom Intent Handler Not Being Called
I have setup a custom intent and it all seems to be working fine except that the handler is not being called. Siri responds as if everything was successful but I don't see anything in the console output and none of my breakpoints are triggering... Here is the handler...@implementation IntentHandler - (id)handlerForIntent:(INIntent *)intent { // This is the default implementation. If you want different objects to handle different intents, // you can override this and return the handler you want for that particular intent. NSLog(@"In handlerForIntent."); if ([intent isKindOfClass:[TriggerSceneIntent class]]) { return [SceneIntentsHandler sharedInstance]; } return self; } @endI have breakpoints at lines 10, 12, and 15. None of them are being hit. I also never see "In handlerForIntent" in the console log in xCode.I'm guessing this is something fairly simple that I missed but I'm not seeing it. Welcome any suggestions?
1
0
2.2k
Sep ’22
[iOS] Developing SiriKit extension for Maps on Simulator
Hi, I'm currently doing some research on implementing Ride-Booking Intents from SiriKit, which is an app extension for the Maps application. I've noticed that that there is a significant delay in time with my updated extension code to be installed on the simulator. What I mean by that is when I update any code inside my extension and re-run it on simulator (running it inside the Maps), the old version of the extension gets executed. To ensure I've got updated extension version installed I have to "Erase all contents and settings..." for the simulator, which makes development extremely slow. Is there some alternative way to ensure extension code gets shipped on each re-run? p.s. not sure if thats related but Maps app does crash often in random moments (shortly after launch) on the simulator My setup: Macbook air M1, Xcode: 13.4 Simulator: iPhone 13 iOS 15.2
0
0
860
Sep ’22
Media Intents in iOS
I am trying to develop a feature when in if a user asks Siri to play a medium content("Hey Siri, play song name in AppName") Siri launches the app and plays the media, so I found this article that basically supports this - https://developer.apple.com/documentation/sirikit/media/managing_audio_with_sirikit did all the 7 steps as mentioned but I keep encountering this error - Attempted to register account monitor for types client is not authorized to access: {(     "com.apple.account.iTunesStore" )} Code to create JWT Token - struct JWT {     var teamID = "MyTeamID"     var keyID = "MyKeyID"     var authToken = """                     -----BEGIN PRIVATE KEY----- MY Private Key goes here                     -----END PRIVATE KEY-----                     """     func generateToken() {             let myHeader = Header(kid: keyID)             let claims = JWTClaims(iss: teamID, iat: Date(), exp: Date() + 60 * 60 * 24 * 100)             var jwt = SwiftJWT.JWT(header: myHeader, claims: claims)             guard let tokenData = authToken.data(using: .utf8) else {return }             do {                 let token = try jwt.sign(using: .es256(privateKey: tokenData))                 UserDefaults.standard.setValue(token, forKey: "JWTToken")             } catch {                 print(error.localizedDescription)             }         } } struct JWTClaims: Claims{     let iss:String?     let iat: Date?     let exp: Date? } How should I overcome this?
0
0
932
Aug ’22
how to create custom shortcut in lockscreen
Hello, I am looking to make a shortcut that works in lock screen mode like shazam. I've looked at a lot of tutorials but I don't see where to start: Widget extension I'm not sure what to do with it, but I'm looking for a way to make it work. Indeed, I don't need to display something on the screen but rather to call an API from my server and I don't know what to do with intentconfiguration or something else ... The idea is to use this shortcut to put it in Accessibility => touch Thanks for your help
0
0
988
Aug ’22
App Intents vs Siri Intents
I've been watching the WWDC videos on the new App Intents framework in iOS. It definitely looks like a nicer API over the Siri Intents framework. However, what's not clear to me is are there any user facing improvements or increased discoverability to it over the existing Siri Intents framework? I'm already indexing my Shortcuts manually whenever the app is opened, which seems like one of the headline features of App Intents. I've got an app that uses Siri Intents quite extensively and I don't really want to have two implementations side by side if there's no tangible benefit. I'd rather just leave the code as is until I can drop iOS 15.
1
3
2.4k
Aug ’22
Siri shortcut cannot run after called, only responds "OK" or "Done" in iOS 16 Beta 4
Dear Apple Developers, I have an issue about Siri shortcut that cannot run in iOS 16. When I call the shortcut, Siri only responds "OK" or "Done" but do nothing. But if I check in the "shortcut" and run my shortcut, it will run properly. I'm so confuse about that, because it only happen in iOS 16, under iOS 16 can be used normally. This is my code: Present siri shortcut fileprivate func presentAddSiriShortcutViewController(_ activity: NSUserActivity) {      if #available(iOS 12.0, *) {        let shortcut = INShortcut(userActivity: activity)        let viewController = INUIAddVoiceShortcutViewController(shortcut: shortcut)        viewController.delegate = self        present(viewController, animated: true) } } Activity + (NSUserActivity *)openPhotoActivity { if (@available(iOS 12.0, *)) { NSUserActivity *userActivity = [[NSUserActivity alloc] initWithActivityType:@"openPhoto"]; userActivity.eligibleForSearch = YES; userActivity.eligibleForPrediction = YES; userActivity.title = MyLocalizedString(@"title_open_photo"); userActivity.suggestedInvocationPhrase = MyLocalizedString(@"keyword_open_photo"); return userActivity; } else { return nil; } } This code can be run normally in under iOS 16. Does the use of "NSUserActivity" no longer apply to iOS 16? Should I use Intent using SiriKit?
0
1
883
Aug ’22
How do I get information on messages that have been sent in Messages app in iOS?
I have wondered before how I can find out what messages have been sent and perhaps even to whom and from whom. What is the underlying technology behind the search feature in iOS when the user swipes right from the first screen of the home screen? Is that part of Siri. Setting group Siri and Search together. Does the search feature I speak of use Intents, and is that made accessible to developers. I have also noticed that there is an intent property to the extension context object that passes information between a host app and another app's share extension. I'm brainstorming and looking for any ideas. I hope someone out there have good information for me. macOS has Spotlight. Is that available on iOS?
0
0
1.2k
Jul ’22
UnicornChat
Anyone ever tested Apple's sample code for SiriKit UnicornChat? How do I figure out what to say to Siri to see if the sample works?
Replies
2
Boosts
0
Views
1.9k
Activity
Nov ’22
Issues with SiriKit and recognizing voice commands meant for out App
Our main issue seems to be getting Siri to recognize the name of the App, which is a bit of a mouthful. Currently only about 40-50% of voice commands get recognized by Siri as being meant for out app and reach the INPlayMediaIntentHandling code we have set up. The app name currently consists of an acronym/initials, I won't post the name here, but something similar to the app name would be “BBCV Ember”. I’ve set up a pronunciation hint in the info.plist, and have also set up localized alternative app names and pronunciations. The pronunciation hints I've set for the acronym look like "B B C V Ember". As well as a "AppIntentVocabulary.plist" file with Intent Examples. For example: Play trending videos in BBCV Ember and Play popular audio with BBCV Ember As you can see above, we’re really only looking for the “play” verb with our SiriKit extension. The app is configured with for INPlayMediaIntent and INSearchForMediaIntent so that we can get access to an INMediaSearch object when parsing out the voice commands that do actually reach our SiriKit code. Half the time one of the intent examples above will trigger Apple Music or YouTube instead of our app. I’ve also registered “podcast” names in the app that match the examples above, but that hasn’t helped much either.    static func updateSiriVocabulary() {      let context = INMediaUserContext()      context.numberOfLibraryItems = 20      context.subscriptionStatus = .subscribed      context.becomeCurrent()      let vocabulary = INVocabulary.shared()      vocabulary.setVocabularyStrings(IntentMediaType.playlistNames, of: .mediaPlaylistTitle)    } In the code above, IntentMediaType.playlistNames would resolve to the following: {(    audio,    "trending audio",    "top audio",    "popular audio",    podcast,    "trending podcast",    "top podcast",    "popular podcast",    podcasts,    "trending podcasts",    "top podcasts",    "popular podcasts",    video,    "trending video",    "top video",    "popular video",    videos,    "trending videos",    "top videos",    "popular videos" )}
Replies
0
Boosts
1
Views
956
Activity
Nov ’22
AppShortcuts are not showing up when using CustomIntentMigratedAppIntent with Xcode 14.1 beta 3.
I am using CustomIntentMigratedAppIntent shortcuts actions. When I want to show them in a SiriTipView, then it does not show up. I get two messages in the console: "[Metadata] Couldn't read autoShortcutProviderMangledName key from metadata." "Provided AppIntent does not match an App Shortcut, SiriTipView will not display." In the previous Xcode it worked well.
Replies
3
Boosts
2
Views
3.2k
Activity
Nov ’22
build disappear on testflight with siri shortcut feature
Problem : When i upload build to testflight, build uploaded successfully from xcode, we can see app is in processing but after some time build is disappeared. In my application i used siri shortcut to open the app. tried removed siri part from the app, it uploaded successfully on testflight. So issue is siri shortcut intergration with app. Could you please suggest me what kind of changes need to upload app with siri shortcut?
Replies
0
Boosts
0
Views
949
Activity
Oct ’22
macOS Shortcut stuck halfway
I'm trying to implement an app Shortcut (Custom Intent) for a macOS app on Monterey. Shortcuts.app finds the shortcut, but when I run it, the progress bar goes to 50% and stops. My handler and resolution code is not called. I'm implementing the handling in-app (not in an extension) I'm following instructions from the WWDC 2021 video "Meet Shortcuts for macOS" and this link https://developer.apple.com/documentation/sirikit/adding_user_interactivity_with_siri_shortcuts_and_the_shortcuts_app?language=objc If I filter on "shortcuts" in the Console app, and press the run button in Shortcuts.app for my Shortcut, I see this message (amongst others) -[WFAction processParameterStates:withInput:skippingHiddenParameters:askForValuesIfNecessary:workQueue:completionHandler:]_block_invoke Action <WFHandleCustomIntentAction: 0x15c1305b0, identifier: finished processing parameter states. Values: which looks sort of promising but I also see this Sandbox: Shortcuts(9856) deny(1) file-read-data /Users/stu/Library/Developer/Xcode/DerivedData/-hghdaydxzeamopexvfsgfeuvsejw/Build/Products/Debug/.app I've tried moving my app to /Applications and launching it from there, I see a similar message in the log, but the path leads to the app in /Applications. I've tried deleting all copies of my app aside from the one I'm currently building and debugging. I've tried deleting the derived data folder, restarting the Mac, re-launching the Shortcuts app. I've tried sandboxing my app. Other Shortcuts (for other apps) work on this machine. I'm probably missing something extremely simple - does anyone have a suggestion? Some related questions: At WWDC 2022, Apple introduced "App Intents", without adequately explaining how these differ from the intents described in the WWDC 2021 video. Can anyone tell me what the difference is? In the Xcode editor for the .intentdefinition file, there's a button "Convert to App Intent". Clicking it produces some new Swift files in my app, but the thing is an intent handled by an app, and now it is an App Intent - what's the difference? Is one better than the other? Do I have to click the convert button again if I subsequently modify the .intentdefinition file, or is this conversion process intended to replace the .intentdefinition file with those .swift files?
Replies
1
Boosts
0
Views
2.3k
Activity
Oct ’22
Intent Classification
I have the following intents: PlayMusic StopMusic NextSound PreviousSound With the following utterances: Play "I'm the one": PlayMusic Play music: PlayMusic Stop the sound: StopMusic Play the Next sound: NextSound Next sound: NextSound Play the previous sound: PreviousSound Previous sound "I'm the one": PreviousSound There are a lot of NLP techniques like Bert (google), Roberta (facebook) etc. who are able to classify those intents. But I couldn't find a framework/technology from Apple, that classifies those intents. Are there technologies from Apple to extend my iOS app?
Replies
0
Boosts
0
Views
980
Activity
Oct ’22
Localizing display string of custom INObject
If the language used by Siri is different than the language settings of the user’s device I get mixed language responses when handling intents. How can I create an instance of a custom INObject with a localized display string and have it use the language used by Siri rather than the language set for the device.With the following code I always get the language of the device and not the language used by SiriINObject(identifier: nyId, display: NSLocalizedString("display", comment: "localizable display string")Also tried to get the language used by Siri using INPreferences.siriLanguageCode(), but it returns an empty string.
Replies
3
Boosts
0
Views
1.9k
Activity
Sep ’22
INPreferences.siriLanguageCode() returns empty string
The Siri language code return empty string. What to do?
Replies
1
Boosts
0
Views
1.2k
Activity
Sep ’22
INVoiceShortcutCenter.shared.setShortcutSuggestions error: Cannot create shortcut from intent ... because it has no valid parameter combinations
I am new to using Siri Shortcuts. I can't figure out what I'm doing wrong. I have a custom intent in aSiriKit Intents Definition File. The intent has one parameter. The parameter type is a custom type The custom type has only an identifier and display string. I am trying to set Shortcut Suggestions using my custom intent. I first create the shortcut with the intent. Then suggest it. This is the feedback in the output window. The only place where "combinations" are mentioned is under the "Shortcuts app" and "Suggestions" section in the definitions file. I on'y have one supported combination, which is the vehicleParameter. I would appreciate some guidance on what I'm doing wrong. Thanks
Replies
1
Boosts
0
Views
1.7k
Activity
Sep ’22
SiriKit Authorization
Our App is trying to support Siri suggestion by donating user's activity. And I follow the document to ask for user‘s authorization. https://developer.apple.com/documentation/sirikit/intent_handling_infrastructure/requesting_authorization_to_use_siri In iOS15.5, the alert did prompt as expected; but in iOS 15.4, the alert did not prompt, and the authorization result is default authorized; in iOS 15.0,the alert did not prompt and the authorization result is default denied. I have two questions: 1、using requestSiriAuthorization, and the alert doesn't prompt, does it fit the expectation, or it's a system bug? 2、when our app only uses MediaIntent, do we need ask for Siri authorization?
Replies
0
Boosts
0
Views
891
Activity
Sep ’22
LAContext.evaluatePolicy returns "Caller is not running foreground." from within shortcut
Hi! I'm developing a custom intent for a medical iOS application. Since this intent (and future intents) has to deal with sensitive patient information, I need to guarantee that the person accessing the shortcut is someone allowed to do so. Asking for the user to log in every time they use the shortcut would defeat its nimble purpose, so the solution I came up with is to save the user credentials into Keychain the first time they log in the app, and then use LAContext().evaluatePolicy from within the shortcut to verify the user's identity. Once it's confirmed, I just log in using the stored credentials and everything is good to go. I actually managed to get this working, but only when the shortcut is called via Siri. For some reason, whenever I try to use this authentication procedure by calling it via Search or the Shortcuts App, I get the following error: Error Domain=com.apple.LocalAuthentication Code=-1004 "Caller is not running foreground." I'm aware there's also the "Restricted While Locked" Authentication flag for intents, I just want to make sure that if an unauthorised person were to get their hands on an unlocked device, they still would have to deal with another security barrier.
Replies
0
Boosts
0
Views
1.7k
Activity
Sep ’22
Shortcuts app and "Open App"
If I open the Shortcuts App, edit a shortcut, tap on Apps under Content Types, tap on Open App, then then click choose, why can't I find my app on the long list of apps? I implemented shortcuts in my app and they work fine. In the Shortcuts app I can search for my specific app shortcuts and use them. However, if I try to use Open App my app doesn't show up. In looking through the long list of apps that do show up, only some of them have implemented shortcuts, soI can't figure out what makes an app show up, and how to make my app show up.
Replies
2
Boosts
1
Views
4.8k
Activity
Sep ’22
Custom Intent Handler Not Being Called
I have setup a custom intent and it all seems to be working fine except that the handler is not being called. Siri responds as if everything was successful but I don't see anything in the console output and none of my breakpoints are triggering... Here is the handler...@implementation IntentHandler - (id)handlerForIntent:(INIntent *)intent { // This is the default implementation. If you want different objects to handle different intents, // you can override this and return the handler you want for that particular intent. NSLog(@"In handlerForIntent."); if ([intent isKindOfClass:[TriggerSceneIntent class]]) { return [SceneIntentsHandler sharedInstance]; } return self; } @endI have breakpoints at lines 10, 12, and 15. None of them are being hit. I also never see "In handlerForIntent" in the console log in xCode.I'm guessing this is something fairly simple that I missed but I'm not seeing it. Welcome any suggestions?
Replies
1
Boosts
0
Views
2.2k
Activity
Sep ’22
[iOS] Developing SiriKit extension for Maps on Simulator
Hi, I'm currently doing some research on implementing Ride-Booking Intents from SiriKit, which is an app extension for the Maps application. I've noticed that that there is a significant delay in time with my updated extension code to be installed on the simulator. What I mean by that is when I update any code inside my extension and re-run it on simulator (running it inside the Maps), the old version of the extension gets executed. To ensure I've got updated extension version installed I have to "Erase all contents and settings..." for the simulator, which makes development extremely slow. Is there some alternative way to ensure extension code gets shipped on each re-run? p.s. not sure if thats related but Maps app does crash often in random moments (shortly after launch) on the simulator My setup: Macbook air M1, Xcode: 13.4 Simulator: iPhone 13 iOS 15.2
Replies
0
Boosts
0
Views
860
Activity
Sep ’22
Media Intents in iOS
I am trying to develop a feature when in if a user asks Siri to play a medium content("Hey Siri, play song name in AppName") Siri launches the app and plays the media, so I found this article that basically supports this - https://developer.apple.com/documentation/sirikit/media/managing_audio_with_sirikit did all the 7 steps as mentioned but I keep encountering this error - Attempted to register account monitor for types client is not authorized to access: {(     "com.apple.account.iTunesStore" )} Code to create JWT Token - struct JWT {     var teamID = "MyTeamID"     var keyID = "MyKeyID"     var authToken = """                     -----BEGIN PRIVATE KEY----- MY Private Key goes here                     -----END PRIVATE KEY-----                     """     func generateToken() {             let myHeader = Header(kid: keyID)             let claims = JWTClaims(iss: teamID, iat: Date(), exp: Date() + 60 * 60 * 24 * 100)             var jwt = SwiftJWT.JWT(header: myHeader, claims: claims)             guard let tokenData = authToken.data(using: .utf8) else {return }             do {                 let token = try jwt.sign(using: .es256(privateKey: tokenData))                 UserDefaults.standard.setValue(token, forKey: "JWTToken")             } catch {                 print(error.localizedDescription)             }         } } struct JWTClaims: Claims{     let iss:String?     let iat: Date?     let exp: Date? } How should I overcome this?
Replies
0
Boosts
0
Views
932
Activity
Aug ’22
how to create custom shortcut in lockscreen
Hello, I am looking to make a shortcut that works in lock screen mode like shazam. I've looked at a lot of tutorials but I don't see where to start: Widget extension I'm not sure what to do with it, but I'm looking for a way to make it work. Indeed, I don't need to display something on the screen but rather to call an API from my server and I don't know what to do with intentconfiguration or something else ... The idea is to use this shortcut to put it in Accessibility => touch Thanks for your help
Replies
0
Boosts
0
Views
988
Activity
Aug ’22
App Intents vs Siri Intents
I've been watching the WWDC videos on the new App Intents framework in iOS. It definitely looks like a nicer API over the Siri Intents framework. However, what's not clear to me is are there any user facing improvements or increased discoverability to it over the existing Siri Intents framework? I'm already indexing my Shortcuts manually whenever the app is opened, which seems like one of the headline features of App Intents. I've got an app that uses Siri Intents quite extensively and I don't really want to have two implementations side by side if there's no tangible benefit. I'd rather just leave the code as is until I can drop iOS 15.
Replies
1
Boosts
3
Views
2.4k
Activity
Aug ’22
Siri shortcut cannot run after called, only responds "OK" or "Done" in iOS 16 Beta 4
Dear Apple Developers, I have an issue about Siri shortcut that cannot run in iOS 16. When I call the shortcut, Siri only responds "OK" or "Done" but do nothing. But if I check in the "shortcut" and run my shortcut, it will run properly. I'm so confuse about that, because it only happen in iOS 16, under iOS 16 can be used normally. This is my code: Present siri shortcut fileprivate func presentAddSiriShortcutViewController(_ activity: NSUserActivity) {      if #available(iOS 12.0, *) {        let shortcut = INShortcut(userActivity: activity)        let viewController = INUIAddVoiceShortcutViewController(shortcut: shortcut)        viewController.delegate = self        present(viewController, animated: true) } } Activity + (NSUserActivity *)openPhotoActivity { if (@available(iOS 12.0, *)) { NSUserActivity *userActivity = [[NSUserActivity alloc] initWithActivityType:@"openPhoto"]; userActivity.eligibleForSearch = YES; userActivity.eligibleForPrediction = YES; userActivity.title = MyLocalizedString(@"title_open_photo"); userActivity.suggestedInvocationPhrase = MyLocalizedString(@"keyword_open_photo"); return userActivity; } else { return nil; } } This code can be run normally in under iOS 16. Does the use of "NSUserActivity" no longer apply to iOS 16? Should I use Intent using SiriKit?
Replies
0
Boosts
1
Views
883
Activity
Aug ’22
How do I get information on messages that have been sent in Messages app in iOS?
I have wondered before how I can find out what messages have been sent and perhaps even to whom and from whom. What is the underlying technology behind the search feature in iOS when the user swipes right from the first screen of the home screen? Is that part of Siri. Setting group Siri and Search together. Does the search feature I speak of use Intents, and is that made accessible to developers. I have also noticed that there is an intent property to the extension context object that passes information between a host app and another app's share extension. I'm brainstorming and looking for any ideas. I hope someone out there have good information for me. macOS has Spotlight. Is that available on iOS?
Replies
0
Boosts
0
Views
1.2k
Activity
Jul ’22
Automatically add Siri shortcut when running the app
Hi, When add Siri shortcut to my app, user need manual add voice command. Now, I want to automatically add Siri shortcut when user open app. So how do I implement it using Swift. Thanks
Replies
1
Boosts
0
Views
732
Activity
Jul ’22