push notification Error

166 views
Skip to first unread message

yassine...@gmail.com

unread,
Jul 18, 2017, 10:30:06 AM7/18/17
to CodenameOne Discussions
hello

i'm trying to use push notification but i got this error  when sending the push on IOS using  :

            new Push(PUSH_TOKEN, "Hello World", deviceKey)
                        .apnsAuth(cert, pass, false)
                        .gcmAuth(GCM_SERVER_API_KEY)
                        .send();

[Network Thread] 0:0:0,3 - Exception while generating certificate data, probably P12 password is incorrect: com.notnoop.exceptions.InvalidSSLConfig: java.io.IOException: toDerInputStream rejects tag type 60

on Android the push works well

thanks in advance

Shai Almog

unread,
Jul 19, 2017, 1:02:20 AM7/19/17
to CodenameOne Discussions, yassine...@gmail.com
Hi,
make sure you are using the right URL for the push certificate and that it is the debug certificate not the production certificate.
Notice that this is NOT the certificate used for signing!!!

If you host it yourself make sure the file is accessible directly and not a page with a download button.

yassine...@gmail.com

unread,
Jul 19, 2017, 6:20:20 AM7/19/17
to CodenameOne Discussions, yassine...@gmail.com
Hi,

it works fine now, thanks,
i have another question , it is possible to push an image from the server ?

Shai Almog

unread,
Jul 20, 2017, 12:26:05 AM7/20/17
to CodenameOne Discussions, yassine...@gmail.com
Hi,
normally you would use push to notify that there is an image and then fetch that image from the server. Push shouldn't be used as a communication protocol as it's pretty unreliable.

https://www.codenameone.com/how-do-i---use-push-notification-send-server-push-messages.html

Yassine el malyh

unread,
Jul 20, 2017, 3:52:09 AM7/20/17
to Shai Almog, CodenameOne Discussions
Hi Shai,

i'm asking for something like that :
output_format-3.png

Shai Almog

unread,
Jul 21, 2017, 1:02:16 AM7/21/17
to CodenameOne Discussions, shai....@gmail.com, yassine...@gmail.com
Hi,
I think we only support that with local notifications and not with push notifications at this time.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages