avivais / phonegap-parse-plugin

Phonegap 3.0.0 plugin for Parse.com push service
195 stars 315 forks source link

how to add to phonegap config.xml #6

Open ricmcavieira opened 10 years ago

ricmcavieira commented 10 years ago

hi, im trying to use your plugin for my first phonegap app, ive added with phonegap local plugin add https://github.com/benjie/phonegap-parse-plugin

but cant seem to be defined when trying to use it in my code, ive added this to the config.xml in phonegap:

 <plugins>
        <plugin name="parsePlugin" value="org.apache.cordova.core.parseplugin"/>
        <gap:plugin name="phonegap-parse-plugin" />
    </plugins>

and trying to use it like this

  window.parsePlugin.initialize(PARSE_APP, PARSE_REST, function() {
        alert('success');
    }, function(e) {
        alert('error');
    });      

but still doesnt work, can you help me please?

ricmcavieira commented 10 years ago

I got this working, my problem was i wasnt letting the phonegap api load I had to add this:

document.addEventListener("deviceready", onDeviceReady, false);

    function onDeviceReady() {
        // Now safe to use the PhoneGap API    

    }
´´´
rajaveernapu commented 10 years ago

Hi

I am using in the deviceReady only but still i am getting the "Class not found" Do i have to do any other i have used automatic installation

i have added these two lines to the config.xml

    <gap:plugin name="phonegap-parse-plugin" />

but still i am not able to make it work

Could you please help me out here

Thanks R