-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does this support dual sided communication with Siri? #43
Comments
This is somewhat related to #3. As mentioned there, you need to create an extension on Xcode, and the JS bridge cannot run there. So unfortunately, for more complex scenarios like the one you presented, you'll have to do it in native. It's probably better if you look up Apple's Documentation on it. You can definitely use this for more straight forward tasks like opening a specific section of your app, or basically any kind of one-shot interaction that can be done with the app open. |
Alright thanks! |
Is it possible to link an intent from XCode via the |
@ovidiu-balau these are the only properties the INUIAddVoiceShortcutButton takes. I assume that if it is possible, that you'd need to link your shortcut to an intent in Xcode |
@Gustash in my case I don't need dual side communication, since all my logic is done in native code, however I still want to able to add shortcut to custom intent using AddToSiriButton. As explained in this article: https://medium.com/@neobeppe/quick-win-for-you-app-add-to-siri-button-7f4badf38e92 button's shortcut can accept either NSUserActivity or CustomIntent, however checking the code of SiriButtonView.setShortcut, I see that it's always creating NSUserActivity, so I suppose it's currently not possible to add shortcut for custom intent without changing native code, however it looks like a simple change to support both options. |
@Gustash sorry, just realized that CustomIntent in this sample code should be the Intent class I created in my extension, so I guess it will be more challenging to instantiate this class inside your code |
@tamirla Yeah, unfortunately since intents are custom classes, you'd need to extend this library's code on a case per case basis. Let me know if you need any help setting that up |
@Gustash ok. no problem, I'll do it & will let you know if I'll need any help. Thanks ! |
Look like the best method is to create custom intent classes with parameters and implement everything in native for an existing RN app? Create the intent, plist changes, etc. for more complex interactions? If so, what would be the issues if developing that with the UI? -Thanks for this thread! |
@sinclas I don't think that would be a problem, very likely doable. It's just a logistic nightmare to have that as a supported feature of this package. I recommend people implement it themselves on a per-app basis, and use as much from this package as possible in order to simplify the implementation |
Agree. After spending a lot of time understanding intents and custom classes it would make sense to go native for a small part of the app’s functionality. Using keychain to stores a shared resource such as login info to a secure endpoint could be a solution.
Are there any tract native example of parameterized custom intents and extensions out there??
Thanks!
Steve
…Sent from my iPhone
On Mar 22, 2021, at 3:59 AM, Gustash ***@***.***> wrote:
@sinclas I don't think that would be a problem, very likely doable. It's just a logistic nightmare to have that as a supported feature of this package. I recommend people implement it themselves on a per-app basis, and use as much from this package as possible in order to simplify the implementation
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Not that I'm aware of, but the Apple docs aren't too bad |
Can we do something like what Google App on iOS does, for example: I want to replicate this flow by doing all user voice interactions inside the app (with google web speech and dialog flow) but replicate above. |
@sinclas, were you able to configure? I have a strange error: the application ignores the |
Suppose i want to create something that does this.
I register "create a data model" as a shortcut with Siri (already works).
User: "Hey siri, create a data model"
Siri: "Sure, select a model type"
User: "Model ABC"
=> Here Siri sends "Model ABC" to my app and i use some API to check on my server if that Model exists or if the user is allowed to choose that option and pass result back to Siri.
Siri: (if the app sends true response) : "Model added!" and opens the app.
Siri: (if the app sends false response) : "Sorry, that model doesn't exist Please select another!"
Something like this?
The text was updated successfully, but these errors were encountered: