avivais / phonegap-parse-plugin

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

parsePlugin.initialize is never run on ios #53

Closed tiagojdf closed 2 years ago

tiagojdf commented 9 years ago

I have the parsePlugin working on Android, but on iOS it arrives at:

return parsePlugin.initialize('asd', 'qwe', (function() {
...
}

It goes to:

    initialize: function(appId, clientKey, successCallback, errorCallback) {
        cordova.exec(
            successCallback,
            errorCallback,
            'ParsePlugin',
            'initialize',
            [appId, clientKey]
        );
    },

But the original code inside initialize is never run,

tiagojdf commented 9 years ago

This plugin still requires you to activate Push Notifications for your App Id and generate and add the SSL certificate to parse?

devHasitha commented 9 years ago

Did you find the reason for that. Coz I'm also have this problem.

Pentiado commented 9 years ago

THREAD WARNING: ['ParsePlugin'] took '32.885986' ms. Plugin should use a background thread. This is the message I'm getting in xcode console when trying to run initialize and none of the callbacks is ever run

MarcBT commented 9 years ago

Hi @Tiagojdferreira, same question as @devHasitha ? Did you find a solution to this issue ? Thanks in advance !

tiagojdf commented 9 years ago

I am not sure anymore what was the problem at the time, and I am sorry I did not share the answer once I found it. Here are some possible problems: Be sure to call the function right after the module is initialized with the .run($ionicPlatform) function and within the $ionicPlatform.ready function Be sure your plugin is well registered (at some point I installed the local push plugin instead of this one, due to their similarity in name) and that it gets built. To debug, use xcode Create the Apple Push SSL certificate, upload it to the Parse server.

MarcBT commented 9 years ago

I have managed to make it work. Thanks for the answer @Tiagojdferreira.

Pentiado commented 9 years ago

Something what I discovered is that switching from 5.x to 4.3.1 fixed the problem