N
N
Nadim Zakirov2020-08-02 11:23:48
JavaScript
Nadim Zakirov, 2020-08-02 11:23:48

How to install InAppBrowser plugin in PhoneGap Build?

My manifest:

spoiler
<?xml version='1.0' encoding='utf-8'?>
<widget id="test" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
    <name>Forums</name>
    <description>
        Форум
    </description>
    <author email="[email protected]" href="https://site.ru">
        Автор
    </author>
    <content src="index.html" />
    <preference name="DisallowOverscroll" value="true" />
    <preference name="android-minSdkVersion" value="19" />
    <plugin name="cordova-plugin-whitelist" source="npm" />
    <plugin name="cordova-plugin-splashscreen" source="npm" />
    <plugin name="cordova-plugin-inappbrowser" source="npm" />
    <preference name="SplashScreenDelay" value="3000" />  
    <preference name="AutoHideSplashScreen" value="true" />
    <preference name="SplashMaintainAspectRatio" value="true" /> 
  <allow-navigation href="*" />
    <icon src="icon.png" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <platform name="android">
        <allow-intent href="market:*" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
    </platform>
</widget>

As you can see, the code for connecting the plugin has been added:
<plugin name="cordova-plugin-inappbrowser" source="npm" />

However, when building in the service, I get an error:
Error - Some official plugins have to be updated if using PhoneGap >= 4.0.0. Please upgrade the version of any plugins that may include the following file: InAppBrowser.java - You can fix this here

And I don’t understand how to overcome this error and still connect the plugin I need. I need the plugin itself to insert my custom JavaScript code into the pages of the site. If there are other plugins that allow you to inject your code into the pages you are viewing, I would be grateful for a tip.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question