codeplay-common 4.11.37 โ†’ 4.11.38

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 (39) hide show
  1. package/README.md +28 -0
  2. package/RELEASE_NOTES.md +13 -13
  3. package/files/buildCodeplay/add-splash-screen.js +1 -1
  4. package/files/buildCodeplay/ensure-current-build.cjs +42 -42
  5. package/files/buildCodeplay/fix-optimize-builld/android-r8-rules.cjs +31 -31
  6. package/files/buildCodeplay/fix-optimize-builld/ffmpeg-jni-rules.cjs +28 -28
  7. package/files/buildCodeplay/fix-optimize-builld/fix-optimize-build.gradle +9 -9
  8. package/files/buildCodeplay/fix-optimize-builld/restore-android-r8-rules.cjs +30 -30
  9. package/files/buildCodeplay/huawei-privacy-entry.js +135 -135
  10. package/files/buildCodeplay/huawei-privacy.css +22 -22
  11. package/files/buildCodeplay/ios-ad-consent.cjs +56 -56
  12. package/files/buildCodeplay/ios-emi-admob-modification.js +25 -25
  13. package/files/buildCodeplay/newly added.txt +89 -89
  14. package/files/buildCodeplay/non-google-billing.pro +3 -3
  15. package/files/buildCodeplay/release-sync.config.json +4 -4
  16. package/files/buildCodeplay/remove-force-kotlin-disable.js +43 -43
  17. package/files/buildCodeplay/ruads.cjs +220 -220
  18. package/files/buildCodeplay/saf-mediastore-dependency.cjs +21 -21
  19. package/files/buildCodeplay/setSplashAnimation.js +2 -2
  20. package/files/buildCodeplay/setup-ruads.cjs +62 -62
  21. package/files/buildCodeplay/splash-setup.cjs +88 -88
  22. package/files/buildCodeplay/store-billing.cjs +43 -43
  23. package/files/buildCodeplay/tests/huawei-live-reload.test.cjs +60 -60
  24. package/files/buildCodeplay/tests/huawei-privacy.test.cjs +49 -49
  25. package/files/scripts-common/collect-startup-profile.js +134 -0
  26. package/files/scripts-common/generate-baseline-profile.js +194 -22
  27. package/files/take-screen-image.js +4414 -4414
  28. package/package.json +1 -1
  29. package/runtime/splash-ready.mjs +52 -52
  30. package/runtime/vk-ads/vk-ad-configuration.json +39 -39
  31. package/scripts/baseline-profile.test.cjs +189 -0
  32. package/scripts/ensure-current-build.test.cjs +76 -76
  33. package/scripts/ios-ad-consent.test.cjs +99 -99
  34. package/scripts/ruads-install.test.cjs +197 -197
  35. package/scripts/ruads-policy.test.cjs +174 -174
  36. package/scripts/saf-mediastore-dependency.test.cjs +44 -44
  37. package/scripts/splash-setup.test.cjs +142 -142
  38. package/scripts/sync-files.js +1 -1
  39. package/scripts/vite-build-settings.test.cjs +93 -93
