codeplay-common 4.11.12 โ†’ 4.11.14

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 (34) hide show
  1. package/CHANGELOG.md +114 -101
  2. package/LICENSE +21 -21
  3. package/README.md +274 -229
  4. package/RELEASE_NOTES.md +110 -97
  5. package/files/buildCodeplay/add-splash-screen.js +256 -255
  6. package/files/buildCodeplay/apk-store-builder.js +97 -97
  7. package/files/buildCodeplay/codeplayBeforeBuild.js +45 -43
  8. package/files/buildCodeplay/ensure-current-build.cjs +42 -42
  9. package/files/buildCodeplay/fix-onesignal-plugin.js +96 -96
  10. package/files/buildCodeplay/ios-emi-admob-modification.js +49 -49
  11. package/files/buildCodeplay/manifestModification.js +38 -38
  12. package/files/buildCodeplay/newly added.txt +89 -89
  13. package/files/buildCodeplay/release-sync.config.json +4 -4
  14. package/files/buildCodeplay/remove-force-kotlin-disable.js +43 -43
  15. package/files/buildCodeplay/setSplashAnimation.js +227 -225
  16. package/files/buildCodeplay/splash-setup.cjs +88 -0
  17. package/files/buildCodeplay/splashxml/codeplay_splashScreen.xml +1 -1
  18. package/files/buildCodeplay/sync-admob-nextgen.js +219 -219
  19. package/files/buildCodeplay/versions.json +27 -27
  20. package/files/finalrelease +1263 -1263
  21. package/files/generate-ai-promo-video.js +23 -23
  22. package/files/ionic.config.json +6 -6
  23. package/files/scripts-common/generate-baseline-profile.js +46 -46
  24. package/files/scripts-common/run-codeplay-sync-after.js +21 -21
  25. package/files/scripts-common/screenshot/background-decorations.js +120 -120
  26. package/files/scripts-common/screenshot/frame-samples.js +117 -117
  27. package/files/scripts-common/setup-baseline-profile.js +291 -291
  28. package/files/take-screen-video.js +644 -644
  29. package/package.json +3 -2
  30. package/runtime/splash-ready.mjs +52 -0
  31. package/scripts/ensure-current-build.test.cjs +76 -76
  32. package/scripts/splash-setup.test.cjs +142 -0
  33. package/scripts/sync-files.js +114 -113
  34. package/scripts/uninstall.js +2 -2
