pushwoosh-react-native-plugin 6.1.40 → 6.1.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/docs/README.md +20 -0
  2. package/index.d.ts +4 -0
  3. package/index.js +33 -0
  4. package/package.json +1 -1
  5. package/pushwoosh-react-native-plugin.podspec +2 -2
  6. package/src/android/.gradle/5.6.4/fileChanges/last-build.bin +0 -0
  7. package/src/android/.gradle/5.6.4/fileHashes/fileHashes.lock +0 -0
  8. package/src/android/.gradle/5.6.4/gc.properties +0 -0
  9. package/src/android/.gradle/vcs-1/gc.properties +0 -0
  10. package/src/android/build.gradle +1 -1
  11. package/src/android/src/main/java/com/pushwoosh/reactnativeplugin/PushwooshPlugin.java +10 -0
  12. package/src/ios/PushwooshPlugin/Pushwoosh.m +8 -0
  13. package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -151
  14. package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -31
  15. package/.github/ISSUE_TEMPLATE/question.yml +0 -28
  16. package/example/LICENSE +0 -21
  17. package/example/README.md +0 -58
  18. package/example/Screenshots/Android_1.png +0 -0
  19. package/example/Screenshots/Android_2.png +0 -0
  20. package/example/Screenshots/iOS_1.png +0 -0
  21. package/example/Screenshots/iOS_2.png +0 -0
  22. package/example/demoapp/.bundle/config +0 -2
  23. package/example/demoapp/.eslintrc.js +0 -4
  24. package/example/demoapp/.prettierrc.js +0 -7
  25. package/example/demoapp/.watchmanconfig +0 -1
  26. package/example/demoapp/Actions.js +0 -302
  27. package/example/demoapp/App.tsx +0 -118
  28. package/example/demoapp/Gemfile +0 -9
  29. package/example/demoapp/Gemfile.lock +0 -105
  30. package/example/demoapp/README.md +0 -79
  31. package/example/demoapp/Settings.js +0 -126
  32. package/example/demoapp/__tests__/App.test.tsx +0 -17
  33. package/example/demoapp/android/app/build.gradle +0 -118
  34. package/example/demoapp/android/app/debug.keystore +0 -0
  35. package/example/demoapp/android/app/proguard-rules.pro +0 -10
  36. package/example/demoapp/android/app/src/debug/AndroidManifest.xml +0 -9
  37. package/example/demoapp/android/app/src/main/AndroidManifest.xml +0 -25
  38. package/example/demoapp/android/app/src/main/java/com/demoapp/MainActivity.kt +0 -22
  39. package/example/demoapp/android/app/src/main/java/com/demoapp/MainApplication.kt +0 -43
  40. package/example/demoapp/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -37
  41. package/example/demoapp/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  42. package/example/demoapp/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  43. package/example/demoapp/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  44. package/example/demoapp/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  45. package/example/demoapp/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  46. package/example/demoapp/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  47. package/example/demoapp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  48. package/example/demoapp/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  49. package/example/demoapp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  50. package/example/demoapp/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  51. package/example/demoapp/android/app/src/main/res/values/strings.xml +0 -3
  52. package/example/demoapp/android/app/src/main/res/values/styles.xml +0 -9
  53. package/example/demoapp/android/build.gradle +0 -21
  54. package/example/demoapp/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  55. package/example/demoapp/android/gradle/wrapper/gradle-wrapper.properties +0 -7
  56. package/example/demoapp/android/gradle.properties +0 -41
  57. package/example/demoapp/android/gradlew +0 -249
  58. package/example/demoapp/android/gradlew.bat +0 -92
  59. package/example/demoapp/android/settings.gradle +0 -4
  60. package/example/demoapp/app.json +0 -4
  61. package/example/demoapp/babel.config.js +0 -3
  62. package/example/demoapp/index.js +0 -46
  63. package/example/demoapp/ios/.xcode.env +0 -11
  64. package/example/demoapp/ios/NotificationService/Info.plist +0 -15
  65. package/example/demoapp/ios/NotificationService/NotificationService.entitlements +0 -8
  66. package/example/demoapp/ios/NotificationService/NotificationService.swift +0 -38
  67. package/example/demoapp/ios/Podfile +0 -40
  68. package/example/demoapp/ios/demoapp/AppDelegate.h +0 -6
  69. package/example/demoapp/ios/demoapp/AppDelegate.mm +0 -31
  70. package/example/demoapp/ios/demoapp/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
  71. package/example/demoapp/ios/demoapp/Images.xcassets/Contents.json +0 -6
  72. package/example/demoapp/ios/demoapp/Info.plist +0 -57
  73. package/example/demoapp/ios/demoapp/LaunchScreen.storyboard +0 -47
  74. package/example/demoapp/ios/demoapp/PrivacyInfo.xcprivacy +0 -37
  75. package/example/demoapp/ios/demoapp/demoapp.entitlements +0 -10
  76. package/example/demoapp/ios/demoapp/main.m +0 -10
  77. package/example/demoapp/ios/demoapp.xcodeproj/project.pbxproj +0 -937
  78. package/example/demoapp/ios/demoapp.xcodeproj/xcshareddata/xcschemes/demoapp.xcscheme +0 -88
  79. package/example/demoapp/ios/demoapp.xcworkspace/contents.xcworkspacedata +0 -10
  80. package/example/demoapp/ios/demoapp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  81. package/example/demoapp/ios/demoappTests/Info.plist +0 -24
  82. package/example/demoapp/ios/demoappTests/demoappTests.m +0 -66
  83. package/example/demoapp/jest.config.js +0 -3
  84. package/example/demoapp/logos.png +0 -0
  85. package/example/demoapp/metro.config.js +0 -20
  86. package/example/demoapp/package.json +0 -42
  87. package/example/demoapp/tsconfig.json +0 -3
  88. package/example/demoapp/yarn.lock +0 -7153
