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
{{ message }}
This repository was archived by the owner on May 20, 2025. It is now read-only.
@@ -80,16 +83,56 @@ If you want to see how other projects have integrated with CodePush, you can che
80
83
81
84
## iOS Setup
82
85
83
-
Once you've acquired the CodePush plugin, you need to integrate it into the Xcode project of your React Native app. To do this, take the following steps:
86
+
Once you've acquired the CodePush plugin, you need to integrate it into the Xcode project of your React Native app and configure it correctly. To do this, take the following steps:
84
87
85
88
### Plugin Installation (iOS)
86
89
90
+
In order to accomodate as many developer preferences as possible, the CodePush plugin supports iOS installation via three mechanisms:
91
+
92
+
1.[**RNPM**](#plugin-installation-ios---rnpm) - [React Native Package Manager (RNPM)](https://github.com/rnpm/rnpm) is an awesome tool that provides the simplest installation experience possible for React Native plugins. If you're already using it, or you want to use it, then we recommend this approach.
93
+
94
+
2.[**CocoaPods**](#plugin-installation-ios---cocoapods) - If you're building a native iOS app that is embedding React Native into it, or you simply prefer using [CocoaPods](https://cocoapods.org), then we recommend using the Podspec file that we ship as part of our plugin.
95
+
96
+
3.[**"Manual"**](#plugin-installation-ios---manual) - If you don't want to depend on any additional tools or are fine with a few extra installation steps (it's a one-time thing), then go with this approach.
97
+
98
+
#### Plugin Installation (iOS - RNPM)
99
+
100
+
1. Run `rnpm link react-native-code-push`
101
+
102
+
*Note: If you don't already have RNPM installed, you can do so by simply running `npm i -g rnpm` and then executing the above command.*
103
+
104
+
2. Open your app's Xcode project
105
+
106
+
3. Select the project node in Xcode and select the "Build Phases" tab of your project configuration.
107
+
108
+
4. Click the plus sign underneath the "Link Binary With Libraries" list and select the `libz.tbd` library underneath the `iOS` node that matches your target version.
*Note: Alternatively, if you prefer, you can add the `-lz` flag to the `Other Linker Flags` field in the `Linking` section of the `Build Settings`.*
113
+
114
+
We hope to eventually remove the need for steps #2-4, but in the meantime, RNPM doesn't support automating them.
115
+
116
+
#### Plugin Installation (iOS - CocoaPods)
117
+
118
+
1. Add the CodePush plugin dependency to your `Podfile`, pointing at the path where NPM installed it
119
+
120
+
```ruby
121
+
pod 'CodePush', :path => './node_modules/react-native-code-push`
122
+
```
123
+
124
+
2. Run `pod install`
125
+
126
+
#### Plugin Installation (iOS - Manual)
127
+
87
128
1. Open your app's Xcode project
129
+
88
130
2. Find the `CodePush.xcodeproj` file within the `node_modules/react-native-code-push/ios` directory (or`node_modules/react-native-code-push`for<=`1.7.3-beta` installations) and drag it into the `Libraries` node inXcode
89
131
90
132

91
133
92
134
3. Select the project node inXcodeandselect the "Build Phases" tab of your project configuration.
135
+
93
136
4. Drag`libCodePush.a` from `Libraries/CodePush.xcodeproj/Products` into the "Link Binary With Libraries" section of your project's "Build Phases" configuration.
94
137
95
138

0 commit comments