@@ -1,97 +1,97 @@
1
- const fs = require("fs");
2
- const path = require("path");
3
-
4
- const pluginPath = path.join(
5
- __dirname,
6
- "..",
7
- "node_modules",
8
- "onesignal-cordova-plugin",
9
- "plugin.xml"
10
- );
11
-
12
- if (!fs.existsSync(pluginPath)) {
13
- console.log("OneSignal plugin not found, skipping patch.");
14
- process.exit(0);
15
- }
16
-
17
- console.log("OneSignal plugin patch started.");
18
-
19
- let content = fs.readFileSync(pluginPath, "utf8");
20
-
21
- /* ---- Prevent running twice ---- */
22
- if (content.includes("buildCodeplay/fix-onesignal-plugin.js")) {
23
- console.log("OneSignal plugin already patched.");
24
- }
25
-
26
- else{
27
- /* ---- Comment Kotlin dependency ---- */
28
- content = content.replace(
29
- '<framework src="org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10" />',
30
- `<!-- Disabled: causes Kotlin version conflict with modern Gradle/Kotlin -->
31
- <!-- <framework src="org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10" /> -->`
32
- );
33
-
34
- /* ---- Add dependencies ---- */
35
- content = content.replace(
36
- '<framework src="build-extras-onesignal.gradle" custom="true" type="gradleReference" />',
37
- `<framework src="build-extras-onesignal.gradle" custom="true" type="gradleReference" />
38
-
39
- <!--Newly added content through buildCodeplay/fix-onesignal-plugin.js Start-->
40
- <framework src="com.fasterxml.jackson.core:jackson-core:2.17.2" />
41
- <framework src="com.google.auto.value:auto-value-annotations:1.11.0" scope="provided" />
42
- <!--Newly added content through buildCodeplay/fix-onesignal-plugin.js End-->`
43
- );
44
-
45
- fs.writeFileSync(pluginPath, content);
46
-
47
- console.log("OneSignal plugin patched successfully.");
48
- }
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57
- //#################### ADD THE PROPER ONESIGNAL PERMISSIN TO INFO.PLIST START ###########################
58
-
59
- const iosPlistPath = path.join(
60
- __dirname,
61
- "..",
62
- "ios",
63
- "App",
64
- "App",
65
- "Info.plist"
66
- );
67
-
68
- console.log(iosPlistPath)
69
-
70
- if (fs.existsSync(iosPlistPath)) {
71
-
72
- let plist = fs.readFileSync(iosPlistPath, "utf8");
73
-
74
- const insertBlock = `
75
- <key>UIBackgroundModes</key>
76
- <array>
77
- <string>remote-notification</string>
78
- </array>
79
- `;
80
-
81
- if (!plist.includes("UIBackgroundModes")) {
82
- const lastIndex = plist.lastIndexOf("</dict>");
83
-
84
- plist =
85
- plist.slice(0, lastIndex) +
86
- insertBlock +
87
- "\n" +
88
- plist.slice(lastIndex);
89
-
90
- console.log("Inserted UIBackgroundModes correctly.");
91
- }
92
-
93
- fs.writeFileSync(iosPlistPath, plist);
94
- }
95
-
96
-
1
+ const fs = require("fs");
2
+ const path = require("path");
3
+
4
+ const pluginPath = path.join(
5
+ __dirname,
6
+ "..",
7
+ "node_modules",
8
+ "onesignal-cordova-plugin",
9
+ "plugin.xml"
10
+ );
11
+
12
+ if (!fs.existsSync(pluginPath)) {
13
+ console.log("OneSignal plugin not found, skipping patch.");
14
+ process.exit(0);
15
+ }
16
+
17
+ console.log("OneSignal plugin patch started.");
18
+
19
+ let content = fs.readFileSync(pluginPath, "utf8");
20
+
21
+ /* ---- Prevent running twice ---- */
22
+ if (content.includes("buildCodeplay/fix-onesignal-plugin.js")) {
23
+ console.log("OneSignal plugin already patched.");
24
+ }
25
+
26
+ else{
27
+ /* ---- Comment Kotlin dependency ---- */
28
+ content = content.replace(
29
+ '<framework src="org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10" />',
30
+ `<!-- Disabled: causes Kotlin version conflict with modern Gradle/Kotlin -->
31
+ <!-- <framework src="org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10" /> -->`
32
+ );
33
+
34
+ /* ---- Add dependencies ---- */
35
+ content = content.replace(
36
+ '<framework src="build-extras-onesignal.gradle" custom="true" type="gradleReference" />',
37
+ `<framework src="build-extras-onesignal.gradle" custom="true" type="gradleReference" />
38
+
39
+ <!--Newly added content through buildCodeplay/fix-onesignal-plugin.js Start-->
40
+ <framework src="com.fasterxml.jackson.core:jackson-core:2.17.2" />
41
+ <framework src="com.google.auto.value:auto-value-annotations:1.11.0" scope="provided" />
42
+ <!--Newly added content through buildCodeplay/fix-onesignal-plugin.js End-->`
43
+ );
44
+
45
+ fs.writeFileSync(pluginPath, content);
46
+
47
+ console.log("OneSignal plugin patched successfully.");
48
+ }
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+ //#################### ADD THE PROPER ONESIGNAL PERMISSIN TO INFO.PLIST START ###########################
58
+
59
+ const iosPlistPath = path.join(
60
+ __dirname,
61
+ "..",
62
+ "ios",
63
+ "App",
64
+ "App",
65
+ "Info.plist"
66
+ );
67
+
68
+ console.log(iosPlistPath)
69
+
70
+ if (fs.existsSync(iosPlistPath)) {
71
+
72
+ let plist = fs.readFileSync(iosPlistPath, "utf8");
73
+
74
+ const insertBlock = `
75
+ <key>UIBackgroundModes</key>
76
+ <array>
77
+ <string>remote-notification</string>
78
+ </array>
79
+ `;
80
+
81
+ if (!plist.includes("UIBackgroundModes")) {
82
+ const lastIndex = plist.lastIndexOf("</dict>");
83
+
84
+ plist =
85
+ plist.slice(0, lastIndex) +
86
+ insertBlock +
87
+ "\n" +
88
+ plist.slice(lastIndex);
89
+
90
+ console.log("Inserted UIBackgroundModes correctly.");
91
+ }
92
+
93
+ fs.writeFileSync(iosPlistPath, plist);
94
+ }
95
+
96
+
97
97
  //#################### ADD THE PROPER ONESIGNAL PERMISSIN TO INFO.PLIST END ###########################
