[Aerogear-users] Error registering for push notifications in iOS

Erik Jan de Wit edewit at redhat.com
Tue Sep 8 05:20:37 EDT 2015


That is really strange could you debug the plugin? Put a breakpoint
here [1] and see if there is a channelId. Also can you fire up safari and
attach a javascript debugger to the cordova webview to see if there are
some javascript errors?


[1]
https://github.com/aerogear/aerogear-cordova-push/blob/master/src/ios/AGPushPlugin.m#L86

On Mon, Sep 7, 2015 at 11:16 PM, Fabio Turizo <fabio.turizo at gmail.com>
wrote:

> Hi again, Erik.
>
> I tried a sample proof of concept for iOS Notifications and they still
> didn't work. Created a new cordova app using the cordova create command,
> added *aerogear-cordova-push* and *cordova-console-plugin *and took the
> sample implementation code for the iOS variant in the UPS web admin.
> Launching the application trough Xcode onlye gets me a '*register*'
> message in the log and nothing more. Even the 'success' or 'error' messages
> in the callbacks aren't printed in the logs yet. Checking the UPs in the
> iOS variant, no installations ares shown.
>
> I tested this using Cordova 5.2.0.
>
> El lun., 7 de sept. de 2015 a la(s) 3:51 p. m., Fabio Turizo <
> fabio.turizo at gmail.com> escribió:
>
>>
>> Ok, sorry for answering this late but i had to get a Mac in order to do
>> the right debug. Xcode log files don't give any info. What's more when I
>> debug the application using Xcode, neither the success or error callback
>> handlers are called. The UPS server log also doesn't show anything. Any
>> idea what could be happening?
>>
>> El jue., 3 de sept. de 2015 a la(s) 1:07 a. m., Erik Jan de Wit <
>> edewit at redhat.com> escribió:
>>
>>> Hi Fabio,
>>>
>>> Can you have a look in the UPS logs? The device log might also provided
>>> some extra information. Running it from xcode you can see this log. Not
>>> being able to register can not be the cause of the certificate is not
>>> configured correctly, that will only prevent UPS from sending a message to
>>> the device.
>>>
>>>
>>> On Wed, Sep 2, 2015 at 10:06 PM, Fabio Turizo <fabio.turizo at gmail.com>
>>> wrote:
>>>
>>>> Greetings.
>>>>
>>>> Ia have an error when i try to register an user in a Cordova app to the
>>>> Unified Push Server. The error callback in this code:
>>>>
>>>> *function registerPush(alias) {*
>>>> *    if(typeof push !== 'undefined'){*
>>>> *        console.log('Registering push notifications for: ' + alias);*
>>>> *        $.ajax({*
>>>> *            url: "push-config.json",*
>>>> *            dataType: "json"*
>>>> *        }).then(function (pushConfig) {*
>>>> *            pushConfig.alias = alias;*
>>>> *            push.register(onNotification, successHandler,
>>>> errorHandler, pushConfig);*
>>>>
>>>> *            function successHandler() {*
>>>> *                console.log('Succesfully registered to aerogear
>>>> push!');*
>>>> *            }*
>>>>
>>>> *            function errorHandler(message) {*
>>>> *                console.log('Error registering aerogear push: ' +
>>>> message);*
>>>> *            }*
>>>> *        });*
>>>> *    }*
>>>> *}*
>>>>
>>>> Gets called with a 'null' message. Do you have any suggestions to debug
>>>> this issue further? I've tried re-issuing a new APN certiticate but it
>>>> didn't work.
>>>>
>>>> _______________________________________________
>>>> Aerogear-users mailing list
>>>> Aerogear-users at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/aerogear-users
>>>>
>>>>
>>>
>>>
>>> --
>>> Cheers,
>>>        Erik Jan
>>> _______________________________________________
>>> Aerogear-users mailing list
>>> Aerogear-users at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/aerogear-users
>>>
>>
> _______________________________________________
> Aerogear-users mailing list
> Aerogear-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-users
>
>


-- 
Cheers,
       Erik Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-users/attachments/20150908/70448d6c/attachment.html 


More information about the Aerogear-users mailing list