<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
        xmlns:android="http://schemas.android.com/apk/res/android"
        id="com.plotprojects.cordova"
        version="3.0.0">
    <engines>
        <engine name="cordova" version=">=8.0.0" />
    </engines>
    <name>Plot</name>
    <description>Use the Plot library for Location Based Notifications in your Cordova/PhoneGap app.</description>
    <author>Floating Market B.V.</author>
    <keywords>plot,plotprojects,location,notification</keywords>
    <license>Apache 2.0 License</license>
    <js-module src="plot.js" name="Plot">
        <clobbers target="plot" />
    </js-module>

    <platform name="android">
        <config-file target="res/xml/config.xml" parent="/*">
            <feature name="PlotCordovaPlugin">
                <param name="android-package" value="com.plotprojects.cordova.PlotCordovaPlugin" />
            </feature>
        </config-file>


    
        <framework src="src/android/plugin.gradle" custom="true" type="gradleReference"/>
        <source-file src="src/android/PlotCordovaPlugin.java" target-dir="src/com/plotprojects/cordova" />
        <source-file src="src/android/PlotRemoteHandler.java" target-dir="src/com/plotprojects/cordova" />
        <source-file src="src/android/RemoteGeotriggerHandler.java" target-dir="src/com/plotprojects/cordova" />
        <source-file src="src/android/RemoteNotificationFilter.java" target-dir="src/com/plotprojects/cordova" />
        <source-file src="src/android/PlotCordovaNotificationOpenReceiver.java" target-dir="src/com/plotprojects/cordova" />

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

        <config-file target="AndroidManifest.xml" parent="/manifest/application">

            <receiver android:exported="false" android:name="com.plotprojects.cordova.PlotCordovaNotificationOpenReceiver">
                <intent-filter>
                    <action android:name="${applicationId}.plot.OpenNotification" />
                </intent-filter>
            </receiver>

            <receiver android:name="com.plotprojects.cordova.RemoteGeotriggerHandler" android:exported="false" >
                <intent-filter>
                    <action android:name="${applicationId}.plot.HandleGeotriggers"/>
                </intent-filter>
            </receiver>

            <receiver android:name="com.plotprojects.cordova.RemoteNotificationFilter" android:exported="false" >
                <intent-filter>
                    <action android:name="${applicationId}.plot.FilterNotifications" />
                </intent-filter>
            </receiver>
                            
            
        </config-file>
        
        <info>Please see our plugin documentation for more information: https://www.plotprojects.com/plot-app-library-documentation-latest/</info>

    </platform>
    <platform name="ios">
        <config-file target="config.xml" parent="/*">
            <feature name="PlotCordovaPlugin">
                <param name="ios-package" value="PlotCordovaPlugin" />
            </feature>
        </config-file>
        <header-file src="src/ios/PlotCordovaPlugin.h" />
        <source-file src="src/ios/PlotCordovaPlugin.m" />
        
        <header-file src="src/ios/PlotRemoteHandler.h" />
        <source-file src="src/ios/PlotRemoteHandler.m" />
        
        <header-file src="src/ios/PlotPlotDelegate.h" />
        <source-file src="src/ios/PlotPlotDelegate.m" />

        <header-file src="src/ios/Plot.h" />
        <framework src="PlotPlugin" type="podspec" spec="2.3.0"/>

        <framework src="libsqlite3.dylib" />
        <framework src="CoreLocation.framework" />
        <framework src="MessageUI.framework" />
        <framework src="UserNotifications.framework" />
        
        <config-file parent="/*" target="config.xml">
             <preference name="deployment-target" value="10.0"/>
         </config-file>
 
        <config-file target="*-Info.plist" parent="NSLocationAlwaysUsageDescription">
					<string>Your location is used in the background to instantly inform you when you are near a location that is interesting to you.</string>
				</config-file>
				<config-file target="*-Info.plist" parent="NSLocationWhenInUseUsageDescription">
					<string>Your location is used to inform you when you are near a location that is interesting to you.</string>
				</config-file>
				<config-file target="*-Info.plist" parent="NSLocationAlwaysAndWhenInUseUsageDescription">
					<string>Your location is used in the background to instantly inform you when you are near a location that is interesting to you.</string>
				</config-file>
				
				<info>Please see our plugin documentation for more information: https://www.plotprojects.com/plot-app-library-documentation-latest/</info>
				
    </platform>
    
</plugin>
