@ammarahmed/notifee-react-native 7.3.0

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 (215) hide show
  1. package/.gitattributes +3 -0
  2. package/LICENSE +44 -0
  3. package/README.md +131 -0
  4. package/RNNotifee.podspec +39 -0
  5. package/RNNotifeeCore.podspec +33 -0
  6. package/android/build.gradle +116 -0
  7. package/android/gradle.properties +1 -0
  8. package/android/libs/app/notifee/core/202108261756/core-202108261756.aar +0 -0
  9. package/android/libs/app/notifee/core/202108261756/core-202108261756.aar.md5 +1 -0
  10. package/android/libs/app/notifee/core/202108261756/core-202108261756.aar.sha1 +1 -0
  11. package/android/libs/app/notifee/core/202108261756/core-202108261756.aar.sha256 +1 -0
  12. package/android/libs/app/notifee/core/202108261756/core-202108261756.aar.sha512 +1 -0
  13. package/android/libs/app/notifee/core/202108261756/core-202108261756.pom +9 -0
  14. package/android/libs/app/notifee/core/202108261756/core-202108261756.pom.md5 +1 -0
  15. package/android/libs/app/notifee/core/202108261756/core-202108261756.pom.sha1 +1 -0
  16. package/android/libs/app/notifee/core/202108261756/core-202108261756.pom.sha256 +1 -0
  17. package/android/libs/app/notifee/core/202108261756/core-202108261756.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 +74 -0
  25. package/android/settings.gradle +1 -0
  26. package/android/src/main/AndroidManifest.xml +12 -0
  27. package/android/src/main/java/io/invertase/notifee/NotifeeApiModule.java +349 -0
  28. package/android/src/main/java/io/invertase/notifee/NotifeeEventSubscriber.java +118 -0
  29. package/android/src/main/java/io/invertase/notifee/NotifeeInitProvider.java +55 -0
  30. package/android/src/main/java/io/invertase/notifee/NotifeePackage.java +30 -0
  31. package/android/src/main/java/io/invertase/notifee/NotifeeReactUtils.java +244 -0
  32. package/app.plugin.js +1 -0
  33. package/dist/NotifeeApiModule.d.ts +53 -0
  34. package/dist/NotifeeApiModule.js +607 -0
  35. package/dist/NotifeeApiModule.js.map +1 -0
  36. package/dist/NotifeeJSEventEmitter.d.ts +3 -0
  37. package/dist/NotifeeJSEventEmitter.js +14 -0
  38. package/dist/NotifeeJSEventEmitter.js.map +1 -0
  39. package/dist/NotifeeNativeError.d.ts +15 -0
  40. package/dist/NotifeeNativeError.js +61 -0
  41. package/dist/NotifeeNativeError.js.map +1 -0
  42. package/dist/NotifeeNativeModule.d.ts +14 -0
  43. package/dist/NotifeeNativeModule.js +43 -0
  44. package/dist/NotifeeNativeModule.js.map +1 -0
  45. package/dist/NotifeeNativeModule.web.d.ts +12 -0
  46. package/dist/NotifeeNativeModule.web.js +19 -0
  47. package/dist/NotifeeNativeModule.web.js.map +1 -0
  48. package/dist/index.d.ts +8 -0
  49. package/dist/index.js +43 -0
  50. package/dist/index.js.map +1 -0
  51. package/dist/types/Library.d.ts +21 -0
  52. package/dist/types/Library.js +6 -0
  53. package/dist/types/Library.js.map +1 -0
  54. package/dist/types/Module.d.ts +572 -0
  55. package/dist/types/Module.js +6 -0
  56. package/dist/types/Module.js.map +1 -0
  57. package/dist/types/Notification.d.ts +450 -0
  58. package/dist/types/Notification.js +105 -0
  59. package/dist/types/Notification.js.map +1 -0
  60. package/dist/types/NotificationAndroid.d.ts +1276 -0
  61. package/dist/types/NotificationAndroid.js +380 -0
  62. package/dist/types/NotificationAndroid.js.map +1 -0
  63. package/dist/types/NotificationIOS.d.ts +537 -0
  64. package/dist/types/NotificationIOS.js +92 -0
  65. package/dist/types/NotificationIOS.js.map +1 -0
  66. package/dist/types/NotificationWeb.d.ts +5 -0
  67. package/dist/types/NotificationWeb.js +3 -0
  68. package/dist/types/NotificationWeb.js.map +1 -0
  69. package/dist/types/PowerManagerInfo.d.ts +36 -0
  70. package/dist/types/PowerManagerInfo.js +6 -0
  71. package/dist/types/PowerManagerInfo.js.map +1 -0
  72. package/dist/types/Trigger.d.ts +108 -0
  73. package/dist/types/Trigger.js +39 -0
  74. package/dist/types/Trigger.js.map +1 -0
  75. package/dist/utils/id.d.ts +1 -0
  76. package/dist/utils/id.js +16 -0
  77. package/dist/utils/id.js.map +1 -0
  78. package/dist/utils/index.d.ts +16 -0
  79. package/dist/utils/index.js +52 -0
  80. package/dist/utils/index.js.map +1 -0
  81. package/dist/utils/validate.d.ts +15 -0
  82. package/dist/utils/validate.js +93 -0
  83. package/dist/utils/validate.js.map +1 -0
  84. package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfo.d.ts +2 -0
  85. package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfo.js +39 -0
  86. package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfo.js.map +1 -0
  87. package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfoPerson.d.ts +2 -0
  88. package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfoPerson.js +27 -0
  89. package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfoPerson.js.map +1 -0
  90. package/dist/validators/validate.d.ts +25 -0
  91. package/dist/validators/validate.js +75 -0
  92. package/dist/validators/validate.js.map +1 -0
  93. package/dist/validators/validateAndroidAction.d.ts +2 -0
  94. package/dist/validators/validateAndroidAction.js +52 -0
  95. package/dist/validators/validateAndroidAction.js.map +1 -0
  96. package/dist/validators/validateAndroidChannel.d.ts +2 -0
  97. package/dist/validators/validateAndroidChannel.js +155 -0
  98. package/dist/validators/validateAndroidChannel.js.map +1 -0
  99. package/dist/validators/validateAndroidChannelGroup.d.ts +2 -0
  100. package/dist/validators/validateAndroidChannelGroup.js +42 -0
  101. package/dist/validators/validateAndroidChannelGroup.js.map +1 -0
  102. package/dist/validators/validateAndroidFullScreenAction.d.ts +2 -0
  103. package/dist/validators/validateAndroidFullScreenAction.js +50 -0
  104. package/dist/validators/validateAndroidFullScreenAction.js.map +1 -0
  105. package/dist/validators/validateAndroidInput.d.ts +2 -0
  106. package/dist/validators/validateAndroidInput.js +54 -0
  107. package/dist/validators/validateAndroidInput.js.map +1 -0
  108. package/dist/validators/validateAndroidNotification.d.ts +2 -0
  109. package/dist/validators/validateAndroidNotification.js +529 -0
  110. package/dist/validators/validateAndroidNotification.js.map +1 -0
  111. package/dist/validators/validateAndroidPressAction.d.ts +2 -0
  112. package/dist/validators/validateAndroidPressAction.js +50 -0
  113. package/dist/validators/validateAndroidPressAction.js.map +1 -0
  114. package/dist/validators/validateAndroidStyle.d.ts +22 -0
  115. package/dist/validators/validateAndroidStyle.js +231 -0
  116. package/dist/validators/validateAndroidStyle.js.map +1 -0
  117. package/dist/validators/validateIOSAttachment.d.ts +6 -0
  118. package/dist/validators/validateIOSAttachment.js +102 -0
  119. package/dist/validators/validateIOSAttachment.js.map +1 -0
  120. package/dist/validators/validateIOSCategory.d.ts +2 -0
  121. package/dist/validators/validateIOSCategory.js +124 -0
  122. package/dist/validators/validateIOSCategory.js.map +1 -0
  123. package/dist/validators/validateIOSCategoryAction.d.ts +2 -0
  124. package/dist/validators/validateIOSCategoryAction.js +59 -0
  125. package/dist/validators/validateIOSCategoryAction.js.map +1 -0
  126. package/dist/validators/validateIOSInput.d.ts +2 -0
  127. package/dist/validators/validateIOSInput.js +32 -0
  128. package/dist/validators/validateIOSInput.js.map +1 -0
  129. package/dist/validators/validateIOSNotification.d.ts +2 -0
  130. package/dist/validators/validateIOSNotification.js +211 -0
  131. package/dist/validators/validateIOSNotification.js.map +1 -0
  132. package/dist/validators/validateIOSPermissions.d.ts +2 -0
  133. package/dist/validators/validateIOSPermissions.js +62 -0
  134. package/dist/validators/validateIOSPermissions.js.map +1 -0
  135. package/dist/validators/validateNotification.d.ts +11 -0
  136. package/dist/validators/validateNotification.js +129 -0
  137. package/dist/validators/validateNotification.js.map +1 -0
  138. package/dist/validators/validateTrigger.d.ts +2 -0
  139. package/dist/validators/validateTrigger.js +104 -0
  140. package/dist/validators/validateTrigger.js.map +1 -0
  141. package/dist/version.d.ts +1 -0
  142. package/dist/version.js.map +1 -0
  143. package/ios/NotifeeCore/Info.plist +22 -0
  144. package/ios/NotifeeCore/NotifeeCore+NSNotificationCenter.h +28 -0
  145. package/ios/NotifeeCore/NotifeeCore+NSNotificationCenter.m +72 -0
  146. package/ios/NotifeeCore/NotifeeCore+NSURLSession.h +25 -0
  147. package/ios/NotifeeCore/NotifeeCore+NSURLSession.m +55 -0
  148. package/ios/NotifeeCore/NotifeeCore+UNUserNotificationCenter.h +37 -0
  149. package/ios/NotifeeCore/NotifeeCore+UNUserNotificationCenter.m +242 -0
  150. package/ios/NotifeeCore/NotifeeCore.h +118 -0
  151. package/ios/NotifeeCore/NotifeeCore.m +784 -0
  152. package/ios/NotifeeCore/NotifeeCoreDelegateHolder.h +34 -0
  153. package/ios/NotifeeCore/NotifeeCoreDelegateHolder.m +70 -0
  154. package/ios/NotifeeCore/NotifeeCoreDownloadDelegate.h +39 -0
  155. package/ios/NotifeeCore/NotifeeCoreDownloadDelegate.m +68 -0
  156. package/ios/NotifeeCore/NotifeeCoreExtensionHelper.h +38 -0
  157. package/ios/NotifeeCore/NotifeeCoreExtensionHelper.m +224 -0
  158. package/ios/NotifeeCore/NotifeeCoreUtil.h +82 -0
  159. package/ios/NotifeeCore/NotifeeCoreUtil.m +793 -0
  160. package/ios/RNNotifee/NotifeeApiModule.h +25 -0
  161. package/ios/RNNotifee/NotifeeApiModule.m +371 -0
  162. package/ios/RNNotifee/NotifeeExtensionHelper.h +37 -0
  163. package/ios/RNNotifee/NotifeeExtensionHelper.m +37 -0
  164. package/ios/RNNotifee.xcodeproj/project.pbxproj +318 -0
  165. package/jest-mock.js +158 -0
  166. package/package.json +59 -0
  167. package/plugin/build/index.d.ts +3 -0
  168. package/plugin/build/index.js +12 -0
  169. package/plugin/build/index.js.map +1 -0
  170. package/plugin/build/withNotifeeProjectGradlePlugin.d.ts +5 -0
  171. package/plugin/build/withNotifeeProjectGradlePlugin.js +24 -0
  172. package/plugin/build/withNotifeeProjectGradlePlugin.js.map +1 -0
  173. package/plugin/src/index.ts +9 -0
  174. package/plugin/src/withNotifeeProjectGradlePlugin.ts +27 -0
  175. package/plugin/tsconfig.json +9 -0
  176. package/react-native.config.js +11 -0
  177. package/refresh-example.sh +71 -0
  178. package/src/NotifeeApiModule.ts +825 -0
  179. package/src/NotifeeJSEventEmitter.ts +11 -0
  180. package/src/NotifeeNativeError.ts +70 -0
  181. package/src/NotifeeNativeModule.ts +55 -0
  182. package/src/NotifeeNativeModule.web.ts +25 -0
  183. package/src/index.ts +33 -0
  184. package/src/types/Library.ts +28 -0
  185. package/src/types/Module.ts +625 -0
  186. package/src/types/Notification.ts +505 -0
  187. package/src/types/NotificationAndroid.ts +1443 -0
  188. package/src/types/NotificationIOS.ts +681 -0
  189. package/src/types/NotificationWeb.ts +5 -0
  190. package/src/types/PowerManagerInfo.ts +43 -0
  191. package/src/types/Trigger.ts +118 -0
  192. package/src/utils/id.ts +13 -0
  193. package/src/utils/index.ts +47 -0
  194. package/src/utils/validate.ts +92 -0
  195. package/src/validators/iosCommunicationInfo/validateIOSCommunicationInfo.ts +45 -0
  196. package/src/validators/iosCommunicationInfo/validateIOSCommunicationInfoPerson.ts +33 -0
  197. package/src/validators/validate.ts +85 -0
  198. package/src/validators/validateAndroidAction.ts +54 -0
  199. package/src/validators/validateAndroidChannel.ts +188 -0
  200. package/src/validators/validateAndroidChannelGroup.ts +49 -0
  201. package/src/validators/validateAndroidFullScreenAction.ts +65 -0
  202. package/src/validators/validateAndroidInput.ts +67 -0
  203. package/src/validators/validateAndroidNotification.ts +704 -0
  204. package/src/validators/validateAndroidPressAction.ts +65 -0
  205. package/src/validators/validateAndroidStyle.ts +315 -0
  206. package/src/validators/validateIOSAttachment.ts +136 -0
  207. package/src/validators/validateIOSCategory.ts +150 -0
  208. package/src/validators/validateIOSCategoryAction.ts +65 -0
  209. package/src/validators/validateIOSInput.ts +38 -0
  210. package/src/validators/validateIOSNotification.ts +296 -0
  211. package/src/validators/validateIOSPermissions.ts +78 -0
  212. package/src/validators/validateNotification.ts +156 -0
  213. package/src/validators/validateTrigger.ts +134 -0
  214. package/src/version.ts +2 -0
  215. package/tsconfig.json +23 -0
