Skip to main content

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?

Don't waste precious time on plugin issues.

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#

$ npm install cordova-plugin-indexappcontent
$ npm install @ionic-native/index-app-content
$ ionic cap sync

Supported Platforms#

  • iOS

Usage#

React#

Learn more about using Ionic Native components in React

Angular#

import { 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));