apple-push-notifications

Java Sockets and Dropped Connections

放肆的年华 提交于 2019-11-27 18:37:26
What's the most appropriate way to detect if a socket has been dropped or not? Or whether a packet did actually get sent? I have a library for sending Apple Push Notifications to iPhones through the Apple gatways ( available on GitHub ). Clients need to open a socket and send a binary representation of each message; but unfortunately Apple doesn't return any acknowledgement whatsoever. The connection can be reused to send multiple messages as well. I'm using the simple Java Socket connections. The relevant code is: Socket socket = socket(); // returns an reused open socket, or a new one socket

How to test production push notifications?

╄→гoц情女王★ 提交于 2019-11-27 18:07:10
Until now I used development push certificate and the push notifications worked great. Now I want to submit my app to Apple so I created a production certificate and set it under "code signing identity" -> "Release" I also placed the .p12 file in my production server. But the push now does not work. Is it suppose to work when I run from xcode? or will it just work when downloading the app from App Store? If so how can I test it? FrediWeber The production push will work when you download the app from the App Store. UPDATE: You can also test the production push with an AdHoc build of the app;

Local and Push Notifications in IOS version compatible

情到浓时终转凉″ 提交于 2019-11-27 17:53:47
I developed local Notifications in iOS 10 . It is working perfectly. But now how should i code local notifications and push notification if user is using iOS 9 and above versions. Can anyone help please? Below is code in iOS 10 import UIKit import UserNotifications @available(iOS 10.0, *) class ViewController: UIViewController,UNUserNotificationCenterDelegate { override func viewDidLoad() { super.viewDidLoad() if #available(iOS 10.0, *) { //Seeking permission of the user to display app notifications UNUserNotificationCenter.current().requestAuthorization(options: [.alert,.sound,.badge],

iPhone APNS Device Tokens in sandbox vs. production

此生再无相见时 提交于 2019-11-27 17:50:37
How do device tokens vary from sandbox to production modes? I think I have locked up some device tokens into a production mode, and they can't be pushed to from development. Any ideas on how I can check? When you build your app using a development cert, the app will generate a unique device token. This device token will not work on the production push network. When you then build your app with a distribution provisioning profile (App Store or Ad-Hoc) your device will generate a different device token for push notifications. If you try to send the development generated token to the production

How to get back “Allow Push Notifications” dialog after it was dismissed once?

有些话、适合烂在心里 提交于 2019-11-27 17:30:48
I am building an app that is heavily relies on APN. Upon the very first start of my app, iOS asks if this app is allowed to use APN (as a result of registerForRemoteNotificationTypes: call). However once dismissed, this dialog is never popping up back. I have to manually go to Settings->Notifications->MyApp to enable/disable things there. So is there a way to avoid this hustle and actually experience what user will experience upon the very first start every time I start my app in debug mode? Eran Here's how Apple say you can do it: Resetting the Push Notifications Permissions Alert on iOS The

iOS Push Notification - How to get the notification data when you click on the app icon instead of notification

守給你的承諾、 提交于 2019-11-27 17:27:20
Similar to this question: How do I access remote push notification data on applicationDidBecomeActive? But the different is how can you access the notification data when you are in applicationDidBecomeActive and if you have clicked on the app icon instead of the push notification. The flow is: If you click on the push notification then didReceiveRemoteNotification will be triggered, but if you click on the original app icon, only applicationDidBecomeActive will be triggered and didReceiveRemoteNotification will not be called. I am looking for the later case so how can I access the push

How to respond to push notification view if app is already running in the background

天涯浪子 提交于 2019-11-27 16:59:54
I have something fairly simple I want to do. I attach a custom piece of data to some push notifications that I handle in -(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions I look for the UIApplicationLaunchOptionsRemoteNotificationKey and hey presto there it is. That method only gets called if my app is being launched for the first time. How do I read that same key if my application is running in the background already when the notification comes in and the user pressed the 'View' button on the notification? I want to send them to a

Apple Push Notification with Sending Custom Data

自作多情 提交于 2019-11-27 16:50:26
I am sending push notifications from php job application to iphone. I am sending push notifications regarding new jobs. Is this possible that when user click on the view of push notification pop up , then user redirect to the particular job in the device. I mean I wanted to know can I send any custom data with push notification like jobId,something else....so that Iphone end Can retrieve and show the particular job ? Thanks. typeoneerror Regardless of the language and library you use, the push notification payload is a JSON payload: { "aps": { "badge": 10, "alert": "Hello world!", "sound":

What Happen If a APNS Device Token Expired?

有些话、适合烂在心里 提交于 2019-11-27 16:49:01
问题 According to this forum post Does the APNS device token ever change, once created? The device token might be expire or APNS might change the device token. My question is that whether the APNS will use the expired token for notification if the server send this expired token to Apple? Can APNS use this expired token for another device? 回答1: I've never encountered an expired device token, so I can't tell you from my personal experience. Nor can I tell you from Apple's APNS documentation, because

How to find the Apple Push Notification Delivered to user or not from our server?

痴心易碎 提交于 2019-11-27 16:41:17
问题 Am new to Apple Push Notification services in iPhone app. I have learned these tutorials and apple document, www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12 www.raywenderlich.com/3525/apple-push-notification-services-tutorial-part-2 We are pushing a notification from our server (PHP) to Apple Push Notification Server and APNS will push the notification to devices. In this case how we can know the notification has delivered the user successfully or not from our