File tree Expand file tree Collapse file tree 1 file changed +62
-0
lines changed
Expand file tree Collapse file tree 1 file changed +62
-0
lines changed Original file line number Diff line number Diff line change 1+ # JPush-React-Native
2+
3+ ## 1. 安装
4+
5+ ```
6+ npm install jpush-react-native --save
7+ ```
8+
9+ * 注意:如果项目里没有jcore-react-native,需要安装
10+
11+ ```
12+ npm install jcore-react-native --save
13+ ```
14+
15+ ## 2. 配置
16+
17+ ### 2.1 Android
18+
19+ * build.gradle
20+
21+ ```
22+ android {
23+ defaultConfig {
24+ applicationId "yourApplicationId" //在此替换你的应用包名
25+ ...
26+ manifestPlaceholders = [
27+ JPUSH_APPKEY: "yourAppKey", //在此替换你的APPKey
28+ JPUSH_CHANNEL: "yourChannel" //在此替换你的channel
29+ ]
30+ }
31+ }
32+ ```
33+
34+ ```
35+ dependencies {
36+ ...
37+ implementation project(':jpush-react-native') // 添加 jpush 依赖
38+ implementation project(':jcore-react-native') // 添加 jcore 依赖
39+ }
40+ ```
41+
42+ * AndridManifest.xml
43+
44+ ```
45+ <meta-data
46+ android:name="JPUSH_CHANNEL"
47+ android:value="${JPUSH_CHANNEL}" />
48+ <meta-data
49+ android:name="JPUSH_APPKEY"
50+ android:value="${JPUSH_APPKEY}" />
51+ ```
52+
53+ * setting.gradle
54+
55+ ```
56+ include ':jpush-react-native'
57+ project(':jpush-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/jpush-react-native/android')
58+ include ':jcore-react-native'
59+ project(':jcore-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/jcore-react-native/android')
60+ ```
61+
62+ ###2 .2 iOS
You can’t perform that action at this time.
0 commit comments