You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/setup cocoapods.md
+12-7Lines changed: 12 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,12 @@
1
1
# Setup CocoaPods
2
2
3
3
[CocoaPods](https://cocoapods.org/) is a package management tool for iOS and macOS development.
4
-
You can use it to add the actual React Native framework code into our project, and especially to manage thirdparties packages.
4
+
You can use it to add the actual React Native framework code into our project, and especially to manage thirdparty packages.
5
5
6
6
In this boilerplate, we don't want to make CocoaPods as a required tool.
7
7
But if you planned to manage a lot of thirdparty dependencies, it should be a really good idea to follow this guide.
8
8
9
-
Finally, I didn't specify it yet, but this tool is for iOS dependencies only. On Android, react-native linking is enought.
10
-
11
-
_You can read more why using CocoaPods can help you to avoid a lot of constraints [on this great article](https://engineering.brigad.co/demystifying-react-native-modules-linking-ae6c017a6b4a) from Brigad._
9
+
Finally, we didn't specify it yet, but this tool is for iOS dependencies only. On Android, `react-native linking` seems to be enought.
12
10
13
11
14
12
## Setup CocoaPods
@@ -19,7 +17,7 @@ brew install cocoapods
19
17
```
20
18
21
19
Then simply create a `Podfile` file, which will be the configuration file of all your dependencies.
22
-
The easiest way is bu running :
20
+
The easiest way is by running :
23
21
```bash
24
22
cd ios
25
23
pod init
@@ -30,7 +28,7 @@ pod init
30
28
### React Native framework
31
29
32
30
One of the main thing you must know about using CocoaPods, is that we need to manage React itself as a pod dependency to make it works well.
33
-
It means that you can decide what parts of React Native framework you would like to integrate into your app. So you must not forget to append each React Native `subspec` inside the [podfile]().
31
+
It means that you can decide what parts of React Native framework you would like to integrate into your app. So you must not forget to append each React Native `subspec` inside the `Podfile`.
34
32
This part is fully explained in the [official React Native documentation](https://facebook.github.io/react-native/docs/integration-with-existing-apps#configuring-cocoapods-dependencies)
35
33
36
34
So, add the following into your `Podfile` :
@@ -85,4 +83,11 @@ That's all ! :tada:
85
83
86
84
87
85
- You must always use the `.xcworkspace` file inside Xcode instead of the `.xcodeproj` one.
88
-
- Sometimes, running `react-native link will automatically try to perform a pod install. Read carefuly each thirdparty package install doc.
86
+
- Sometimes, running `react-native link will automatically try to perform a pod install. Read carefuly each thirdparty package install doc.`
-[Beginner’s Guide to Using CocoaPods with React Native](https://shift.infinite.red/beginner-s-guide-to-using-cocoapods-with-react-native-46cb4d372995)
0 commit comments