@@ -1,49 +1,49 @@
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
- let fileContent = fs.readFileSync(filePath, 'utf8');
13
-
14
- // match the hideBannerAd method
15
- const methodRegex = /(- \(void\)hideBannerAd:[\s\S]*?\{)([\s\S]*?)(^\})/m;
16
-
17
- const match = fileContent.match(methodRegex);
18
-
19
- if (match) {
20
- const methodBody = match[2];
21
-
22
- // replace only if the line is not already commented
23
- const modifiedMethodBody = methodBody.replace(
24
- /^(\s*)(?!\/\/)\[self\s+resetWebViewHeight\];/m,
25
- '$1//[self resetWebViewHeight];'
26
- );
27
-
28
- const updatedFileContent =
29
- fileContent.slice(0, match.index) +
30
- match[1] +
31
- modifiedMethodBody +
32
- match[3] +
33
- fileContent.slice(match.index + match[0].length);
34
-
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();
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
+ let fileContent = fs.readFileSync(filePath, 'utf8');
13
+
14
+ // match the hideBannerAd method
15
+ const methodRegex = /(- \(void\)hideBannerAd:[\s\S]*?\{)([\s\S]*?)(^\})/m;
16
+
17
+ const match = fileContent.match(methodRegex);
18
+
19
+ if (match) {
20
+ const methodBody = match[2];
21
+
22
+ // replace only if the line is not already commented
23
+ const modifiedMethodBody = methodBody.replace(
24
+ /^(\s*)(?!\/\/)\[self\s+resetWebViewHeight\];/m,
25
+ '$1//[self resetWebViewHeight];'
26
+ );
27
+
28
+ const updatedFileContent =
29
+ fileContent.slice(0, match.index) +
30
+ match[1] +
31
+ modifiedMethodBody +
32
+ match[3] +
33
+ fileContent.slice(match.index + match[0].length);
34
+
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();
@@ -1,38 +1,38 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
- const plist = require('plist');
4
- const { syncAndroidR8Rules } = require('./fix-optimize-builld/restore-android-r8-rules.cjs');
5
-
6
- syncAndroidR8Rules(process.cwd(), { installGradleHook: true });
7
-
8
- const { readFileSync } = require("fs");
9
-
10
-
11
-
12
-
13
-
14
-
15
- const addToolAttribute=()=>{
16
- //const platformRoot = path.join(context.opts.projectRoot, 'android');
17
- //const manifestPath = path.join(platformRoot, 'capacitor-cordova-android-plugins/src/main/AndroidManifest.xml');
18
-
19
- const manifestPath = path.resolve(process.cwd(), 'android/capacitor-cordova-android-plugins/src/main/AndroidManifest.xml');
20
-
21
- if (fs.existsSync(manifestPath)) {
22
- let manifest = fs.readFileSync(manifestPath, 'utf8');
23
-
24
- // Check if xmlns:tools exists
25
- if (!manifest.includes('xmlns:tools="http://schemas.android.com/tools"')) {
26
- // Add the tools namespace to the <manifest> tag.
27
- manifest = manifest.replace('<manifest', '<manifest xmlns:tools="http://schemas.android.com/tools"');
28
- fs.writeFileSync(manifestPath, manifest, 'utf8');
29
- console.log('โœ… Added xmlns:tools to AndroidManifest.xml');
30
- } else {
31
- console.log('โ„น๏ธ xmlns:tools already exists, skipping...');
32
- }
33
- } else {
34
- console.log('โ„น๏ธ capacitor-cordova-android-plugins AndroidManifest.xml not found, skipping tools namespace update.');
35
- }
36
- };
37
-
38
- addToolAttribute()
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+ const plist = require('plist');
4
+ const { syncAndroidR8Rules } = require('./fix-optimize-builld/restore-android-r8-rules.cjs');
5
+
6
+ syncAndroidR8Rules(process.cwd(), { installGradleHook: true });
7
+
8
+ const { readFileSync } = require("fs");
9
+
10
+
11
+
12
+
13
+
14
+
15
+ const addToolAttribute=()=>{
16
+ //const platformRoot = path.join(context.opts.projectRoot, 'android');
17
+ //const manifestPath = path.join(platformRoot, 'capacitor-cordova-android-plugins/src/main/AndroidManifest.xml');
18
+
19
+ const manifestPath = path.resolve(process.cwd(), 'android/capacitor-cordova-android-plugins/src/main/AndroidManifest.xml');
20
+
21
+ if (fs.existsSync(manifestPath)) {
22
+ let manifest = fs.readFileSync(manifestPath, 'utf8');
23
+
24
+ // Check if xmlns:tools exists
25
+ if (!manifest.includes('xmlns:tools="http://schemas.android.com/tools"')) {
26
+ // Add the tools namespace to the <manifest> tag.
27
+ manifest = manifest.replace('<manifest', '<manifest xmlns:tools="http://schemas.android.com/tools"');
28
+ fs.writeFileSync(manifestPath, manifest, 'utf8');
29
+ console.log('โœ… Added xmlns:tools to AndroidManifest.xml');
30
+ } else {
31
+ console.log('โ„น๏ธ xmlns:tools already exists, skipping...');
32
+ }
33
+ } else {
34
+ console.log('โ„น๏ธ capacitor-cordova-android-plugins AndroidManifest.xml not found, skipping tools namespace update.');
35
+ }
36
+ };
37
+
38
+ addToolAttribute()
@@ -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,4 +1,4 @@
1
- {
2
- "url": "https://htmlcodeplay.com/codeplay/api/v1/release/sync",
3
- "token": "b_TiY0Lu7q7Yb0Kx9djVxA6ST8k4CFiwFQNxgci7AAU"
4
- }
1
+ {
2
+ "url": "https://htmlcodeplay.com/codeplay/api/v1/release/sync",
3
+ "token": "b_TiY0Lu7q7Yb0Kx9djVxA6ST8k4CFiwFQNxgci7AAU"
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
+ });