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
@@ -0,0 +1,318 @@
1
+ // !$*UTF8*$!
2
+ {
3
+ archiveVersion = 1;
4
+ classes = {
5
+ };
6
+ objectVersion = 50;
7
+ objects = {
8
+
9
+ /* Begin PBXBuildFile section */
10
+ 27E8C37823E48C66007568A4 /* NotifeeApiModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 27E8C37723E48C66007568A4 /* NotifeeApiModule.m */; };
11
+ 27E8C37923E48C66007568A4 /* NotifeeApiModule.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 27E8C37623E48C66007568A4 /* NotifeeApiModule.h */; };
12
+ 79A3978325FD5D4B00CBBAAB /* NotifeeExtensionHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 79A3978225FD5D4B00CBBAAB /* NotifeeExtensionHelper.m */; };
13
+ 79AEF7D62701295A00BE87B5 /* NotifeeExtensionHelper.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 79A3978125FD5D4B00CBBAAB /* NotifeeExtensionHelper.h */; };
14
+ /* End PBXBuildFile section */
15
+
16
+ /* Begin PBXCopyFilesBuildPhase section */
17
+ 27E8C37123E48C66007568A4 /* CopyFiles */ = {
18
+ isa = PBXCopyFilesBuildPhase;
19
+ buildActionMask = 2147483647;
20
+ dstPath = "include/$(PRODUCT_NAME)";
21
+ dstSubfolderSpec = 16;
22
+ files = (
23
+ 79AEF7D62701295A00BE87B5 /* NotifeeExtensionHelper.h in CopyFiles */,
24
+ 27E8C37923E48C66007568A4 /* NotifeeApiModule.h in CopyFiles */,
25
+ );
26
+ runOnlyForDeploymentPostprocessing = 0;
27
+ };
28
+ /* End PBXCopyFilesBuildPhase section */
29
+
30
+ /* Begin PBXFileReference section */
31
+ 27E8C37323E48C66007568A4 /* libRNNotifee.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNNotifee.a; sourceTree = BUILT_PRODUCTS_DIR; };
32
+ 27E8C37623E48C66007568A4 /* NotifeeApiModule.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NotifeeApiModule.h; sourceTree = "<group>"; };
33
+ 27E8C37723E48C66007568A4 /* NotifeeApiModule.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NotifeeApiModule.m; sourceTree = "<group>"; };
34
+ 79A3978125FD5D4B00CBBAAB /* NotifeeExtensionHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NotifeeExtensionHelper.h; sourceTree = "<group>"; };
35
+ 79A3978225FD5D4B00CBBAAB /* NotifeeExtensionHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NotifeeExtensionHelper.m; sourceTree = "<group>"; };
36
+ /* End PBXFileReference section */
37
+
38
+ /* Begin PBXFrameworksBuildPhase section */
39
+ 27E8C37023E48C66007568A4 /* Frameworks */ = {
40
+ isa = PBXFrameworksBuildPhase;
41
+ buildActionMask = 2147483647;
42
+ files = (
43
+ );
44
+ runOnlyForDeploymentPostprocessing = 0;
45
+ };
46
+ /* End PBXFrameworksBuildPhase section */
47
+
48
+ /* Begin PBXGroup section */
49
+ 27E8C36A23E48C66007568A4 = {
50
+ isa = PBXGroup;
51
+ children = (
52
+ 27E8C37523E48C66007568A4 /* RNNotifee */,
53
+ 27E8C37423E48C66007568A4 /* Products */,
54
+ );
55
+ sourceTree = "<group>";
56
+ };
57
+ 27E8C37423E48C66007568A4 /* Products */ = {
58
+ isa = PBXGroup;
59
+ children = (
60
+ 27E8C37323E48C66007568A4 /* libRNNotifee.a */,
61
+ );
62
+ name = Products;
63
+ sourceTree = "<group>";
64
+ };
65
+ 27E8C37523E48C66007568A4 /* RNNotifee */ = {
66
+ isa = PBXGroup;
67
+ children = (
68
+ 79A3978125FD5D4B00CBBAAB /* NotifeeExtensionHelper.h */,
69
+ 79A3978225FD5D4B00CBBAAB /* NotifeeExtensionHelper.m */,
70
+ 27E8C37623E48C66007568A4 /* NotifeeApiModule.h */,
71
+ 27E8C37723E48C66007568A4 /* NotifeeApiModule.m */,
72
+ );
73
+ path = RNNotifee;
74
+ sourceTree = "<group>";
75
+ };
76
+ /* End PBXGroup section */
77
+
78
+ /* Begin PBXNativeTarget section */
79
+ 27E8C37223E48C66007568A4 /* RNNotifee */ = {
80
+ isa = PBXNativeTarget;
81
+ buildConfigurationList = 27E8C37C23E48C66007568A4 /* Build configuration list for PBXNativeTarget "RNNotifee" */;
82
+ buildPhases = (
83
+ 27E8C36F23E48C66007568A4 /* Sources */,
84
+ 27E8C37023E48C66007568A4 /* Frameworks */,
85
+ 27E8C37123E48C66007568A4 /* CopyFiles */,
86
+ );
87
+ buildRules = (
88
+ );
89
+ dependencies = (
90
+ );
91
+ name = RNNotifee;
92
+ productName = RNNotifee;
93
+ productReference = 27E8C37323E48C66007568A4 /* libRNNotifee.a */;
94
+ productType = "com.apple.product-type.library.static";
95
+ };
96
+ /* End PBXNativeTarget section */
97
+
98
+ /* Begin PBXProject section */
99
+ 27E8C36B23E48C66007568A4 /* Project object */ = {
100
+ isa = PBXProject;
101
+ attributes = {
102
+ LastUpgradeCheck = 1130;
103
+ ORGANIZATIONNAME = Invertase;
104
+ TargetAttributes = {
105
+ 27E8C37223E48C66007568A4 = {
106
+ CreatedOnToolsVersion = 11.3;
107
+ };
108
+ };
109
+ };
110
+ buildConfigurationList = 27E8C36E23E48C66007568A4 /* Build configuration list for PBXProject "RNNotifee" */;
111
+ compatibilityVersion = "Xcode 9.3";
112
+ developmentRegion = en;
113
+ hasScannedForEncodings = 0;
114
+ knownRegions = (
115
+ en,
116
+ Base,
117
+ );
118
+ mainGroup = 27E8C36A23E48C66007568A4;
119
+ productRefGroup = 27E8C37423E48C66007568A4 /* Products */;
120
+ projectDirPath = "";
121
+ projectRoot = "";
122
+ targets = (
123
+ 27E8C37223E48C66007568A4 /* RNNotifee */,
124
+ );
125
+ };
126
+ /* End PBXProject section */
127
+
128
+ /* Begin PBXSourcesBuildPhase section */
129
+ 27E8C36F23E48C66007568A4 /* Sources */ = {
130
+ isa = PBXSourcesBuildPhase;
131
+ buildActionMask = 2147483647;
132
+ files = (
133
+ 79A3978325FD5D4B00CBBAAB /* NotifeeExtensionHelper.m in Sources */,
134
+ 27E8C37823E48C66007568A4 /* NotifeeApiModule.m in Sources */,
135
+ );
136
+ runOnlyForDeploymentPostprocessing = 0;
137
+ };
138
+ /* End PBXSourcesBuildPhase section */
139
+
140
+ /* Begin XCBuildConfiguration section */
141
+ 27E8C37A23E48C66007568A4 /* Debug */ = {
142
+ isa = XCBuildConfiguration;
143
+ buildSettings = {
144
+ ALWAYS_SEARCH_USER_PATHS = NO;
145
+ CLANG_ANALYZER_NONNULL = YES;
146
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
147
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
148
+ CLANG_CXX_LIBRARY = "libc++";
149
+ CLANG_ENABLE_MODULES = YES;
150
+ CLANG_ENABLE_OBJC_ARC = YES;
151
+ CLANG_ENABLE_OBJC_WEAK = YES;
152
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
153
+ CLANG_WARN_BOOL_CONVERSION = YES;
154
+ CLANG_WARN_COMMA = YES;
155
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
156
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
157
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
158
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
159
+ CLANG_WARN_EMPTY_BODY = YES;
160
+ CLANG_WARN_ENUM_CONVERSION = YES;
161
+ CLANG_WARN_INFINITE_RECURSION = YES;
162
+ CLANG_WARN_INT_CONVERSION = YES;
163
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
164
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
165
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
166
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
167
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
168
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
169
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
170
+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
171
+ CLANG_WARN_UNREACHABLE_CODE = YES;
172
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
173
+ COPY_PHASE_STRIP = NO;
174
+ DEBUG_INFORMATION_FORMAT = dwarf;
175
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
176
+ ENABLE_TESTABILITY = YES;
177
+ GCC_C_LANGUAGE_STANDARD = gnu11;
178
+ GCC_DYNAMIC_NO_PIC = NO;
179
+ GCC_NO_COMMON_BLOCKS = YES;
180
+ GCC_OPTIMIZATION_LEVEL = 0;
181
+ GCC_PREPROCESSOR_DEFINITIONS = (
182
+ "DEBUG=1",
183
+ "$(inherited)",
184
+ );
185
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
186
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
187
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
188
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
189
+ GCC_WARN_UNUSED_FUNCTION = YES;
190
+ GCC_WARN_UNUSED_VARIABLE = YES;
191
+ HEADER_SEARCH_PATHS = (
192
+ "$(inherited)",
193
+ "$(REACT_SEARCH_PATH)/React/**",
194
+ "$(SRCROOT)/../../react-native/React/**",
195
+ "${SRCROOT}/../../../ios/Firebase/**",
196
+ "${SRCROOT}/../../../ios/Pods/Headers/Public/**",
197
+ "$(SRCROOT)/../../../node_modules/react-native/React/**",
198
+ "${SRCROOT}/../../../tests_react_native/ios/Pods/Headers/Public/**",
199
+ );
200
+ IPHONEOS_DEPLOYMENT_TARGET = 13.2;
201
+ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
202
+ MTL_FAST_MATH = YES;
203
+ ONLY_ACTIVE_ARCH = YES;
204
+ SDKROOT = iphoneos;
205
+ };
206
+ name = Debug;
207
+ };
208
+ 27E8C37B23E48C66007568A4 /* Release */ = {
209
+ isa = XCBuildConfiguration;
210
+ buildSettings = {
211
+ ALWAYS_SEARCH_USER_PATHS = NO;
212
+ CLANG_ANALYZER_NONNULL = YES;
213
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
214
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
215
+ CLANG_CXX_LIBRARY = "libc++";
216
+ CLANG_ENABLE_MODULES = YES;
217
+ CLANG_ENABLE_OBJC_ARC = YES;
218
+ CLANG_ENABLE_OBJC_WEAK = YES;
219
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
220
+ CLANG_WARN_BOOL_CONVERSION = YES;
221
+ CLANG_WARN_COMMA = YES;
222
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
223
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
224
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
225
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
226
+ CLANG_WARN_EMPTY_BODY = YES;
227
+ CLANG_WARN_ENUM_CONVERSION = YES;
228
+ CLANG_WARN_INFINITE_RECURSION = YES;
229
+ CLANG_WARN_INT_CONVERSION = YES;
230
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
231
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
232
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
233
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
234
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
235
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
236
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
237
+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
238
+ CLANG_WARN_UNREACHABLE_CODE = YES;
239
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
240
+ COPY_PHASE_STRIP = NO;
241
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
242
+ ENABLE_NS_ASSERTIONS = NO;
243
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
244
+ GCC_C_LANGUAGE_STANDARD = gnu11;
245
+ GCC_NO_COMMON_BLOCKS = YES;
246
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
247
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
248
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
249
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
250
+ GCC_WARN_UNUSED_FUNCTION = YES;
251
+ GCC_WARN_UNUSED_VARIABLE = YES;
252
+ HEADER_SEARCH_PATHS = (
253
+ "$(SRCROOT)/../../react-native/React/**/**",
254
+ "$(REACT_SEARCH_PATH)/React/**/**",
255
+ );
256
+ IPHONEOS_DEPLOYMENT_TARGET = 13.2;
257
+ MTL_ENABLE_DEBUG_INFO = NO;
258
+ MTL_FAST_MATH = YES;
259
+ SDKROOT = iphoneos;
260
+ VALIDATE_PRODUCT = YES;
261
+ };
262
+ name = Release;
263
+ };
264
+ 27E8C37D23E48C66007568A4 /* Debug */ = {
265
+ isa = XCBuildConfiguration;
266
+ buildSettings = {
267
+ CODE_SIGN_STYLE = Automatic;
268
+ FRAMEWORK_SEARCH_PATHS = (
269
+ "$(inherited)",
270
+ "$(PROJECT_DIR)",
271
+ );
272
+ OTHER_LDFLAGS = "-ObjC";
273
+ PRODUCT_NAME = "$(TARGET_NAME)";
274
+ SKIP_INSTALL = YES;
275
+ TARGETED_DEVICE_FAMILY = "1,2";
276
+ };
277
+ name = Debug;
278
+ };
279
+ 27E8C37E23E48C66007568A4 /* Release */ = {
280
+ isa = XCBuildConfiguration;
281
+ buildSettings = {
282
+ CODE_SIGN_STYLE = Automatic;
283
+ FRAMEWORK_SEARCH_PATHS = (
284
+ "$(inherited)",
285
+ "$(PROJECT_DIR)",
286
+ );
287
+ OTHER_LDFLAGS = "-ObjC";
288
+ PRODUCT_NAME = "$(TARGET_NAME)";
289
+ SKIP_INSTALL = YES;
290
+ TARGETED_DEVICE_FAMILY = "1,2";
291
+ };
292
+ name = Release;
293
+ };
294
+ /* End XCBuildConfiguration section */
295
+
296
+ /* Begin XCConfigurationList section */
297
+ 27E8C36E23E48C66007568A4 /* Build configuration list for PBXProject "RNNotifee" */ = {
298
+ isa = XCConfigurationList;
299
+ buildConfigurations = (
300
+ 27E8C37A23E48C66007568A4 /* Debug */,
301
+ 27E8C37B23E48C66007568A4 /* Release */,
302
+ );
303
+ defaultConfigurationIsVisible = 0;
304
+ defaultConfigurationName = Release;
305
+ };
306
+ 27E8C37C23E48C66007568A4 /* Build configuration list for PBXNativeTarget "RNNotifee" */ = {
307
+ isa = XCConfigurationList;
308
+ buildConfigurations = (
309
+ 27E8C37D23E48C66007568A4 /* Debug */,
310
+ 27E8C37E23E48C66007568A4 /* Release */,
311
+ );
312
+ defaultConfigurationIsVisible = 0;
313
+ defaultConfigurationName = Release;
314
+ };
315
+ /* End XCConfigurationList section */
316
+ };
317
+ rootObject = 27E8C36B23E48C66007568A4 /* Project object */;
318
+ }
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Workspace
3
+ version = "1.0">
4
+ <FileRef
5
+ location = "self:RNNotifee.xcodeproj">
6
+ </FileRef>
7
+ </Workspace>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>IDEDidComputeMac32BitWarning</key>
6
+ <true/>
7
+ </dict>
8
+ </plist>
package/jest-mock.js ADDED
@@ -0,0 +1,162 @@
1
+ /**
2
+ * Mock implementation for test runners.
3
+ *
4
+ * Example:
5
+ *
6
+ * ```js
7
+ * jest.mock('react-native-notify-kit', () => require('react-native-notify-kit/jest-mock'));
8
+ * ```
9
+ */
10
+
11
+ import { version as SDK_VERSION } from './dist/version';
12
+ import * as Notification from './dist/types/Notification';
13
+ import * as NotificationAndroid from './dist/types/NotificationAndroid';
14
+ import * as NotificationIOS from './dist/types/NotificationIOS';
15
+ import * as TriggerType from './dist/types/Trigger';
16
+
17
+ export * from './dist/types/Library';
18
+ export * from './dist/types/Notification';
19
+ export * from './dist/types/Trigger';
20
+ export * from './dist/types/NotificationIOS';
21
+ export * from './dist/types/NotificationAndroid';
22
+ /* eslint-disable @typescript-eslint/no-unused-vars */
23
+
24
+ /* eslint-disable no-undef */
25
+ export const testNotification = {
26
+ id: 'test-id',
27
+ title: 'test-title',
28
+ body: 'test-body',
29
+ android: {
30
+ channelId: 'default',
31
+ },
32
+ };
33
+
34
+ export const testChannel = {
35
+ id: 'channel-id',
36
+ name: 'channel-name',
37
+ };
38
+
39
+ export const testChannelGroup = {
40
+ id: 'channel-group-id',
41
+ name: 'channel-group',
42
+ };
43
+
44
+ export const testTrigger = {
45
+ type: 'TIMESTAMP',
46
+ timestamp: new Date(Date.now()).getTime(),
47
+ };
48
+
49
+ export const testTriggerNotificationIds = ['trigger1', 'trigger2'];
50
+
51
+ export const testTriggerNotifications = [
52
+ {
53
+ notification: testNotification,
54
+ trigger: testTrigger,
55
+ },
56
+ ];
57
+
58
+ export const testDisplayedNotifications = [
59
+ {
60
+ id: testNotification.id,
61
+ date: testTrigger.timestamp,
62
+ notification: testNotification,
63
+ trigger: testTrigger,
64
+ },
65
+ ];
66
+
67
+ export const testCategory = {
68
+ id: 'test-category',
69
+ actions: [
70
+ {
71
+ id: 'test-action',
72
+ title: 'Test',
73
+ },
74
+ ],
75
+ allowInCarPlay: false,
76
+ allowAnnouncement: false,
77
+ hiddenPreviewsShowTitle: false,
78
+ hiddenPreviewsShowSubtitle: false,
79
+ };
80
+
81
+ export const testNotificationSettings = {
82
+ authorizationStatus: Notification.AuthorizationStatus.AUTHORIZED,
83
+ android: {
84
+ alarm: NotificationAndroid.AndroidNotificationSetting.ENABLED,
85
+ },
86
+ ios: {
87
+ alert: true,
88
+ badge: true,
89
+ sound: true,
90
+ carPlay: true,
91
+ criticalAlert: true,
92
+ provisional: true,
93
+ lockScreen: true,
94
+ notificationCenter: true,
95
+ showPreviews: true,
96
+ inAppNotificationSettings: true,
97
+ authorizationStatus: Notification.AuthorizationStatus.AUTHORIZED,
98
+ },
99
+ };
100
+
101
+ export const testBadgeCount = 1;
102
+
103
+ export const testPowerManagerSettings = {
104
+ activity: 'test-activity',
105
+ manufacturer: 'test-manufacturer',
106
+ model: 'test-model',
107
+ version: 'test-version',
108
+ };
109
+
110
+ export default {
111
+ SDK_VERSION,
112
+ ...Notification,
113
+ ...NotificationAndroid,
114
+ ...NotificationIOS,
115
+ TriggerType,
116
+ displayNotification: jest.fn(async notification => notification?.id || testNotification.id),
117
+ createTriggerNotification: jest.fn(
118
+ async (notification, _) => notification?.id || testNotification.id,
119
+ ),
120
+ getChannel: jest.fn(async id => ({
121
+ ...testChannel,
122
+ id,
123
+ })),
124
+ getChannels: jest.fn(async () => [testChannel]),
125
+ getChannelGroup: jest.fn(async () => testChannelGroup),
126
+ getChannelGroups: jest.fn(async () => [testChannelGroup]),
127
+ isChannelBlocked: jest.fn(async () => false),
128
+ isChannelCreated: jest.fn(async () => true),
129
+ getTriggerNotificationIds: jest.fn(async () => testTriggerNotificationIds),
130
+ getDisplayedNotifications: jest.fn(async () => testDisplayedNotifications),
131
+ getTriggerNotifications: jest.fn(async () => testTriggerNotifications),
132
+ cancelAllNotifications: jest.fn(async () => {}),
133
+ cancelDisplayedNotifications: jest.fn(async () => {}),
134
+ cancelTriggerNotifications: jest.fn(async () => {}),
135
+ cancelNotification: jest.fn(async () => {}),
136
+ cancelDisplayedNotification: jest.fn(async () => {}),
137
+ cancelTriggerNotification: jest.fn(async () => {}),
138
+ createChannel: jest.fn(async channel => channel?.id || testChannel.id),
139
+ createChannels: jest.fn(async () => {}),
140
+ createChannelGroup: jest.fn(async channelGroup => channelGroup?.id || testChannelGroup.id),
141
+ createChannelGroups: jest.fn(async () => {}),
142
+ deleteChannel: jest.fn(async () => {}),
143
+ getInitialNotification: jest.fn(async () => testNotification),
144
+ onBackgroundEvent: jest.fn(() => jest.fn()),
145
+ onForegroundEvent: jest.fn(() => jest.fn()),
146
+ openNotificationSettings: jest.fn(),
147
+ requestPermission: jest.fn(async () => testNotificationSettings),
148
+ registerForegroundService: jest.fn(() => jest.fn()),
149
+ setNotificationCategories: jest.fn(async () => {}),
150
+ getNotificationCategories: jest.fn(async () => [testCategory]),
151
+ getNotificationSettings: jest.fn(async () => testNotificationSettings),
152
+ getBadgeCount: jest.fn(async () => testBadgeCount),
153
+ setBadgeCount: jest.fn(async () => {}),
154
+ incrementBadgeCount: jest.fn(async () => {}),
155
+ decrementBadgeCount: jest.fn(async () => {}),
156
+ isBatteryOptimizationEnabled: jest.fn(async () => true),
157
+ openBatteryOptimizationSettings: jest.fn(async () => {}),
158
+ getPowerManagerInfo: jest.fn(async () => {}),
159
+ openPowerManagerSettings: jest.fn(async () => testPowerManagerSettings),
160
+ stopForegroundService: jest.fn(async () => {}),
161
+ hideNotificationDrawer: jest.fn(async () => {}),
162
+ };
package/package.json ADDED
@@ -0,0 +1,85 @@
1
+ {
2
+ "name": "react-native-notify-kit",
3
+ "version": "9.1.8",
4
+ "author": "Marco Crupi",
5
+ "description": "React Native Notify Kit - a feature rich notifications library for React Native.",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "scripts": {
9
+ "validate:all:ts": "tsc --project ./",
10
+ "build": "genversion --es6 --semi src/version.ts && tsc",
11
+ "build:clean": "rimraf android/libs && rimraf android/build && rimraf ios/build && rimraf dist",
12
+ "build:watch": "tsc --watch",
13
+ "prepare": "yarn run build",
14
+ "prepublishOnly": "cd ../.. && yarn run build:core",
15
+ "format:android": "google-java-format --replace -i $(find . -type f -name \"*.java\" ! -path \"*/node_modules/*\" ! -path \"*/generated/*\")",
16
+ "format:android:check": "google-java-format --set-exit-if-changed --replace -i $(find . -type f -name \"*.java\" ! -path \"*/node_modules/*\" ! -path \"*/generated/*\")",
17
+ "format:ios": "npm_config_yes=true npx clang-format -i --glob=\"ios/**/*.{h,cpp,m,mm}\" --style=Google",
18
+ "format:ios:check": "npm_config_yes=true npx clang-format --glob=\"ios/**/*.{h,cpp,m,mm}\" --style=Google -n -Werror"
19
+ },
20
+ "devDependencies": {
21
+ "@babel/preset-env": "^7.25.3",
22
+ "@babel/runtime": "^7.25.0",
23
+ "@react-native/babel-preset": "0.84.1",
24
+ "@types/jest": "^29.5.13",
25
+ "babel-jest": "^29.7.0",
26
+ "genversion": "^3.0.2",
27
+ "jest": "^29.7.0",
28
+ "prettier": "^3.8.1",
29
+ "react-native": "0.84.1",
30
+ "rimraf": "^3.0.2",
31
+ "ts-jest": "^29.2.5",
32
+ "typescript": "^5.9.3"
33
+ },
34
+ "peerDependencies": {
35
+ "react-native": ">=0.73.0"
36
+ },
37
+ "codegenConfig": {
38
+ "name": "NotifeeSpec",
39
+ "type": "modules",
40
+ "jsSrcsDir": "src/specs",
41
+ "android": {
42
+ "javaPackageName": "io.invertase.notifee"
43
+ }
44
+ },
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "git+https://github.com/marcocrupi/react-native-notify-kit.git"
48
+ },
49
+ "homepage": "https://github.com/marcocrupi/react-native-notify-kit#readme",
50
+ "bugs": {
51
+ "url": "https://github.com/marcocrupi/react-native-notify-kit/issues"
52
+ },
53
+ "license": "Apache-2.0",
54
+ "keywords": [
55
+ "react",
56
+ "react-native",
57
+ "scheduling",
58
+ "channels",
59
+ "android",
60
+ "ios",
61
+ "firebase",
62
+ "fcm",
63
+ "notifee",
64
+ "notifications",
65
+ "onesignal"
66
+ ],
67
+ "publishConfig": {
68
+ "access": "public"
69
+ },
70
+ "files": [
71
+ "README.md",
72
+ "LICENSE",
73
+ "/android",
74
+ "!/android/build",
75
+ "/ios",
76
+ "/src",
77
+ "!/src/__mocks__",
78
+ "/dist",
79
+ "/lib",
80
+ "/*.podspec",
81
+ "/jest-mock.js",
82
+ "/react-native.config.js",
83
+ "tsconfig.json"
84
+ ]
85
+ }
@@ -0,0 +1,11 @@
1
+ module.exports = {
2
+ dependency: {
3
+ platforms: {
4
+ android: {
5
+ packageImportPath: 'import io.invertase.notifee.NotifeePackage;',
6
+ packageInstance: 'new NotifeePackage()',
7
+ },
8
+ ios: {},
9
+ },
10
+ },
11
+ };