djacobs / PyAPNs

Python library for interacting with the Apple Push Notification service (APNs)
http://pypi.python.org/pypi/apns/
MIT License
1.22k stars 374 forks source link

Payload does not contain mutable_content. #190

Open sunnyjain1 opened 7 years ago

sunnyjain1 commented 7 years ago

Hi,

I am using this library to send notification to ios device.

For ios 10 compatible notification I tried below code written in README.

import time
from apns import APNs, Frame, Payload
apns = APNs(use_sandbox=True, cert_file='cert.pem', key_file='key.pem')
token_hex = '<some-token>'
payload = Payload(alert="Hello World!", sound="default", badge=1, mutable_content=True)  <-- Got Error on this line
apns.gateway_server.send_notification(token_hex, payload)

The Error I got was :

__init__() got an unexpected keyword argument 'mutable_content'

I installed the apns using :

easy install apns

Thanks

ZwodahS commented 7 years ago

Hmm the line for mutable_content was added on 2016, and the last apns uploaded to pypi is 2015.

Any chance that we can get a new version on pypi ? Or should we use directly from github ? If so, can we have a tag on the last known stable instead of relying on master.