File tree Expand file tree Collapse file tree 1 file changed +17
-13
lines changed
Expand file tree Collapse file tree 1 file changed +17
-13
lines changed Original file line number Diff line number Diff line change 1515```
1616npm install jpush-react-native jcore-react-native --save
1717```
18+ ## 配置
1819
19- ##### (如果是原生应用集成 react-native)使用 CocoaPods 安装
20+ 配置包括两个步骤,自动配置和手动操作。
2021
21- 在 Podfile 中添加如下代码:
22+ ### 1.自动配置部分(以下命令均在你的 React Native Project 目录下运行)
2223
24+ 如果工程不是通过 Cocoapods 来集成 ReactNative 的可以直接使用下面代码来 link 插件。
2325```
24- pod 'JPushRN', :path => '../node_modules/jpush- react-native'
26+ react-native link
2527```
2628
27- 终端执行如下指令:
29+ 根据提示,输入 ` appKey ` 等即可。
2830
29- ```
30- pod install
31- ```
31+ 自动配置操作会自动插入 Native 代码(iOS 中使用 Appdelegate.m 文件名,如果修改了该文件名需要手动插入[ 代码] ( documents/ios_usage.md ) ),这个部分用户无需关系具体细节。
3232
33- ## 配置
3433
35- 配置包括两个步骤,自动配置和手动操作。
3634
37- ### 1.自动配置部分(以下命令均在你的 React Native Project 目录下运行)
35+ ##### (如果是原生应用集成 react-native)使用 CocoaPods 安装
36+
37+ ##### 如果你的 React Native 是通过 Cocoapods 来集成的则使用下面两个步骤来集成,注意: 使用 pod 就不要使用 react-native link 了,不然会有冲突。
38+
39+ 1 . 在 Podfile 中添加如下代码:
3840
3941```
40- react-native link
42+ pod 'JPushRN', :path => '../node_modules/jpush- react-native'
4143```
4244
43- 根据提示,输入 ` appKey ` 等即可。
45+ 2 . 终端执行如下指令:
4446
45- 自动配置操作会自动插入 Native 代码(iOS 中使用 Appdelegate.m 文件名,如果修改了该文件名需要手动插入[ 代码] ( documents/ios_usage.md ) ),这个部分用户无需关系具体细节。
47+ ```
48+ pod install
49+ ```
4650
4751### 2.手动操作部分(自动配置后,部分操作需要手动修改)
4852
You can’t perform that action at this time.
0 commit comments