apple-push-notifications

Objective-C - Detect when user change the app's notifications settings

我只是一个虾纸丫 提交于 2019-11-26 12:45:04
问题 I need to always know which options the user choose on the push notification settings. (The options are - alert, sound and badges) So when my app launch I call: UIRemoteNotificationType types = [[UIApplication sharedApplication] enabledRemoteNotificationTypes]; and detect what the user chose. But how can I detect if the user change the settings later during the app life time? Is there some delegate method that get called when a change occur with this settings? 回答1: There is no delegate. You

It's possible to change push notification message before display on device from iOS side?

故事扮演 提交于 2019-11-26 12:29:37
问题 Display my push notification message is Message from: +919687335565 attached screenshot : i just want to fetch name of this +919687335565 contact number from Address book and display name of this contact instead of phone number in push notification . Before displaying notification i want to replace phone number +919687335565 with its contact name Chandresh in push notification. like attached screenshot : 回答1: There are various possibilities for preprocessing and modify the payload of a

didReceiveRemoteNotification:fetchCompletionHandler not being called when app is in background and not connected to Xcode

我们两清 提交于 2019-11-26 12:21:32
问题 I\'ve a very strange problem, I implemented: - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler For silent remote push notification. It works perfect when app is in background and connected to Xcode. When I unplug any iOS device and run the app, move to background and send remote notification, didReceiveRemoteNotification:fetchCompletionHandler not being

Update badge with push notification while app in background

匆匆过客 提交于 2019-11-26 12:19:57
I have got push notification working and managed to update icon badge count when app is brought to foreground. I am a bit confused about this though...the iPhone receives the notification and the pop up message appears to activate my app, and the badge only updates after me starting the app. This does not sound right in terms of user experience. My understanding is that the badge count should notify the user of what needs action, through incremented count, but this doe not happen until a later stage when the app is live. So is there a way to tell the app to update its badge count when it

Get device token for push notification

那年仲夏 提交于 2019-11-26 12:16:22
问题 I am working on push notifications. I wrote the following code for fetching a device token. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. // Add the view controller\'s view to the window and display. [self.window addSubview:viewController.view]; [self.window makeKeyAndVisible]; NSLog(@\"Registering for push notifications...\"); [[UIApplication sharedApplication]

Cannot send push notifications using Javapns/Javaapns SSL handshake failure

你。 提交于 2019-11-26 12:12:01
问题 I have an issue with push notifications. I have a p.12 certificate that was created by a team member and I have the device token for the device to be pushed to. I am using the javapns library to do the push (also tried the javaapns lib with same results) but I keep getting this error: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174) at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts

didReceiveRemoteNotification when in background

柔情痞子 提交于 2019-11-26 12:05:24
These kind of question has been asked a number of times but i have some specific situation going on. When my application is active and I receive a PUSH message i'm successfully able to parse the custom payloads and such. However when my application is in the background and the PUSH arrives the user has to click on the 'View/Open' button in order to get the didReceiveRemoteNotification called and the didFinishLaunchingWithOptions is called after that. I need to have my application decide if they have to prompt the user with an UIAlert when in the background or suppress the push message based on

How can I test Apple Push Notification Service without an iPhone?

核能气质少年 提交于 2019-11-26 12:04:52
问题 Is it possible test the Apple Push Notification Services without an iPhone application? (Creating an emulator on windows?) If isn\'t, how could I test that? Is there a free sample application compiled to do that? I created the Server provider, but I need test the functionallity. 回答1: (This answer may be outdated after 2013) Sorry to say, but you'll need to find some hardware to test this functionality. Push notifications are not available in the simulator. They require a provisioning profile

Change language of alert in banner of Push Notification

无人久伴 提交于 2019-11-26 12:04:16
问题 I am facing problem to change the language of alert in banner when push comes. Actually i am working on an app which works in two language. One is English and second is Norwegian. The push I am receiving from my web server end and what the string it has in alert key is displayed in banner when push comes and you are outside of the app. But as a requirement we want that if I change the language from setting from English to Norwegian then when push comes it\'s banner\'s alert string would also

PHP Apple Enhanced Push Notification read error response

蓝咒 提交于 2019-11-26 12:01:01
问题 In PHP, how do you use fread() to check if there is an error response when sending enhanced push notifications? I have read the Apple docs, a couple vague posts thru Google, and a couple questions/answers here on SO but this was still very confusing. Here is what I looked at: http://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/IPhoneOSClientImp/IPhoneOSClientImp.html Reading error from Apple enhanced push notification with PHP iPhone Push