New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-search-api

Package Overview
Dependencies
Maintainers
13
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-search-api - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

22

index.js

@@ -64,2 +64,24 @@

/**
* Gets the initial spotlight item's identifier. Resoves to null
* in case the app was started otherwise.
*
* @NOTE A good place for calling this method is the component's
* `componentDidMount` override.
*/
getInitialSpotlightItem(): Promise {
return SearchApiManager.getInitialSpotlightItem();
}
/**
* Gets the initial app history item's user info dictionary. Resolves to null
* in case the app was started otherwise.
*
* @NOTE A good place for calling this method is the component's
* `componentDidMount` override.
*/
getInitialAppHistoryItem(): Promise {
return SearchApiManager.getInitialAppHistoryItem();
}
/**
* Registers for the spotlight item opening event.

@@ -66,0 +88,0 @@ *

2

package.json

@@ -7,3 +7,3 @@ {

},
"version": "1.1.0",
"version": "1.2.0",
"description": "A React Native module that allows to perform the Spotlight integration on iOS",

@@ -10,0 +10,0 @@ "author": "Daniil Konoplev <danchoys@ombori.com>",

@@ -48,2 +48,19 @@ # React Native Search Api module

Generally you should be interested whether the app was started using the search, therefore consider using
the following two methods:
```js
// For the spotlight item:
SearchApi.getInitialSpotlightItem().then(result => {
if (result) {
console.log('Started with a spotlight item!')
}
})
// For the app history item:
SearchApi.getInitialAppHistoryItem().then(result => {
if (result) {
console.log('Started with an app history item!')
}
})
```
In order to create a new spotlight item, use `indexSpotlightItem` or `indexSpotlightItems`:

@@ -89,4 +106,18 @@ ```js

Thumbnail to be presented in the search results. The same format as `source` in
the `Image` component. Refer to [documentation](https://facebook.github.io/react-native/docs/image.html). Optional.
the `Image` component. Optional.
Examples:
```js
var localItem = {
<...>,
thumbnail: require('/react-native/img/favicon.png')
};
var remoteItem = {
<...>,
thumbnail: {uri: 'https://facebook.github.io/react-native/docs/assets/favicon.png'}
};
```
Please refer to [documentation](https://facebook.github.io/react-native/docs/image.html) for more details.
### Spotlight-specific keys

@@ -93,0 +124,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc