pushwoosh-cordova-plugin 8.3.51 → 8.3.53

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.
@@ -1,23 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const fs = require('fs');
4
- const path = require('path');
5
-
6
- module.exports = function(context) {
7
- const platforms = context.opts.platforms;
8
-
9
- if (platforms.indexOf('android') === -1) {
10
- return;
11
- }
12
-
13
- const projectRoot = context.opts.projectRoot;
14
- const sourceFile = path.join(projectRoot, 'google-services.json');
15
- const targetFile = path.join(projectRoot, 'platforms/android/app/google-services.json');
16
-
17
- if (fs.existsSync(sourceFile)) {
18
- fs.copyFileSync(sourceFile, targetFile);
19
- console.log('[Hook] Copied google-services.json to platforms/android/app/');
20
- } else {
21
- console.log('[Hook] Warning: google-services.json not found in project root');
22
- }
23
- };
@@ -1,43 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const fs = require('fs');
4
- const path = require('path');
5
-
6
- module.exports = function(context) {
7
- const platforms = context.opts.platforms;
8
-
9
- if (platforms.indexOf('ios') === -1) {
10
- return;
11
- }
12
-
13
- const iosPlatformRoot = path.join(context.opts.projectRoot, 'platforms', 'ios');
14
- const podfilePath = path.join(iosPlatformRoot, 'Podfile');
15
-
16
- if (!fs.existsSync(podfilePath)) {
17
- console.log('[Hook] Podfile not found, skipping VoIP pod injection');
18
- return;
19
- }
20
-
21
- let podfileContent = fs.readFileSync(podfilePath, 'utf8');
22
-
23
- // Check if PushwooshVoIP already added
24
- if (podfileContent.includes("pod 'PushwooshVoIP'")) {
25
- console.log('[Hook] PushwooshVoIP pod already present in Podfile');
26
- return;
27
- }
28
-
29
- // Find the target block and add PushwooshVoIP pod
30
- const targetRegex = /(target\s+'[^']+'\s+do[\s\S]*?pod\s+'Pushwoosh'[^\n]*\n)/;
31
-
32
- if (targetRegex.test(podfileContent)) {
33
- podfileContent = podfileContent.replace(
34
- targetRegex,
35
- "$1 pod 'PushwooshXCFramework/PushwooshVoIP'\n"
36
- );
37
-
38
- fs.writeFileSync(podfilePath, podfileContent, 'utf8');
39
- console.log('[Hook] Added PushwooshVoIP pod to Podfile');
40
- } else {
41
- console.log('[Hook] Could not find Pushwoosh pod in Podfile, skipping VoIP pod injection');
42
- }
43
- };
@@ -1,28 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const fs = require('fs');
4
- const path = require('path');
5
-
6
- module.exports = function(context) {
7
- const platforms = context.opts.platforms;
8
-
9
- if (platforms.indexOf('android') !== -1) {
10
- const androidPlatformRoot = path.join(context.opts.projectRoot, 'platforms', 'android');
11
- const localPropertiesPath = path.join(androidPlatformRoot, 'local.properties');
12
-
13
- // Android SDK path - adjust if needed
14
- const sdkPath = process.env.ANDROID_HOME ||
15
- process.env.ANDROID_SDK_ROOT ||
16
- path.join(process.env.HOME, 'Library', 'Android', 'sdk');
17
-
18
- const content = `## This file must *NOT* be checked into Version Control Systems,
19
- # as it contains information specific to your local configuration.
20
- #
21
- # Location of the SDK. This is only used by Gradle.
22
- sdk.dir=${sdkPath}
23
- `;
24
-
25
- fs.writeFileSync(localPropertiesPath, content, 'utf8');
26
- console.log('[Hook] Created local.properties with sdk.dir=' + sdkPath);
27
- }
28
- };