apple-push-notifications

Cannot send push notifications using Javapns/Javaapns SSL handshake failure

亡梦爱人 提交于 2019-11-27 06:49:59
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.java:136) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1720) at com.sun

Push notifications in Apple Safari with FCM

泪湿孤枕 提交于 2019-11-27 06:45:09
问题 We implemented push notifications using FCM in chrome and firefox and it worked fine, but Safari doesn't support Service Workers which is mandatory for FCM. Did anyone deal with this kind of issues? any suggestions? 回答1: While Service Workers now work on Safari, they are not enough. The documentation says: The FCM JavaScript API lets you receive notification messages in web apps running in browsers that support the Push API. This includes the browser versions listed in this support matrix.

Change language of alert in banner of Push Notification

◇◆丶佛笑我妖孽 提交于 2019-11-27 06:38:27
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 change to Norwegian. Will it be possible at my end or i have to change it from server whenever i change

Getting OpenSSL::X509::CertificateError nested asn1 error on Ruby

隐身守侯 提交于 2019-11-27 06:35:54
问题 I have .p12 file from Apple and tried to convert it to .pem file with following command: openssl pkcs12 -in cert.p12 -out apple_push_notification_development.pem -nodes -clcerts When trying the create new OpenSSL::X509::Certificate object with OpenSSL::X509::Certificate.new(File.read('apple_push_notification_development.pem')) I get the following error: OpenSSL::X509::CertificateError: nested asn1 error from (irb):9:in `initialize' from (irb):9:in `new' ... Did I do something wrong ? Being

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

喜夏-厌秋 提交于 2019-11-27 06:35:31
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. casademora (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 from iTunes Connect, and thus are required to be installed on a device. That also means you'll

Getting javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure Error

[亡魂溺海] 提交于 2019-11-27 06:30:34
问题 I am trying to send push notification to iPhone using Java-pns but I am getting the following error - javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure My code is - String token="95076d2846e8979b46efd1884206a590d99d0f3f6139d947635ac4186cdc5942"; String host = "gateway.sandbox.push.apple.com"; int port = 2195; String payload = "{\"aps\":{\"alert\":\"Message from Java o_O\"}}"; NotificationTest.verifyKeystore("res/myFile.p12", "password", false); KeyStore keyStore =

How to use Apple's new .p8 certificate for APNs in firebase console

最后都变了- 提交于 2019-11-27 06:17:54
With the recent up gradation of the Apple developer accounts, I am facing a difficulty that while trying to create the push notification certificates, it is providing me with (.p8) certificate instead of APNs ones which can be exported to (.p12). Firebase console only accepts (.p12) certificates so how I can get that out from these new (.p8) certificates. John Idasetima I was able to do this by selecting "All" located under the "Keys" header from the left column Then I clicked the plus button in the top right corner to add a new key Enter a name for your key and check "APNs" Then scroll down

didReceiveRemoteNotification: fetchCompletionHandler: open from icon vs push notification

只谈情不闲聊 提交于 2019-11-27 05:59:41
I'm trying to implement background push notification handling, but I'm having issues with determining whether the user opened the app from the push notification that was sent as opposed to opening it from the icon. - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { //************************************************************ // I only want this called if the user opened from swiping the push notification. // Otherwise I just want to update the local model //******

iOS push notification: how to detect if the user tapped on notification when the app is in background?

混江龙づ霸主 提交于 2019-11-27 05:53:33
There are a lot of stackoverflow threads regarding this topic, but I still didn't find a good solution. If the app is not in the background, I can check launchOptions[UIApplicationLaunchOptionsRemoteNotificationKey] in application:didFinishLaunchingWithOptions: call to see if it's opened from a notification. If the app is in the background, all the posts suggest to use application:didReceiveRemoteNotification: and check the application state. But as I experimented (and also as the name of this API suggests), this method gets called when the notification is received, instead of tapped. So the

registerForRemoteNotificationTypes: is not supported in iOS 8.0 and later

ε祈祈猫儿з 提交于 2019-11-27 05:46:57
When trying to register for push notifications under iOS 8.x: application.registerForRemoteNotificationTypes(UIRemoteNotificationType.Alert | UIRemoteNotificationType.Badge | UIRemoteNotificationType.Sound) I get the following error: registerForRemoteNotificationTypes: is not supported in iOS 8.0 and later. Any ideas what is the new way of doing it? It does work when I run this Swift app on iOS 7.x. EDIT On iOS 7.x when I include the conditional code I get (either SystemVersion conditional or #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000) dyld: Symbol not found: _OBJC_CLASS_$