package/docs/README.md CHANGED
@@ -62,6 +62,8 @@ DeviceEventEmitter.addListener('pushOpened', (e: Event) => {
62
62
  <tr class="even"><td><a href="#setcommunicationenabled">setCommunicationEnabled()</a></td></tr>
63
63
  <tr class="even"><td><a href="#removealldevicedata">removeAllDeviceData()</a></td></tr>
64
64
  <tr class="even"><td><a href="#enableHuaweiPushNotifications">enableHuaweiPushNotifications()</a></td></tr>
65
+ <tr class="even"><td><a href="#registersmsnumber">registerSMSNumber(phoneNumber)</a></td></tr>
66
+ <tr class="even"><td><a href="#registerwhatsappnumber">registerWhatsappNumber(phoneNumber)</a></td></tr>
65
67
  <tr>
66
68
  <th align="left" colspan="2"><strong>Events</strong></th>
67
69
  </tr>
@@ -491,6 +493,24 @@ enableHuaweiPushNotifications()
491
493
  **[android]**
492
494
  Enables Huawei push messaging. Requires configured Huawei platform for your Pushwoosh application. See the <a href="https://docs.pushwoosh.com/platform-docs/pushwoosh-sdk/android-push-notifications/huawei-integration/huawei-in-react-native">integration guide</a>.
493
495
 
496
+ ### registerSMSNumber
497
+
498
+ ```js
499
+ registerSMSNumber(phoneNumber)
500
+ ```
501
+ **[android, ios]**
502
+ Registers phone number associated to the current user.
503
+ SMS numbers must be in E.164 format (e.g., "+1234567890") and be valid.
504
+
505
+ ### registerWhatsappNumber
506
+
507
+ ```js
508
+ registerWhatsappNumber(phoneNumber)
509
+ ```
510
+ **[android, ios]**
511
+ Registers WhatsApp number associated to the current user.
512
+ WhatsApp numbers must be in E.164 format (e.g., "+1234567890") and be valid.
513
+
494
514
  ### pushReceived
495
515
 
496
516
  ```js
package/index.d.ts CHANGED
@@ -53,6 +53,9 @@ declare module 'pushwoosh-react-native-plugin' {
53
53
  //email methods
54
54
  setUserEmails(userId: string, emails: (string | string[]), success?: () => void, fail?: (error: Error) => void): void;
55
55
  setEmails(emails: (string | string[]), success?: () => void, fail?: (error: Error) => void): void;
56
+ //SMS and WhatsApp methods
57
+ registerSMSNumber(phoneNumber: string): void;
58
+ registerWhatsappNumber(phoneNumber: string): void;
56
59
  //badge methods
57
60
  setApplicationIconBadgeNumber(badgeNumber: number): void;
58
61
  getApplicationIconBadgeNumber(callback: (badge: number) => void): void;
@@ -88,6 +91,7 @@ declare module 'pushwoosh-react-native-plugin' {
88
91
  isAvailableGDPR(success: (isAvailable: boolean) => void): void;
89
92
  setCommunicationEnabled(enabled: boolean, success?: () => void, fail?: (error: Error) => void): void;
90
93
  removeAllDeviceData(success?: () => void, fail?: (error: Error) => void): void;
94
+
91
95
  }
92
96
 
93
97
  const Pushwoosh: Pushwoosh;
package/index.js CHANGED
@@ -176,6 +176,38 @@ class PushNotification {
176
176
  PushwooshModule.setEmails(emails, success, fail);
177
177
  }
178
178
 
179
+ //Function: registerSMSNumber
180
+ //Registers phone number associated to the current user.
181
+ //SMS numbers must be in E.164 format (e.g., "+1234567890") and be valid.
182
+ //
183
+ //Example:
184
+ //(start code)
185
+ // Pushwoosh.registerSMSNumber("+1234567890");
186
+ //(end)
187
+ registerSMSNumber(phoneNumber: string) {
188
+ if (!phoneNumber || phoneNumber.trim() === '') {
189
+ console.warn('Pushwoosh: SMS number is null or empty');
190
+ return;
191
+ }
192
+ PushwooshModule.registerSMSNumber(phoneNumber);
193
+ }
194
+
195
+ //Function: registerWhatsappNumber
196
+ //Registers WhatsApp number associated to the current user.
197
+ //WhatsApp numbers must be in E.164 format (e.g., "+1234567890") and be valid.
198
+ //
199
+ //Example:
200
+ //(start code)
201
+ // Pushwoosh.registerWhatsappNumber("+1234567890");
202
+ //(end)
203
+ registerWhatsappNumber(phoneNumber: string) {
204
+ if (!phoneNumber || phoneNumber.trim() === '') {
205
+ console.warn('Pushwoosh: WhatsApp number is null or empty');
206
+ return;
207
+ }
208
+ PushwooshModule.registerWhatsappNumber(phoneNumber);
209
+ }
210
+
179
211
  //Function: setTags
180
212
  //Call this to set tags for the device
181
213
  //
@@ -620,6 +652,7 @@ class PushNotification {
620
652
  enableHuaweiPushNotifications() {
621
653
  PushwooshModule.enableHuaweiPushNotifications();
622
654
  }
655
+
623
656
  }
624
657
 
625
658
  module.exports = new PushNotification();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pushwoosh-react-native-plugin",
3
- "version": "6.1.40",
3
+ "version": "6.1.42",
4
4
  "description": "This plugin allows you to send and receive push notifications. Powered by Pushwoosh (www.pushwoosh.com).",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -1,6 +1,6 @@
1
1
  Pod::Spec.new do |s|
2
2
  s.name = "pushwoosh-react-native-plugin"
3
- s.version = "6.1.40"
3
+ s.version = "6.1.42"
4
4
  s.summary = "React Native Pushwoosh Push Notifications module"
5
5
  s.requires_arc = true
6
6
  s.author = 'Pushwoosh'
@@ -15,6 +15,6 @@ Pod::Spec.new do |s|
15
15
  s.static_framework = true
16
16
 
17
17
  s.dependency 'React'
18
- s.dependency 'PushwooshXCFramework', '6.8.6'
18
+ s.dependency 'PushwooshXCFramework', '6.10.4'
19
19
  s.dependency 'PushwooshInboxUIXCFramework'
20
20
  end
File without changes
File without changes
@@ -37,7 +37,7 @@ android {
37
37
  }
38
38
 
39
39
  ext {
40
- pushwoosh = "6.7.24"
40
+ pushwoosh = "6.7.32"
41
41
  }
42
42
 
43
43
  dependencies {
@@ -580,6 +580,16 @@ public class PushwooshPlugin extends ReactContextBaseJavaModule implements Lifec
580
580
  Pushwoosh.getInstance().enableHuaweiPushNotifications();
581
581
  }
582
582
 
583
+ @ReactMethod
584
+ public void registerSMSNumber(String phoneNumber) {
585
+ Pushwoosh.getInstance().registerSMSNumber(phoneNumber);
586
+ }
587
+
588
+ @ReactMethod
589
+ public void registerWhatsappNumber(String phoneNumber) {
590
+ Pushwoosh.getInstance().registerWhatsappNumber(phoneNumber);
591
+ }
592
+
583
593
  ///
584
594
  /// LifecycleEventListener callbacks
585
595
  ///
@@ -875,6 +875,14 @@ RCT_EXPORT_METHOD(clearNotificationCenter){
875
875
  RCT_EXPORT_METHOD(enableHuaweiPushNotifications) {
876
876
  // available in Android only
877
877
  }
878
+
879
+ RCT_EXPORT_METHOD(registerSMSNumber:(NSString *)phoneNumber) {
880
+ [[Pushwoosh sharedInstance] registerSmsNumber:phoneNumber];
881
+ }
882
+
883
+ RCT_EXPORT_METHOD(registerWhatsappNumber:(NSString *)phoneNumber) {
884
+ [[Pushwoosh sharedInstance] registerWhatsappNumber:phoneNumber];
885
+ }
878
886
 
879
887
  #pragma mark - PushNotificationDelegate
880
888
 
@@ -1,151 +0,0 @@
1
- name: "🐞 Bug Report"
2
- description: "Report us a bug"
3
- title: "[Bug]: "
4
- labels: ["bug"]
5
- body:
6
- - type: markdown
7
- attributes:
8
- value: |
9
- Thank you for taking the time to create this issue.
10
-
11
- The more detailed information filled below will help us to investigate the root cause of the issue faster and fix it.
12
- This form is for React Native Plugin only. If this is a bug for another platform or framework — please create the issue in the corresponded [repository](https://github.com/orgs/Pushwoosh/repositories). We appreciate your cooperation!
13
- - type: checkboxes
14
- id: rtfm
15
- attributes:
16
- label: Documentation
17
- description: "Have you checked the relevant integration guide: [Integrating React Native Plugin](https://docs.pushwoosh.com/platform-docs/pushwoosh-sdk/cross-platform-frameworks/react-native/integrating-react-native-plugin) which describes implementation process of the Pushwoosh SDK to your app and follow all the necessary steps?"
18
- options:
19
- - label: I've checked the guide, but it doesn't help me to resolve the issue.
20
- required: true
21
- - type: textarea
22
- id: description
23
- attributes:
24
- label: Description
25
- description: Short description of the issue. You can add screenshots and screencast to illustrate it.
26
- placeholder: "Example: When receiving a push with Rich Media in a closed app, Rich Media is not shown."
27
- validations:
28
- required: true
29
- - type: dropdown
30
- id: severity
31
- attributes:
32
- label: Bug severity
33
- description: |
34
- How do you rate the severity of this bug?
35
- For an objective assessment, please take into account how often this bug occurs in everyday app interaction, how serious the consequences of its occurrence (crash, warning, etc.), number of affected users, enviroment where it occurs (stage, production. etc.).
36
- options:
37
- - Low
38
- - Normal
39
- - High
40
- - Urgent
41
- validations:
42
- required: true
43
- - type: textarea
44
- id: repro-steps
45
- attributes:
46
- label: Steps to Reproduce
47
- description: Describe all the steps needed to reproduce the issue. If an issue is only reproducible under particular circumstances, put all required details here. E.g., if a push is not shown only for a specific API request, provide the full request body. Or, if an issue is reproducible with a particular Rich Media, deep link, etc. — specify it.
48
- placeholder: |
49
- 1. Open the app;
50
- 2. Switch it to the background;
51
- 3. Received notification with "root_params" causes the app to crash.
52
- This happens only if dependency XYZ v.1.2.3 is installed
53
- validations:
54
- required: true
55
- - type: dropdown
56
- id: affected-version
57
- attributes:
58
- label: Your Pushwoosh React Native Plugin version
59
- description: Your React Native Plugin version which was integrated to the app. You may find it on the [releases page](https://github.com/Pushwoosh/pushwoosh-react-native-plugin/releases)
60
- options:
61
- - 6.1.40
62
- - 6.1.40
63
- - 6.1.41
64
- - 6.1.39
65
- - 6.1.38
66
- - 6.1.37
67
- - 6.1.36
68
- - 6.1.35
69
- - 6.1.34
70
- - 6.1.32
71
- - 6.1.31
72
- - 6.1.30
73
- - 6.1.29
74
- - 6.1.28
75
- - 6.1.27
76
- - 6.1.26
77
- - 6.1.25
78
- - 6.1.23
79
- - 6.1.22
80
- - 6.1.21
81
- - 6.1.20
82
- - 6.1.19
83
- - 6.1.18
84
- - 6.1.17
85
- - 6.1.16
86
- - 6.1.15
87
- - 6.1.14
88
- - 6.1.13
89
- - 6.1.12
90
- - 6.1.11
91
- - 6.1.10
92
- - 6.1.9
93
- - 6.1.8
94
- - 6.1.7
95
- - 6.1.6
96
- - 6.1.5
97
- - 6.1.4
98
- - 6.1.3
99
- - 6.1.2
100
- - 6.1.1
101
- - 6.0.10
102
- - 6.0.9
103
- - 6.0.8
104
- - 6.0.7
105
- - 6.0.6
106
- - 6.0.5
107
- - 6.0.4
108
- - 6.0.3
109
- - 6.0.2
110
- - 6.0.1
111
- - 6.0.0
112
- - Other — specify it in the description
113
- validations:
114
- required: true
115
- - type: input
116
- id: last-worked
117
- attributes:
118
- label: Last worked Pushwoosh React Native Plugin version (if any)
119
- description: Is there a version that worked well? If so, please specify.
120
- - type: checkboxes
121
- id: platforms-affected
122
- attributes:
123
- label: Affected platforms
124
- description: Select the platforms on which the issue occurs. This helps us determine whether the root cause is core plugin or platform specific.
125
- options:
126
- - label: Android
127
- - label: iOS
128
- validations:
129
- required: true
130
- - type: textarea
131
- id: platform-versions
132
- attributes:
133
- label: Affected OS versions and/or devices
134
- description: Please specify device models and custom distributions (if any) on which this issue occurs. If the issue occurs when building, then specify the target platform.
135
- placeholder: |
136
- E.g. Android 13 on a Google Pixel 3a XL,
137
- iOS 17.0.3 on an iPhone 14
138
- MIUI 14.0.8.0 on Xiaomi 13 Ultra, etc.
139
- validations:
140
- required: true
141
- - type: textarea
142
- id: workaround
143
- attributes:
144
- label: Workaround
145
- description: Have you found a workaround for this issue? Please tell us — this may help other people to continue their work while waiting for this issue to be resolved.
146
- - type: textarea
147
- id: logs
148
- attributes:
149
- label: Relevant log output
150
- description: After reproducing the issue, copy device console logs and paste them here "as is". This code block will be formatted automatically, so no additional formatting is needed. If the issue occurs when building, then provide us building logs here.
151
- render: shell
@@ -1,31 +0,0 @@
1
- name: "💡 Feature request"
2
- description: "Suggest us a good idea or improvement"
3
- title: "[Feature]: "
4
- labels: ["feature"]
5
- body:
6
- - type: markdown
7
- attributes:
8
- value: |
9
- Thank you for taking the time to create this request.
10
-
11
- This form is for React Native Plugin only. If this is a feature for another platform or framework — please create it in the corresponded [repository](https://github.com/orgs/Pushwoosh/repositories). We appreciate your cooperation!
12
-
13
- - type: textarea
14
- id: description
15
- attributes:
16
- label: Description
17
- description: Please tell us what's on your mind. You can add screenshots and screencast to illustrate your request.
18
- validations:
19
- required: true
20
-
21
- - type: textarea
22
- id: suggestions
23
- attributes:
24
- label: Sugeestions
25
- description: |
26
- If you know how you can achieve what you want or you have any information that may help us to achieve this, you can add it here.
27
- For example, links to repositories, discussion threads, documentation, code samples, etc.
28
-
29
- - type: markdown
30
- attributes:
31
- value: Thank you for your feedback!
@@ -1,28 +0,0 @@
1
- name: "❓ Question"
2
- description: "Ask us a question"
3
- title: "[Question]: "
4
- labels: ["question"]
5
- body:
6
- - type: markdown
7
- attributes:
8
- value: |
9
- Thank you for your question!
10
-
11
- This form is for React Native Plugin only. If this is a question for another platform or framework — please create it in the corresponded [repository](https://github.com/orgs/Pushwoosh/repositories). We appreciate your cooperation!
12
-
13
- - type: checkboxes
14
- id: rtfm
15
- attributes:
16
- label: Documentation
17
- description: "Have you checked the relevant integration guide: [Integrating React Native Plugin](https://docs.pushwoosh.com/platform-docs/pushwoosh-sdk/cross-platform-frameworks/react-native/integrating-react-native-plugin) which describes implementation process of the Pushwoosh SDK to your app and follow all the necessary steps?"
18
- options:
19
- - label: I've checked the guide, but I didn't find the information I needed there.
20
- required: true
21
-
22
- - type: textarea
23
- id: question
24
- attributes:
25
- label: Question
26
- description: How can we help you? Do you have any questions about the integration of the SDK or how it works? You can add screenshots and screencast to illustrate your request.
27
- validations:
28
- required: true
package/example/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 Pushwoosh
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
package/example/README.md DELETED
@@ -1,58 +0,0 @@
1
- # REACT NATIVE SAMPLE
2
-
3
- ## To launch and utilize a sample with Pushwoosh SDK integration, clone or download the repository archive.
4
-
5
- ### iOS
6
- <img src="https://github.com/Pushwoosh/pushwoosh-reactnative-sample/blob/main/Screenshots/iOS_1.png" alt="Alt text" width="300"> <img src="https://github.com/Pushwoosh/pushwoosh-reactnative-sample/blob/main/Screenshots/iOS_2.png" alt="Alt text" width="300">
7
-
8
- ### Android
9
- <img src="https://github.com/Pushwoosh/pushwoosh-reactnative-sample/blob/main/Screenshots/Android_1.png" alt="Alt text" width="300"> <img src="https://github.com/Pushwoosh/pushwoosh-reactnative-sample/blob/main/Screenshots/Android_2.png" alt="Alt text" width="300">
10
-
11
- ### 1. Open demoapp -> Settings.js and add your App ID and FCM Sender ID.
12
-
13
- ```
14
- /**
15
- * initialize Pushwoosh SDK.
16
- * Example params: {"pw_appid": "application id", "project_number": "FCM sender id"}
17
- *
18
- * 1. app_id - YOUR_APP_ID
19
- * 2. sender_id - FCM_SENDER_ID
20
- */
21
-
22
- Pushwoosh.init({ "pw_appid" : "XXXXX-XXXXX", "project_number":"XXXXXXXXXXXX"});
23
-
24
- ```
25
-
26
- ### 2. Add 'google-services.json' file in android -> app folder.
27
-
28
- ### 3. Add GoogleServices gradle plugin to your project's build.gradle
29
-
30
- ```
31
- // you should already have buildscript and dependencies blocks in your project's build.gradle so just put the classpath line there
32
-
33
- buildscript {
34
- dependencies {
35
- classpath 'com.google.gms:google-services:4.3.3'
36
- }
37
- }
38
-
39
- ```
40
-
41
- ### 4. Apply GoogleServicesPlugin in your app's build.gradle
42
-
43
- ```
44
- // add these lines to the very end of your build.gradle
45
-
46
- apply {
47
- plugin com.google.gms.googleservices.GoogleServicesPlugin
48
- }
49
-
50
- ```
51
-
52
- ## The guide for SDK integration is available on Pushwoosh [website](https://docs.pushwoosh.com/platform-docs/pushwoosh-sdk/cross-platform-frameworks/react-native/integrating-react-native-plugin).
53
-
54
- Documentation:
55
- https://github.com/Pushwoosh/pushwoosh-ios-sdk/tree/master/Documentation
56
-
57
- Pushwoosh team
58
- http://www.pushwoosh.com
Binary file
Binary file
Binary file
Binary file
@@ -1,2 +0,0 @@
1
- BUNDLE_PATH: "vendor/bundle"
2
- BUNDLE_FORCE_RUBY_PLATFORM: 1
@@ -1,4 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- extends: '@react-native',
4
- };
@@ -1,7 +0,0 @@
1
- module.exports = {
2
- arrowParens: 'avoid',
3
- bracketSameLine: true,
4
- bracketSpacing: false,
5
- singleQuote: true,
6
- trailingComma: 'all',
7
- };
@@ -1 +0,0 @@
1
- {}