iOS - Opening Search App programmatically

143 Views Asked by At

I would like to know how it is possible to search something on iOS devices programmatically (Spotlight?) using Universal links or direct methods (native code) to open the search app like on Android.

In my Android app I have

String string = query;
Intent intent = new Intent(Intent.ACTION_WEB_SEARCH);
intent.setPackage("com.google.android.googlequicksearchbox");
intent.setClassName("com.google.android.googlequicksearchbox", "com.google.android.googlequicksearchbox.SearchActivity");
intent.putExtra("query", string);
activity.startActivity(intent);

This code performs a search that sometimes allows assistant-like results with the possibility to open relevant apps or the web browser and so on.

I think also iOS have this feature. How to do that?

1

There are 1 best solutions below

1
matt On

You can make your app searchable with Siri, but you cannot, in code, trigger a Siri search.