https://github.com/rhdeck/react-native-fix-pod-links
Fix header references to pods in linked modules
https://github.com/rhdeck/react-native-fix-pod-links
Last synced: 8 months ago
JSON representation
Fix header references to pods in linked modules
- Host: GitHub
- URL: https://github.com/rhdeck/react-native-fix-pod-links
- Owner: rhdeck
- License: mit
- Created: 2018-02-14T17:49:27.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-12-15T11:59:45.000Z (over 7 years ago)
- Last Synced: 2025-09-17T04:20:47.535Z (9 months ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-native-fix-pod-links
Focused plugin to help with developing React Native static modules that have CocoaPod dependencies (using [react-native-pods](https://npmjs.com/react-native-pods) maybe?)
This will edit the header search path to add an absolute reference from your linked module to your app's ios/Pods path.
As a result, you get to use linked libraries stored anywhere in the tree you want, and they will have the correct path "back" to the app's additional dependencies.
# Installation
## Global (kinda convenient for dev)
```
yarn global add react-native-fix-pod-links
```
## Per-app (useful for sharing)
```
yarn add react-native-fix-pod-links
```
# Usage
Assuming you have a library and app stored at, say:
```
/Users/me/Documents/module
/Users/me/Documents/testapp
```
And you want to be able to develop module in-place while running through testapp.
Presumably you have already done:
```
cd /Users/me/Documents/testapp
yarn add link:/Users/me/Documents/module
```
(There are multiple ways to get the above effect, but this will do for now)
Now try building your app. If it is failing because of a dependency on CocoaPod, you just:
```
cd /Users/me/Documents/testapp
react-native-fix-pod-links
```
Switch back over to xcode. It builds!
# Shorter format
Want to save some keystrokes? Try just typing:
```
rnfpl
```
# Undo
_Important_ you problably don't want to keep these absolute links for all time - not helpful for distribution, for example. Easily remove them.
```
cd /Users/me/Documents/testapp
rnfpl -u
```