Flutter教程

Index App Content

Contents

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

联系我们?

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic's experts offer official maintenance, support, and integration help.

Contact Us Today!

Ionic Index App Content插件的安装(Installation)

ionic cordova plugin add cordova-plugin-indexappcontent npm install @ionic-native/index-app-content
Ionic EE comes with fully supported and maintained plugins from the Ionic Team. Learn More or Contact Us
ionic enterprise register --key=YOURPRODUCTKEY npm install @ionic-enterprise/index-app-content

Ionic Index App Content插件支持的平台(Supported Platforms)

  • iOS

Ionic Index App Content插件的用法(Usage)

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