title: Cordova Parse Plugin not working
body: <p>I am facing issue with implementing <a href="https://github.com/avivais/phonegap-parse-plugin" rel="nofollow">Avivais Phonegap-Plugin-parse</a> in my ionic project. Below are the steps I followed.</p>
  
  <p><strong>Issue</strong></p>
  
  <p>I always get <code>Reference Error: parsePlugin not defined</code>. </p>
  
  <p><strong>Steps followed</strong></p>
  
  <p>a. Run this command in Ionic project directory.</p>
  
  <p><code>cordova plugin add https://github.com/benjie/phonegap-parse-plugin</code> </p>
  
  <p>b. Add android platform. <code>ionic platform add android</code></p>
  
  <p>c. in <code>www/js/app.js</code> add this code.</p>
  
  <pre><code>.run(function($ionicPlatform) {
    $ionicPlatform.ready(function() {
      // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
      // for form inputs)
      if(window.cordova &amp;&amp; window.cordova.plugins.Keyboard) {
        cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
      }
      if(window.StatusBar) {
        // org.apache.cordova.statusbar required
        StatusBar.styleDefault();
      }
      try{
          parsePlugin.initialize('XXX', 'YYY', function() {
              alert('success');
          }, function(e) {
              alert('error');
          });
  
      }catch(err){
          alert('Parse Error '+err.message); //this gets executed all time
      }
    });
  })
  </code></pre>
  
  <p><strong>Note</strong></p>
  
  <p>a. The plugin is installed and shows in <code>plugins/org.apache.cordova.core.parseplugin</code></p>
  
  <p>b. The <code>platforms/android/res/xml/config.xml</code> has </p>
  
  <pre><code>&lt;feature name="ParsePlugin"&gt;
          &lt;param name="android-package" value="org.apache.cordova.core.ParsePlugin" /&gt;
   &lt;/feature&gt;
  </code></pre>
  
  <p>c. The <code>index.html</code> has <code>&lt;script src="cordova.js"&gt;&lt;/script&gt;</code></p>
  
  <p>d. <code>AndroidManifest.xml</code></p>
  
  <pre><code>&lt;service android:name="com.parse.PushService" /&gt;
  &lt;receiver android:name="com.parse.ParseBroadcastReceiver"&gt;
      &lt;intent-filter&gt;
          &lt;action android:name="android.intent.action.BOOT_COMPLETED" /&gt;
          &lt;action android:name="android.intent.action.USER_PRESENT" /&gt;
      &lt;/intent-filter&gt;
  &lt;/receiver&gt;
  &lt;receiver android:name="com.parse.GcmBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND"&gt;
      &lt;intent-filter&gt;
          &lt;action android:name="com.google.android.c2dm.intent.RECEIVE" /&gt;
          &lt;action android:name="com.google.android.c2dm.intent.REGISTRATION" /&gt;
          &lt;category android:name="com.ionicframework.ecopulse420832" /&gt;
      &lt;/intent-filter&gt;
  &lt;/receiver&gt;
  </code></pre>
  
  <p>Can anyone please tell me what am I missing here to add or check?</p>