Sending apns notifications from a python backend

Hi!

I have a backend written in python and am using the urbanairship python module to send a silent content-available notification. My code looks like:

    push = airship.create_push()

    push.audience = ua.push.audience.device_token(token)

    push.notification = ua.notification(ios=ua.ios(content_available=True, badge=0))

    push.device_types = ua.device_types('ios')

    push.send()

The urban airship servers replies positively, with for example:

{"ok":true,"operation_id":"cde30009-c5f2-439a-b7cc-e671d35f0b39","push_ids":["ea6bf4cc-2df6-4bea-9843-3f4874725247"],"message_ids":[],"content_urls":[]}

But I don't get any notification in my ios app.

Now I should mention that I haven't installed the sdk into the ios app. My usecase is to use urban airship just for sending the apns notifications from within the backend.

Should it work? Or do I have to add the sdk to the ios app?

Thanks for any help!

 

Didn't find what you were looking for?

New post

Comments

1 comment

Please sign in to leave a comment.