<?xml version='1.0' encoding='UTF-8'?>

<plugin xmlns:android="http://schemas.android.com/apk/res/android" id="cordova-plugin-repro" version="6.29.0" xmlns="http://apache.org/cordova/ns/plugins/1.0">
    <name>Repro</name>
    <description>Repro Cordova Plugin</description>
    <license>Commercial</license>
    <keywords>repro,analytics</keywords>

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

    <!-- ios -->
    <platform name="ios">
        <preference default="true" name="ENABLE_IOS_PUSH"/>
        <hook src="src/ios/after_prepare_hook.js" type="after_prepare"/>

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

        <header-file src="src/ios/CDVRepro.h"/>
        <source-file src="src/ios/CDVRepro.m"/>
        <header-file src="src/ios/CDVReproEventPropertiesFactory.h"/>
        <source-file src="src/ios/CDVReproEventPropertiesFactory.m"/>
        <header-file src="src/ios/AppDelegate+CDVReproNotification.h"/>
        <source-file src="src/ios/AppDelegate+CDVReproNotification.m"/>
        <header-file src="src/ios/CDVReproEnableSwizzling.h"/>

        <framework src="SystemConfiguration.framework"/>
        <framework src="WebKit.framework"/>
        <framework src="UserNotifications.framework"/>

        <framework custom="true" src="src/ios/Repro.xcframework"/>
    </platform>

    <!-- android -->
    <platform name="android">
        <preference default="17.3.4" name="FIREBASE_MESSAGING_VERSION"/>
        <hook src="src/android/before_plugin_install_hook.js" type="before_plugin_install"/>
        <hook src="src/android/after_prepare_hook.js" type="after_prepare"/>

        <config-file parent="/*" target="config.xml">
            <feature name="Repro">
                <param name="android-package" value="io.repro.cordova.CordovaPlugin"/>
            </feature>
        </config-file>

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

        <config-file parent="/manifest/application" target="AndroidManifest.xml">
            <service android:name="io.repro.android.ReproService"/>
        </config-file>

        <source-file src="src/android/CordovaPlugin.java" target-dir="src/io/repro/cordova"/>
        <source-file src="src/android/StandardEventPropertiesFactory.java" target-dir="src/io/repro/cordova"/>
        <resource-file src="src/android/repro-android-sdk.aar" target="libs/repro-android-sdk.aar"/>

        <framework src="com.google.firebase:firebase-messaging:$FIREBASE_MESSAGING_VERSION"/>
        <framework custom="true" src="src/android/repro-android-sdk.gradle" type="gradleReference"/>

    </platform>

</plugin>