apple-push-notifications

APNS: invalid token (8)

こ雲淡風輕ζ 提交于 2019-12-30 02:56:08
问题 I am using the apns php server provided at https://code.google.com/p/apns-php/. I've have set up th push notification certificate but my code still throws an error on connect. What is wrong with this? Here is how I get the device token: - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)devToken { #if !TARGET_IPHONE_SIMULATOR // Prepare the Device Token for Registration (remove spaces and < >) NSString *deviceToken = [[[[devToken

iOS7 and iOS8: how to detect when user said No to a request for push notifications

时光毁灭记忆、已成空白 提交于 2019-12-30 02:45:08
问题 I am building an app that targets iOS7 and iOS8. I ask the user for permission to send push notifications. But for some reason, neither iOS7 nor iOS8 ever calls my application:didFailToRegisterForRemoteNotificationsWithError handler if I click "No" when asked for push permission. My question: how do I know, on both iOS7 and iOS8, when the user has dismissed the request for push notifications--and how do I know if they denied the request? I've looked at a bunch of StackOverflow answers and

iOS push notifications behavior when app is deleted and then reinstalled

妖精的绣舞 提交于 2019-12-29 17:38:07
问题 I've encountered an unusual scenario where a user is continuing to receive notifications when my app has been deleted and then reinstalled. The scenario is as follows: user installs the app from the appstore user logs onto our app and we register them for notifications user deletes the app from their device user reinstalls the app from the appstore user receives a notification even though they have not started the app up yet, logged in, etc My understanding of the APNs architecture was that

How to send Push Notification to multiple devices?

只谈情不闲聊 提交于 2019-12-29 11:38:10
问题 This is the first time I am using push notification in my App. I have gone through sample applications along with books and I got how to send push notification to a single device. But I am not getting exactly what changes should I do in my program to send push notification to multiple devices. I am using 'PushMeBaby' application for server side coding. Please, help me out. 回答1: Try this example code and modify for your environment. $apnsHost = '<APNS host>'; $apnsPort = <port num>; $apnsCert

How to send Push Notification to multiple devices?

给你一囗甜甜゛ 提交于 2019-12-29 11:38:06
问题 This is the first time I am using push notification in my App. I have gone through sample applications along with books and I got how to send push notification to a single device. But I am not getting exactly what changes should I do in my program to send push notification to multiple devices. I am using 'PushMeBaby' application for server side coding. Please, help me out. 回答1: Try this example code and modify for your environment. $apnsHost = '<APNS host>'; $apnsPort = <port num>; $apnsCert

How to send Push Notification to multiple devices?

我怕爱的太早我们不能终老 提交于 2019-12-29 11:38:00
问题 This is the first time I am using push notification in my App. I have gone through sample applications along with books and I got how to send push notification to a single device. But I am not getting exactly what changes should I do in my program to send push notification to multiple devices. I am using 'PushMeBaby' application for server side coding. Please, help me out. 回答1: Try this example code and modify for your environment. $apnsHost = '<APNS host>'; $apnsPort = <port num>; $apnsCert

aps_developer_identity.cer to p12 without having to export from Key Chain?

烂漫一生 提交于 2019-12-29 10:36:14
问题 I have a shed load of 'aps_developer_identity.cer' certificates exported from iPhone Developer portal. They were all created using the same Certificate Signing Request and (thus) the same private key. If I export just the private key from the Apple Key Chain is it then possible to take the private key and the 'aps_developer_identity.cer' and use openssl to create merged p12/pkcs#12 certificate that I can use on my (Windows) server. Just to be clear, I know how to get a merged p12 from the Key

ios Google Cloud Messaging (GCM) not receiving remote notifications

假装没事ソ 提交于 2019-12-29 08:27:12
问题 Problem: iOS isn't receiving any remote notifications from GCM, but can't find any information relating to why this would be the case. First time implementing push notifications, not sure what the cause of problem is. Situation: I am currently working on the iOS version of an app that uses GCM for push notifications. Notifications are being received fine on Android, however, it doesn't appear to be receiving at all on iOS. When I run the application, the console shows me that everything is

Badge Count is not increasing for push notification.always badge count remains 1?

会有一股神秘感。 提交于 2019-12-29 08:25:32
问题 My app badge count in not increasing when app is in background for push notifications.Count increase by 1 only for the first push notification and always remains badge count as 1, if i get more then 1 notification also badge count remaing 1 only. Below is my code - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { NSString *message = nil; id alert = [userInfo objectForKey:@"aps"]; if ([alert isKindOfClass:[NSString class]]) { message =

How to invalidate an iOS push notification on iPad when handled on iPhone?

二次信任 提交于 2019-12-29 07:15:29
问题 Let's say a user has a messages app on their iPhone and iPad. They get a new message from the server, so a push notification is sent to both their devices. Now the user picks up their iPhone and reads the message waiting in notification center. How do I now remove the message from notification center (and the app badge number) on their iPad, since it's already been read? 回答1: When the user reads the message on the iPhone (presumably after tapping on the notification or the launch icon of the