<?xml version='1.0' encoding='utf-8'?>
<plugin id="cordova-plugin-insider" version="1.0.0" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
    <name>Insider</name>
    <description>Insider Cordova Plugin</description>
    <keywords>insider,cordova,cordova-ios,cordova-android</keywords>
    <license>Apache 2.0 License</license>

    <js-module name="InsiderPlugin" src="www/InsiderPlugin.js">
        <clobbers target="Insider" />
    </js-module>

    <js-module name="CallbackType" src="www/CallbackType.js"/>
    <js-module name="ContentOptimizerDataType" src="www/ContentOptimizerDataType.js" />
    <js-module name="Gender" src="www/Gender.js" />
    <js-module name="Identifier" src="www/Identifier.js"/>
    <js-module name="Product" src="www/Product.js"/>
    <js-module name="Event" src="www/Event.js" />
    <js-module name="User" src="www/User.js" />
    <js-module name="Constants" src="www/Constants.js" />
    <js-module name="Utils" src="www/Utils.js" />

    <engines>
        <engine name="cordova" version=">=7.0.0" />
        <engine name="cordova-android" version=">=6.3.0" />
        <engine name="cordova-ios" version=">=4.3.0" />
    </engines>

    <platform name="android">
        <framework src="src/android/build-extras.gradle" custom="true" type="gradleReference" />

    <hook type="before_plugin_uninstall" src="hooks/before_plugin_uninstall.js"/>
    <hook type="after_plugin_install" src="hooks/after_plugin_install.js"/>


        <config-file target="config.xml" parent="/*">
            <preference name="GradlePluginGoogleServicesEnabled" value="true" />
            <preference name="GradlePluginGoogleServicesVersion" value="4.3.10" />
        </config-file>

        <config-file target="AndroidManifest.xml" parent="/manifest">
            <uses-permission android:name="android.permission.INTERNET" />
            <uses-permission android:name="android.permission.WAKE_LOCK" />
            <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
        </config-file>

        <config-file parent="/*" target="res/xml/config.xml">
            <feature name="InsiderPlugin">
                <param name="android-package" value="com.useinsider.cordova.InsiderPlugin" />
                <param name="onload" value="true" />
            </feature>
        </config-file>

        <source-file src="src/android/InsiderPlugin.java" target-dir="src/com/useinsider/cordova" />
        <source-file src="src/android/Constants.java" target-dir="src/com/useinsider/cordova" />
        <source-file src="src/android/CDVUtils.java" target-dir="src/com/useinsider/cordova" />
    
        <resource-file src="src/android/res/values/dimens.xml"  target="res/values/dimens.xml" />
        <resource-file src="src/android/res/values-sw600dp/dimens.xml" target="res/values-sw600dp/dimens.xml" />
        <resource-file src="src/android/res/values-sw720dp/dimens.xml"  target="res/values-sw720dp/dimens.xml" />
        <resource-file src="src/android/res/values-xhdpi/dimens.xml"  target="res/values-xhdpi/dimens.xml" />
        <resource-file src="src/android/res/values-xxhdpi/dimens.xml"  target="res/values-xxhdpi/dimens.xml" />
        <resource-file src="src/android/res/values-xxxhdpi/dimens.xml"  target="res/values-xxxhdpi/dimens.xml" />
    </platform>

    <platform name="ios">
        <framework src="libsqlite3.tbd" />
        <framework src="libicucore.tbd" />

        <podspec>
            <config>
                <source url="https://cdn.cocoapods.org/" />
            </config>
            <pods use-frameworks="true">
                <pod name="InsiderMobile" />
                <pod name="InsiderHybrid" />
            </pods>
        </podspec>

        <config-file parent="/*" target="config.xml">
            <feature name="InsiderPlugin">
                <param name="ios-package" value="InsiderPlugin" />
            </feature>
        </config-file>

        <source-file src="src/ios/InsiderPlugin.m" />
        <header-file src="src/ios/InsiderPlugin.h" />

        <source-file src="src/ios/IDFAHelper.m" />
        <header-file src="src/ios/IDFAHelper.h" />
    </platform>
</plugin>