<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://cordova.apache.org/ns/plugins/1.0"
	xmlns:android="http://schemas.android.com/apk/res/android"
	id="lanista-plugin-estimotebeacon"
	version="0.8.7">

	<name>LanistaEstimoteBeacons</name>
	<description>Lanista Cordova/PhoneGap plugin for Estimote beacons.</description>
	<license>Private</license>
	<keywords>Lanista, Estimote, Beacons</keywords>

	<js-module src="plugin/src/js/EstimoteBeacons.js" name="EstimoteBeacons">
		<clobbers target="EstimoteBeacons" />
	</js-module>

	<platform name="ios">

		<framework src="CoreBluetooth.framework" />
		<framework src="CoreLocation.framework" />
		<framework src="SystemConfiguration.framework" />

		<framework src="plugin/lib/ios/Frameworks/EstimoteSDK.framework" custom="true" />

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

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

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

		<config-file target="*-Info.plist" parent="NSLocationAlwaysUsageDescription">
            <string>This app would like to scan for beacons when in the background.</string>
        </config-file>
        <config-file target="*-Info.plist" parent="NSLocationWhenInUseUsageDescription">
            <string>This app would like to scan for beacons while it is in use.</string>
        </config-file>

	</platform>

	<platform name="android">
		<config-file target="res/xml/config.xml" parent="/*">
			<feature name="EstimoteBeacons" >
				<param name="android-package" value="com.lanista.EstimoteBeacons"/>
			</feature>
		</config-file>
		<config-file target="AndroidManifest.xml" parent="/manifest">
			<uses-permission android:name="android.permission.BLUETOOTH" />
			<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
		</config-file>
		<config-file target="AndroidManifest.xml" parent="/manifest/application">
			<service android:name="com.estimote.sdk.service.BeaconService" android:exported="false"/>
		</config-file>

		<framework src="plugin/src/android/lanista.gradle" custom="true" type="gradleReference" />

		<source-file src="plugin/src/android/EstimoteBeacons.java" target-dir="src/com/lanista" />
		<source-file src="plugin/src/android/estimote-sdk.aar" target-dir="libs" />
		<source-file src="plugin/src/android/gradle.properties" target-dir="." />
	</platform>

</plugin>
