apns | Golang package for sending Apple Push Notifications | Notification library
kandi X-RAY | apns Summary
kandi X-RAY | apns Summary
Utilities for Apple Push Notification and Feedback Services.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of apns
apns Key Features
apns Examples and Code Snippets
public void quit () throws Exception {
Future disconnectFuture = apnsClient.disconnect();
disconnectFuture.await();
}
Community Discussions
Trending Discussions on apns
QUESTION
A few days ago my code for sending Push notifications stopped working :(
The program began to hang on the last line apnsBroker.Stop();
I use NuGet package PushSharp.Core https://github.com/mitch-tofi/PushSharp.Core
...ANSWER
Answered 2021-Apr-27 at 13:30We're looking in to the same issue currently and it seems apple are disabling the old binary interface which push sharp uses.
https://developer.apple.com/news/?id=c88acm2b
pushsharp has it on the roadmap to support the new interface but not completed yet.
Found this library which seems easy enough to use as a solution. hope this helps.
QUESTION
I am sending push notification using php code and ios didn't get notification so whats the exact issue i don't know please help.
...ANSWER
Answered 2021-Apr-29 at 01:44I think port 443 is used now
Sending Notification Requests to APNs
https://support.apple.com/en-us/HT203609
I've been talking to Apple via the developer portal and so far this is all I know. I've now decided to just cherry pick and see what other devs that use APNS did to keep the deliveries successful. I asked this question too and now that I'm browsing the Apple-Push-Notifications tag, I see others are too.
QUESTION
When I try to put an array as a parameter for cloud functions. In my code, the array shows up correct, but in the logs for the cloud function it shows up as undefined.
Array Result: ["user1", "user2"]
Cloud Function:
...ANSWER
Answered 2021-Jun-10 at 22:08I can see that in your code you are sending this:
QUESTION
I am having absolutely no luck getting push notifications to work in iOS in a Xamarin Forms project.
In AppDelegate.cs, I am calling the following in the FinishedLaunching override:
...ANSWER
Answered 2021-May-18 at 18:21You can try implementing the MSInstallationLifecycleDelegate
interface which will allow you to check and see if the installation is being saved on the back end with either success or failure.
QUESTION
My app is implemented in React Native and is using Firebase for notifications. We have webhooks on the web app that are triggered on certain events. Those webhooks then send a request to the respective Firebase Cloud Function. With information from the request's header they get the topic they must send the notification to; from the request's body it gathers the information to be sent as data to the device. They are sent as data notifications only, the handler (using the React Native FCM API) then shows a local notification already translated with i18n using the react-native-push-notifications package. Everything works fine until I hit the weird situation described below.
Everything was doing alright both on Android and iOS until I launched the app on Test Flight for internal testing and then it stopped working after some time on iOS. Eventually, I noticed that when more than one iPhone subscribed to the same topic it eventually lead to inconsistencies in the delivery of the data notifications. The first iPhone to subscribe to the topic usually worked, the others didn't, the first one most of the time eventually stopped working as well or sometimes it just kept working while the others still didn't. I used the Firebase Console to send some test notification to the subscribed devices and it they actually received it. I then changed my Cloud Functions' code to avoid sending any data and just send some example body and title and it turns out the problem was here. As soon as I send something through the data field in the admin.messaging.Message object to be sent as argument to the admin.messaging().send method, they aren't received by the iPhone devices subscribed to the topic (or it's received by one or two max, the first ones to currently subscribe to the topic. But they usually stop receiving them after a while as well).
This is really really weird and being so inconsistent makes it practically impossible to debug with my current knowledge. Some things to keep in mind:
- All Android devices still receive the notifications without a problem
- I've watched the iPhone's console through Xcode to see if there was some error when processing the notification, in case they were actually getting the notification but they it failed before it was shown to the user. But nothing is logged by the SpringBoard process, making me conclude the notifications aren't actually getting to the device
- I've manually sent notifications with cURL to APNs (with this guide). They were received fine
- All notifications without data, regardless of the iOS specific apn headers, payload, etc, are received
What can be the cause of the problem? Or there's something in my code causing this strange behavior (which I doubt, since it works fine on Android and works fine in iOS as well on specific scenarios), there's some type of bug on Firebase's side causing some notifications to not be sent or, finally, there's some error on Apple's APNs side causing this. Highly doubt the last one, if the fault lays on any exterior factor it probably should be on Firebase's handling of topics.
Really would appreciate some help. Thanks in advance. Sorry If I didn't gave enough information, I actually never had the need to do a question on Stack Overflow. I'll leave below an example of a cloud function as well.
...ANSWER
Answered 2021-May-18 at 23:35Turns out the data payload was exceeding the 4KB APNs limit but since when you send by topic it doesn't show any errors at all I had no way of knowing. So yeah, add this to your checklist
QUESTION
I am new to certificate generation. We have our app(Xamarin.Forms-iOS) in production already and planned for another production release this month end.
Provisional profile and distribution profile are expiring by May end. And APNS certificate is going to expire by June end.
Note: All the above certificates are generated from team-members's system (CSR).
Can I re-generate provisional profile and distribution certificate this month from my system and release build to production? Will that affect existing app or something?
And during June, if I regenerate APNS certificate from my system and upload it to azure hub. Will the production app continues to work fine (receive push notification)?
Is there any dependency between CSR or APNS dependency with other certificate?
Note: I will be re-generating certificates from my machine for the same bundle identifier.
...ANSWER
Answered 2021-May-17 at 14:28Provisional profile and distribution profile are expiring by May end, means your account will also expire. Make sure you renew them.
After renew, just renew the profiles. Don't create new.
APNS certificate is going to expire by June end., means when you make new APNS (certificates), just go and update provision profile. No need to create new provisional profile.
And during June, if I regenerate APNS certificate from my system and upload it to azure hub. Will the production app continues to work fine (receive push notification)? - Yes, just after you make new/renew APNS, re-generate provision profile as said above. That's it.
QUESTION
When we are sending a FCM data message with the Firebase Admin SDK to an iOS device we are getting the following exception.
...ANSWER
Answered 2021-Feb-24 at 08:19I think i figured it out.
My problem was that i was setting the apns-priority
to "10". According to the documentation, notifications with a priority of "10" have to be delivered immediatly.
If i put my device into flight mode for example, and sending my data push it failes with the mentioned firebase exception about an invalid token. Which is very missleading in my opinion.
If i set the apns-priority
to "5" everything works fine.
QUESTION
I am sending cloud-messages to my app but Firebase-CF-Reports tells me that they would not be received:
But I know for sure that some devices do receive them. e.g. my own. So something is going wrong here in the reports.
I read about this problem here and here but I already have an analytics-label that I send with my cloud-message.
This is how I sent my notifications with java-admin-sdk:
...ANSWER
Answered 2021-May-04 at 07:51Despite I did not find this in the official documentation, I found information in this discussion in the comments to this answer here. Turns out that subscribing to a topic in FCM is not necessarily permanent. So don't subscribe users to a topic once. Instead do it on every app start, although it is
"not technically necessary. It may depend on your use case. For example, if you want a global topic where all users are a member of, you'd have to make sure that they are subscribed to it. Putting the subscribe method when the app starts guarantees this."
- -@AL.
Since I changed that, the Notifications are received by a lot more people than before. Only the open-count is still not working for me. It is always on zero.
QUESTION
I have a project which use VoiP pushes for calling and APNS pushes for simple notifications. APNS push comes, but VoiP doesn't come. When server tries to send me VoiP push by my VoiP token server throws exception "Invalid Token". Please, see my solution and let me know what I do worst.
I created two certificates (APNS and VoiP)
I added certificate to identify, but I can add just APNS
Next, I generated p12 keys and send to server for using them.
In UIApplicationDelegate I retrieve APNS token and send to server
...ANSWER
Answered 2021-Apr-26 at 10:34Firstly, you should use p8 authKey to send push notifications
Secondly, PKPushRegistry is stored in the func? This is strange. Move it to field of your class
Thirdly, try converting the token from data by the following code:
QUESTION
I have set up the Ionic/Capacitor app to receive push notifications following the capacitor tutorial,
I went through all the tutorial successfully and I receive test notifications sent from FCM both in foreground and background
I can successfully register to a topic I can receive notifications sent to the topic I can receive notifications sent to the token (test mode)
Now I'm trying to send notifications from a different device, I just created a two test button to send notification in multicast to an array of tokens and another button to send notification to a given topic
In both cases from my device I receive the notifications in foreground, but not in background
I believe is something wrong with the format I'm using to send the notifications that is not correct in case of background (I can receive those from the FCM test tool)
Client
...ANSWER
Answered 2021-Apr-18 at 14:15I've found the error myself, for the notifications be visible in background mode the notification object needs to have "notification" key populated, that was missing in my case,
correct send function should be
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install apns
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page