apple-push-notifications

Detect if application: didReceiveRemoteNotification: fetchCompletionHandler: was called by tapping on a notification in Notification Center

倾然丶 夕夏残阳落幕 提交于 2019-12-03 02:14:46
问题 application: didReceiveRemoteNotification: fetchCompletionHandler: is different from application: didReceiveRemoteNotification: How? from the docs: Unlike the application:didReceiveRemoteNotification: method, which is called only when your app is running, the system calls this method regardless of the state of your app. If your app is suspended or not running, the system wakes up or launches your app and puts it into the background running state before calling the method. If the user opens

MDM push certificate creation

蹲街弑〆低调 提交于 2019-12-03 01:53:35
I'm interesting in creation of PushCertWebRequest (this is from apple documentation) I have found a lot of docs how to do this for 3rd party vendors like Air-watch and so on, but they skip last step where they are working with your .p12 certificate. I mean process when you should create PushCertWebRequest and upload it to https://identity.apple.com/pushcert So my question is how to create a Push Certificate Request plist. the example of this plist should be following (this is from apple doc) <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www

iOS 8 push notification action buttons - code in handleActionWithIdentifier does not always run when app is in background

梦想的初衷 提交于 2019-12-03 01:48:10
I am adding two action buttons to my push notifications on iOS 8: an Accept button and a Deny button. Neither button will open the app, but different server requests will be made depending on which button is pressed. Here's my setup: + (void)requestForPushNotificationToken { UIApplication *application = [UIApplication sharedApplication]; // if ios 8 or greater if ([application respondsToSelector:@selector(registerUserNotificationSettings:)]) { UIMutableUserNotificationAction *acceptAction = [[UIMutableUserNotificationAction alloc] init]; [acceptAction setActivationMode

Apple Multiple Push Notifications not visible in Notifications Tray

谁说我不能喝 提交于 2019-12-03 01:48:00
I basically want to make multiple push notifications in the same application visible in the notification tray in iOS. This scenario works if my data is on while push notification is triggered via APNS, but only the latest one is received in case I am offline and come back after a while. This functionality is affirmed by APNS documentaion. However, this is what worked in WhatsApp: Turned Data Connection OFF Sent some messages to WhatsApp Turned Data Connection ON Saw multiple push notifications received in Apple's Notification Tray How's this scenario working? Can I use APNS for this? If yes,

Which Apple Push Notification Service Java library should I use? [closed]

怎甘沉沦 提交于 2019-12-03 01:39:42
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I need to send push notifications to iOS devices, from my Java server, using Apple Push Notification Service (APNS) I found two libraries to send APNS push notifications in Java: java-apns javapns But both seem to be abandoned (or at least they have bugs and the last release is a year ago). java-apns has lots of

How to send APNs push messages using APNs Auth Key and standard CLI tools?

假装没事ソ 提交于 2019-12-03 01:39:31
问题 Apple recently added a new authentication method to APNS ( Apple Push Notification Authentication Key (Sandbox & Production)). The downloaded key is a .p8 file with a private key: $ cat APNSAuthKey_3HHEB343FX.p8 -----BEGIN PRIVATE KEY----- MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBH...Already.Revoked...lHEjCX1v51W -----END PRIVATE KEY----- I am using APNs messages using the old method - adding them to keychain, asking for a certificate and using OpenSSL to send messages to gateway.production.push

Push Notification vs. Web Sockets for implementing a real-time chat app?

独自空忆成欢 提交于 2019-12-03 01:13:59
I'm looking into building a real-time chat app for iPhone (but this question applies to Android and other devices as well) Basically I want the app to receive realtime messages while it's open as well as while it's closed, just like the iPhone's own "Message" app. When it's closed I can use the native push notification services like APNS, and when the app is open, I can run my own websockets server or use 3rd party providers like PubNub or Pusher, which is what I've been doing actually. Then I wondered: Why can't I completely rely on APNS for the real-time messaging, both while the app is open

How do you test the Push Notification feedback service?

混江龙づ霸主 提交于 2019-12-03 00:53:01
How would you test the APNS feedback service in the sandbox? Or in other words, how do you force a device to be in the feedback? I think that from the initial round of question "Yes bu how do you get something to show up there? " actually came from the fact that, his tests were not returning any device, i.e., even though he may have had notifications successfully sent to the iPhone/iPad, whenever he queries the FB server, nothing came back, precisely because the app was never removed from the device, therefore the server is just as happy to keep answering "0 devices found" (for example)

how to make iPhone app asks to register device for push notification multiple times

邮差的信 提交于 2019-12-03 00:18:10
I have used the following code to register my app to receive push notification, and I got the alert that asks me to register for push notification and I accidentally press cancel. Now I want to have the alert again so I can fire the delegate method in order to get the device token. But I don't get this alert any more and every time I open the settings I found that the notification is turned off for the app. I tried to delete the app from device, change app version, delete testing profile ,clean the target even I reset all the iPhone settings, but still was not able to solve this.I would very

iOS - Handling pushed notifications with APNS

Deadly 提交于 2019-12-02 22:57:30
Considering that I receive a pushed notification on my iPhone. What happens: If the application is started: is there a way to get the payload? Do I see the notification on my screen? If the application is not started, is there a way to get the payload? Thx for your answers First of all push notifications are not “strong”, if you simply let a notification sit for long enough (e.g. phone turned off for many days) it will get discarded. You need to do some custom back-end processing to persist the content sent in notifications. In the UIApplicationDelegate protocol there’s application