@@ -1,22 +1,22 @@
1
- .codeplay-huawei-privacy-gate {
2
- position: fixed;
3
- z-index: 2147483647;
4
- inset: 0;
5
- display: grid;
6
- place-items: center;
7
- overflow: auto;
8
- padding: calc(24px + env(safe-area-inset-top, 0px)) calc(20px + env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) calc(20px + env(safe-area-inset-left, 0px));
9
- box-sizing: border-box;
10
- background: #fff;
11
- color: #17212b;
12
- font-family: system-ui, sans-serif;
13
- }
14
- .codeplay-huawei-privacy-card { width: min(100%, 420px); }
15
- .codeplay-huawei-privacy-card h1 { margin: 0 0 16px; font-size: 24px; line-height: 1.3; }
16
- .codeplay-huawei-privacy-card p { line-height: 1.6; }
17
- .codeplay-huawei-privacy-card button { display: block; width: 100%; min-height: 48px; margin-top: 12px; border-radius: 8px; font: inherit; }
18
- .codeplay-huawei-privacy-policy { border: 0; background: transparent; color: #155fc6; text-decoration: underline; }
19
- .codeplay-huawei-privacy-agree { border: 0; background: #155fc6; color: #fff; }
20
- .codeplay-huawei-privacy-decline { border: 1px solid #8a929c; background: #fff; color: #17212b; }
21
- .codeplay-huawei-privacy-status { min-height: 1.5em; color: #9b2b20; }
22
- .codeplay-huawei-privacy-settings { display: flex; flex-direction: column; gap: 8px; }
1
+ .codeplay-huawei-privacy-gate {
2
+ position: fixed;
3
+ z-index: 2147483647;
4
+ inset: 0;
5
+ display: grid;
6
+ place-items: center;
7
+ overflow: auto;
8
+ padding: calc(24px + env(safe-area-inset-top, 0px)) calc(20px + env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) calc(20px + env(safe-area-inset-left, 0px));
9
+ box-sizing: border-box;
10
+ background: #fff;
11
+ color: #17212b;
12
+ font-family: system-ui, sans-serif;
13
+ }
14
+ .codeplay-huawei-privacy-card { width: min(100%, 420px); }
15
+ .codeplay-huawei-privacy-card h1 { margin: 0 0 16px; font-size: 24px; line-height: 1.3; }
16
+ .codeplay-huawei-privacy-card p { line-height: 1.6; }
17
+ .codeplay-huawei-privacy-card button { display: block; width: 100%; min-height: 48px; margin-top: 12px; border-radius: 8px; font: inherit; }
18
+ .codeplay-huawei-privacy-policy { border: 0; background: transparent; color: #155fc6; text-decoration: underline; }
19
+ .codeplay-huawei-privacy-agree { border: 0; background: #155fc6; color: #fff; }
20
+ .codeplay-huawei-privacy-decline { border: 1px solid #8a929c; background: #fff; color: #17212b; }
21
+ .codeplay-huawei-privacy-status { min-height: 1.5em; color: #9b2b20; }
22
+ .codeplay-huawei-privacy-settings { display: flex; flex-direction: column; gap: 8px; }
@@ -1,56 +1,56 @@
1
- // Version 1.0: keep native app lifecycle callbacks out of the UMP/ATT flow.
2
- const fs = require('node:fs');
3
- const path = require('node:path');
4
-
5
- // Only remove the known block generated by older builds. Any other native
6
- // request needs an explicit correction rather than deleting custom app code.
7
- const legacyRequest = [
8
- 'if ATTrackingManager.trackingAuthorizationStatus == .notDetermined &&',
9
- '!isTrackingAuthorizationRequestScheduled {',
10
- 'isTrackingAuthorizationRequestScheduled = true',
11
- 'DispatchQueue.main.asyncAfter(deadline: .now() + 1) { [weak self] in',
12
- 'self?.isTrackingAuthorizationRequestScheduled = false',
13
- 'guard UIApplication.shared.applicationState == .active,',
14
- 'ATTrackingManager.trackingAuthorizationStatus == .notDetermined else { return }',
15
- 'ATTrackingManager.requestTrackingAuthorization { _ in }',
16
- '}',
17
- '}',
18
- ].map(line => line.replace(/[.*+?^${}()|[\]\\]/g, '\\$&').replace(/ +/g, '\\s+')).join('\\s*');
19
-
20
- function nativeSources(directory) {
21
- if (!fs.existsSync(directory)) return [];
22
- return fs.readdirSync(directory, { withFileTypes: true }).flatMap(entry => {
23
- const file = path.join(directory, entry.name);
24
- if (entry.isDirectory()) return nativeSources(file);
25
- return entry.isFile() && /\.(?:swift|m|mm)$/.test(entry.name) ? [file] : [];
26
- });
27
- }
28
-
29
- function prepareIOSAdConsent(projectRoot, log = console.log) {
30
- const appDirectory = path.join(projectRoot, 'ios', 'App', 'App');
31
- const updates = [];
32
- for (const file of nativeSources(appDirectory)) {
33
- const original = fs.readFileSync(file, 'utf8');
34
- let content = original;
35
- if (path.basename(file) === 'SceneDelegate.swift') {
36
- content = content.replace(new RegExp(legacyRequest, 'g'), '');
37
- content = content.replace(/^[ \t]*private var isTrackingAuthorizationRequestScheduled = false\r?\n/gm, '');
38
- if (!content.includes('ATTrackingManager')) {
39
- content = content.replace(/^import AppTrackingTransparency\r?\n/gm, '');
40
- }
41
- }
42
- // Check AppDelegate and other app-owned startup code even when this app
43
- // has no SceneDelegate. The Capacitor plugin remains the single ATT owner.
44
- const executable = content.replace(/\/\*[\s\S]*?\*\//g, '').replace(/\/\/[^\r\n]*/g, '');
45
- if (/\bATTrackingManager\s*(?:\.\s*|\s+)requestTrackingAuthorization(?:WithCompletionHandler)?\b/.test(executable)) {
46
- throw new Error(`${path.relative(projectRoot, file)} requests ATT outside the regional consent flow. Remove the native startup request; @admob requests ATT after UMP completes.`);
47
- }
48
- if (content !== original) updates.push({ file, content });
49
- }
50
- // Validate every source before changing any file.
51
- for (const { file, content } of updates) fs.writeFileSync(file, content, 'utf8');
52
- log('iOS native startup checked; the ad consent flow controls ATT after UMP.');
53
- return updates.map(({ file }) => path.relative(projectRoot, file));
54
- }
55
-
56
- module.exports = { prepareIOSAdConsent };
1
+ // Version 1.0: keep native app lifecycle callbacks out of the UMP/ATT flow.
2
+ const fs = require('node:fs');
3
+ const path = require('node:path');
4
+
5
+ // Only remove the known block generated by older builds. Any other native
6
+ // request needs an explicit correction rather than deleting custom app code.
7
+ const legacyRequest = [
8
+ 'if ATTrackingManager.trackingAuthorizationStatus == .notDetermined &&',
9
+ '!isTrackingAuthorizationRequestScheduled {',
10
+ 'isTrackingAuthorizationRequestScheduled = true',
11
+ 'DispatchQueue.main.asyncAfter(deadline: .now() + 1) { [weak self] in',
12
+ 'self?.isTrackingAuthorizationRequestScheduled = false',
13
+ 'guard UIApplication.shared.applicationState == .active,',
14
+ 'ATTrackingManager.trackingAuthorizationStatus == .notDetermined else { return }',
15
+ 'ATTrackingManager.requestTrackingAuthorization { _ in }',
16
+ '}',
17
+ '}',
18
+ ].map(line => line.replace(/[.*+?^${}()|[\]\\]/g, '\\$&').replace(/ +/g, '\\s+')).join('\\s*');
19
+
20
+ function nativeSources(directory) {
21
+ if (!fs.existsSync(directory)) return [];
22
+ return fs.readdirSync(directory, { withFileTypes: true }).flatMap(entry => {
23
+ const file = path.join(directory, entry.name);
24
+ if (entry.isDirectory()) return nativeSources(file);
25
+ return entry.isFile() && /\.(?:swift|m|mm)$/.test(entry.name) ? [file] : [];
26
+ });
27
+ }
28
+
29
+ function prepareIOSAdConsent(projectRoot, log = console.log) {
30
+ const appDirectory = path.join(projectRoot, 'ios', 'App', 'App');
31
+ const updates = [];
32
+ for (const file of nativeSources(appDirectory)) {
33
+ const original = fs.readFileSync(file, 'utf8');
34
+ let content = original;
35
+ if (path.basename(file) === 'SceneDelegate.swift') {
36
+ content = content.replace(new RegExp(legacyRequest, 'g'), '');
37
+ content = content.replace(/^[ \t]*private var isTrackingAuthorizationRequestScheduled = false\r?\n/gm, '');
38
+ if (!content.includes('ATTrackingManager')) {
39
+ content = content.replace(/^import AppTrackingTransparency\r?\n/gm, '');
40
+ }
41
+ }
42
+ // Check AppDelegate and other app-owned startup code even when this app
43
+ // has no SceneDelegate. The Capacitor plugin remains the single ATT owner.
44
+ const executable = content.replace(/\/\*[\s\S]*?\*\//g, '').replace(/\/\/[^\r\n]*/g, '');
45
+ if (/\bATTrackingManager\s*(?:\.\s*|\s+)requestTrackingAuthorization(?:WithCompletionHandler)?\b/.test(executable)) {
46
+ throw new Error(`${path.relative(projectRoot, file)} requests ATT outside the regional consent flow. Remove the native startup request; @admob requests ATT after UMP completes.`);
47
+ }
48
+ if (content !== original) updates.push({ file, content });
49
+ }
50
+ // Validate every source before changing any file.
51
+ for (const { file, content } of updates) fs.writeFileSync(file, content, 'utf8');
52
+ log('iOS native startup checked; the ad consent flow controls ATT after UMP.');
53
+ return updates.map(({ file }) => path.relative(projectRoot, file));
54
+ }
55
+
56
+ module.exports = { prepareIOSAdConsent };
@@ -1,14 +1,14 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
-
4
- const replaceEmiPluginCode=()=>
5
- {
6
- // path to your .m file
7
- const filePath = path.join(__dirname, '../ios/capacitor-cordova-ios-plugins/sourcesstatic/EmiIndoCordovaPluginAdmob/emiAdmobPlugin.m');
8
- const nextGenPackagePath = path.join(__dirname, '../node_modules/capacitor-admob-nextgen/package.json');
9
-
10
-
11
- if (fs.existsSync(filePath)) {
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+
4
+ const replaceEmiPluginCode=()=>
5
+ {
6
+ // path to your .m file
7
+ const filePath = path.join(__dirname, '../ios/capacitor-cordova-ios-plugins/sourcesstatic/EmiIndoCordovaPluginAdmob/emiAdmobPlugin.m');
8
+ const nextGenPackagePath = path.join(__dirname, '../node_modules/capacitor-admob-nextgen/package.json');
9
+
10
+
11
+ if (fs.existsSync(filePath)) {
12
12
  let fileContent = fs.readFileSync(filePath, 'utf8');
13
13
 
14
14
  // match the hideBannerAd method
@@ -33,17 +33,17 @@ const replaceEmiPluginCode=()=>
33
33
  fileContent.slice(match.index + match[0].length);
34
34
 
35
35
  fs.writeFileSync(filePath, updatedFileContent, 'utf8');
36
- console.log(
37
- 'โœ… Successfully ensured [self resetWebViewHeight]; is commented only inside hideBannerAd in emiAdmobPlugin.m'
38
- );
39
- } else {
40
- console.log('โš ๏ธ hideBannerAd method not found.');
41
- }
42
- } else if (fs.existsSync(nextGenPackagePath)) {
43
- console.log('โ„น๏ธ Skipping legacy iOS EMI AdMob patch. capacitor-admob-nextgen does not use emiAdmobPlugin.m.');
44
- } else {
45
- console.log('โ„น๏ธ emiAdmobPlugin.m file not found, skipping modification.');
46
- }
47
- }
48
-
49
- replaceEmiPluginCode();
36
+ console.log(
37
+ 'โœ… Successfully ensured [self resetWebViewHeight]; is commented only inside hideBannerAd in emiAdmobPlugin.m'
38
+ );
39
+ } else {
40
+ console.log('โš ๏ธ hideBannerAd method not found.');
41
+ }
42
+ } else if (fs.existsSync(nextGenPackagePath)) {
43
+ console.log('โ„น๏ธ Skipping legacy iOS EMI AdMob patch. capacitor-admob-nextgen does not use emiAdmobPlugin.m.');
44
+ } else {
45
+ console.log('โ„น๏ธ emiAdmobPlugin.m file not found, skipping modification.');
46
+ }
47
+ }
48
+
49
+ replaceEmiPluginCode();
@@ -1,90 +1,90 @@
1
- Note: This changes are added with my old(current) code. Might we need to integrate this features into our new optimized code.
2
-
3
- 1) If no import(saveToGalleryAndSaveAnyFile) found it through error issue is fixed
4
- // iOS Checks
5
- /* if (isMac && !iosImportFound) {
6
- console.warn(`โš ๏ธ WARNING: You're on macOS but no iOS version (saveToGalleryAndSaveAnyFile-x.x-ios.js) found.`);
7
- process.exit(1);
8
- } else if (isMac && iosImportFound) {
9
- console.log('โœ… iOS version detected for macOS build.');
10
- } else if (!iosImportFound) {
11
- console.log('โœ… No iOS-specific imports detected for non-macOS.');
12
- } */
13
-
14
- // โœ… Only care if iOS import is found in NON-mac systems
15
- if (iosImportFound && !isMac) {
16
- console.error(`\nโŒ ERROR: iOS-specific file is imported in non-macOS environment.`);
17
- process.exit(1);
18
- } else if (iosImportFound && isMac) {
19
- console.log('โœ… iOS import detected (valid for macOS build).');
20
- } else {
21
- console.log('โœ… No iOS-specific imports found (this is totally fine).');
22
- }
23
-
24
-
25
- 2) Statusbar color set in app startup is checked and through erro
26
-
27
- const STATUSBAR_FILE = path.resolve(__dirname, '../src/js/common-configuration.js');
28
- const STATUSBAR_REGEX = /^(?!\s*\/\/).*Capacitor\.Plugins\.StatusBar\.setStyle/m;
29
-
30
-
31
- const ONESIGNAL_OLD_FILES = [
32
- path.resolve(__dirname, '../src/js/onesignal-settings.js')
33
- ];
34
- const ONESIGNAL_VERSION_REGEX = /^onesignal-\d+(\.\d+)*\.js$/;
35
-
36
- ....
37
- ....
38
- ....
39
-
40
-
41
- const JS_ROOT = path.resolve(__dirname, '../src/js');
42
- const ONESIGNAL_DIR = path.join(JS_ROOT, 'onesignal');
43
-
44
- // ๐Ÿšจ Block old OneSignal file locations (ONLY in src/js root)
45
- if (path.dirname(dir) === JS_ROOT) {
46
-
47
- // โŒ onesignal-settings.js
48
- if (ONESIGNAL_OLD_FILES.includes(dir)) {
49
- console.error(`\nโŒ ERROR: onesignal-settings.js should not be in src/js/`);
50
- console.error(`๐Ÿ“ Move it to: src/js/onesignal/`);
51
- console.error(`๐Ÿ“„ File: ${dir}\n`);
52
- process.exit(1);
53
- }
54
-
55
- // โŒ onesignal-x.x.js
56
- if (ONESIGNAL_VERSION_REGEX.test(baseName)) {
57
- console.error(`\nโŒ ERROR: ${baseName} should not be in src/js/`);
58
- console.error(`๐Ÿ“ Move it to: src/js/onesignal/`);
59
- console.error(`๐Ÿ“„ File: ${dir}\n`);
60
- process.exit(1);
61
- }
62
- }
63
-
64
- // ๐Ÿšจ Special check ONLY for common-configuration.js
65
- if (dir === STATUSBAR_FILE) {
66
- let content = fs.readFileSync(dir, 'utf8');
67
-
68
- // ๐Ÿงน Remove ALL comments (single-line + multi-line)
69
- const contentWithoutComments = content
70
- .replace(/\/\/.*$/gm, '') // remove // comments
71
- .replace(/\/\*[\s\S]*?\*\//g, ''); // remove /* */ comments
72
-
73
- // โœ… Now check only real code
74
- if (contentWithoutComments.includes('Capacitor.Plugins.StatusBar.setStyle')) {
75
- console.error(`\nโŒ ERROR: StatusBar.setStyle should NOT be used in common-configuration.js`);
76
- console.error(`๐Ÿšซ iOS status bar is controlled via other methods. Remove this line.`);
77
- console.error(`๐Ÿ“„ File: ${dir}\n`);
78
- process.exit(1);
79
- }
80
- }
81
-
82
-
83
- 3) Modification in "fix-onesignal-plugin.js" file
84
- Search following and that whole block added for add permission to "info.plist" file
85
- INFO.PLIST START
86
-
87
- 4) In "codeplayBeforeBuild-6.1.js" file following whole method is replaced. Due to add ads related permission to info.plist file
88
- updateInfoPlist()
89
-
1
+ Note: This changes are added with my old(current) code. Might we need to integrate this features into our new optimized code.
2
+
3
+ 1) If no import(saveToGalleryAndSaveAnyFile) found it through error issue is fixed
4
+ // iOS Checks
5
+ /* if (isMac && !iosImportFound) {
6
+ console.warn(`โš ๏ธ WARNING: You're on macOS but no iOS version (saveToGalleryAndSaveAnyFile-x.x-ios.js) found.`);
7
+ process.exit(1);
8
+ } else if (isMac && iosImportFound) {
9
+ console.log('โœ… iOS version detected for macOS build.');
10
+ } else if (!iosImportFound) {
11
+ console.log('โœ… No iOS-specific imports detected for non-macOS.');
12
+ } */
13
+
14
+ // โœ… Only care if iOS import is found in NON-mac systems
15
+ if (iosImportFound && !isMac) {
16
+ console.error(`\nโŒ ERROR: iOS-specific file is imported in non-macOS environment.`);
17
+ process.exit(1);
18
+ } else if (iosImportFound && isMac) {
19
+ console.log('โœ… iOS import detected (valid for macOS build).');
20
+ } else {
21
+ console.log('โœ… No iOS-specific imports found (this is totally fine).');
22
+ }
23
+
24
+
25
+ 2) Statusbar color set in app startup is checked and through erro
26
+
27
+ const STATUSBAR_FILE = path.resolve(__dirname, '../src/js/common-configuration.js');
28
+ const STATUSBAR_REGEX = /^(?!\s*\/\/).*Capacitor\.Plugins\.StatusBar\.setStyle/m;
29
+
30
+
31
+ const ONESIGNAL_OLD_FILES = [
32
+ path.resolve(__dirname, '../src/js/onesignal-settings.js')
33
+ ];
34
+ const ONESIGNAL_VERSION_REGEX = /^onesignal-\d+(\.\d+)*\.js$/;
35
+
36
+ ....
37
+ ....
38
+ ....
39
+
40
+
41
+ const JS_ROOT = path.resolve(__dirname, '../src/js');
42
+ const ONESIGNAL_DIR = path.join(JS_ROOT, 'onesignal');
43
+
44
+ // ๐Ÿšจ Block old OneSignal file locations (ONLY in src/js root)
45
+ if (path.dirname(dir) === JS_ROOT) {
46
+
47
+ // โŒ onesignal-settings.js
48
+ if (ONESIGNAL_OLD_FILES.includes(dir)) {
49
+ console.error(`\nโŒ ERROR: onesignal-settings.js should not be in src/js/`);
50
+ console.error(`๐Ÿ“ Move it to: src/js/onesignal/`);
51
+ console.error(`๐Ÿ“„ File: ${dir}\n`);
52
+ process.exit(1);
53
+ }
54
+
55
+ // โŒ onesignal-x.x.js
56
+ if (ONESIGNAL_VERSION_REGEX.test(baseName)) {
57
+ console.error(`\nโŒ ERROR: ${baseName} should not be in src/js/`);
58
+ console.error(`๐Ÿ“ Move it to: src/js/onesignal/`);
59
+ console.error(`๐Ÿ“„ File: ${dir}\n`);
60
+ process.exit(1);
61
+ }
62
+ }
63
+
64
+ // ๐Ÿšจ Special check ONLY for common-configuration.js
65
+ if (dir === STATUSBAR_FILE) {
66
+ let content = fs.readFileSync(dir, 'utf8');
67
+
68
+ // ๐Ÿงน Remove ALL comments (single-line + multi-line)
69
+ const contentWithoutComments = content
70
+ .replace(/\/\/.*$/gm, '') // remove // comments
71
+ .replace(/\/\*[\s\S]*?\*\//g, ''); // remove /* */ comments
72
+
73
+ // โœ… Now check only real code
74
+ if (contentWithoutComments.includes('Capacitor.Plugins.StatusBar.setStyle')) {
75
+ console.error(`\nโŒ ERROR: StatusBar.setStyle should NOT be used in common-configuration.js`);
76
+ console.error(`๐Ÿšซ iOS status bar is controlled via other methods. Remove this line.`);
77
+ console.error(`๐Ÿ“„ File: ${dir}\n`);
78
+ process.exit(1);
79
+ }
80
+ }
81
+
82
+
83
+ 3) Modification in "fix-onesignal-plugin.js" file
84
+ Search following and that whole block added for add permission to "info.plist" file
85
+ INFO.PLIST START
86
+
87
+ 4) In "codeplayBeforeBuild-6.1.js" file following whole method is replaced. Due to add ads related permission to info.plist file
88
+ updateInfoPlist()
89
+
90
90
  5) The "checkPackageVersion()" metod is updated. Now check the "codeplay-common" latest version and uninstall/install automatically.
@@ -1,3 +1,3 @@
1
- # MyTracker checks for BillingClient/Purchase classes and disables its Google
2
- # purchase helper when absent. These optional classes are excluded on stores 4/10.
3
- -dontwarn com.android.billingclient.**
1
+ # MyTracker checks for BillingClient/Purchase classes and disables its Google
2
+ # purchase helper when absent. These optional classes are excluded on stores 4/10.
3
+ -dontwarn com.android.billingclient.**
@@ -1,4 +1,4 @@
1
- {
2
- "url": "https://htmlcodeplay.com/codeplay/api/v1/release/sync",
3
- "token": ""
4
- }
1
+ {
2
+ "url": "https://htmlcodeplay.com/codeplay/api/v1/release/sync",
3
+ "token": ""
4
+ }
@@ -1,43 +1,43 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
-
4
- const legacyPluginXmlPath = path.resolve(
5
- __dirname,
6
- '../node_modules/emi-indo-cordova-plugin-admob/plugin.xml'
7
- );
8
-
9
- const nextGenPackagePath = path.resolve(
10
- __dirname,
11
- '../node_modules/capacitor-admob-nextgen/package.json'
12
- );
13
-
14
- if (!fs.existsSync(legacyPluginXmlPath)) {
15
- if (fs.existsSync(nextGenPackagePath)) {
16
- console.log('โ„น๏ธ Skipping legacy Kotlin patch. capacitor-admob-nextgen is installed and does not use plugin.xml.');
17
- process.exit(0);
18
- }
19
-
20
- console.log('โ„น๏ธ Legacy AdMob plugin.xml not found, skipping Kotlin patch.');
21
- process.exit(0);
22
- }
23
-
24
- fs.readFile(legacyPluginXmlPath, 'utf8', (err, data) => {
25
- if (err) {
26
- console.error('Error reading plugin.xml:', err);
27
- process.exit(1);
28
- }
29
-
30
- const modifiedData = data.replace(
31
- /<framework\s+src="src\/android\/force-kotlin\.gradle"\s+custom="true"\s+type="gradleReference"\s*\/>\s*\n?/g,
32
- ''
33
- );
34
-
35
- fs.writeFile(legacyPluginXmlPath, modifiedData, 'utf8', (writeErr) => {
36
- if (writeErr) {
37
- console.error('Error writing plugin.xml:', writeErr);
38
- process.exit(1);
39
- }
40
-
41
- console.log('plugin.xml updated successfully.');
42
- });
43
- });
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+
4
+ const legacyPluginXmlPath = path.resolve(
5
+ __dirname,
6
+ '../node_modules/emi-indo-cordova-plugin-admob/plugin.xml'
7
+ );
8
+
9
+ const nextGenPackagePath = path.resolve(
10
+ __dirname,
11
+ '../node_modules/capacitor-admob-nextgen/package.json'
12
+ );
13
+
14
+ if (!fs.existsSync(legacyPluginXmlPath)) {
15
+ if (fs.existsSync(nextGenPackagePath)) {
16
+ console.log('โ„น๏ธ Skipping legacy Kotlin patch. capacitor-admob-nextgen is installed and does not use plugin.xml.');
17
+ process.exit(0);
18
+ }
19
+
20
+ console.log('โ„น๏ธ Legacy AdMob plugin.xml not found, skipping Kotlin patch.');
21
+ process.exit(0);
22
+ }
23
+
24
+ fs.readFile(legacyPluginXmlPath, 'utf8', (err, data) => {
25
+ if (err) {
26
+ console.error('Error reading plugin.xml:', err);
27
+ process.exit(1);
28
+ }
29
+
30
+ const modifiedData = data.replace(
31
+ /<framework\s+src="src\/android\/force-kotlin\.gradle"\s+custom="true"\s+type="gradleReference"\s*\/>\s*\n?/g,
32
+ ''
33
+ );
34
+
35
+ fs.writeFile(legacyPluginXmlPath, modifiedData, 'utf8', (writeErr) => {
36
+ if (writeErr) {
37
+ console.error('Error writing plugin.xml:', writeErr);
38
+ process.exit(1);
39
+ }
40
+
41
+ console.log('plugin.xml updated successfully.');
42
+ });
43
+ });