How to launch Siri using scheme url with xcode?
Asked Answered
D

3

-1

I need to launch Siri (on a jailbroken device) through the openUrl: method.

For example

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"Siri://"]];
Demonology answered 4/4, 2013 at 1:2 Comment(1)
Sorry for my english. Anyway, I wanted to know if there is a some trick to open Siri. Just see this video for understand. youtube.com/watch?v=Pcpr5Z_1UAc&desktop_uri=/… For me no problem if i need to use cydia. Just I would like to know the way for make it.Demonology
T
2

This isn't possible. Also, Xcode is an IDE - a code editor. It's not a language or a platform.

Thora answered 4/4, 2013 at 1:12 Comment(1)
Sorry for my english., i know the xcode is an IDE and not a language :P Anyway, I wanted to know if there is a some trick to open Siri. Just see this video for understand. youtube.com/watch?v=Pcpr5Z_1UAc&desktop_uri=/… For me no problem if i need to use cydia. Just I would like to know the way for make it.Demonology
S
2

There doesn't seem to be any URL Scheme for Siri, so I don't think you can open it that way. Siri is also not a normal App, it's a library that's used by SpringBoard.

Anyway, if you want another way to open it, I would try looking at rpetrich's libActivator source code.

If you look here, you'll see something similar to what you need. The Virtual Assistant is "Siri".

- (BOOL)activateVirtualAssistant{   
   if ([%c(SBAssistantController) preferenceEnabled]) { 
      if ([%c(SBAssistantController) shouldEnterAssistant]) {
          SBAssistantController *assistant = (SBAssistantController *)[%c(SBAssistantController) sharedInstance];           
          if (assistant.assistantVisible)   
             [assistant dismissAssistant];          
          else {
             [(SpringBoard *)UIApp activateAssistantWithOptions:nil withCompletion:nil];
             return YES;
          }     
       }
   }    
   return NO;
}

Here, the code calls activateAssistantWithOptions:withCompletion:, which is a method in the SpringBoard class itself.

This technique, of course, is based on MobileSubstrate hooking.

Disclaimer: I have not tested this code. Just looking at it, though, it seems to be what you need.


Update:

This isn't using URL schemes, but I did figure out a different way to launch Siri, described in this answer.

Sporophyll answered 10/4, 2013 at 1:32 Comment(0)
J
0

There's no URL schema for Siri and there's no integration available at this time - there may be integration coming in iOS 7 but at this stage there is no way to perform this function.

Jose answered 4/4, 2013 at 1:35 Comment(1)
Sorry for my english. Anyway, I wanted to know if there is a some trick to open Siri. Just see this video for understand. youtube.com/watch?v=Pcpr5Z_1UAc&desktop_uri=/… For me no problem if i need to use cydia. Just I would like to know the way for make it.Demonology

© 2022 - 2024 — McMap. All rights reserved.