react-native-notify-kit 9.1.8

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 (212) hide show
  1. package/LICENSE +44 -0
  2. package/README.md +212 -0
  3. package/RNNotifee.podspec +37 -0
  4. package/RNNotifeeCore.podspec +32 -0
  5. package/android/.editorconfig +10 -0
  6. package/android/build.gradle +117 -0
  7. package/android/gradle.properties +1 -0
  8. package/android/libs/app/notifee/core/202108261754/core-202108261754.aar +0 -0
  9. package/android/libs/app/notifee/core/202108261754/core-202108261754.aar.md5 +1 -0
  10. package/android/libs/app/notifee/core/202108261754/core-202108261754.aar.sha1 +1 -0
  11. package/android/libs/app/notifee/core/202108261754/core-202108261754.aar.sha256 +1 -0
  12. package/android/libs/app/notifee/core/202108261754/core-202108261754.aar.sha512 +1 -0
  13. package/android/libs/app/notifee/core/202108261754/core-202108261754.pom +9 -0
  14. package/android/libs/app/notifee/core/202108261754/core-202108261754.pom.md5 +1 -0
  15. package/android/libs/app/notifee/core/202108261754/core-202108261754.pom.sha1 +1 -0
  16. package/android/libs/app/notifee/core/202108261754/core-202108261754.pom.sha256 +1 -0
  17. package/android/libs/app/notifee/core/202108261754/core-202108261754.pom.sha512 +1 -0
  18. package/android/libs/app/notifee/core/maven-metadata.xml +13 -0
  19. package/android/libs/app/notifee/core/maven-metadata.xml.md5 +1 -0
  20. package/android/libs/app/notifee/core/maven-metadata.xml.sha1 +1 -0
  21. package/android/libs/app/notifee/core/maven-metadata.xml.sha256 +1 -0
  22. package/android/libs/app/notifee/core/maven-metadata.xml.sha512 +1 -0
  23. package/android/lint.xml +5 -0
  24. package/android/proguard-rules.pro +82 -0
  25. package/android/settings.gradle +1 -0
  26. package/android/src/main/AndroidManifest.xml +12 -0
  27. package/android/src/main/kotlin/io/invertase/notifee/HeadlessTask.kt +257 -0
  28. package/android/src/main/kotlin/io/invertase/notifee/NotifeeApiModule.kt +392 -0
  29. package/android/src/main/kotlin/io/invertase/notifee/NotifeeEventSubscriber.kt +117 -0
  30. package/android/src/main/kotlin/io/invertase/notifee/NotifeeInitProvider.kt +43 -0
  31. package/android/src/main/kotlin/io/invertase/notifee/NotifeePackage.kt +37 -0
  32. package/android/src/main/kotlin/io/invertase/notifee/NotifeeReactUtils.kt +118 -0
  33. package/dist/NotifeeApiModule.d.ts +53 -0
  34. package/dist/NotifeeApiModule.js +593 -0
  35. package/dist/NotifeeApiModule.js.map +1 -0
  36. package/dist/NotifeeJSEventEmitter.d.ts +3 -0
  37. package/dist/NotifeeJSEventEmitter.js +9 -0
  38. package/dist/NotifeeJSEventEmitter.js.map +1 -0
  39. package/dist/NotifeeNativeError.d.ts +15 -0
  40. package/dist/NotifeeNativeError.js +56 -0
  41. package/dist/NotifeeNativeError.js.map +1 -0
  42. package/dist/NotifeeNativeModule.d.ts +13 -0
  43. package/dist/NotifeeNativeModule.js +27 -0
  44. package/dist/NotifeeNativeModule.js.map +1 -0
  45. package/dist/NotifeeNativeModule.web.d.ts +12 -0
  46. package/dist/NotifeeNativeModule.web.js +15 -0
  47. package/dist/NotifeeNativeModule.web.js.map +1 -0
  48. package/dist/index.d.ts +8 -0
  49. package/dist/index.js +24 -0
  50. package/dist/index.js.map +1 -0
  51. package/dist/specs/NativeNotifeeModule.d.ts +53 -0
  52. package/dist/specs/NativeNotifeeModule.js +6 -0
  53. package/dist/specs/NativeNotifeeModule.js.map +1 -0
  54. package/dist/types/Library.d.ts +21 -0
  55. package/dist/types/Library.js +5 -0
  56. package/dist/types/Library.js.map +1 -0
  57. package/dist/types/Module.d.ts +576 -0
  58. package/dist/types/Module.js +5 -0
  59. package/dist/types/Module.js.map +1 -0
  60. package/dist/types/Notification.d.ts +462 -0
  61. package/dist/types/Notification.js +108 -0
  62. package/dist/types/Notification.js.map +1 -0
  63. package/dist/types/NotificationAndroid.d.ts +1311 -0
  64. package/dist/types/NotificationAndroid.js +406 -0
  65. package/dist/types/NotificationAndroid.js.map +1 -0
  66. package/dist/types/NotificationIOS.d.ts +539 -0
  67. package/dist/types/NotificationIOS.js +89 -0
  68. package/dist/types/NotificationIOS.js.map +1 -0
  69. package/dist/types/NotificationWeb.d.ts +5 -0
  70. package/dist/types/NotificationWeb.js +5 -0
  71. package/dist/types/NotificationWeb.js.map +1 -0
  72. package/dist/types/PowerManagerInfo.d.ts +36 -0
  73. package/dist/types/PowerManagerInfo.js +5 -0
  74. package/dist/types/PowerManagerInfo.js.map +1 -0
  75. package/dist/types/Trigger.d.ts +124 -0
  76. package/dist/types/Trigger.js +48 -0
  77. package/dist/types/Trigger.js.map +1 -0
  78. package/dist/utils/id.d.ts +1 -0
  79. package/dist/utils/id.js +12 -0
  80. package/dist/utils/id.js.map +1 -0
  81. package/dist/utils/index.d.ts +16 -0
  82. package/dist/utils/index.js +31 -0
  83. package/dist/utils/index.js.map +1 -0
  84. package/dist/utils/validate.d.ts +15 -0
  85. package/dist/utils/validate.js +75 -0
  86. package/dist/utils/validate.js.map +1 -0
  87. package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfo.d.ts +2 -0
  88. package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfo.js +45 -0
  89. package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfo.js.map +1 -0
  90. package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfoPerson.d.ts +2 -0
  91. package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfoPerson.js +24 -0
  92. package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfoPerson.js.map +1 -0
  93. package/dist/validators/validate.d.ts +25 -0
  94. package/dist/validators/validate.js +68 -0
  95. package/dist/validators/validate.js.map +1 -0
  96. package/dist/validators/validateAndroidAction.d.ts +2 -0
  97. package/dist/validators/validateAndroidAction.js +46 -0
  98. package/dist/validators/validateAndroidAction.js.map +1 -0
  99. package/dist/validators/validateAndroidChannel.d.ts +2 -0
  100. package/dist/validators/validateAndroidChannel.js +152 -0
  101. package/dist/validators/validateAndroidChannel.js.map +1 -0
  102. package/dist/validators/validateAndroidChannelGroup.d.ts +2 -0
  103. package/dist/validators/validateAndroidChannelGroup.js +39 -0
  104. package/dist/validators/validateAndroidChannelGroup.js.map +1 -0
  105. package/dist/validators/validateAndroidFullScreenAction.d.ts +2 -0
  106. package/dist/validators/validateAndroidFullScreenAction.js +47 -0
  107. package/dist/validators/validateAndroidFullScreenAction.js.map +1 -0
  108. package/dist/validators/validateAndroidInput.d.ts +2 -0
  109. package/dist/validators/validateAndroidInput.js +51 -0
  110. package/dist/validators/validateAndroidInput.js.map +1 -0
  111. package/dist/validators/validateAndroidNotification.d.ts +2 -0
  112. package/dist/validators/validateAndroidNotification.js +541 -0
  113. package/dist/validators/validateAndroidNotification.js.map +1 -0
  114. package/dist/validators/validateAndroidPressAction.d.ts +2 -0
  115. package/dist/validators/validateAndroidPressAction.js +47 -0
  116. package/dist/validators/validateAndroidPressAction.js.map +1 -0
  117. package/dist/validators/validateAndroidStyle.d.ts +22 -0
  118. package/dist/validators/validateAndroidStyle.js +222 -0
  119. package/dist/validators/validateAndroidStyle.js.map +1 -0
  120. package/dist/validators/validateIOSAttachment.d.ts +6 -0
  121. package/dist/validators/validateIOSAttachment.js +96 -0
  122. package/dist/validators/validateIOSAttachment.js.map +1 -0
  123. package/dist/validators/validateIOSCategory.d.ts +2 -0
  124. package/dist/validators/validateIOSCategory.js +118 -0
  125. package/dist/validators/validateIOSCategory.js.map +1 -0
  126. package/dist/validators/validateIOSCategoryAction.d.ts +2 -0
  127. package/dist/validators/validateIOSCategoryAction.js +53 -0
  128. package/dist/validators/validateIOSCategoryAction.js.map +1 -0
  129. package/dist/validators/validateIOSInput.d.ts +2 -0
  130. package/dist/validators/validateIOSInput.js +29 -0
  131. package/dist/validators/validateIOSInput.js.map +1 -0
  132. package/dist/validators/validateIOSNotification.d.ts +2 -0
  133. package/dist/validators/validateIOSNotification.js +205 -0
  134. package/dist/validators/validateIOSNotification.js.map +1 -0
  135. package/dist/validators/validateIOSPermissions.d.ts +2 -0
  136. package/dist/validators/validateIOSPermissions.js +59 -0
  137. package/dist/validators/validateIOSPermissions.js.map +1 -0
  138. package/dist/validators/validateNotification.d.ts +11 -0
  139. package/dist/validators/validateNotification.js +121 -0
  140. package/dist/validators/validateNotification.js.map +1 -0
  141. package/dist/validators/validateTrigger.d.ts +2 -0
  142. package/dist/validators/validateTrigger.js +107 -0
  143. package/dist/validators/validateTrigger.js.map +1 -0
  144. package/dist/version.d.ts +1 -0
  145. package/dist/version.js +3 -0
  146. package/dist/version.js.map +1 -0
  147. package/ios/NotifeeCore/Info.plist +22 -0
  148. package/ios/NotifeeCore/NotifeeCore+NSNotificationCenter.h +28 -0
  149. package/ios/NotifeeCore/NotifeeCore+NSNotificationCenter.m +76 -0
  150. package/ios/NotifeeCore/NotifeeCore+NSURLSession.h +25 -0
  151. package/ios/NotifeeCore/NotifeeCore+NSURLSession.m +55 -0
  152. package/ios/NotifeeCore/NotifeeCore+UNUserNotificationCenter.h +44 -0
  153. package/ios/NotifeeCore/NotifeeCore+UNUserNotificationCenter.m +270 -0
  154. package/ios/NotifeeCore/NotifeeCore.h +118 -0
  155. package/ios/NotifeeCore/NotifeeCore.m +843 -0
  156. package/ios/NotifeeCore/NotifeeCoreDelegateHolder.h +34 -0
  157. package/ios/NotifeeCore/NotifeeCoreDelegateHolder.m +70 -0
  158. package/ios/NotifeeCore/NotifeeCoreDownloadDelegate.h +39 -0
  159. package/ios/NotifeeCore/NotifeeCoreDownloadDelegate.m +68 -0
  160. package/ios/NotifeeCore/NotifeeCoreExtensionHelper.h +38 -0
  161. package/ios/NotifeeCore/NotifeeCoreExtensionHelper.m +224 -0
  162. package/ios/NotifeeCore/NotifeeCoreUtil.h +81 -0
  163. package/ios/NotifeeCore/NotifeeCoreUtil.m +834 -0
  164. package/ios/RNNotifee/NotifeeApiModule.h +25 -0
  165. package/ios/RNNotifee/NotifeeApiModule.mm +421 -0
  166. package/ios/RNNotifee/NotifeeExtensionHelper.h +37 -0
  167. package/ios/RNNotifee/NotifeeExtensionHelper.m +37 -0
  168. package/ios/RNNotifee.xcodeproj/project.pbxproj +318 -0
  169. package/ios/RNNotifee.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  170. package/ios/RNNotifee.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  171. package/jest-mock.js +162 -0
  172. package/package.json +85 -0
  173. package/react-native.config.js +11 -0
  174. package/src/NotifeeApiModule.ts +823 -0
  175. package/src/NotifeeJSEventEmitter.ts +10 -0
  176. package/src/NotifeeNativeError.ts +68 -0
  177. package/src/NotifeeNativeModule.ts +39 -0
  178. package/src/NotifeeNativeModule.web.ts +25 -0
  179. package/src/index.ts +33 -0
  180. package/src/specs/NativeNotifeeModule.ts +71 -0
  181. package/src/types/Library.ts +28 -0
  182. package/src/types/Module.ts +629 -0
  183. package/src/types/Notification.ts +518 -0
  184. package/src/types/NotificationAndroid.ts +1478 -0
  185. package/src/types/NotificationIOS.ts +683 -0
  186. package/src/types/NotificationWeb.ts +5 -0
  187. package/src/types/PowerManagerInfo.ts +43 -0
  188. package/src/types/Trigger.ts +136 -0
  189. package/src/utils/id.ts +13 -0
  190. package/src/utils/index.ts +46 -0
  191. package/src/utils/validate.ts +90 -0
  192. package/src/validators/iosCommunicationInfo/validateIOSCommunicationInfo.ts +61 -0
  193. package/src/validators/iosCommunicationInfo/validateIOSCommunicationInfoPerson.ts +33 -0
  194. package/src/validators/validate.ts +85 -0
  195. package/src/validators/validateAndroidAction.ts +54 -0
  196. package/src/validators/validateAndroidChannel.ts +188 -0
  197. package/src/validators/validateAndroidChannelGroup.ts +49 -0
  198. package/src/validators/validateAndroidFullScreenAction.ts +65 -0
  199. package/src/validators/validateAndroidInput.ts +67 -0
  200. package/src/validators/validateAndroidNotification.ts +734 -0
  201. package/src/validators/validateAndroidPressAction.ts +65 -0
  202. package/src/validators/validateAndroidStyle.ts +315 -0
  203. package/src/validators/validateIOSAttachment.ts +135 -0
  204. package/src/validators/validateIOSCategory.ts +150 -0
  205. package/src/validators/validateIOSCategoryAction.ts +65 -0
  206. package/src/validators/validateIOSInput.ts +38 -0
  207. package/src/validators/validateIOSNotification.ts +296 -0
  208. package/src/validators/validateIOSPermissions.ts +78 -0
  209. package/src/validators/validateNotification.ts +156 -0
  210. package/src/validators/validateTrigger.ts +142 -0
  211. package/src/version.ts +2 -0
  212. package/tsconfig.json +27 -0
