<?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="cordova-plugin-pushnotification-parsepushnotification"
    version="1.0.34">
	
    <name>Cordova Parse Push Notification plugin</name>
    <description>Cordova Parse Push Notification plugin</description>
    <author>Sang Ki Kwon (Cranberrygame)</author>		
    <license>MIT</license>
    <keywords>cordova,plugin,pushnotification,parse,promotion,advanced</keywords>
    <repo>https://github.com/cranberrygame/cordova-plugin-pushnotification-parsepushnotification</repo>
    <issue>https://github.com/cranberrygame/cordova-plugin-pushnotification-parsepushnotification/issues</issue> 	
	<engines>
	    <engine name="cordova" version=">=3.0.0" />
	</engines>
	
    <js-module src="www/parsepushnotification.js" name="parsepushnotification">
        <clobbers target="window.parsepushnotification" />
    </js-module>

    <!-- android -->
    <platform name="android">
		<config-file target="res/xml/config.xml" parent="/*">
			<feature name="ParsePushNotificationPlugin">
				<param name="android-package" value="com.cranberrygame.cordova.plugin.pushnotification.parsepushnotification.ParsePushNotificationPlugin" />
			</feature>
		</config-file>
        
        <config-file target="AndroidManifest.xml" parent="/manifest/application">
			<service android:name="com.parse.PushService" />
            <receiver android:name="com.cranberrygame.cordova.plugin.pushnotification.parsepushnotification.ParseBroadcastReceiver">
                <intent-filter>
                    <action android:name="com.google.android.c2dm.intent.RECEIVE"/>
                    <action android:name="android.intent.action.USER_PRESENT"/>
                    <category android:name="$PACKAGE_NAME"/>
                </intent-filter>
            </receiver>			
			<receiver android:name="com.parse.ParseBroadcastReceiver">
				<intent-filter>
					<action android:name="android.intent.action.BOOT_COMPLETED" />
					<action android:name="android.intent.action.USER_PRESENT" />
				</intent-filter>
			</receiver>
			<receiver android:name="com.parse.GcmBroadcastReceiver"	android:permission="com.google.android.c2dm.permission.SEND">
				<intent-filter>
					<action android:name="com.google.android.c2dm.intent.RECEIVE" />
					<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
					<category android:name="$PACKAGE_NAME" />
				</intent-filter>
			</receiver>
			<receiver android:exported="false" android:name="com.parse.ParsePushBroadcastReceiver">
				<intent-filter>
					<action android:name="com.parse.push.intent.RECEIVE"/>
					<action android:name="com.parse.push.intent.OPEN"/>
					<action android:name="com.parse.push.intent.DELETE"/>
				</intent-filter>
			</receiver>			  
        </config-file>
        
        <config-file target="AndroidManifest.xml" parent="/manifest">
			<uses-permission android:name="android.permission.INTERNET" />
			<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
			<uses-permission android:name="android.permission.WAKE_LOCK" />
			<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
			<uses-permission android:name="android.permission.VIBRATE" />
			<uses-permission android:name="android.permission.GET_ACCOUNTS" />
			<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
			<permission android:protectionLevel="signature" android:name="$PACKAGE_NAME.permission.C2D_MESSAGE" />
			<uses-permission android:name="$PACKAGE_NAME.permission.C2D_MESSAGE" />
        </config-file>

        <source-file src="src/android/Parse-1.9.4.jar" target-dir="libs" />
        <source-file src="src/android/bolts-android-1.2.0.jar" target-dir="libs" />
		<source-file src="src/android/ParseCrashReporting-1.9.4.jar" target-dir="libs" />
		<source-file src="src/android/ParseFacebookUtilsV4-1.9.4.jar" target-dir="libs" />
        <source-file src="src/android/ParsePushNotificationPlugin.java" target-dir="src/com/cranberrygame/cordova/plugin/pushnotification/parsepushnotification" />
        <source-file src="src/android/ParseBroadcastReceiver.java" target-dir="src/com/cranberrygame/cordova/plugin/pushnotification/parsepushnotification" />
     </platform>

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

        <framework src="Accounts.framework" />
        <framework src="AudioToolbox.framework" />
        <framework src="CFNetwork.framework" />
        <framework src="CoreGraphics.framework" />
        <framework src="CoreLocation.framework" />
        <framework src="MobileCoreServices.framework" />
        <framework src="QuartzCore.framework" />
        <framework src="Security.framework" />
        <framework src="Social.framework" />
        <framework src="StoreKit.framework" />
        <framework src="SystemConfiguration.framework" />
        <framework src="libz.dylib" />
        <framework src="libsqlite3.dylib" />

        <framework src="src/ios/Bolts.framework" custom="true" />
        <framework src="src/ios/Parse.framework" custom="true" />
        <!--
        //cause build error
        //http://stackoverflow.com/questions/15457136/parse-for-ios-errors-when-trying-to-run-the-app
        <framework src="src/ios/ParseCrashReporting.framework" custom="true" />
        <framework src="src/ios/ParseFacebookUtils.framework" custom="true" />
        <framework src="src/ios/ParseFacebookUtilsV4.framework" custom="true" />
        <framework src="src/ios/ParseUI.framework" custom="true" />
        -->
    </platform>
		
	<!-- wp8 -->
    <platform name="wp8">
        <config-file target="config.xml" parent="/*">
            <feature name="ParsePushNotificationPlugin">
                <param name="wp-package" value="ParsePushNotificationPlugin"/>
            </feature>
        </config-file>

        <source-file src="src/wp8/ParsePushNotificationPlugin.cs" />
		
		<framework src="src/wp8/Parse.dll" custom="true"/>
		<framework src="src/wp8/Parse.Phone.dll" custom="true"/>
		
		<config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App/Capabilities">
			<Capability Name="ID_CAP_PUSH_NOTIFICATION" />
		</config-file>
    </platform>
</plugin>