package/.gitattributes ADDED
@@ -0,0 +1,3 @@
1
+ *.xcodeproj binary
2
+ *.xcworkspace binary
3
+ *.framework binary
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 License
38
+ --------------------
39
+
40
+ The Notifee "core" submodule on Android/iOS (e.g. `android/libs/notifee_core_release.aar`) is not Open Source
41
+ but is distributed in minified & obfuscated form. A purchased license is required to use Notifee Core in
42
+ release builds and is subject to the Notifee License terms which can be found at:
43
+
44
+ https://notifee.app/license-terms
package/README.md ADDED
@@ -0,0 +1,131 @@
1
+ <p align="center">
2
+ <a href="https://notifee.app">
3
+ <img width="160px" src="https://notifee.app/logo-icon.png"><br/>
4
+ </a>
5
+ <h2 align="center">Notifee - React Native</h2>
6
+ </p>
7
+
8
+ ---
9
+
10
+ A feature rich Android & iOS notifications library for React Native.
11
+
12
+ [> Learn More](https://notifee.app/)
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ yarn add @notifee/react-native
18
+ ```
19
+
20
+ ## Documentation
21
+
22
+ - [Overview](https://notifee.app/react-native/docs/overview)
23
+ - [Licensing](https://notifee.app/react-native/docs/license-keys)
24
+ - [Reference](https://notifee.app/react-native/reference)
25
+
26
+ ### Android
27
+
28
+ The APIs for Android allow for creating rich, styled and highly interactive notifications. Below you'll find guides that cover the supported Android features.
29
+
30
+ | Topic | |
31
+ | ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
32
+ | [Appearance](https://notifee.app/react-native/docs/android/appearance) | Change the appearance of a notification; icons, colors, visibility etc. |
33
+ | [Behaviour](https://notifee.app/react-native/docs/android/behaviour) | Customize how a notification behaves when it is delivered to a device; sound, vibration, lights etc. |
34
+ | [Channels & Groups](https://notifee.app/react-native/docs/android/channels) | Organize your notifications into channels & groups to allow users to control how notifications are handled on their device |
35
+ | [Foreground Service](https://notifee.app/react-native/docs/android/foreground-service) | Long running background tasks can take advantage of a Android Foreground Services to display an on-going, prominent notification. |
36
+ | [Grouping & Sorting](https://notifee.app/react-native/docs/android/grouping-and-sorting) | Group and sort related notifications in a single notification pane. |
37
+ | [Interaction](https://notifee.app/react-native/docs/android/interaction) | Allow users to interact with your application directly from the notification with actions. |
38
+ | [Progress Indicators](https://notifee.app/react-native/docs/android/progress-indicators) | Show users a progress indicator of an on-going background task, and learn how to keep it updated. |
39
+ | [Styles](https://notifee.app/react-native/docs/android/styles) | Style notifications to show richer content, such as expandable images/text, or message conversations. |
40
+ | [Timers](https://notifee.app/react-native/docs/android/timers) | Display counting timers on your notification, useful for on-going tasks such as a phone call, or event time remaining. |
41
+
42
+ ### iOS
43
+
44
+ Below you'll find guides that cover the supported iOS features.
45
+
46
+ | Topic | |
47
+ | ----------------------------------------------------------------- | ------------------------------------------------------------------------ |
48
+ | [Appearance](https://notifee.app/react-native/docs/ios/appearance) | Change now the notification is displayed to your users. |
49
+ | [Behaviour](https://notifee.app/react-native/docs/ios/behaviour) | Control how notifications behave when they are displayed to a device; sound, crtitial alerts etc. |
50
+ | [Categories](https://notifee.app/react-native/docs/ios/categories) | Create & assign categories to notifications. |
51
+ | [Interaction](https://notifee.app/react-native/docs/ios/interaction) | Handle user interaction with your notifications. | |
52
+ | [Permissions](https://notifee.app/react-native/docs/ios/permissions) | Request permission from your application users to display notifications. | |
53
+
54
+ ### Jest Testing
55
+
56
+ To run jest tests after integrating this module, you will need to mock out the native parts of Notifee or you will get an error that looks like:
57
+
58
+ ```bash
59
+ ● Test suite failed to run
60
+
61
+ Notifee native module not found.
62
+
63
+ 59 | this._nativeModule = NativeModules[this._moduleConfig.nativeModuleName];
64
+ 60 | if (this._nativeModule == null) {
65
+ > 61 | throw new Error('Notifee native module not found.');
66
+ | ^
67
+ 62 | }
68
+ 63 |
69
+ 64 | return this._nativeModule;
70
+ ```
71
+
72
+ Add this to a setup file in your project e.g. `jest.setup.js`:
73
+
74
+ If you don't already have a Jest setup file configured, please add the following to your Jest configuration file and create the new jest.setup.js file in project root:
75
+
76
+ ```js
77
+ setupFiles: ['<rootDir>/jest.setup.js'],
78
+ ```
79
+
80
+ You can then add the following line to that setup file to mock `notifee`:
81
+
82
+ ```js
83
+ jest.mock('@notifee/react-native', () => require('@notifee/react-native/jest-mock'))
84
+ ```
85
+
86
+ You will also need to add `@notifee` to `transformIgnorePatterns` in your config file (`jest.config.js`):
87
+
88
+ ```bash
89
+ transformIgnorePatterns: [
90
+ 'node_modules/(?!(jest-)?react-native|@react-native|@notifee)'
91
+ ]
92
+ ```
93
+
94
+ ### Detox Testing
95
+
96
+ To utilise Detox's functionality to mock a local notification and trigger notifee's event handlers, you will need a payload with a key `__notifee_notification`:
97
+
98
+ ```js
99
+ {
100
+ title: 'test',
101
+ body: 'Body',
102
+ payload: {
103
+ __notifee_notification: {
104
+ ios: {
105
+ foregroundPresentationOptions: {
106
+ banner: true,
107
+ list: true,
108
+ },
109
+ },
110
+ data: {}
111
+ },
112
+ },
113
+ }
114
+ ```
115
+
116
+ The important part is to make sure you have a `__notifee_notification` object under `payload` with the default properties.
117
+
118
+ ## License
119
+
120
+ - See [LICENSE](/LICENSE)
121
+
122
+ ---
123
+
124
+ <p>
125
+ <img align="left" width="50px" src="https://static.invertase.io/assets/invertase-logo-small.png">
126
+ <p align="left">
127
+ Built and maintained with 💛 by <a href="https://invertase.io">Invertase</a>.
128
+ </p>
129
+ </p>
130
+
131
+ ---
@@ -0,0 +1,39 @@
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://notifee.app"
13
+ s.license = package['license']
14
+ s.authors = "Invertase Limited"
15
+ s.source = { :git => "https://github.com/invertase/notifee", :tag => "v#{s.version}" }
16
+ s.social_media_url = 'http://twitter.com/notifee_app'
17
+
18
+ s.cocoapods_version = '>= 1.10.0'
19
+ s.ios.deployment_target = '10.0'
20
+
21
+ s.dependency 'React-Core'
22
+ s.source_files = ['ios/RNNotifee/NotifeeApiModule.h', 'ios/RNNotifee/NotifeeApiModule.m']
23
+
24
+ if defined?($NotifeeCoreFromSources) && $NotifeeCoreFromSources == true
25
+ # internal dev flag used by Notifee devs, ignore
26
+ Pod::UI.warn "RNNotifee: Using NotifeeCore from sources."
27
+ s.dependency 'NotifeeCore'
28
+ elsif defined?($NotifeeExtension) && $NotifeeExtension == true
29
+ # App uses Notification Service Extension
30
+ Pod::UI.warn "RNNotifee: using Notification Service Extension."
31
+ s.dependency 'RNNotifeeCore'
32
+ else
33
+ s.subspec "NotifeeCore" do |ss|
34
+ ss.source_files = "ios/NotifeeCore/*.{h,mm,m}"
35
+ end
36
+ end
37
+
38
+ end
39
+
@@ -0,0 +1,33 @@
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://notifee.app"
13
+ s.license = package['license']
14
+ s.authors = "Invertase Limited"
15
+ s.source = { :git => "https://github.com/notifee/react-native-notifee", :tag => "v#{s.version}" }
16
+ s.social_media_url = 'http://twitter.com/notifee_app'
17
+
18
+ s.cocoapods_version = '>= 1.10.0'
19
+ s.ios.deployment_target = '10.0'
20
+
21
+ if defined?($NotifeeCoreFromSources) && $NotifeeCoreFromSources == true
22
+ # internal dev flag used by Notifee devs, ignore
23
+ Pod::UI.warn "RNNotifeeCore: Using NotifeeCore from sources."
24
+ s.dependency 'NotifeeCore'
25
+ else
26
+ s.subspec "NotifeeCore" do |ss|
27
+ ss.source_files = "ios/NotifeeCore/*.{h,mm,m}"
28
+ end
29
+ end
30
+
31
+ s.source_files = ['ios/RNNotifee/NotifeeExtensionHelper.h', 'ios/RNNotifee/NotifeeExtensionHelper.m']
32
+ s.public_header_files = ['ios/RNNotifee/NotifeeExtensionHelper.h']
33
+ end
@@ -0,0 +1,116 @@
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:7.0.3")
15
+ }
16
+ }
17
+ }
18
+
19
+ plugins {
20
+ id "io.invertase.gradle.build" version "1.5"
21
+ }
22
+
23
+ // https://github.com/facebook/react-native/blob/a70354df12ef71aec08583cca4f1fed5fb77d874/ReactAndroid/build.gradle#L168-L201
24
+ def findNodeModulePath(baseDir, packageName) {
25
+ def basePath = baseDir.toPath().normalize()
26
+ // Node's module resolution algorithm searches up to the root directory,
27
+ // after which the base path will be null
28
+ while (basePath) {
29
+ def candidatePath = Paths.get(basePath.toString(), "node_modules", packageName)
30
+ if (candidatePath.toFile().exists()) {
31
+ return candidatePath.toString()
32
+ }
33
+ basePath = basePath.getParent()
34
+ }
35
+ return null
36
+ }
37
+
38
+ def notifeeDir = findNodeModulePath(projectDir, "@ammarahm-ed/notifee-react-native") ?: "$rootDir/../node_modules/@ammarahm-ed/notifee-react-native"
39
+ println ":${project.name} @notifee/react-native found at $notifeeDir"
40
+
41
+ if (project.hasProperty('reactNativeProjects')) {
42
+ reactNativeProjects.each { dependent ->
43
+ project.evaluationDependsOn(dependent)
44
+ }
45
+ } else {
46
+ project.evaluationDependsOn(':app')
47
+ }
48
+
49
+ project.ext {
50
+ set('react-native', [
51
+ versions: [
52
+ android: [
53
+ minSdk : 20,
54
+ targetSdk : 33,
55
+ compileSdk: 33,
56
+ // optional as gradle.buildTools comes with one by default
57
+ // overriding here though to match the version RN uses
58
+ // buildTools: "29.0.2"
59
+ ],
60
+ ],
61
+ ])
62
+ }
63
+
64
+ android {
65
+ defaultConfig {
66
+ multiDexEnabled true
67
+ }
68
+ lintOptions {
69
+ disable 'GradleCompatible'
70
+ abortOnError false
71
+ }
72
+ compileOptions {
73
+ sourceCompatibility JavaVersion.VERSION_1_8
74
+ targetCompatibility JavaVersion.VERSION_1_8
75
+ }
76
+ buildTypes {
77
+ release {
78
+ consumerProguardFiles 'proguard-rules.pro'
79
+ }
80
+ }
81
+ compileSdkVersion = 33
82
+ buildToolsVersion = '33.0.0'
83
+ }
84
+
85
+ repositories {
86
+ google()
87
+ mavenCentral()
88
+ }
89
+
90
+ dependencies {
91
+ if (findProject(':notifee_core')) {
92
+ implementation findProject(':notifee_core')
93
+ } else {
94
+ implementation(group: 'app.notifee', name:'core', version: '+')
95
+ }
96
+ implementation 'androidx.concurrent:concurrent-futures:1.1.0' // https://developer.android.com/jetpack/androidx/releases/concurrent
97
+ implementation 'com.google.android.gms:play-services-tasks:18.0.1' // https://developers.google.com/android/guides/releases
98
+ implementation 'androidx.work:work-runtime:2.7.1' // https://developer.android.com/jetpack/androidx/releases/work
99
+ implementation 'org.greenrobot:eventbus:3.2.0' // https://github.com/greenrobot/EventBus/releases
100
+
101
+ // needed to enforce version and avoid clashes
102
+ // https://github.com/square/okhttp/blob/master/docs/changelog_3x.md
103
+ implementation 'com.squareup.okhttp3:okhttp:3.12.13' // okhttp must stay on 3.12.x to support minSdkVersion < 21
104
+ }
105
+
106
+ ReactNative.shared.applyPackageVersion()
107
+ ReactNative.shared.applyDefaultExcludes()
108
+ ReactNative.module.applyAndroidVersions()
109
+ ReactNative.module.applyReactNativeDependency("api")
110
+ rootProject.allprojects {
111
+ repositories {
112
+ maven {
113
+ url "$notifeeDir/android/libs"
114
+ }
115
+ }
116
+ }
@@ -0,0 +1 @@
1
+ NOTIFEE=1
@@ -0,0 +1 @@
1
+ a4067a1e56a587f1f060ae75d4327aca
@@ -0,0 +1 @@
1
+ d1778e90b76cbfd65f2eabee7c8549d9719e3501
@@ -0,0 +1 @@
1
+ 4a186c8ad42c34298f533579d73729934128f289af510e83f835f055c63a070a
@@ -0,0 +1 @@
1
+ d1a1f5c57b1c16811bad7db3aafea97edd59b8e48b82e72092b6b7f0f0718fe11eee4f1cc4f17ac095200f145bf9e3e348b9135d8cb1d714f23ca91f81285422
@@ -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>202108261756</version>
8
+ <packaging>aar</packaging>
9
+ </project>
@@ -0,0 +1 @@
1
+ bdc9784717713fbe2119d5937159dbfb
@@ -0,0 +1 @@
1
+ 9b5404bb424f69f1a47df6a427a40f909565e1b4
@@ -0,0 +1 @@
1
+ feddfa2cd29a571e59decdf8a0c5f127523662e72ad189c1158e8cf8934131a0
@@ -0,0 +1 @@
1
+ 594fdaf1cc2560b1349948649cd10a9eceec06f483bd1e08c8929c4e97c6f7dba2dc226443fc724e8913537490a6bb997116bae34c3959da456a21b96705ec88
@@ -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>202108261756</latest>
7
+ <release>202108261756</release>
8
+ <versions>
9
+ <version>202108261756</version>
10
+ </versions>
11
+ <lastUpdated>20230112100512</lastUpdated>
12
+ </versioning>
13
+ </metadata>
@@ -0,0 +1 @@
1
+ 98a698ea05e61dc96340b30870a15e97
@@ -0,0 +1 @@
1
+ fba186c53cf240180e2c8fdb871675f960e728a5
@@ -0,0 +1 @@
1
+ 1483e8b2e822ba974af58ccba1dd15134af9421672d723d612fbe994c428f055
@@ -0,0 +1 @@
1
+ 868cbf687dce6d01aaf63eead3191801654eb75dc10e1ec10d2fe07e03f3542bce365cf7ff3a4b1aa069c0ac2bab2e00cc97958b84f4f43d6ae31c45424fdd81
@@ -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,74 @@
1
+ -keep class io.invertase.notifee.NotifeeEventSubscriber
2
+ -keep class io.invertase.notifee.NotifeeInitProvider
3
+ -keepnames class com.facebook.react.ReactActivity
4
+ -keepnames class io.invertase.notifee.NotifeePackage
5
+ -keepnames class io.invertase.notifee.NotifeeApiModule
6
+
7
+ # Preserve all annotations.
8
+ -keepattributes *Annotation*
9
+
10
+ # Keep the classes/members we need for client functionality.
11
+ -keep @interface androidx.annotation.Keep
12
+ -keep @androidx.annotation.Keep class *
13
+ -keepclasseswithmembers class * {
14
+ @androidx.annotation.Keep <fields>;
15
+ }
16
+ -keepclasseswithmembers class * {
17
+ @androidx.annotation.Keep <methods>;
18
+ }
19
+
20
+ # Keep the classes/members we need for client functionality.
21
+ -keep @interface app.notifee.core.KeepForSdk
22
+ -keep @app.notifee.core.KeepForSdk class *
23
+ -keepclasseswithmembers class * {
24
+ @app.notifee.core.KeepForSdk <fields>;
25
+ }
26
+ -keepclasseswithmembers class * {
27
+ @app.notifee.core.KeepForSdk <methods>;
28
+ }
29
+
30
+ # Preserve all .class method names.
31
+ -keepclassmembernames class * {
32
+ java.lang.Class class$(java.lang.String);
33
+ java.lang.Class class$(java.lang.String, boolean);
34
+ }
35
+
36
+ # Preserve all native method names and the names of their classes.
37
+ -keepclasseswithmembernames class * {
38
+ native <methods>;
39
+ }
40
+
41
+ # Preserve the special static methods that are required in all enumeration
42
+ # classes.
43
+ -keepclassmembers class * extends java.lang.Enum {
44
+ public static **[] values();
45
+ public static ** valueOf(java.lang.String);
46
+ }
47
+
48
+ # --------------------------------
49
+ # LIBRARIES
50
+ # --------------------------------
51
+
52
+ # Work Manager
53
+ -keepclassmembers class * extends androidx.work.ListenableWorker {
54
+ public <init>(android.content.Context,androidx.work.WorkerParameters);
55
+ }
56
+
57
+ # EventBus
58
+ -keepclassmembers class * {
59
+ @org.greenrobot.eventbus.Subscribe <methods>;
60
+ }
61
+ -keep enum org.greenrobot.eventbus.ThreadMode { *; }
62
+
63
+ # Only required if you use AsyncExecutor
64
+ -keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
65
+ <init>(java.lang.Throwable);
66
+ }
67
+
68
+ # OkHttp3
69
+ -dontwarn okio.**
70
+ -dontwarn okhttp3.**
71
+ -dontwarn javax.annotation.**
72
+ -dontwarn org.conscrypt.**
73
+ # A resource is loaded with a relative path so the package of this class must be preserved.
74
+ -keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
@@ -0,0 +1 @@
1
+ rootProject.name = '@notifee_react_native'
@@ -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>