codeplay-common 1.6.7 → 1.6.9
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.
|
@@ -692,55 +692,6 @@ checkPlugins();
|
|
|
692
692
|
|
|
693
693
|
|
|
694
694
|
|
|
695
|
-
/* EMI PLUGIN one line comment START */
|
|
696
|
-
|
|
697
|
-
//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];"
|
|
698
|
-
|
|
699
|
-
const replaceEmiPluginCode=()=>
|
|
700
|
-
{
|
|
701
|
-
// path to your .m file
|
|
702
|
-
const filePath = path.join(__dirname, '../ios/capacitor-cordova-ios-plugins/sourcesstatic/EmiIndoCordovaPluginAdmob/emiAdmobPlugin.m');
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
if (fs.existsSync(filePath)) {
|
|
706
|
-
let fileContent = fs.readFileSync(filePath, 'utf8');
|
|
707
|
-
|
|
708
|
-
// match the hideBannerAd method
|
|
709
|
-
const methodRegex = /(- \(void\)hideBannerAd:[\s\S]*?\{)([\s\S]*?)(^\})/m;
|
|
710
|
-
|
|
711
|
-
const match = fileContent.match(methodRegex);
|
|
712
|
-
|
|
713
|
-
if (match) {
|
|
714
|
-
const methodBody = match[2];
|
|
715
|
-
|
|
716
|
-
// replace only if the line is not already commented
|
|
717
|
-
const modifiedMethodBody = methodBody.replace(
|
|
718
|
-
/^(\s*)(?!\/\/)\[self\s+resetWebViewHeight\];/m,
|
|
719
|
-
'$1//[self resetWebViewHeight];'
|
|
720
|
-
);
|
|
721
|
-
|
|
722
|
-
const updatedFileContent =
|
|
723
|
-
fileContent.slice(0, match.index) +
|
|
724
|
-
match[1] +
|
|
725
|
-
modifiedMethodBody +
|
|
726
|
-
match[3] +
|
|
727
|
-
fileContent.slice(match.index + match[0].length);
|
|
728
|
-
|
|
729
|
-
fs.writeFileSync(filePath, updatedFileContent, 'utf8');
|
|
730
|
-
console.log(
|
|
731
|
-
'✅ Successfully ensured [self resetWebViewHeight]; is commented only inside hideBannerAd in emiAdmobPlugin.m'
|
|
732
|
-
);
|
|
733
|
-
} else {
|
|
734
|
-
console.log('⚠️ hideBannerAd method not found.');
|
|
735
|
-
}
|
|
736
|
-
} else {
|
|
737
|
-
console.log('ℹ️ emiAdmobPlugin.m file not found, skipping modification.');
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
|
-
|
|
741
|
-
replaceEmiPluginCode();
|
|
742
|
-
|
|
743
|
-
/* EMI PLUGIN one line comment END */
|
|
744
695
|
|
|
745
696
|
|
|
746
697
|
|
|
@@ -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
package/scripts/sync-files.js
CHANGED
|
@@ -65,6 +65,7 @@ if (latestCodeplayBuild) {
|
|
|
65
65
|
}
|
|
66
66
|
if (latestSplashScreen && latestSplashAnimation) {
|
|
67
67
|
packageJson.scripts["capacitor:sync:after"] = `node buildCodeplay/${latestSplashScreen} && node buildCodeplay/${latestSplashAnimation}`;
|
|
68
|
+
//node buildCodeplay/ios-emi-admob-modification.js &&
|
|
68
69
|
}
|
|
69
70
|
|
|
70
71
|
packageJson.scripts["ionic:build"] = "npm run build";
|