react-native-acoustic-mobile-push-snooze-beta 3.8.17
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/README.md +45 -0
- package/android/android-react-native-acoustic-mobile-push-snooze.iml +217 -0
- package/android/build.gradle +39 -0
- package/android/react-native-acoustic-mobile-push-snooze.iml +218 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/java/co/acoustic/mobile/push/plugin/snooze/RNAcousticMobilePushSnoozeModule.java +51 -0
- package/android/src/main/java/co/acoustic/mobile/push/plugin/snooze/RNAcousticMobilePushSnoozePackage.java +37 -0
- package/android/src/main/java/co/acoustic/mobile/push/plugin/snooze/SnoozeAction.java +88 -0
- package/android/src/main/java/co/acoustic/mobile/push/plugin/snooze/SnoozeIntentService.java +66 -0
- package/ios/RNAcousticMobilePushSnooze.h +16 -0
- package/ios/RNAcousticMobilePushSnooze.m +106 -0
- package/ios/RNAcousticMobilePushSnooze.xcodeproj/project.pbxproj +278 -0
- package/ios/RNAcousticMobilePushSnooze.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/ios/RNAcousticMobilePushSnooze.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/ios/RNAcousticMobilePushSnooze.xcodeproj/project.xcworkspace/xcuserdata/buchmanj.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/RNAcousticMobilePushSnooze.xcodeproj/xcshareddata/xcschemes/RNAcousticMobilePushSnooze.xcscheme +80 -0
- package/ios/RNAcousticMobilePushSnooze.xcodeproj/xcuserdata/buchmanj.xcuserdatad/xcschemes/xcschememanagement.plist +27 -0
- package/ios/RNAcousticMobilePushSnooze.xcworkspace/contents.xcworkspacedata +9 -0
- package/package.json +39 -0
- package/postinstall.js +94 -0
- package/react-native-acoustic-mobile-push-snooze.podspec +23 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<Scheme
|
|
3
|
+
LastUpgradeVersion = "1020"
|
|
4
|
+
version = "1.3">
|
|
5
|
+
<BuildAction
|
|
6
|
+
parallelizeBuildables = "YES"
|
|
7
|
+
buildImplicitDependencies = "YES">
|
|
8
|
+
<BuildActionEntries>
|
|
9
|
+
<BuildActionEntry
|
|
10
|
+
buildForTesting = "YES"
|
|
11
|
+
buildForRunning = "YES"
|
|
12
|
+
buildForProfiling = "YES"
|
|
13
|
+
buildForArchiving = "YES"
|
|
14
|
+
buildForAnalyzing = "YES">
|
|
15
|
+
<BuildableReference
|
|
16
|
+
BuildableIdentifier = "primary"
|
|
17
|
+
BlueprintIdentifier = "58B511DA1A9E6C8500147676"
|
|
18
|
+
BuildableName = "libRNMobilePushCalendar.a"
|
|
19
|
+
BlueprintName = "RNMobilePushCalendar"
|
|
20
|
+
ReferencedContainer = "container:RNMobilePushCalendar.xcodeproj">
|
|
21
|
+
</BuildableReference>
|
|
22
|
+
</BuildActionEntry>
|
|
23
|
+
</BuildActionEntries>
|
|
24
|
+
</BuildAction>
|
|
25
|
+
<TestAction
|
|
26
|
+
buildConfiguration = "Debug"
|
|
27
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
28
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
29
|
+
shouldUseLaunchSchemeArgsEnv = "YES">
|
|
30
|
+
<Testables>
|
|
31
|
+
</Testables>
|
|
32
|
+
<AdditionalOptions>
|
|
33
|
+
</AdditionalOptions>
|
|
34
|
+
</TestAction>
|
|
35
|
+
<LaunchAction
|
|
36
|
+
buildConfiguration = "Debug"
|
|
37
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
38
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
39
|
+
launchStyle = "0"
|
|
40
|
+
useCustomWorkingDirectory = "NO"
|
|
41
|
+
ignoresPersistentStateOnLaunch = "NO"
|
|
42
|
+
debugDocumentVersioning = "YES"
|
|
43
|
+
debugServiceExtension = "internal"
|
|
44
|
+
allowLocationSimulation = "YES">
|
|
45
|
+
<MacroExpansion>
|
|
46
|
+
<BuildableReference
|
|
47
|
+
BuildableIdentifier = "primary"
|
|
48
|
+
BlueprintIdentifier = "58B511DA1A9E6C8500147676"
|
|
49
|
+
BuildableName = "libRNMobilePushCalendar.a"
|
|
50
|
+
BlueprintName = "RNMobilePushCalendar"
|
|
51
|
+
ReferencedContainer = "container:RNMobilePushCalendar.xcodeproj">
|
|
52
|
+
</BuildableReference>
|
|
53
|
+
</MacroExpansion>
|
|
54
|
+
<AdditionalOptions>
|
|
55
|
+
</AdditionalOptions>
|
|
56
|
+
</LaunchAction>
|
|
57
|
+
<ProfileAction
|
|
58
|
+
buildConfiguration = "Release"
|
|
59
|
+
shouldUseLaunchSchemeArgsEnv = "YES"
|
|
60
|
+
savedToolIdentifier = ""
|
|
61
|
+
useCustomWorkingDirectory = "NO"
|
|
62
|
+
debugDocumentVersioning = "YES">
|
|
63
|
+
<MacroExpansion>
|
|
64
|
+
<BuildableReference
|
|
65
|
+
BuildableIdentifier = "primary"
|
|
66
|
+
BlueprintIdentifier = "58B511DA1A9E6C8500147676"
|
|
67
|
+
BuildableName = "libRNMobilePushCalendar.a"
|
|
68
|
+
BlueprintName = "RNMobilePushCalendar"
|
|
69
|
+
ReferencedContainer = "container:RNMobilePushCalendar.xcodeproj">
|
|
70
|
+
</BuildableReference>
|
|
71
|
+
</MacroExpansion>
|
|
72
|
+
</ProfileAction>
|
|
73
|
+
<AnalyzeAction
|
|
74
|
+
buildConfiguration = "Debug">
|
|
75
|
+
</AnalyzeAction>
|
|
76
|
+
<ArchiveAction
|
|
77
|
+
buildConfiguration = "Release"
|
|
78
|
+
revealArchiveInOrganizer = "YES">
|
|
79
|
+
</ArchiveAction>
|
|
80
|
+
</Scheme>
|
|
@@ -0,0 +1,27 @@
|
|
|
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>SchemeUserState</key>
|
|
6
|
+
<dict>
|
|
7
|
+
<key>RNAcousticMobilePushSnooze.xcscheme_^#shared#^_</key>
|
|
8
|
+
<dict>
|
|
9
|
+
<key>orderHint</key>
|
|
10
|
+
<integer>10</integer>
|
|
11
|
+
</dict>
|
|
12
|
+
<key>RNIbmMobilePushCalendarCalendar.xcscheme_^#shared#^_</key>
|
|
13
|
+
<dict>
|
|
14
|
+
<key>orderHint</key>
|
|
15
|
+
<integer>48</integer>
|
|
16
|
+
</dict>
|
|
17
|
+
</dict>
|
|
18
|
+
<key>SuppressBuildableAutocreation</key>
|
|
19
|
+
<dict>
|
|
20
|
+
<key>58B511DA1A9E6C8500147676</key>
|
|
21
|
+
<dict>
|
|
22
|
+
<key>primary</key>
|
|
23
|
+
<true/>
|
|
24
|
+
</dict>
|
|
25
|
+
</dict>
|
|
26
|
+
</dict>
|
|
27
|
+
</plist>
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"author": "Acoustic, L.P.",
|
|
3
|
+
"dependencies": {
|
|
4
|
+
"chalk": "^2.4.2",
|
|
5
|
+
"ncp": "^2.0.0",
|
|
6
|
+
"plist": "^3.0.1",
|
|
7
|
+
"xcode": "^2.0.0",
|
|
8
|
+
"xml2js": "^0.4.19"
|
|
9
|
+
},
|
|
10
|
+
"description": "BETA: Acoustic Mobile Push Snooze Action Plugin",
|
|
11
|
+
"devDependencies": {
|
|
12
|
+
"jetifier": "^1.6.3"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://github.com/aipoweredmarketer/ca-mce-react-native",
|
|
15
|
+
"keywords": [
|
|
16
|
+
"react-native",
|
|
17
|
+
"ios",
|
|
18
|
+
"android",
|
|
19
|
+
"mobile push snooze action",
|
|
20
|
+
"Campaign"
|
|
21
|
+
],
|
|
22
|
+
"license": "See license in ../../../license.txt",
|
|
23
|
+
"main": "index.js",
|
|
24
|
+
"name": "react-native-acoustic-mobile-push-snooze-beta",
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"react-native-acoustic-mobile-push-beta": "3.8.17"
|
|
27
|
+
},
|
|
28
|
+
"repository": {
|
|
29
|
+
"directory": "plugins/react-native-acoustic-mobile-push-snooze",
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "https://github.com/aipoweredmarketer/ca-mce-react-native"
|
|
32
|
+
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"postinstall": "node postinstall.js $INIT_CWD",
|
|
35
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
36
|
+
},
|
|
37
|
+
"summary": "react-native ios android mobile push Campaign",
|
|
38
|
+
"version": "3.8.17"
|
|
39
|
+
}
|
package/postinstall.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright © 2019, 2023 Acoustic, L.P. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* NOTICE: This file contains material that is confidential and proprietary to
|
|
5
|
+
* Acoustic, L.P. and/or other developers. No license is granted under any intellectual or
|
|
6
|
+
* industrial property rights of Acoustic, L.P. except as may be provided in an agreement with
|
|
7
|
+
* Acoustic, L.P. Any unauthorized copying or distribution of content from this file is
|
|
8
|
+
* prohibited.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const fs = require('fs');
|
|
12
|
+
const path = require('path');
|
|
13
|
+
const xml2js = require('xml2js');
|
|
14
|
+
const chalk = require('chalk');
|
|
15
|
+
|
|
16
|
+
function findInstallDirectory() {
|
|
17
|
+
if(process.env.MCE_RN_DIRECTORY) {
|
|
18
|
+
console.log(chalk.yellow.bold("Using MCE_RN_DIRECTORY override instead of finding the application source directory."))
|
|
19
|
+
return process.env.MCE_RN_DIRECTORY;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Mac
|
|
23
|
+
var currentDirectory = process.argv[ process.argv.length-1 ];
|
|
24
|
+
if(currentDirectory != "$INIT_CWD") {
|
|
25
|
+
return currentDirectory;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Windows
|
|
29
|
+
currentDirectory = process.cwd();
|
|
30
|
+
while(!fs.existsSync(path.join(currentDirectory, "app.json"))) {
|
|
31
|
+
var parentDirectory = path.dirname(currentDirectory);
|
|
32
|
+
console.log("cwd: ", currentDirectory, ", parent: ", parentDirectory);
|
|
33
|
+
if(parentDirectory == currentDirectory) {
|
|
34
|
+
console.error(chalk.red("Could not find installation directory!"));
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
currentDirectory = parentDirectory;
|
|
38
|
+
}
|
|
39
|
+
console.log("Install Directory Found:", currentDirectory);
|
|
40
|
+
|
|
41
|
+
return currentDirectory;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function containsStanza(array, stanza, type) {
|
|
45
|
+
for(var i = 0; i < array.length; i++) {
|
|
46
|
+
if(array[i]['$']['android:name'] == stanza[type]['$']['android:name']) {
|
|
47
|
+
return true
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function verifyStanza(array, stanzaString) {
|
|
54
|
+
if(typeof array == "undefined") {
|
|
55
|
+
array = [];
|
|
56
|
+
}
|
|
57
|
+
new xml2js.Parser().parseString(stanzaString, function (err, stanza) {
|
|
58
|
+
const types = Object.getOwnPropertyNames(stanza);
|
|
59
|
+
const type = types[0];
|
|
60
|
+
if( !containsStanza(array, stanza, type) ) {
|
|
61
|
+
console.log("Adding required " + type + " stanza to AndroidManifest.xml");
|
|
62
|
+
array.push( stanza[type] )
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
return array;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function modifyManifest(installDirectory) {
|
|
69
|
+
let manifestPath = path.join(installDirectory, "android", "app", "src", "main", "AndroidManifest.xml");
|
|
70
|
+
new xml2js.Parser().parseString(fs.readFileSync(manifestPath), function (err, document) {
|
|
71
|
+
|
|
72
|
+
console.log("Adding required service to Android Manifest");
|
|
73
|
+
var services = document.manifest.application[0].service;
|
|
74
|
+
var service = '<service android:name="co.acoustic.mobile.push.plugin.snooze.SnoozeIntentService" />';
|
|
75
|
+
document.manifest.application[0].service = verifyStanza(services, service);
|
|
76
|
+
|
|
77
|
+
var output = new xml2js.Builder().buildObject(document);
|
|
78
|
+
fs.writeFileSync(manifestPath, output);
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if(process.env.MCE_RN_NOCONFIG) {
|
|
83
|
+
console.log(chalk.yellow.bold("Acoustic Mobile Push Snooze Plugin installed, but will not be auto configured because MCE_RN_NOCONFIG environment flag detected."));
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
console.log(chalk.green.bold("Setting up Acoustic Mobile Push Snooze Plugin"));
|
|
88
|
+
const installDirectory = findInstallDirectory();
|
|
89
|
+
modifyManifest(installDirectory);
|
|
90
|
+
console.log(chalk.green("Installation Complete!"));
|
|
91
|
+
console.log(chalk.blue.bold("\nPost Installation Steps\n"));
|
|
92
|
+
|
|
93
|
+
console.log(chalk.blue('For react-native 0.59 and lower link the plugin with:'));
|
|
94
|
+
console.log('react-native link react-native-acoustic-mobile-push-snooze\n');
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require "json"
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
|
+
|
|
5
|
+
Pod::Spec.new do |s|
|
|
6
|
+
s.name = "react-native-acoustic-mobile-push-snooze"
|
|
7
|
+
s.version = package["version"]
|
|
8
|
+
s.summary = package["description"]
|
|
9
|
+
s.description = <<-DESC
|
|
10
|
+
react-native-acoustic-mobile-push-snooze
|
|
11
|
+
DESC
|
|
12
|
+
s.homepage = "https://github.com/Acoustic-Mobile-Push/React-Native"
|
|
13
|
+
s.license = "Copyright (c) 2019. Acoustic, L.P. All rights reserved"
|
|
14
|
+
s.authors = { "Support" => "support@acoustic.co" }
|
|
15
|
+
s.platforms = { :ios => "12.0" }
|
|
16
|
+
s.source = { :git => "https://github.com/Acoustic-Mobile-Push/React-Native.git", :tag => "#{s.version}" }
|
|
17
|
+
|
|
18
|
+
s.source_files = "ios/*.{h,m,swift}"
|
|
19
|
+
s.requires_arc = true
|
|
20
|
+
|
|
21
|
+
s.dependency "React"
|
|
22
|
+
end
|
|
23
|
+
|