@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.
- package/.gitattributes +3 -0
- package/LICENSE +44 -0
- package/README.md +131 -0
- package/RNNotifee.podspec +39 -0
- package/RNNotifeeCore.podspec +33 -0
- package/android/build.gradle +116 -0
- package/android/gradle.properties +1 -0
- package/android/libs/app/notifee/core/202108261756/core-202108261756.aar +0 -0
- package/android/libs/app/notifee/core/202108261756/core-202108261756.aar.md5 +1 -0
- package/android/libs/app/notifee/core/202108261756/core-202108261756.aar.sha1 +1 -0
- package/android/libs/app/notifee/core/202108261756/core-202108261756.aar.sha256 +1 -0
- package/android/libs/app/notifee/core/202108261756/core-202108261756.aar.sha512 +1 -0
- package/android/libs/app/notifee/core/202108261756/core-202108261756.pom +9 -0
- package/android/libs/app/notifee/core/202108261756/core-202108261756.pom.md5 +1 -0
- package/android/libs/app/notifee/core/202108261756/core-202108261756.pom.sha1 +1 -0
- package/android/libs/app/notifee/core/202108261756/core-202108261756.pom.sha256 +1 -0
- package/android/libs/app/notifee/core/202108261756/core-202108261756.pom.sha512 +1 -0
- package/android/libs/app/notifee/core/maven-metadata.xml +13 -0
- package/android/libs/app/notifee/core/maven-metadata.xml.md5 +1 -0
- package/android/libs/app/notifee/core/maven-metadata.xml.sha1 +1 -0
- package/android/libs/app/notifee/core/maven-metadata.xml.sha256 +1 -0
- package/android/libs/app/notifee/core/maven-metadata.xml.sha512 +1 -0
- package/android/lint.xml +5 -0
- package/android/proguard-rules.pro +74 -0
- package/android/settings.gradle +1 -0
- package/android/src/main/AndroidManifest.xml +12 -0
- package/android/src/main/java/io/invertase/notifee/NotifeeApiModule.java +349 -0
- package/android/src/main/java/io/invertase/notifee/NotifeeEventSubscriber.java +118 -0
- package/android/src/main/java/io/invertase/notifee/NotifeeInitProvider.java +55 -0
- package/android/src/main/java/io/invertase/notifee/NotifeePackage.java +30 -0
- package/android/src/main/java/io/invertase/notifee/NotifeeReactUtils.java +244 -0
- package/app.plugin.js +1 -0
- package/dist/NotifeeApiModule.d.ts +53 -0
- package/dist/NotifeeApiModule.js +607 -0
- package/dist/NotifeeApiModule.js.map +1 -0
- package/dist/NotifeeJSEventEmitter.d.ts +3 -0
- package/dist/NotifeeJSEventEmitter.js +14 -0
- package/dist/NotifeeJSEventEmitter.js.map +1 -0
- package/dist/NotifeeNativeError.d.ts +15 -0
- package/dist/NotifeeNativeError.js +61 -0
- package/dist/NotifeeNativeError.js.map +1 -0
- package/dist/NotifeeNativeModule.d.ts +14 -0
- package/dist/NotifeeNativeModule.js +43 -0
- package/dist/NotifeeNativeModule.js.map +1 -0
- package/dist/NotifeeNativeModule.web.d.ts +12 -0
- package/dist/NotifeeNativeModule.web.js +19 -0
- package/dist/NotifeeNativeModule.web.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +43 -0
- package/dist/index.js.map +1 -0
- package/dist/types/Library.d.ts +21 -0
- package/dist/types/Library.js +6 -0
- package/dist/types/Library.js.map +1 -0
- package/dist/types/Module.d.ts +572 -0
- package/dist/types/Module.js +6 -0
- package/dist/types/Module.js.map +1 -0
- package/dist/types/Notification.d.ts +450 -0
- package/dist/types/Notification.js +105 -0
- package/dist/types/Notification.js.map +1 -0
- package/dist/types/NotificationAndroid.d.ts +1276 -0
- package/dist/types/NotificationAndroid.js +380 -0
- package/dist/types/NotificationAndroid.js.map +1 -0
- package/dist/types/NotificationIOS.d.ts +537 -0
- package/dist/types/NotificationIOS.js +92 -0
- package/dist/types/NotificationIOS.js.map +1 -0
- package/dist/types/NotificationWeb.d.ts +5 -0
- package/dist/types/NotificationWeb.js +3 -0
- package/dist/types/NotificationWeb.js.map +1 -0
- package/dist/types/PowerManagerInfo.d.ts +36 -0
- package/dist/types/PowerManagerInfo.js +6 -0
- package/dist/types/PowerManagerInfo.js.map +1 -0
- package/dist/types/Trigger.d.ts +108 -0
- package/dist/types/Trigger.js +39 -0
- package/dist/types/Trigger.js.map +1 -0
- package/dist/utils/id.d.ts +1 -0
- package/dist/utils/id.js +16 -0
- package/dist/utils/id.js.map +1 -0
- package/dist/utils/index.d.ts +16 -0
- package/dist/utils/index.js +52 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/validate.d.ts +15 -0
- package/dist/utils/validate.js +93 -0
- package/dist/utils/validate.js.map +1 -0
- package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfo.d.ts +2 -0
- package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfo.js +39 -0
- package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfo.js.map +1 -0
- package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfoPerson.d.ts +2 -0
- package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfoPerson.js +27 -0
- package/dist/validators/iosCommunicationInfo/validateIOSCommunicationInfoPerson.js.map +1 -0
- package/dist/validators/validate.d.ts +25 -0
- package/dist/validators/validate.js +75 -0
- package/dist/validators/validate.js.map +1 -0
- package/dist/validators/validateAndroidAction.d.ts +2 -0
- package/dist/validators/validateAndroidAction.js +52 -0
- package/dist/validators/validateAndroidAction.js.map +1 -0
- package/dist/validators/validateAndroidChannel.d.ts +2 -0
- package/dist/validators/validateAndroidChannel.js +155 -0
- package/dist/validators/validateAndroidChannel.js.map +1 -0
- package/dist/validators/validateAndroidChannelGroup.d.ts +2 -0
- package/dist/validators/validateAndroidChannelGroup.js +42 -0
- package/dist/validators/validateAndroidChannelGroup.js.map +1 -0
- package/dist/validators/validateAndroidFullScreenAction.d.ts +2 -0
- package/dist/validators/validateAndroidFullScreenAction.js +50 -0
- package/dist/validators/validateAndroidFullScreenAction.js.map +1 -0
- package/dist/validators/validateAndroidInput.d.ts +2 -0
- package/dist/validators/validateAndroidInput.js +54 -0
- package/dist/validators/validateAndroidInput.js.map +1 -0
- package/dist/validators/validateAndroidNotification.d.ts +2 -0
- package/dist/validators/validateAndroidNotification.js +529 -0
- package/dist/validators/validateAndroidNotification.js.map +1 -0
- package/dist/validators/validateAndroidPressAction.d.ts +2 -0
- package/dist/validators/validateAndroidPressAction.js +50 -0
- package/dist/validators/validateAndroidPressAction.js.map +1 -0
- package/dist/validators/validateAndroidStyle.d.ts +22 -0
- package/dist/validators/validateAndroidStyle.js +231 -0
- package/dist/validators/validateAndroidStyle.js.map +1 -0
- package/dist/validators/validateIOSAttachment.d.ts +6 -0
- package/dist/validators/validateIOSAttachment.js +102 -0
- package/dist/validators/validateIOSAttachment.js.map +1 -0
- package/dist/validators/validateIOSCategory.d.ts +2 -0
- package/dist/validators/validateIOSCategory.js +124 -0
- package/dist/validators/validateIOSCategory.js.map +1 -0
- package/dist/validators/validateIOSCategoryAction.d.ts +2 -0
- package/dist/validators/validateIOSCategoryAction.js +59 -0
- package/dist/validators/validateIOSCategoryAction.js.map +1 -0
- package/dist/validators/validateIOSInput.d.ts +2 -0
- package/dist/validators/validateIOSInput.js +32 -0
- package/dist/validators/validateIOSInput.js.map +1 -0
- package/dist/validators/validateIOSNotification.d.ts +2 -0
- package/dist/validators/validateIOSNotification.js +211 -0
- package/dist/validators/validateIOSNotification.js.map +1 -0
- package/dist/validators/validateIOSPermissions.d.ts +2 -0
- package/dist/validators/validateIOSPermissions.js +62 -0
- package/dist/validators/validateIOSPermissions.js.map +1 -0
- package/dist/validators/validateNotification.d.ts +11 -0
- package/dist/validators/validateNotification.js +129 -0
- package/dist/validators/validateNotification.js.map +1 -0
- package/dist/validators/validateTrigger.d.ts +2 -0
- package/dist/validators/validateTrigger.js +104 -0
- package/dist/validators/validateTrigger.js.map +1 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js.map +1 -0
- package/ios/NotifeeCore/Info.plist +22 -0
- package/ios/NotifeeCore/NotifeeCore+NSNotificationCenter.h +28 -0
- package/ios/NotifeeCore/NotifeeCore+NSNotificationCenter.m +72 -0
- package/ios/NotifeeCore/NotifeeCore+NSURLSession.h +25 -0
- package/ios/NotifeeCore/NotifeeCore+NSURLSession.m +55 -0
- package/ios/NotifeeCore/NotifeeCore+UNUserNotificationCenter.h +37 -0
- package/ios/NotifeeCore/NotifeeCore+UNUserNotificationCenter.m +242 -0
- package/ios/NotifeeCore/NotifeeCore.h +118 -0
- package/ios/NotifeeCore/NotifeeCore.m +784 -0
- package/ios/NotifeeCore/NotifeeCoreDelegateHolder.h +34 -0
- package/ios/NotifeeCore/NotifeeCoreDelegateHolder.m +70 -0
- package/ios/NotifeeCore/NotifeeCoreDownloadDelegate.h +39 -0
- package/ios/NotifeeCore/NotifeeCoreDownloadDelegate.m +68 -0
- package/ios/NotifeeCore/NotifeeCoreExtensionHelper.h +38 -0
- package/ios/NotifeeCore/NotifeeCoreExtensionHelper.m +224 -0
- package/ios/NotifeeCore/NotifeeCoreUtil.h +82 -0
- package/ios/NotifeeCore/NotifeeCoreUtil.m +793 -0
- package/ios/RNNotifee/NotifeeApiModule.h +25 -0
- package/ios/RNNotifee/NotifeeApiModule.m +371 -0
- package/ios/RNNotifee/NotifeeExtensionHelper.h +37 -0
- package/ios/RNNotifee/NotifeeExtensionHelper.m +37 -0
- package/ios/RNNotifee.xcodeproj/project.pbxproj +318 -0
- package/jest-mock.js +158 -0
- package/package.json +59 -0
- package/plugin/build/index.d.ts +3 -0
- package/plugin/build/index.js +12 -0
- package/plugin/build/index.js.map +1 -0
- package/plugin/build/withNotifeeProjectGradlePlugin.d.ts +5 -0
- package/plugin/build/withNotifeeProjectGradlePlugin.js +24 -0
- package/plugin/build/withNotifeeProjectGradlePlugin.js.map +1 -0
- package/plugin/src/index.ts +9 -0
- package/plugin/src/withNotifeeProjectGradlePlugin.ts +27 -0
- package/plugin/tsconfig.json +9 -0
- package/react-native.config.js +11 -0
- package/refresh-example.sh +71 -0
- package/src/NotifeeApiModule.ts +825 -0
- package/src/NotifeeJSEventEmitter.ts +11 -0
- package/src/NotifeeNativeError.ts +70 -0
- package/src/NotifeeNativeModule.ts +55 -0
- package/src/NotifeeNativeModule.web.ts +25 -0
- package/src/index.ts +33 -0
- package/src/types/Library.ts +28 -0
- package/src/types/Module.ts +625 -0
- package/src/types/Notification.ts +505 -0
- package/src/types/NotificationAndroid.ts +1443 -0
- package/src/types/NotificationIOS.ts +681 -0
- package/src/types/NotificationWeb.ts +5 -0
- package/src/types/PowerManagerInfo.ts +43 -0
- package/src/types/Trigger.ts +118 -0
- package/src/utils/id.ts +13 -0
- package/src/utils/index.ts +47 -0
- package/src/utils/validate.ts +92 -0
- package/src/validators/iosCommunicationInfo/validateIOSCommunicationInfo.ts +45 -0
- package/src/validators/iosCommunicationInfo/validateIOSCommunicationInfoPerson.ts +33 -0
- package/src/validators/validate.ts +85 -0
- package/src/validators/validateAndroidAction.ts +54 -0
- package/src/validators/validateAndroidChannel.ts +188 -0
- package/src/validators/validateAndroidChannelGroup.ts +49 -0
- package/src/validators/validateAndroidFullScreenAction.ts +65 -0
- package/src/validators/validateAndroidInput.ts +67 -0
- package/src/validators/validateAndroidNotification.ts +704 -0
- package/src/validators/validateAndroidPressAction.ts +65 -0
- package/src/validators/validateAndroidStyle.ts +315 -0
- package/src/validators/validateIOSAttachment.ts +136 -0
- package/src/validators/validateIOSCategory.ts +150 -0
- package/src/validators/validateIOSCategoryAction.ts +65 -0
- package/src/validators/validateIOSInput.ts +38 -0
- package/src/validators/validateIOSNotification.ts +296 -0
- package/src/validators/validateIOSPermissions.ts +78 -0
- package/src/validators/validateNotification.ts +156 -0
- package/src/validators/validateTrigger.ts +134 -0
- package/src/version.ts +2 -0
- package/tsconfig.json +23 -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
|
+
}
|
package/jest-mock.js
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mock implementation for test runners.
|
|
3
|
+
*
|
|
4
|
+
* Example:
|
|
5
|
+
*
|
|
6
|
+
* ```js
|
|
7
|
+
* jest.mock('@notifee/react-native', () => require('@notifee/react-native/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 TriggerType from './dist/types/Trigger';
|
|
15
|
+
|
|
16
|
+
export * from './dist/types/Library';
|
|
17
|
+
export * from './dist/types/Notification';
|
|
18
|
+
export * from './dist/types/Trigger';
|
|
19
|
+
export * from './dist/types/NotificationIOS';
|
|
20
|
+
export * from './dist/types/NotificationAndroid';
|
|
21
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
22
|
+
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
23
|
+
/* eslint-disable no-undef */
|
|
24
|
+
export const testNotification = {
|
|
25
|
+
id: 'test-id',
|
|
26
|
+
title: 'test-title',
|
|
27
|
+
body: 'test-body',
|
|
28
|
+
android: {
|
|
29
|
+
channelId: 'default',
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const testChannel = {
|
|
34
|
+
id: 'channel-id',
|
|
35
|
+
name: 'channel-name',
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const testChannelGroup = {
|
|
39
|
+
id: 'channel-group-id',
|
|
40
|
+
name: 'channel-group',
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const testTrigger = {
|
|
44
|
+
type: 'TIMESTAMP',
|
|
45
|
+
timestamp: new Date(Date.now()).getTime(),
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const testTriggerNotificationIds = ['trigger1', 'trigger2'];
|
|
49
|
+
|
|
50
|
+
export const testTriggerNotifications = [
|
|
51
|
+
{
|
|
52
|
+
notification: testNotification,
|
|
53
|
+
trigger: testTrigger,
|
|
54
|
+
},
|
|
55
|
+
];
|
|
56
|
+
|
|
57
|
+
export const testDisplayedNotifications = [
|
|
58
|
+
{
|
|
59
|
+
id: testNotification.id,
|
|
60
|
+
date: testTrigger.timestamp,
|
|
61
|
+
notification: testNotification,
|
|
62
|
+
trigger: testTrigger,
|
|
63
|
+
},
|
|
64
|
+
];
|
|
65
|
+
|
|
66
|
+
export const testCategory = {
|
|
67
|
+
id: 'test-category',
|
|
68
|
+
actions: [
|
|
69
|
+
{
|
|
70
|
+
id: 'test-action',
|
|
71
|
+
title: 'Test',
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
allowInCarPlay: false,
|
|
75
|
+
allowAnnouncement: false,
|
|
76
|
+
hiddenPreviewsShowTitle: false,
|
|
77
|
+
hiddenPreviewsShowSubtitle: false,
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export const testNotificationSettings = {
|
|
81
|
+
authorizationStatus: Notification.AuthorizationStatus.AUTHORIZED,
|
|
82
|
+
android: {
|
|
83
|
+
alarm: NotificationAndroid.AndroidNotificationSetting.ENABLED,
|
|
84
|
+
},
|
|
85
|
+
ios: {
|
|
86
|
+
alert: true,
|
|
87
|
+
badge: true,
|
|
88
|
+
sound: true,
|
|
89
|
+
carPlay: true,
|
|
90
|
+
criticalAlert: true,
|
|
91
|
+
provisional: true,
|
|
92
|
+
lockScreen: true,
|
|
93
|
+
notificationCenter: true,
|
|
94
|
+
showPreviews: true,
|
|
95
|
+
inAppNotificationSettings: true,
|
|
96
|
+
authorizationStatus: Notification.AuthorizationStatus.AUTHORIZED,
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export const testBadgeCount = 1;
|
|
101
|
+
|
|
102
|
+
export const testPowerManagerSettings = {
|
|
103
|
+
activity: 'test-activity',
|
|
104
|
+
manufacturer: 'test-manufacturer',
|
|
105
|
+
model: 'test-model',
|
|
106
|
+
version: 'test-version',
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export default {
|
|
110
|
+
SDK_VERSION,
|
|
111
|
+
AndroidNotificationSetting: NotificationAndroid.AndroidNotificationSetting,
|
|
112
|
+
TriggerType,
|
|
113
|
+
displayNotification: jest.fn(async notification => notification?.id || testNotification.id),
|
|
114
|
+
createTriggerNotification: jest.fn(
|
|
115
|
+
async (notification, _) => notification?.id || testNotification.id,
|
|
116
|
+
),
|
|
117
|
+
getChannel: jest.fn(async id => ({
|
|
118
|
+
...testChannel,
|
|
119
|
+
id,
|
|
120
|
+
})),
|
|
121
|
+
getChannels: jest.fn(async () => [testChannel]),
|
|
122
|
+
getChannelGroup: jest.fn(async () => testChannelGroup),
|
|
123
|
+
getChannelGroups: jest.fn(async () => [testChannelGroup]),
|
|
124
|
+
isChannelBlocked: jest.fn(async () => false),
|
|
125
|
+
isChannelCreated: jest.fn(async () => true),
|
|
126
|
+
getTriggerNotificationIds: jest.fn(async () => testTriggerNotificationIds),
|
|
127
|
+
getDisplayedNotifications: jest.fn(async () => testDisplayedNotifications),
|
|
128
|
+
getTriggerNotifications: jest.fn(async () => testTriggerNotifications),
|
|
129
|
+
cancelAllNotifications: jest.fn(async () => {}),
|
|
130
|
+
cancelDisplayedNotifications: jest.fn(async () => {}),
|
|
131
|
+
cancelTriggerNotifications: jest.fn(async () => {}),
|
|
132
|
+
cancelNotification: jest.fn(async () => {}),
|
|
133
|
+
cancelDisplayedNotification: jest.fn(async () => {}),
|
|
134
|
+
cancelTriggerNotification: jest.fn(async () => {}),
|
|
135
|
+
createChannel: jest.fn(async channel => channel?.id || testChannel.id),
|
|
136
|
+
createChannelGroup: jest.fn(async channelGroup => channelGroup?.id || testChannelGroup.id),
|
|
137
|
+
createChannelGroups: jest.fn(async () => {}),
|
|
138
|
+
deleteChannel: jest.fn(async () => {}),
|
|
139
|
+
getInitialNotification: jest.fn(async () => testNotification),
|
|
140
|
+
onBackgroundEvent: jest.fn(),
|
|
141
|
+
onForegroundEvent: jest.fn(),
|
|
142
|
+
openNotificationSettings: jest.fn(),
|
|
143
|
+
requestPermission: jest.fn(async () => testNotificationSettings),
|
|
144
|
+
registerForegroundService: jest.fn(),
|
|
145
|
+
setNotificationCategories: jest.fn(async () => {}),
|
|
146
|
+
getNotificationCategories: jest.fn(async () => [testCategory]),
|
|
147
|
+
getNotificationSettings: jest.fn(async () => testNotificationSettings),
|
|
148
|
+
getBadgeCount: jest.fn(async () => testBadgeCount),
|
|
149
|
+
setBadgeCount: jest.fn(async () => {}),
|
|
150
|
+
incrementBadgeCount: jest.fn(async () => {}),
|
|
151
|
+
decrementBadgeCount: jest.fn(async () => {}),
|
|
152
|
+
isBatteryOptimizationEnabled: jest.fn(async () => true),
|
|
153
|
+
openBatteryOptimizationSettings: jest.fn(async () => {}),
|
|
154
|
+
getPowerManagerInfo: jest.fn(async () => {}),
|
|
155
|
+
openPowerManagerSettings: jest.fn(async () => testPowerManagerSettings),
|
|
156
|
+
stopForegroundService: jest.fn(async () => {}),
|
|
157
|
+
hideNotificationDrawer: jest.fn(async () => {}),
|
|
158
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ammarahmed/notifee-react-native",
|
|
3
|
+
"version": "7.3.0",
|
|
4
|
+
"author": "Invertase <oss@invertase.io> (http://invertase.io)",
|
|
5
|
+
"description": "Notifee - a feature rich notifications library for React Native.",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"validate:all:js": "eslint . --ext .js,.jsx,.ts,.tsx --resolve-plugins-relative-to .",
|
|
10
|
+
"validate:all:ts": "tsc --project ./",
|
|
11
|
+
"build": "genversion --es6 --semi src/version.ts && tsc",
|
|
12
|
+
"build:clean": "rimraf android/libs && rimraf android/build && rimraf ios/build && rimraf dist",
|
|
13
|
+
"build:watch": "tsc --watch",
|
|
14
|
+
"build:plugin": "rimraf plugin/build && tsc --build plugin",
|
|
15
|
+
"prepare": "yarn run build && yarn run build:plugin",
|
|
16
|
+
"prepublishOnly": "cd ../.. && yarn run build:core",
|
|
17
|
+
"format:android": "google-java-format --replace -i $(find . -type f -name \"*.java\")",
|
|
18
|
+
"format:ios": "npm_config_yes=true npx clang-format -i --glob=\"*/**/*.{h,cpp,m,mm}\" --style=Google"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@expo/config-plugins": "^4.1.0",
|
|
22
|
+
"@types/react-native": "0.67.2",
|
|
23
|
+
"@typescript-eslint/eslint-plugin": "^5.14.0",
|
|
24
|
+
"@typescript-eslint/parser": "^5.14.0",
|
|
25
|
+
"eslint": "^7.32.0",
|
|
26
|
+
"eslint-config-prettier": "^8.5.0",
|
|
27
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
28
|
+
"genversion": "^3.0.2",
|
|
29
|
+
"prettier": "^2.5.1",
|
|
30
|
+
"rimraf": "^3.0.2",
|
|
31
|
+
"typedoc": "^0.22.13",
|
|
32
|
+
"typedoc-plugin-markdown": "^3.11.14",
|
|
33
|
+
"typescript": "^4.6.2"
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"react-native": "*"
|
|
37
|
+
},
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "https://github.com/invertase/notifee"
|
|
41
|
+
},
|
|
42
|
+
"license": "Apache-2.0",
|
|
43
|
+
"keywords": [
|
|
44
|
+
"react",
|
|
45
|
+
"react-native",
|
|
46
|
+
"scheduling",
|
|
47
|
+
"channels",
|
|
48
|
+
"android",
|
|
49
|
+
"ios",
|
|
50
|
+
"firebase",
|
|
51
|
+
"fcm",
|
|
52
|
+
"notifee",
|
|
53
|
+
"notifications",
|
|
54
|
+
"onesignal"
|
|
55
|
+
],
|
|
56
|
+
"publishConfig": {
|
|
57
|
+
"access": "public"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const config_plugins_1 = require("@expo/config-plugins");
|
|
7
|
+
const withNotifeeProjectGradlePlugin_1 = __importDefault(require("./withNotifeeProjectGradlePlugin"));
|
|
8
|
+
const withNotifee = config => {
|
|
9
|
+
return (0, config_plugins_1.withPlugins)(config, [withNotifeeProjectGradlePlugin_1.default]);
|
|
10
|
+
};
|
|
11
|
+
exports.default = withNotifee;
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,yDAAiE;AAEjE,sGAA8E;AAE9E,MAAM,WAAW,GAAiB,MAAM,CAAC,EAAE;IACzC,OAAO,IAAA,4BAAW,EAAC,MAAM,EAAE,CAAC,wCAA8B,CAAC,CAAC,CAAC;AAC/D,CAAC,CAAC;AAEF,kBAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setCompileSdkVersion = void 0;
|
|
4
|
+
const config_plugins_1 = require("@expo/config-plugins");
|
|
5
|
+
const withNotifeeProjectGradlePlugin = config => {
|
|
6
|
+
return (0, config_plugins_1.withProjectBuildGradle)(config, ({ modResults, ...subConfig }) => {
|
|
7
|
+
if (modResults.language !== 'groovy') {
|
|
8
|
+
config_plugins_1.WarningAggregator.addWarningAndroid('withNotifee', `Cannot automatically configure project build.gradle if it's not groovy`);
|
|
9
|
+
return { modResults, ...subConfig };
|
|
10
|
+
}
|
|
11
|
+
modResults.contents = setCompileSdkVersion(modResults.contents);
|
|
12
|
+
return { modResults, ...subConfig };
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
const setCompileSdkVersion = (buildGradle) => {
|
|
16
|
+
const pattern = /compileSdkVersion = 30/g;
|
|
17
|
+
if (!buildGradle.match(pattern)) {
|
|
18
|
+
return buildGradle;
|
|
19
|
+
}
|
|
20
|
+
return buildGradle.replace(/compileSdkVersion = 30/, `compileSdkVersion = 33`);
|
|
21
|
+
};
|
|
22
|
+
exports.setCompileSdkVersion = setCompileSdkVersion;
|
|
23
|
+
exports.default = withNotifeeProjectGradlePlugin;
|
|
24
|
+
//# sourceMappingURL=withNotifeeProjectGradlePlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withNotifeeProjectGradlePlugin.js","sourceRoot":"","sources":["../src/withNotifeeProjectGradlePlugin.ts"],"names":[],"mappings":";;;AAAA,yDAA+F;AAE/F,MAAM,8BAA8B,GAAiB,MAAM,CAAC,EAAE;IAC5D,OAAO,IAAA,uCAAsB,EAAC,MAAM,EAAE,CAAC,EAAE,UAAU,EAAE,GAAG,SAAS,EAAE,EAAE,EAAE;QACrE,IAAI,UAAU,CAAC,QAAQ,KAAK,QAAQ,EAAE;YACpC,kCAAiB,CAAC,iBAAiB,CACjC,aAAa,EACb,wEAAwE,CACzE,CAAC;YACF,OAAO,EAAE,UAAU,EAAE,GAAG,SAAS,EAAE,CAAC;SACrC;QAED,UAAU,CAAC,QAAQ,GAAG,oBAAoB,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QAChE,OAAO,EAAE,UAAU,EAAE,GAAG,SAAS,EAAE,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,oBAAoB,GAAG,CAAC,WAAmB,EAAU,EAAE;IAC3D,MAAM,OAAO,GAAG,yBAAyB,CAAC;IAC1C,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE;QAC/B,OAAO,WAAW,CAAC;KACpB;IACD,OAAO,WAAW,CAAC,OAAO,CAAC,wBAAwB,EAAE,wBAAwB,CAAC,CAAC;AACjF,CAAC,CAAC;AAEO,oDAAoB;AAC7B,kBAAe,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ConfigPlugin, withPlugins } from '@expo/config-plugins';
|
|
2
|
+
|
|
3
|
+
import withNotifeeProjectGradlePlugin from './withNotifeeProjectGradlePlugin';
|
|
4
|
+
|
|
5
|
+
const withNotifee: ConfigPlugin = config => {
|
|
6
|
+
return withPlugins(config, [withNotifeeProjectGradlePlugin]);
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default withNotifee;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ConfigPlugin, WarningAggregator, withProjectBuildGradle } from '@expo/config-plugins';
|
|
2
|
+
|
|
3
|
+
const withNotifeeProjectGradlePlugin: ConfigPlugin = config => {
|
|
4
|
+
return withProjectBuildGradle(config, ({ modResults, ...subConfig }) => {
|
|
5
|
+
if (modResults.language !== 'groovy') {
|
|
6
|
+
WarningAggregator.addWarningAndroid(
|
|
7
|
+
'withNotifee',
|
|
8
|
+
`Cannot automatically configure project build.gradle if it's not groovy`,
|
|
9
|
+
);
|
|
10
|
+
return { modResults, ...subConfig };
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
modResults.contents = setCompileSdkVersion(modResults.contents);
|
|
14
|
+
return { modResults, ...subConfig };
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const setCompileSdkVersion = (buildGradle: string): string => {
|
|
19
|
+
const pattern = /compileSdkVersion = 30/g;
|
|
20
|
+
if (!buildGradle.match(pattern)) {
|
|
21
|
+
return buildGradle;
|
|
22
|
+
}
|
|
23
|
+
return buildGradle.replace(/compileSdkVersion = 30/, `compileSdkVersion = 33`);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export { setCompileSdkVersion };
|
|
27
|
+
export default withNotifeeProjectGradlePlugin;
|