package/LICENSE ADDED
@@ -0,0 +1,44 @@
1
+ Apache-2.0 License
2
+ ------------------
3
+
4
+ Copyright (c) 2016-present Invertase Limited <oss@invertase.io>
5
+
6
+ Licensed under the Apache License, Version 2.0 (the "License");
7
+ you may not use this library except in compliance with the License.
8
+
9
+ You may obtain a copy of the Apache-2.0 License at
10
+
11
+ http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+ Unless required by applicable law or agreed to in writing, software
14
+ distributed under the License is distributed on an "AS IS" BASIS,
15
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ See the License for the specific language governing permissions and
17
+ limitations under the License.
18
+
19
+
20
+
21
+ Creative Commons Attribution 3.0 License
22
+ ----------------------------------------
23
+
24
+ Copyright (c) 2016-present Invertase Limited <oss@invertase.io>
25
+
26
+ Documentation and other instructional materials provided for this project
27
+ (including on a separate documentation repository or it's documentation website) are
28
+ licensed under the Creative Commons Attribution 3.0 License. Code samples/blocks
29
+ contained therein are licensed under the Apache License, Version 2.0 (the "License"), as above.
30
+
31
+ You may obtain a copy of the Creative Commons Attribution 3.0 License at
32
+
33
+ https://creativecommons.org/licenses/by/3.0/
34
+
35
+
36
+
37
+ Notifee Core
38
+ ------------
39
+
40
+ The Notifee "core" submodule on Android/iOS was originally distributed by
41
+ Invertase Limited in minified & obfuscated form under a proprietary license.
42
+
43
+ In this fork (react-native-notify-kit), the core source code is distributed
44
+ under the Apache License, Version 2.0, as part of the open-source project.
package/README.md ADDED
@@ -0,0 +1,212 @@
1
+ # react-native-notify-kit
2
+
3
+ A feature-rich local and push notification library for React Native (Android & iOS).
4
+
5
+ Maintained fork of [Notifee](https://github.com/invertase/notifee) — New Architecture only (TurboModules).
6
+
7
+ ## Requirements
8
+
9
+ - React Native >= 0.73 (New Architecture required)
10
+ - Android: minSdk 24, compileSdk 35
11
+ - iOS: deployment target 15.1+
12
+ - Node.js >= 22
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ yarn add react-native-notify-kit
18
+ # or
19
+ npm install react-native-notify-kit
20
+ ```
21
+
22
+ ### iOS
23
+
24
+ ```bash
25
+ cd ios && pod install
26
+ ```
27
+
28
+ ### Android
29
+
30
+ No additional steps — the library is auto-linked via React Native CLI.
31
+
32
+ ## Quick Start
33
+
34
+ ### 1. Request permission (required on Android 13+ and iOS)
35
+
36
+ ```ts
37
+ import notifee from 'react-native-notify-kit';
38
+
39
+ const settings = await notifee.requestPermission();
40
+ ```
41
+
42
+ ### 2. Create a channel (Android only, required for Android 8+)
43
+
44
+ ```ts
45
+ import notifee, { AndroidImportance } from 'react-native-notify-kit';
46
+
47
+ await notifee.createChannel({
48
+ id: 'default',
49
+ name: 'Default Channel',
50
+ importance: AndroidImportance.HIGH,
51
+ });
52
+ ```
53
+
54
+ ### 3. Display a notification
55
+
56
+ ```ts
57
+ await notifee.displayNotification({
58
+ title: 'Hello',
59
+ body: 'This is a local notification',
60
+ android: { channelId: 'default' },
61
+ });
62
+ ```
63
+
64
+ ### 4. Handle events
65
+
66
+ In your `index.js` (before `AppRegistry.registerComponent`):
67
+
68
+ ```ts
69
+ import notifee from 'react-native-notify-kit';
70
+
71
+ // Background/killed state events
72
+ notifee.onBackgroundEvent(async ({ type, detail }) => {
73
+ console.log('Background event:', type, detail.notification?.id);
74
+ });
75
+ ```
76
+
77
+ In your React component:
78
+
79
+ ```ts
80
+ import { useEffect } from 'react';
81
+ import notifee, { EventType } from 'react-native-notify-kit';
82
+
83
+ useEffect(() => {
84
+ return notifee.onForegroundEvent(({ type, detail }) => {
85
+ if (type === EventType.PRESS) {
86
+ console.log('Notification pressed:', detail.notification?.id);
87
+ }
88
+ });
89
+ }, []);
90
+ ```
91
+
92
+ ## Push Notifications (Firebase)
93
+
94
+ This library handles notification **display and management**. For receiving push notifications, pair it with [`@react-native-firebase/messaging`](https://rnfirebase.io/messaging/usage):
95
+
96
+ ### Android setup
97
+
98
+ 1. Add Firebase dependencies to your app:
99
+
100
+ ```bash
101
+ yarn add @react-native-firebase/app @react-native-firebase/messaging
102
+ ```
103
+
104
+ 2. Add the google-services plugin to `android/build.gradle`:
105
+
106
+ ```gradle
107
+ classpath("com.google.gms:google-services:4.4.2")
108
+ ```
109
+
110
+ 3. Apply the plugin in `android/app/build.gradle`:
111
+
112
+ ```gradle
113
+ apply plugin: "com.google.gms.google-services"
114
+ ```
115
+
116
+ 4. Download `google-services.json` from [Firebase Console](https://console.firebase.google.com/) and place it in `android/app/`.
117
+
118
+ 5. Add `POST_NOTIFICATIONS` permission to `AndroidManifest.xml` (required for Android 13+):
119
+
120
+ ```xml
121
+ <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
122
+ ```
123
+
124
+ ### iOS setup
125
+
126
+ 1. Download `GoogleService-Info.plist` from Firebase Console and add it to your Xcode project.
127
+
128
+ 2. Enable **Push Notifications** capability in Xcode:
129
+ - Select your target > **Signing & Capabilities** > **+ Capability** > **Push Notifications**
130
+
131
+ 3. Enable **Background Modes** > **Remote notifications**:
132
+ - Select your target > **Signing & Capabilities** > **+ Capability** > **Background Modes** > check **Remote notifications**
133
+
134
+ 4. Configure APNs certificates or keys in Firebase Console > Project Settings > Cloud Messaging.
135
+
136
+ ### Display a push notification
137
+
138
+ ```ts
139
+ import messaging from '@react-native-firebase/messaging';
140
+ import notifee from 'react-native-notify-kit';
141
+
142
+ messaging().onMessage(async remoteMessage => {
143
+ await notifee.displayNotification({
144
+ title: remoteMessage.notification?.title,
145
+ body: remoteMessage.notification?.body,
146
+ android: { channelId: 'default' },
147
+ });
148
+ });
149
+ ```
150
+
151
+ ## iOS Notification Service Extension
152
+
153
+ To modify push notification content before display (e.g., attach images), create a Notification Service Extension:
154
+
155
+ 1. In Xcode: **File > New > Target > Notification Service Extension**
156
+ 2. Add to your Podfile:
157
+
158
+ ```ruby
159
+ target 'YourNSETarget' do
160
+ pod 'RNNotifeeCore', :path => '../node_modules/react-native-notify-kit'
161
+ end
162
+ ```
163
+
164
+ 3. Use `NotifeeExtensionHelper` in your `NotificationService.m`:
165
+
166
+ ```objc
167
+ #import "NotifeeExtensionHelper.h"
168
+
169
+ - (void)didReceiveNotificationRequest:(UNNotificationRequest *)request
170
+ withContentHandler:(void (^)(UNNotificationContent *))contentHandler {
171
+ self.contentHandler = contentHandler;
172
+ self.bestAttemptContent = [request.content mutableCopy];
173
+ [NotifeeExtensionHelper populateNotificationContent:request
174
+ withContent:self.bestAttemptContent
175
+ withContentHandler:contentHandler];
176
+ }
177
+ ```
178
+
179
+ 4. Run `cd ios && pod install`
180
+
181
+ ## Jest Testing
182
+
183
+ Mock the native module in your Jest setup file:
184
+
185
+ ```js
186
+ // jest.setup.js
187
+ jest.mock('react-native-notify-kit', () => require('react-native-notify-kit/jest-mock'));
188
+ ```
189
+
190
+ Add to your Jest config:
191
+
192
+ ```js
193
+ setupFiles: ['<rootDir>/jest.setup.js'],
194
+ transformIgnorePatterns: [
195
+ 'node_modules/(?!(jest-)?react-native|@react-native|react-native-notify-kit)'
196
+ ],
197
+ ```
198
+
199
+ ## Documentation
200
+
201
+ The upstream Notifee documentation remains a valid reference for the API:
202
+
203
+ - [Overview](https://docs.page/marcocrupi/react-native-notify-kit/react-native/overview)
204
+ - [API Reference](https://docs.page/marcocrupi/react-native-notify-kit/react-native/reference)
205
+ - [Android Guides](https://docs.page/marcocrupi/react-native-notify-kit/react-native/android/channels)
206
+ - [iOS Guides](https://docs.page/marcocrupi/react-native-notify-kit/react-native/ios/permissions)
207
+
208
+ ## License
209
+
210
+ Apache-2.0 — see [LICENSE](/LICENSE).
211
+
212
+ Originally built by [Invertase](https://invertase.io). This fork is independently maintained by Marco Crupi.
@@ -0,0 +1,37 @@
1
+
2
+ require 'json'
3
+ package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
4
+
5
+ Pod::Spec.new do |s|
6
+ s.name = "RNNotifee"
7
+ s.version = package["version"]
8
+ s.description = package["description"]
9
+ s.summary = <<-DESC
10
+ A feature rich local notifications library for React Native Android & iOS.
11
+ DESC
12
+ s.homepage = "https://github.com/marcocrupi/react-native-notify-kit"
13
+ s.license = package['license']
14
+ s.authors = "Marco Crupi"
15
+ s.source = { :git => "https://github.com/marcocrupi/react-native-notify-kit", :tag => "react-native-notify-kit@#{s.version}" }
16
+
17
+ s.cocoapods_version = '>= 1.10.0'
18
+ s.platforms = { :ios => '15.1' }
19
+
20
+ install_modules_dependencies(s)
21
+ s.source_files = 'ios/RNNotifee/*.{h,m,mm,cpp}'
22
+
23
+ if defined?($NotifeeCoreFromSources) && $NotifeeCoreFromSources == true
24
+ # internal dev flag used by Notifee devs, ignore
25
+ Pod::UI.warn "RNNotifee: Using NotifeeCore from sources."
26
+ s.dependency 'NotifeeCore'
27
+ elsif defined?($NotifeeExtension) && $NotifeeExtension == true
28
+ # App uses Notification Service Extension
29
+ Pod::UI.warn "RNNotifee: using Notification Service Extension."
30
+ s.dependency 'RNNotifeeCore'
31
+ else
32
+ s.subspec "NotifeeCore" do |ss|
33
+ ss.source_files = "ios/NotifeeCore/*.{h,mm,m}"
34
+ end
35
+ end
36
+
37
+ end
@@ -0,0 +1,32 @@
1
+
2
+ require 'json'
3
+ package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
4
+
5
+ Pod::Spec.new do |s|
6
+ s.name = "RNNotifeeCore"
7
+ s.version = package["version"]
8
+ s.description = package["description"]
9
+ s.summary = <<-DESC
10
+ A feature rich local notifications library for React Native Android & iOS.
11
+ DESC
12
+ s.homepage = "https://github.com/marcocrupi/react-native-notify-kit"
13
+ s.license = package['license']
14
+ s.authors = "Marco Crupi"
15
+ s.source = { :git => "https://github.com/marcocrupi/react-native-notify-kit", :tag => "react-native-notify-kit@#{s.version}" }
16
+
17
+ s.cocoapods_version = '>= 1.10.0'
18
+ s.ios.deployment_target = '15.1'
19
+
20
+ if defined?($NotifeeCoreFromSources) && $NotifeeCoreFromSources == true
21
+ # internal dev flag used by Notifee devs, ignore
22
+ Pod::UI.warn "RNNotifeeCore: Using NotifeeCore from sources."
23
+ s.dependency 'NotifeeCore'
24
+ else
25
+ s.subspec "NotifeeCore" do |ss|
26
+ ss.source_files = "ios/NotifeeCore/*.{h,mm,m}"
27
+ end
28
+ end
29
+
30
+ s.source_files = ['ios/RNNotifee/NotifeeExtensionHelper.h', 'ios/RNNotifee/NotifeeExtensionHelper.m']
31
+ s.public_header_files = ['ios/RNNotifee/NotifeeExtensionHelper.h']
32
+ end
@@ -0,0 +1,10 @@
1
+ # editorconfig
2
+ root = true
3
+
4
+ [*]
5
+ indent_style = space
6
+ indent_size = 2
7
+ end_of_line = lf
8
+ charset = utf-8
9
+ trim_trailing_whitespace = true
10
+ insert_final_newline = true
@@ -0,0 +1,117 @@
1
+ import java.nio.file.Paths
2
+
3
+ buildscript {
4
+ // The Android Gradle plugin is only required when opening the android folder stand-alone.
5
+ // This avoids unnecessary downloads and potential conflicts when the library is included as a
6
+ // module dependency in an application project.
7
+ if (project == rootProject) {
8
+ repositories {
9
+ google()
10
+ mavenCentral()
11
+ }
12
+
13
+ dependencies {
14
+ classpath("com.android.tools.build:gradle:8.2.2")
15
+ classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.24")
16
+ }
17
+ }
18
+ }
19
+
20
+ plugins {
21
+ id "com.android.library"
22
+ id "com.facebook.react"
23
+ id "org.jetbrains.kotlin.android"
24
+ }
25
+
26
+ // https://github.com/facebook/react-native/blob/a70354df12ef71aec08583cca4f1fed5fb77d874/ReactAndroid/build.gradle#L168-L201
27
+ def findNodeModulePath(baseDir, packageName) {
28
+ def basePath = baseDir.toPath().normalize()
29
+ // Node's module resolution algorithm searches up to the root directory,
30
+ // after which the base path will be null
31
+ while (basePath) {
32
+ def candidatePath = Paths.get(basePath.toString(), "node_modules", packageName)
33
+ if (candidatePath.toFile().exists()) {
34
+ return candidatePath.toString()
35
+ }
36
+ basePath = basePath.getParent()
37
+ }
38
+ return null
39
+ }
40
+
41
+ def notifeeDir = findNodeModulePath(projectDir, "react-native-notify-kit") ?: "$rootDir/../node_modules/react-native-notify-kit"
42
+ println ":${project.name} react-native-notify-kit found at $notifeeDir"
43
+
44
+ if (project.hasProperty('reactNativeProjects')) {
45
+ reactNativeProjects.each { dependent ->
46
+ project.evaluationDependsOn(dependent)
47
+ }
48
+ } else {
49
+ project.evaluationDependsOn(':app')
50
+ }
51
+
52
+ android {
53
+ namespace = "io.invertase.notifee"
54
+ compileSdk = 35
55
+
56
+ defaultConfig {
57
+ minSdk = 24
58
+ targetSdk = 35
59
+ multiDexEnabled true
60
+ }
61
+
62
+ lint {
63
+ disable 'GradleCompatible'
64
+ abortOnError false
65
+ }
66
+
67
+ compileOptions {
68
+ sourceCompatibility JavaVersion.VERSION_17
69
+ targetCompatibility JavaVersion.VERSION_17
70
+ }
71
+
72
+ kotlinOptions {
73
+ jvmTarget = "17"
74
+ }
75
+
76
+ sourceSets {
77
+ main {
78
+ kotlin.srcDirs += 'src/main/kotlin'
79
+ }
80
+ }
81
+
82
+ buildTypes {
83
+ release {
84
+ consumerProguardFiles 'proguard-rules.pro'
85
+ }
86
+ }
87
+ }
88
+
89
+ repositories {
90
+ google()
91
+ mavenCentral()
92
+ }
93
+
94
+ dependencies {
95
+ if (findProject(':notifee_core')) {
96
+ implementation findProject(':notifee_core')
97
+ } else {
98
+ implementation(group: 'app.notifee', name:'core', version: '+')
99
+ }
100
+
101
+ implementation("com.google.guava:guava:33.3.1-android") // https://github.com/google/guava
102
+ implementation 'androidx.concurrent:concurrent-futures:1.1.0' // https://developer.android.com/jetpack/androidx/releases/concurrent
103
+ implementation 'androidx.work:work-runtime:2.8.0' // https://developer.android.com/jetpack/androidx/releases/work
104
+ implementation 'org.greenrobot:eventbus:3.3.1' // https://github.com/greenrobot/EventBus/releases
105
+ implementation 'androidx.lifecycle:lifecycle-process:2.3.1'
106
+
107
+ //noinspection GradleDynamicVersion
108
+ implementation 'com.facebook.react:react-android:+'
109
+ }
110
+
111
+ rootProject.allprojects {
112
+ repositories {
113
+ maven {
114
+ url "$notifeeDir/android/libs"
115
+ }
116
+ }
117
+ }
@@ -0,0 +1 @@
1
+ NOTIFEE=1
@@ -0,0 +1 @@
1
+ f352cf9592f99de18ac58c980a8044d1
@@ -0,0 +1 @@
1
+ fab0922062b4bb8449ee33b3a21ff4abd728ff5a
@@ -0,0 +1 @@
1
+ 8e0fa882e60961a03635ef54c8ed8f5d69031fbcdf659d2ee93434a5ad12994a
@@ -0,0 +1 @@
1
+ 4f5fb568dc9c197c6162d1acaa69dbfea44d785785f8aede60fe2c559451558740de092a1adce5cac54cd2f91394c3075667aa3023b8392926afb3a92debb528
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
3
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4
+ <modelVersion>4.0.0</modelVersion>
5
+ <groupId>app.notifee</groupId>
6
+ <artifactId>core</artifactId>
7
+ <version>202108261754</version>
8
+ <packaging>aar</packaging>
9
+ </project>
@@ -0,0 +1 @@
1
+ 4f6e0cf891e903f91ee3093356815b7a
@@ -0,0 +1 @@
1
+ 692dedb13cd922156e38dc5f6bcfba86e4141932
@@ -0,0 +1 @@
1
+ 4f7ea80d7045abd14e8a836ec3a8299a245994b8bbcff7e30d2e3ae7f523c9ec
@@ -0,0 +1 @@
1
+ 79244ae770a7c732e5eb33d72ca3e707398ae33d0db8e104d63690fecdb156d9cc040571f09baab30ffb19db3ac00b0283b74f581c1245069b4bf477c590732b
@@ -0,0 +1,13 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <metadata>
3
+ <groupId>app.notifee</groupId>
4
+ <artifactId>core</artifactId>
5
+ <versioning>
6
+ <latest>202108261754</latest>
7
+ <release>202108261754</release>
8
+ <versions>
9
+ <version>202108261754</version>
10
+ </versions>
11
+ <lastUpdated>20260404125644</lastUpdated>
12
+ </versioning>
13
+ </metadata>
@@ -0,0 +1 @@
1
+ 5e530bbfa8e06f617c34dd000d0824e5
@@ -0,0 +1 @@
1
+ 7326f2554939bcf65817328815b9504e22026ad1
@@ -0,0 +1 @@
1
+ cfb3bc703b70421c56b6a4b004d7b8bcada5647eaa2bcfd5dde5e31a46f66e99
@@ -0,0 +1 @@
1
+ c139bb9a938cdc3ca121e2fc7d42a7594cc748837d9dfec51023a0e42e831c69ad01084f3a9224489d5650811164df0dc70a7404398ff1ea2146781441d99d94
@@ -0,0 +1,5 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <lint>
3
+ <!-- Disable the given check in this project -->
4
+ <issue id="GradleCompatible" severity="ignore" />
5
+ </lint>
@@ -0,0 +1,82 @@
1
+ -keep class io.invertase.notifee.NotifeeEventSubscriber
2
+ -keep class io.invertase.notifee.NotifeeInitProvider
3
+ -keepnames class io.invertase.notifee.NotifeePackage
4
+ -keepnames class io.invertase.notifee.NotifeeApiModule
5
+
6
+ # We depend on certain classes to exist under their names for dynamic
7
+ # class-loading to work. We use this to handle new arch / old arch backwards
8
+ # compatibility despite the class names moving around
9
+ -keep class com.facebook.react.defaults.DefaultNewArchitectureEntryPoint { *; }
10
+ -keep class com.facebook.react.ReactApplication { *; }
11
+ -keep class com.facebook.react.ReactHost { *; }
12
+ -keep class * extends com.facebook.react.ReactHost { *; }
13
+ -keepnames class com.facebook.react.ReactActivity
14
+
15
+ # Preserve all annotations.
16
+ -keepattributes *Annotation*
17
+
18
+ # Keep the classes/members we need for client functionality.
19
+ -keep @interface androidx.annotation.Keep
20
+ -keep @androidx.annotation.Keep class *
21
+ -keepclasseswithmembers class * {
22
+ @androidx.annotation.Keep <fields>;
23
+ }
24
+ -keepclasseswithmembers class * {
25
+ @androidx.annotation.Keep <methods>;
26
+ }
27
+
28
+ # Keep the classes/members we need for client functionality.
29
+ -keep @interface app.notifee.core.KeepForSdk
30
+ -keep @app.notifee.core.KeepForSdk class *
31
+ -keepclasseswithmembers class * {
32
+ @app.notifee.core.KeepForSdk <fields>;
33
+ }
34
+ -keepclasseswithmembers class * {
35
+ @app.notifee.core.KeepForSdk <methods>;
36
+ }
37
+
38
+ # Preserve all .class method names.
39
+ -keepclassmembernames class * {
40
+ java.lang.Class class$(java.lang.String);
41
+ java.lang.Class class$(java.lang.String, boolean);
42
+ }
43
+
44
+ # Preserve all native method names and the names of their classes.
45
+ -keepclasseswithmembernames class * {
46
+ native <methods>;
47
+ }
48
+
49
+ # Preserve the special static methods that are required in all enumeration
50
+ # classes.
51
+ -keepclassmembers class * extends java.lang.Enum {
52
+ public static **[] values();
53
+ public static ** valueOf(java.lang.String);
54
+ }
55
+
56
+ # --------------------------------
57
+ # LIBRARIES
58
+ # --------------------------------
59
+
60
+ # Work Manager
61
+ -keepclassmembers class * extends androidx.work.ListenableWorker {
62
+ public <init>(android.content.Context,androidx.work.WorkerParameters);
63
+ }
64
+
65
+ # EventBus
66
+ -keepclassmembers class * {
67
+ @org.greenrobot.eventbus.Subscribe <methods>;
68
+ }
69
+ -keep enum org.greenrobot.eventbus.ThreadMode { *; }
70
+
71
+ # Only required if you use AsyncExecutor
72
+ -keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
73
+ <init>(java.lang.Throwable);
74
+ }
75
+
76
+ # OkHttp3
77
+ -dontwarn okio.**
78
+ -dontwarn okhttp3.**
79
+ -dontwarn javax.annotation.**
80
+ -dontwarn org.conscrypt.**
81
+ # A resource is loaded with a relative path so the package of this class must be preserved.
82
+ -keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
@@ -0,0 +1 @@
1
+ rootProject.name = 'react-native-notify-kit'
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+ package="io.invertase.notifee">
4
+
5
+ <application>
6
+ <provider
7
+ android:name=".NotifeeInitProvider"
8
+ android:authorities="${applicationId}.notifee-init-provider"
9
+ android:exported="false"
10
+ android:initOrder="-100" />
11
+ </application>
12
+ </manifest>