Siri and Voice

RSS for tag

Help users quickly accomplish tasks related to your app using just their voice.

Posts under Siri and Voice tag

51 Posts
Sort by:
Post not yet marked as solved
0 Replies
265 Views
For iOS, is there any way to add words into the dictionary that voice dictation recognizes and to the dictionary that the bar on top of the keyboard uses, that shows suggestions for words? I would like to make an iOS app that uses Biblical words such as "thee" and "thou". Any ideas will be appreciated.
Posted Last updated
.
Post not yet marked as solved
0 Replies
282 Views
I was trying to add multiple sender avatars to a group conversation communication notifications but it's not reflecting in UI. Every Sender object has an image property which has an image value but not all images are showing up in the notification avatar. Also, tried to replicate this locally by creating a custom collage and assign it as image but the InImage doesn't take the local images to render and just showing empty avatar. How can we add multiple avatars to communication notifications? And how can we read InImage from local?
Posted Last updated
.
Post not yet marked as solved
0 Replies
297 Views
I develop my an IM app for support Siri suggestion feature. I donate a INSendMessageIntent when user send message in group. I create INPerson array by users in that group. But the photo share sheet only show max 20 persons, the trust is I set persons parameters count is 56. Who can explain why limit show max group users count, or my anything wrong? I circle the key point in picture by red pencil. The second and the fourth chat that users in group count more than 20.
Posted
by lcrystal.
Last updated
.
Post not yet marked as solved
0 Replies
289 Views
I would like to allow users to run an Apple Watch App action by using automations on the iPhone. The action can only be done on the watch and not the companion iPhone app? I noticed that it's possible to start a workout on the default Apple watch app with automations, and also possible to start a workout on the 3rd party Dawn Patrol app using automations. Is it possible to do this with custom intents or NSUserActivities or only the system start workout intent?
Posted Last updated
.
Post not yet marked as solved
1 Replies
341 Views
I have an app that lets users log drinks. Users create CoreData entries that have attributes like drink type and quantity. I have a view that lets users the quantity they have consumed in the current day. This is done using a FetchRequest and a calendar predicate that only fetches entries from the current day. I am using @FetchRequest property wrapper in the view, then initializing it with init() {}. Inside the initializer, I set the predicate, sort descriptors, and use self._todayIntakeEvents ... to set the value for the fetch request variable. Then, each time the view appears, I use .onAppear to sum the quantity of the fetched items by using todayIntakeEvents.map, then using .reduce to sum the array. The problem: when users add drinks with Siri, the drink information doesn't show up when opening the app from background. However, it will appear if I quit and relaunch the app. What I want to happen is for the drink to appear immediately when the user opens the app again. My code for the view: struct TodaySummaryView: View { @Environment(\.managedObjectContext) private var viewContext     @FetchRequest var todayIntakeEvents: FetchedResults<WaterIntakeEvent> init() {         let calendar = Calendar.current         let dateFrom = calendar.startOfDay(for: Date())         let dateTo = calendar.date(byAdding: .day, value: 1, to: dateFrom)         let predicateTodayEvents = NSPredicate(format: "timeOfConsumption <= %@ AND timeOfConsumption >= %@", dateTo! as CVarArg, dateFrom as CVarArg)         self._todayIntakeEvents = FetchRequest(             entity: WaterIntakeEvent.entity(),             sortDescriptors: [NSSortDescriptor(keyPath: \WaterIntakeEvent.timeOfConsumption, ascending: false)],             predicate: predicateTodayEvents)     } var body: some View { // some UI .onAppear { totalWaterQuantityToday = todayIntakeEvents.map {Int($0.waterQuantity)}             sumOfWaterQuantityToday = totalWaterQuantityToday.reduce(0, +) print(sumOfWaterQuantityToday) // even after Siri creates new CoreData entries, this still prints the quantity from before it added } My code for the Siri Intent Handler: public func handle(intent: LogDrinkIntent, completion: @escaping (LogDrinkIntentResponse) -> Swift.Void) {         let context = PersistenceController.shared.container.viewContext         let newDrink = WaterIntakeEvent(context: context)         newDrink.drinkType = intent.drinkType         newDrink.quantity = intent.quantity as! Float         newDrink.waterQuantity = intent.quantity as! Float         newDrink.timeOfConsumption = Date()         newDrink.id = UUID()         do {             try context.save()             let response = LogDrinkIntentResponse(code: LogDrinkIntentResponseCode.success, userActivity: nil)             completion(response)             print("Successfully saved.")         } catch {             completion(LogDrinkIntentResponse(code: LogDrinkIntentResponseCode.failure, userActivity: nil))             print("Error saving.")         }     } I suspect the problem is not Siri (because the data appears after relaunching the app) but that because I initialized the view with the FetchRequest, it's not responding to changes. Can someone help please?
Posted
by Hu is I.
Last updated
.
Post marked as solved
2 Replies
841 Views
The IntentHandler in my objective-C implementation of a custom intent fails to receive a call from a voice activated shortcut. When using Siri to invoke the donated interaction, I have observed that I receive the following errors in the Console app that claim the intent handler method for intent is unimplemented: -[INIntentDeliverer _invokeIntentHandlerMethodForIntent:intentHandler:parameterNamed:keyForSelectors:executionHandler:unimplementedHandler:] _invokeIntentHandlerMethodForIntent sirikit.intent.voice_commands.RunVoiceCommandIntent -[WFRVCIntentHandler stateMachineForIntent:] Created state machine <WFRVCStateMachine: 0x102e23970 state=WaitingForServer phase=Unknown> for intent with identifier 8A87FC68-329D-49FF-B534-B0A5821854CA -[INIntentDeliverer _invokeIntentHandlerMethodForIntent:intentHandler:parameterNamed:keyForSelectors:executionHandler:unimplementedHandler:] _invokeIntentHandlerMethodForIntent sirikit.intent.voice_commands.RunVoiceCommandIntent This error is consistent with the fact that an attempt to trigger the custom intent with a voice command results in iOS calling my appDelegate, and in particular the application:continueUserActivity:restorationHandler:. According to the documentation, the restorationHandler should only be called if the intent is not handled and must be handled by the main app. As there is very little documentation for an objective-C implementation, I cannot figure out what I am missing. I have tried to map the sample SoupChef app implementation of Siri Shortcuts to my implementation. I cannot figure out where I am going wrong. Here is my implementation (sorry for all the details, but I am hoping you can see something wrong): First, I have implemented two additional targets; a Shared Framework and an Intents Extension. I have also implemented an Intents Definition File. Here is an image of my targets: W_P_r is the main app, W_P_rKit is the shared framework, and PartsListManagerIntents is the Intents Extension. Next, here is my Intents Definition file and the target membership that it belongs to: I have also added an app group to the capabilities section of the add for both the main target and the PartsListIntentManager target. And I added Siri capability to the main target. All of this auto-creates some code, including a default IntentHandler.m and an info.plist in the PartsListManagerIntents target. I have updated the info.plist as follows: And here is the Auto-generated IntentHandler (which I have modified to log activity and to call a specific intent handler that resides in the W_P_rKit shared framework: #import "IntentHandler.h" #import <Intents/Intents.h> #import <W_P_rKit/W_P_rKit.h> #import "CreatePartsListIntentHandler.h" #import "P__tHandler.h" #import <os/log.h> @interface IntentHandler () /* <CreatePartsListIntentHandling, P__tHandling> */ @end @implementation IntentHandler - (id)handlerForIntent:(INIntent *)intent { os_log_with_type(OS_LOG_DEFAULT, OS_LOG_TYPE_DEBUG, "handlerForIntent: Reached IntentHandler."); if ([intent.identifier isEqualToString:@"P__rIntent"]) { NSLog(@"P__rIntent"); return [[P__rIntentHandler alloc] init]; } else if ([intent.identifier isEqualToString:@"CreatePartsListIntent"]) { NSLog(@"CreatePartsListIntent"); os_log_with_type(OS_LOG_DEFAULT, OS_LOG_TYPE_DEBUG, "handlerForIntent: IntentHandler Received CreatePartsListIntent."); return [[CreatePartsListIntentHandler alloc] init]; } return self; } Note that CreatePartsListIntentHandler is a class that implements the CreatePartsListIntentHandling protocol (resolve, confirm, and handle methods of the IntentHandler). Now here is the relevant implementation that should trigger iOS to call the IntentHandler: In my app at the point where the user fills in the name of a new project I make a call to donate the interaction as follows: CreatePartsListIntent *data = [[CreatePartsListIntent alloc] init]; data.projectName = [projectPlistName copy]; data.quantity = [NSNumber numberWithInteger : currentProjectQuantity]; [[W_P_rDonationManager sharedInstance] donateCreatePartsListIntent : data]; The call to donateCreatePartsListIntent does the following: data.suggestedInvocationPhrase = @"Create Parts List"; INInteraction* interaction = [[INInteraction alloc] initWithIntent:data response:nil]; [interaction donateInteractionWithCompletion:^(NSError * _Nullable error) { ... } Once the user has created the empty parts list (forcing the above interaction donation to occur), the view controller will present an "Add Siri Shortcut" button. The tapping of the button automatically calls the following method to create a shortcut: -(void) addCreatePartsListShortcutWasTapped { NSUserActivity *userActivity = [[W_P_rDonationManager sharedInstance] CreatePartsListShortcut]; INShortcut *shortcut = [[INShortcut alloc] initWithUserActivity:userActivity]; INUIAddVoiceShortcutViewController *addSiri = [[INUIAddVoiceShortcutViewController alloc] initWithShortcut:shortcut]; addSiri.delegate = self; [self presentViewController:addSiri animated:YES completion: nil]; } The call to CreatePartsListShortcut does the following: NSUserActivity *newActivity = [[NSUserActivity alloc] initWithActivityType: kW_P_rCreatePartsListActivityType]; newActivity.persistentIdentifier = kW_P_rCreatePartsListActivityType; newActivity.eligibleForSearch = TRUE; newActivity.eligibleForPrediction = TRUE; CSSearchableItemAttributeSet *attributeSet = [[CSSearchableItemAttributeSet alloc] initWithContentType: UTTypeImage]; newActivity.title = @"Create Parts List"; attributeSet.contentDescription = @"Create a parts list for a new project"; newActivity.suggestedInvocationPhrase = @"Create Parts List"; UIImage *image = [UIImage imageNamed:@"W_P_r_Icon.jpg"]; NSData *imageData = [NSData dataWithData:UIImagePNGRepresentation(image)]; attributeSet.thumbnailData = imageData; newActivity.contentAttributeSet = attributeSet; return newActivity; This does create a shortcut that is visible in the shortcuts app. Clicking on the shortcut or saying the invocation phrase will take you directly to the the app delegate's application:userActivity:restorationHandler. But it does not call the IntentHandler. I know this because I have implemented logs that would tell me if the execution thread came there. Why is my IntentHandler not being called? Why is iOS sending the error message _invokeIntentHandlerMethodForIntent:intentHandler:parameterNamed:keyForSelectors:executionHandler:unimplementedHandler:? I have actually been struggling with this for weeks. Any help or hints would be so helpful.
Posted
by jeffb6688.
Last updated
.
Post not yet marked as solved
0 Replies
513 Views
Obviously I’m aware there’s no tab key on the iPhone keyboard, but I swear on my previous iPhone - which was definitely not on the latest iOS up because of storage shortages - I could use the dictate/mic button to say “tab key” and it would indent the paragraph in google docs etc. as if I’d pressed the tab key on my computer. However I just tried on my new iPhone and it just types out the words tab key? Super confused as to why this is something Apple would get rid of, but I checked the list of dictation commands and it’s not there? Is there any other way to indent paragraphs now?
Posted
by Alxschot.
Last updated
.
Post not yet marked as solved
1 Replies
832 Views
I'm living in china and the default search engine is Baidu. The results of Baidu is really bad and for privacy concern I have no intention to use it or send my questions to them. Can we change it to Google or Being? I haven't found any option to achieve that. Also, I have set my default search engine of Safari to Google, but Siri still search my question by Baidu.
Posted
by keyvchan.
Last updated
.
Post not yet marked as solved
0 Replies
420 Views
Hi there, I'm implementing a custom IntentHandler, which has a parameter. This parameter is an array of strings. I'd like to handle the case when user didn't specify the value for this parameter. I want to provide a value calculated using my business logic and ask the user to confirm that value. To do this, I use the resolveParameter function and return the following result: [INStringResolutionResult.confirmationRequired(with: someSuggestedValue)] Unfortunately, Siri throws an error with the message: "Uh oh, there's a problem. Please try again." using debug I caught the error, here's the error message: libc++abi: terminating with uncaught exception of type NSException Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unexpected class Swift.__SwiftDeferredNSArray' terminating with uncaught exception of type NSException Here's a part of my code. func resolveParameter(for intent: MyCustomIntent) async -> [INStringResolutionResult] { if intent.arrayOfMyCustomParameters?.isEmpty ?? true { // Users did not specify the value intent.arrayOfMyCustomParameters = [someSuggestedValue] return [INStringResolutionResult.confirmationRequired(with: someSuggestedValue)] } else { var result = [INStringResolutionResult]()             for value in intent.arrayOfMyCustomParameters {                 result.append(.success(with: value))             }             return result } } p.s. This problem occurs only using the shortcut from the Siri voice assistant for iOS 15.0.0+ devices. Not sure if this is helpful, but here is the stack trace. libobjc.A.dylib`objc_exception_throw: -> 0x198f37670 <+0>: stp x28, x27, [sp, #-0x40]! 0x198f37674 <+4>: stp x22, x21, [sp, #0x10] 0x198f37678 <+8>: stp x20, x19, [sp, #0x20] 0x198f3767c <+12>: stp x29, x30, [sp, #0x30] 0x198f37680 <+16>: add x29, sp, #0x30 ; =0x30 0x198f37684 <+20>: sub sp, sp, #0xfc0 ; =0xfc0 0x198f37688 <+24>: mov x20, x0 0x198f3768c <+28>: mov w0, #0x20 0x198f37690 <+32>: bl 0x19902ea70 ; __cxa_allocate_exception 0x198f37694 <+36>: mov x19, x0 0x198f37698 <+40>: adrp x8, 372380 0x198f3769c <+44>: ldr x8, [x8, #0xb68] 0x198f376a0 <+48>: mov x0, x20 0x198f376a4 <+52>: blr x8 0x198f376a8 <+56>: mov x20, x0 0x198f376ac <+60>: adrp x8, 13442 0x198f376b0 <+64>: add x1, x8, #0x959 ; =0x959 0x198f376b4 <+68>: bl 0x198f24040 ; objc_msgSend 0x198f376b8 <+72>: str x20, [x19] 0x198f376bc <+76>: adrp x8, 342105 0x198f376c0 <+80>: add x8, x8, #0x78 ; =0x78 0x198f376c4 <+84>: add x8, x8, #0x10 ; =0x10 0x198f376c8 <+88>: mov x21, x19 0x198f376cc <+92>: str x8, [x21, #0x8]! 0x198f376d0 <+96>: mov x0, x20 0x198f376d4 <+100>: bl 0x198f37270 ; object_getClassName 0x198f376d8 <+104>: str x0, [x19, #0x10] 0x198f376dc <+108>: cbnz x20, 0x198f376e8 ; <+120> 0x198f376e0 <+112>: mov x8, #0x0 0x198f376e4 <+116>: b 0x198f376f4 ; <+132> 0x198f376e8 <+120>: tbnz x20, #0x3f, 0x198f3779c ; <+300> 0x198f376ec <+124>: ldr x8, [x20] 0x198f376f0 <+128>: and x8, x8, #0xffffffff8 0x198f376f4 <+132>: str x8, [x19, #0x18] 0x198f376f8 <+136>: adrp x22, 377914 0x198f376fc <+140>: ldrb w8, [x22, #0x2c6] 0x198f37700 <+144>: cbz w8, 0x198f37720 ; <+176> 0x198f37704 <+148>: mov x0, x20 0x198f37708 <+152>: bl 0x198f37270 ; object_getClassName 0x198f3770c <+156>: stp x20, x0, [sp, #0x8] 0x198f37710 <+160>: str x19, [sp] 0x198f37714 <+164>: adrp x0, 28 0x198f37718 <+168>: add x0, x0, #0xae9 ; =0xae9 0x198f3771c <+172>: bl 0x198f4957c ; _objc_inform 0x198f37720 <+176>: adrp x8, 377914 0x198f37724 <+180>: ldrb w8, [x8, #0x2c7] 0x198f37728 <+184>: cbz w8, 0x198f37780 ; <+272> 0x198f3772c <+188>: ldrb w8, [x22, #0x2c6] 0x198f37730 <+192>: cbnz w8, 0x198f37750 ; <+224> 0x198f37734 <+196>: mov x0, x20 0x198f37738 <+200>: bl 0x198f37270 ; object_getClassName 0x198f3773c <+204>: stp x20, x0, [sp, #0x8] 0x198f37740 <+208>: str x19, [sp] 0x198f37744 <+212>: adrp x0, 28 0x198f37748 <+216>: add x0, x0, #0xae9 ; =0xae9 0x198f3774c <+220>: bl 0x198f4957c ; _objc_inform 0x198f37750 <+224>: add x0, sp, #0x20 ; =0x20 0x198f37754 <+228>: mov w1, #0x1f4 0x198f37758 <+232>: bl 0x1941a3b34 0x198f3775c <+236>: mov x22, x0 0x198f37760 <+240>: adrp x8, 342104 0x198f37764 <+244>: ldr x8, [x8, #0xd18] 0x198f37768 <+248>: ldr x0, [x8] 0x198f3776c <+252>: bl 0x1941a3df8 0x198f37770 <+256>: mov x2, x0 0x198f37774 <+260>: add x0, sp, #0x20 ; =0x20 0x198f37778 <+264>: mov x1, x22 0x198f3777c <+268>: bl 0x198f4a8cc ; symbol stub for: backtrace_symbols_fd 0x198f37780 <+272>: mov x0, x20 0x198f37784 <+276>: nop 0x198f37788 <+280>: adrp x2, 3 0x198f3778c <+284>: add x2, x2, #0xac0 ; =0xac0 0x198f37790 <+288>: mov x0, x19 0x198f37794 <+292>: mov x1, x21 0x198f37798 <+296>: bl 0x198f4a7d0 ; symbol stub for: __cxa_throw 0x198f3779c <+300>: adrp x8, 372380 0x198f377a0 <+304>: add x8, x8, #0xae0 ; =0xae0 0x198f377a4 <+308>: and x9, x20, #0x7 0x198f377a8 <+312>: ldr x8, [x8, x9, lsl #3] 0x198f377ac <+316>: adrp x9, 372380 0x198f377b0 <+320>: add x9, x9, #0x258 ; =0x258 0x198f377b4 <+324>: cmp x8, x9 0x198f377b8 <+328>: b.ne 0x198f376f4 ; <+132> 0x198f377bc <+332>: ubfx x8, x20, #55, #8 0x198f377c0 <+336>: adrp x9, 372380 0x198f377c4 <+340>: add x9, x9, #0x2e0 ; =0x2e0 0x198f377c8 <+344>: ldr x8, [x9, x8, lsl #3] 0x198f377cc <+348>: b 0x198f376f4 ; <+132> 0x198f377d0 <+352>: udf #0x0 0x198f377d4 <+356>: udf #0x0
Posted
by azemtsov.
Last updated
.
Post not yet marked as solved
0 Replies
241 Views
it's a great tool from Apple, but I want to delve more into its engine as I need to. The documentation doesn't seem to go there. For instance, I can't figure out how to clear the bestTranscritption object in speechRecognizer, as it always contains the entire transcription. There are other things I would like to work with as well. Has anyone worked with this heavily enough to recommend proper books are paid for tutorials? Many thanks
Posted
by SergioDCQ.
Last updated
.
Post not yet marked as solved
1 Replies
279 Views
Ever since I got my iPhone 13, when I ask Siri to play my music on Spotify it gives me an error saying “Something went wrong.” When I ask Siri to open the Spotify app it says, “Shortcut say ‘Open App failed because it couldn’t find an app to open.’” At this point I have deleted and re-downloaded Spotify, I have made sure all my Siri and search options are on, I have turned off and turned back on Siri. I don’t know what else to do and it’s quite frustrating because I did not have this issue with any of my other phones/iOS and I use this shortcut very frequently.
Posted Last updated
.
Post not yet marked as solved
2 Replies
419 Views
Siri vocal commands just stop working on our iWatch app after iOS15 watchOS8 upgrade. Triggering manually the shortcut works on both iPhone and Watch. Vocal command work on iPhone. I tried reinstalling, re-paring the watch, reinstalling commands app, reinstalling watch app. No way. When "Hey Siri, execute My Command" I always got the answer: "There is a problem, please retry" (on the watch). This started only after watchOS8 upgrade. Other Siri vocal commands with other apps work correctly. Any way to debug this?
Posted Last updated
.
Post not yet marked as solved
0 Replies
244 Views
Is it possible to predict gender and/or age using voice input within an app from an iOS device? We are working on a vocal singing app that needs some level of gender and age recognition in order to attempt to improve the user experience and to better provide suggestions of songs to sing. Does anyone know if there is an Apple SDK or 3rd party SDK (Git Repo or otherwise) that can take a voice sample and attempt to predict the gender and/or age of the speaker? Preference is to make it all on-device to allow off-line use as well as to protect the users information. We have a dedicated secure server that could be available if on-device is not an option. We do already have a voice interpreter for key phrases, but the gender portion is (understandably) more of a challenge for a variety of reasons. As always, thank you in advance to the great community of folks who help each other on this platform.
Posted
by gestes.
Last updated
.
Post not yet marked as solved
1 Replies
544 Views
Hi all, I am using a UIViewControllerRepresentable that wraps the INUIAddVoiceShortcutButton and presents the INUIAddVoiceShortcutViewController for the user to be able to add my shortcut to Siri. In the past I remember the interaction involved recording a voice trigger (sample article with reference screenshots, https://bit.ly/3ee1Avf However iOS14 seems to have removed this interaction and wants to add the shortcut straight to Siri? Can someone confirm that this is true and there no longer a way to trigger recording the voice prompt? My usecase might be a little more unique where we are building apps for an ingdigenous language program in Australia and we want Siri to trigger on What' Wiradjuri for ... which obviously is not an English word. Thanks for any points and appreciate you sparing your time to read/respond.
Posted
by devraj.
Last updated
.
Post not yet marked as solved
1 Replies
570 Views
I have got disabled Siri suggestions (general & individual for apps), but everytime on locked screen it appears notoriously (for almost anything: safari, photos, ...). Never got that kind of problems in iOS12. Do you have any working solutions? I've been fighting with that problem for over a year now - it's so frustrating.
Posted
by tom68564r.
Last updated
.
Post not yet marked as solved
1 Replies
445 Views
I want to use Siri to perform a repetitive task in my app that inputs variable parameters, thus accelerating the input of that data. I have implemented a couple custom intents for background execution with the use of an intentDefinition file and implemented an IntentsExtension and associated plist to enable those custom intents. I can successfully donate an interaction that iOS matches with the supported suggestions in the intentsDefinition file that causes a Siri Suggestion to be displayed in Siri Search (or on the lock screen when enabled): CreatePartsListIntent* createPartsListIntent = [[CreatePartsListIntent alloc] init];     createPartsListIntent.projectName = intentData.projectName;     createPartsListIntent.quantity = intentData.quantity; INInteraction* interaction = [[INInteraction alloc] initWithIntent:createPartsListIntent response:nil];     [interaction donateInteractionWithCompletion:^(NSError * _Nullable error) {         if(!error) {             NSLog(@"CreatePartsList donation success");         }else {             NSLog(@"CreatePartsList donation fail %@",error.localizedDescription);         }     }]; I can then tap on this suggestion and it takes me to my appDelegate to process the interaction within the app - (id)application:(UIApplication *)application handlerForIntent:(INIntent *)intent { // This method is called when I tap on the Siri suggestion } But I want to process the interaction in the background using voice commands. When I speak the the command of the interaction I donated, the IntentHandler is never called. I cannot figure out what I need to do to get the IntentHandler to be called. According to the WWDC18 Intro to Siri Shortcuts, I should be able to invoke a dialog with Siri, which is my goal. Am I off track. Why isn't the IntentHandler being called? What should trigger it to be called?
Posted
by jeffb6688.
Last updated
.
Post not yet marked as solved
0 Replies
280 Views
What are the possibilities to use "Hey Siri" while Audio Call in App is in progress? Or is there any function that triggers while we say "Hey Siri"? In my case, I am using PJSIP library to use push to talk functionality (VOIP) that required access of microphone during the call in BG and FG both.
Posted Last updated
.
Post not yet marked as solved
0 Replies
247 Views
I just noticed that siri custom intents are not resolving correctly for DURATION type parameters. Siri keeps providing the default value even after the user speaks. This happens on the new IOS 15 devices. See my code snippet     guard let duration = intent.parkingTime else{       completion(INTimeIntervalResolutionResult.needsValue())       return     }      /* Siri keeps returning 0 even if the user says 100 */     if(intent.parkingTime?.doubleValue == 0){       completion(INTimeIntervalResolutionResult.needsValue())       return     }     print("PARKING TIME \(duration.doubleValue)")           completion(INTimeIntervalResolutionResult.success(with: TimeInterval(duration.doubleValue)))   }
Posted
by babafresh.
Last updated
.