React Native Module for IOS MapKit Local Search
- Not on npm yet, but in the meantime clone or download this repo to you project directory
cd
into React-Native-LocalSearch andnpm install
- In XCode's project navigator, right click
Libraries
andAdd Files to [your project's name]
- Find your
React-Native-LocalSearch
directory and addRNLocalSearch.xcodeproj
- Add
libRNLocalSearch.a
to your project'sBuild Phases
andLink Binary With Libraries
- Click
RNLocalSearch.xcodeproj
in the project navigator and go theBuild Settings
tab. Make sure 'All' is toggled on (instead of 'Basic'). Look forHeader Search Paths
and make sure it contains$(SRCROOT)/node_modules/react-native/React
and mark asrecursive
.
Local Search currently utilizes a single method.
var RNLocalSearch = require('react-native').NativeModules.RNLocalSearch;
RNLocalSearch.searchForLocations(searchString, callback(err, resp) =>{});