apple-push-notifications

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

心不动则不痛 提交于 2019-12-20 11:32:04
问题 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 = [

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

余生长醉 提交于 2019-12-20 11:09:39
问题 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

Device Token not received when registering for remote notifications in Swift

拥有回忆 提交于 2019-12-20 10:54:28
问题 I somehow can not receive the device token when registering for remote notifications. I get the modal saying "Do you want to allow App X to be able to send you notificaitons", but when I accept it, the didRegisterForRemoteNotifications function is not called. When I register for remote notifications in iOS 8/Swift using this code: UIApplication.sharedApplication().registerForRemoteNotifications() let settings = UIUserNotificationSettings(forTypes: UIUserNotificationType.Badge |

Firebase Auth using phone number returns an internal error

感情迁移 提交于 2019-12-20 10:35:22
问题 I set up my app to be able to send Apple Notifications using firebase and I verified that it works using the console. Now I want to do phone authentication which is built on top of APN. So I wrote this: PhoneAuthProvider.provider().verifyPhoneNumber(phoneNumber) { verificationID, error in if error != nil { print("Verification code not sent \(error!)") } else { print ("Successful.") } And I get: Error Domain=FIRAuthErrorDomain Code=17999 "An internal error has occurred, print and inspect the

Duplicate Apple APNS push notifications?

混江龙づ霸主 提交于 2019-12-20 10:22:44
问题 We've been using APNS on our app without much incident for some time now, and suddenly our users are reporting receiving the same push notification multiple times. I've confirmed - tediously - that our servers are only sending the notification payloads to Apple once, and yet the notification produces 2 and sometimes 3 identical alerts, both in the banner and notification center. This has been observed in both iOS5 and iOS6. Has anybody seen this phenomenon before? Am I perhaps missing some

ejabberd and Push Notification

北战南征 提交于 2019-12-20 09:21:58
问题 I have integrate chat system in my iOS and Android app using XMPP. I have used ejabberd 2 in the server side. Chatting sytem works fine. I want to integrate push notification in my chating using APNS and GCM. How can I send a push notification with each chat message ? ejabberd 2 has any API or extensions available to implement this feature ? Help is highly appreciable, 回答1: Please use the below blog , it is very simple and useful, it is works fine for me. http://symmetricinfinity.com/2013/01

How to show iOS Push Notification Popup? [closed]

拟墨画扇 提交于 2019-12-20 09:02:52
问题 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 6 years ago . I'm trying to add push notification to my app. I need to know how to make the push notification popup appear. The popup I'm pertaining to is an alert view that has two choices, "allow" and "don't allow". It asks the user whether to allow the app to receive notifications and stuff or not. I've tried deleting my

Apple Push Notifications in Bulk

旧时模样 提交于 2019-12-20 08:58:11
问题 I have an app that involves sending Apple Push Notifications to ~1M users periodically. The setup for doing so has been built and tested for small numbers of notifications. Since there is no way I can test sending at that scale, I am interested in knowing whether there are any gotchas in sending bulk push notifications. I have scripts written in Python that open a single connection to the push server and send all notifications over that connection. Apple recommends keeping it open for as long

“no valid aps-environment entitlement found for application”

自作多情 提交于 2019-12-20 08:56:36
问题 I am encountering this error when I am loading an Ad Hoc build of my Push Notification enabled iPhone app onto my device: no valid aps-environment entitlement found for application What does it mean, and how do I repair it? 回答1: I found the solution. In my project info under Build > Code Signing Identity I had it set to automatic, and it was selecting an AdHoc distribution profile which did not have push notifications enabled. (It was the wrong one.) I have selected the correct profile and

Use Apple Push Notification Service through Java

99封情书 提交于 2019-12-20 08:56:01
问题 Am trying to implement a Java program which sends an Apple Push Notification to an iPhone client app... Found the following library: Java APNs Provider code: Created the following code (from Javapns) to use in my app: try { PayLoad payLoad = new PayLoad(); payLoad.addAlert("My alert message"); payLoad.addBadge(45); payLoad.addSound("default"); PushNotificationManager pushManager = PushNotificationManager.getInstance(); pushManager.addDevice("iPhone", "f4201f5d8278fe39545349d0868a24a3b60ed732"