codeplay-common 1.6.6 → 1.6.8

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Merbin Joe
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Merbin Joe
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
@@ -683,4 +683,17 @@ checkPlugins();
683
683
 
684
684
 
685
685
 
686
- // Check all the codeplays plugins version START
686
+ // Check all the codeplays plugins version START
687
+
688
+
689
+
690
+
691
+
692
+
693
+
694
+
695
+
696
+
697
+
698
+
699
+
@@ -0,0 +1,52 @@
1
+ /* EMI PLUGIN one line comment START */
2
+
3
+ //Note : Call showBannerAd() method after hideBannerAd(), the inset space are not set properly (The banner ad overlap the content). So hide a line in emiAdmobPlugin.m file "//[self resetWebViewHeight];"
4
+ const fs = require('fs');
5
+ const path = require('path');
6
+
7
+ const replaceEmiPluginCode=()=>
8
+ {
9
+ debugger;
10
+ // path to your .m file
11
+ const filePath = path.join(__dirname, '../ios/capacitor-cordova-ios-plugins/sourcesstatic/EmiIndoCordovaPluginAdmob/emiAdmobPlugin.m');
12
+
13
+
14
+ if (fs.existsSync(filePath)) {
15
+ let fileContent = fs.readFileSync(filePath, 'utf8');
16
+
17
+ // match the hideBannerAd method
18
+ const methodRegex = /(- \(void\)hideBannerAd:[\s\S]*?\{)([\s\S]*?)(^\})/m;
19
+
20
+ const match = fileContent.match(methodRegex);
21
+
22
+ if (match) {
23
+ const methodBody = match[2];
24
+
25
+ // replace only if the line is not already commented
26
+ const modifiedMethodBody = methodBody.replace(
27
+ /^(\s*)(?!\/\/)\[self\s+resetWebViewHeight\];/m,
28
+ '$1//[self resetWebViewHeight];'
29
+ );
30
+
31
+ const updatedFileContent =
32
+ fileContent.slice(0, match.index) +
33
+ match[1] +
34
+ modifiedMethodBody +
35
+ match[3] +
36
+ fileContent.slice(match.index + match[0].length);
37
+
38
+ fs.writeFileSync(filePath, updatedFileContent, 'utf8');
39
+ console.log(
40
+ '✅ Successfully ensured [self resetWebViewHeight]; is commented only inside hideBannerAd in emiAdmobPlugin.m'
41
+ );
42
+ } else {
43
+ console.log('⚠️ hideBannerAd method not found.');
44
+ }
45
+ } else {
46
+ console.log('ℹ️ emiAdmobPlugin.m file not found, skipping modification.');
47
+ }
48
+ }
49
+
50
+ replaceEmiPluginCode();
51
+
52
+ /* EMI PLUGIN one line comment END */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeplay-common",
3
- "version": "1.6.6",
3
+ "version": "1.6.8",
4
4
  "description": "Common build scripts and files",
5
5
  "scripts": {
6
6
  "postinstall": "node scripts/sync-files.js",
@@ -64,7 +64,7 @@ if (latestCodeplayBuild) {
64
64
  packageJson.scripts["build"] = `node buildCodeplay/${latestCodeplayBuild} && cross-env NODE_ENV=production vite build`;
65
65
  }
66
66
  if (latestSplashScreen && latestSplashAnimation) {
67
- packageJson.scripts["capacitor:sync:after"] = `node buildCodeplay/${latestSplashScreen} && node buildCodeplay/${latestSplashAnimation}`;
67
+ packageJson.scripts["capacitor:sync:after"] = `node buildCodeplay/ios-emi-admob-modification.js && node buildCodeplay/${latestSplashScreen} && node buildCodeplay/${latestSplashAnimation}`;
68
68
  }
69
69
 
70
70
  packageJson.scripts["ionic:build"] = "npm run build";