npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-places-sdk

v0.1.2

Published

A React Native wrapper for Google Places SDK

Readme

react-native-places-sdk

React Native wrapper for Google Places SDK for Android and iOS. Supports both the legacy architecture and New Architecture (Turbo Modules).

Installation

npm install react-native-places-sdk
# or
yarn add react-native-places-sdk

Requirements

Development Environment

  • Node.js >= 14.0.0
  • npm >= 6.0.0 or Yarn

iOS

  • Google Places SDK for iOS
  • iOS 15.0 or higher

Android

  • Google Places SDK for Android
  • minSdkVersion 24

Setup

iOS

  1. Add GooglePlaces SDK as a dependency in your Podfile:
target 'YourApp' do
  # ...other dependencies...
  pod 'GooglePlaces', '~> 9.0.0'
  
  # Make sure this line is included to link the SDK properly
  pod 'react-native-places-sdk', :path => '../node_modules/react-native-places-sdk'
end
  1. Run pod install

  2. Get an API key from the Google Cloud Console.

  3. Add your API key to your Info.plist:

<key>GooglePlacesAPIKey</key>
<string>YOUR_API_KEY</string>
  1. For location-based features, add these permissions to your Info.plist:
<key>NSLocationWhenInUseUsageDescription</key>
<string>This app needs access to your location to show nearby places.</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>This app needs access to your location to show nearby places.</string>
  1. If you're using the New Architecture (Turbo Modules), make sure to enable it in ios/Podfile:
ENV['RCT_NEW_ARCH_ENABLED'] = '1'  # Set to '0' to disable

Android

  1. Add the Google Places dependency to your app/build.gradle:
dependencies {
    // ...other dependencies...
    implementation 'com.google.android.libraries.places:places:2.6.0'
}
  1. Get an API key from the Google Cloud Console.

  2. Add your API key to your AndroidManifest.xml:

<application>
    <!-- ... other tags -->
    <meta-data
        android:name="com.google.android.geo.API_KEY"
        android:value="YOUR_API_KEY"/>
</application>

Usage

import GooglePlaces from 'react-native-places-sdk';

// Initialize with API key (alternative to Info.plist or AndroidManifest configuration)
await GooglePlaces.initialize('YOUR_API_KEY');

// Autocomplete search
const results = await GooglePlaces.autocomplete('New York');

// Place details
const placeDetails = await GooglePlaces.fetchPlace('PLACE_ID', ['name', 'address', 'coordinate']);


## Methods

- `initialize(apiKey)` - Initialize the SDK with your API key
- `autocomplete(query, [options])` - Search for places with given query
- `fetchPlace(placeId, [fields])` - Get details for a specific place

## Troubleshooting

### iOS Issues

#### 'RCTGooglePlacesSdk.h' file not found

If you encounter this error when building your iOS project, follow these steps:

1. Make sure you've run `pod install` in your iOS directory.
2. If the error persists, create a file named `RCTGooglePlacesSdk.h` in the `node_modules/react-native-places-sdk/ios/` directory with the following content:

```objective-c
#ifdef RCT_NEW_ARCH_ENABLED
#import <GooglePlacesSdk/GooglePlacesSdkSpec.h>

NS_ASSUME_NONNULL_BEGIN

@interface RCTGooglePlacesSdk : NSObject <NativeGooglePlacesSdkSpec>
@end

NS_ASSUME_NONNULL_END

#else

#import <React/RCTBridgeModule.h>

NS_ASSUME_NONNULL_BEGIN

@interface RCTGooglePlacesSdk : NSObject <RCTBridgeModule>
@end

NS_ASSUME_NONNULL_END

#endif
  1. Clean your build folder: In Xcode, go to Product > Clean Build Folder (or press ⇧⌘K).
  2. Rebuild your project.

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT