https://github.com/rhdeck/react-native-pod
Automatic creation/support for podfiles in React Native
https://github.com/rhdeck/react-native-pod
Last synced: 10 months ago
JSON representation
Automatic creation/support for podfiles in React Native
- Host: GitHub
- URL: https://github.com/rhdeck/react-native-pod
- Owner: rhdeck
- License: mit
- Created: 2017-11-25T16:31:38.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-12-24T18:49:24.000Z (over 6 years ago)
- Last Synced: 2025-08-06T17:28:14.296Z (11 months ago)
- Language: JavaScript
- Size: 32.2 KB
- Stars: 22
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-native-pod
Extends support for CocoaPods in React Native projects by:
1. Initializing a Podfile for your ios project (in /ios/Podfile)
2. On react-native link, scans the package.json of all dependencies for a "pods" entry. If found, adds those pods to the Podfile.
3. At the end of react-native link, runs `pod install` to update your Pods if necessary. Now you have installed pods!
4. You can update pods at any time by running `react-native installpods`
# Usage:
```bash
yarn add react-native-pod
react-native link
```
# Developer use
**New!** Add pods you would like distributed with your package from the command line:
```
react-native addpod [pod]
```
or
```
react-native addpod [pod] --podversion [version]
```
or
```
react-native addpod [pod] --podgit[giturl]
```
Note that adding a pod puts the reference in your package.json. This gives the hint to react-native link to add it to your Podfile.
To remove a pod:
```
react-native removepod [pod]
```
# Prerequisite
You need to have [CocoaPods](http://cocoapods.org) installed. To get it going: `sudo gem install cocoapods`.
# How to add value with this
When making a native module that has a pod dependency, just add the pod reference to your pods in package.json manually or using the tools above, and make `react-native-pod` a peer dependency.
Feedback welcome!