-
-
Notifications
You must be signed in to change notification settings - Fork 621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
does not work with python 3.10 #675
Comments
Can you provide additional context? |
when I try to send a push notification I get |
others have commented on this issue. it seems to be related to unmaintained dependencies, specifically |
Yes, concur, the incompatibility with Python 3.10 is due to the apns2 and thus hyper dependencies. May need to consider incorporating aioapns as an alternative. Thoughts? |
yes i’ve been using aiopns as a result of these issues actually and it has been working for me |
That’s great feedback, thank you. I’m tempted to open another Issue and
propose to the group to switch to aioapns and drop apns2 if they aren’t
jumping on supporting python 10 by this point in time.
…On Wed, Jan 25, 2023 at 10:58 AM Samir ***@***.***> wrote:
yes i’ve been using aiopns as a result of these issues actually and it has
been working for me
—
Reply to this email directly, view it on GitHub
<#675 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANVBG5P7T2LPFGXHBLZNGLWUFERVANCNFSM6AAAAAASPHUOH4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
@samirsd Did you encounter an issue with aioapns complaining that it is expecting an EllipticCurve PrivateKey/PublicKey pair? If so, could you tell me what you did to resolve the issue, or point me to a online reference? I have the APNS cert/key pem file already. |
@bradleydworak I didn't encounter that issue but I've been using it in sandbox mode Maybe double check the steps for generating your my code looks like this: `
` I did however encounter an issue where |
Thx for the feedback. Yes I wasn’t able to find any documentation on
generating the .p8 file, and unclear if it is derived from the APNS
cert/key or generated separately. Do you have a link to instructions and/or
sample code on how to do this? I’m hoping to add some documentation to the
aioapns Readme once I understand this better.
…On Sat, Feb 4, 2023 at 9:21 PM Samir ***@***.***> wrote:
@bradleydworak <https://github.com/bradleydworak> I didn't encounter that
issue but I've been using it in sandbox mode
Maybe double check the steps for generating your .p8 file?
my code looks like this:
`async def send_message(device_token, message):
key_path = os.path.join(settings.BASE_DIR,
"path/to/my/AuthKey_12345ABC.p8")
use_sandbox = True
apns_key_client = APNs(
key= key_path,
key_id=KEY_ID,
team_id=TEAM_ID,
topic=IOS_APP_BUNDLE_ID, # Bundle ID
use_sandbox=use_sandbox,
)
request = NotificationRequest(
device_token=device_token,
message = {
"aps": {
"alert": message,
"badge": "1",
}
},
notification_id=str(uuid4()), # optional
time_to_live=3, # optional
push_type=PushType.ALERT, # optional # optional
)
await apns_key_client.send_notification(request)
`
I did however encounter an issue where aioapns would send repeated push
notifications so I just commented out the retry logic as follows:
***@***.***
<samirsd/aioapns@f7e6081>
—
Reply to this email directly, view it on GitHub
<#675 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANVBG4JZTJD32KU34IOX5LWV4FCJANCNFSM6AAAAAASPHUOH4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
It has to be done from the apple developer website https://stackoverflow.com/questions/44631803/ios-swift-how-to-create-p8-file `Certificates, Identifiers & Profiles > Keys > Click "+" > Check Apple Push Notifications service (APNs) Choose a name, then register it. It will give you an option to download the p8 file.` |
Thx…finally got it working. Without any documentation it wasn’t clear that
you use either the key or the cert file but not both. I’m hoping to make a
pull request and forgo apns.
…On Sun, Feb 5, 2023 at 9:46 AM Samir ***@***.***> wrote:
It has to be done from the apple developer website
https://stackoverflow.com/questions/44631803/ios-swift-how-to-create-p8-file
—
Reply to this email directly, view it on GitHub
<#675 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANVBG2RXI6KMCLR6UELAWDWV64KZANCNFSM6AAAAAASPHUOH4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
no prob glad i could help |
Any fork you know which uses aioapns? |
Closing in favor of #622 |
No description provided.
The text was updated successfully, but these errors were encountered: