Index App Content
This plugin gives you a Javascript API to interact with Core Spotlight on iOS (=> iOS 9). You can add, update and delete items to the spotlight search index. Spotlight Search will include these items in the result list. You can deep-link the search results with your app.
https://github.com/johanblomgren/cordova-plugin-indexappcontent
Stuck on a Cordova issue?
If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic’s experts offer premium advisory services for both community plugins and premier plugins.
Installation#
- Capacitor
- Cordova
- Enterprise
$ npm install cordova-plugin-indexappcontent $ npm install @ionic-native/index-app-content $ ionic cap sync
$ ionic cordova plugin add cordova-plugin-indexappcontent $ npm install @ionic-native/index-app-content
Ionic Enterprise comes with fully supported and maintained plugins from the Ionic Team. Learn More or if you're interested in an enterprise version of this plugin Contact Us
#
Supported Platforms- iOS
#
Usage#
ReactLearn more about using Ionic Native components in React
#
Angularimport { IndexAppContent } from '@ionic-native/index-app-content/ngx';
constructor(private indexAppContent: IndexAppContent) { }
...
var items = [ { domain: 'com.my.domain', identifier: '88asdf7dsf', title: 'Foo', description: 'Bar', url: 'http://location/of/my/image.jpg', }, { domain: 'com.other.domain', identifier: '9asd67g6a', title: 'Baz', description: 'Woot', url: 'http://location/of/my/image2.jpg', }];
this.indexAppContent.setItems(items) .then((res: any) => console.log(res)) .catch((error: any) => console.error(error));