codeplay-common 1.6.5 → 1.6.7
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.
|
|
@@ -76,6 +76,22 @@ function updateAndroidManifest() {
|
|
|
76
76
|
updated = updated.replace('<activity', '<activity android:resizeableActivity="false"');
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
+
|
|
80
|
+
// If android:screenOrientation is already present, update it
|
|
81
|
+
if (updated.includes('android:screenOrientation=')) {
|
|
82
|
+
updated = updated.replace(
|
|
83
|
+
/android:screenOrientation="[^"]*"/,
|
|
84
|
+
'android:screenOrientation="portrait"'
|
|
85
|
+
);
|
|
86
|
+
} else {
|
|
87
|
+
updated = updated.replace(
|
|
88
|
+
'<activity',
|
|
89
|
+
'<activity android:screenOrientation="portrait"'
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
79
95
|
return updated;
|
|
80
96
|
}
|
|
81
97
|
);
|
|
@@ -683,4 +683,66 @@ 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
|
+
/* 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
|
+
|
|
745
|
+
|
|
746
|
+
|
|
747
|
+
|
|
748
|
+
|