apple-push-notifications

iPhone: Connection refused error while connection Apple's Push Notification Service

[亡魂溺海] 提交于 2019-12-08 04:42:56
问题 I have been scratching my head since long now to get rid of following error message. Warning: stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://gateway.push.apple.com:2195 (Connection refused) I have tried multiple times generating the correct certificate and made sure that project is signed with the correct bundle identifier. I have also tried using testing script PHP(https://devforums.apple.com/message/50461) and Python (http://stackoverflow.com/questions

Apple Push Notifications - App store submission

旧巷老猫 提交于 2019-12-08 04:30:42
问题 I am using a third party library which has code for push notifications. But in our code, we don't have anything related to push notifications. So my profile is not enabled with APNS. When I try to push this to iTunes Connect for BETA TESTING, I'm getting below email from Apple. My question now is CAN I SUBMIT MY APP WITH APNS ENABLED even when I am not using push notifications? Will Apple reject my app if I do so? Dear developer, We have discovered one or more issues with your recent delivery

.NET Core 2.1 Apple Push Notifications

倖福魔咒の 提交于 2019-12-08 04:05:34
问题 I have to send push notifications to specific iOS devices with my .Net Core WebAPI that will be executed on a Windows 2008 Server R2. The server itself should not be the problem because it is working with a node.js library. But I want it to work with an WepAPI in ASP .Net Core 2.1 which is self hosted with the inbuilt Kestrel Server. Maybe you've got an idea how to solve this problem. My Code: // This will encode the jason web token apns needs for the authorization // get the base64 private

iOS critical alert through FCM

时光毁灭记忆、已成空白 提交于 2019-12-08 03:47:58
问题 iOS 12 has added critical alerts. The APNS payload has the sound dictionary to support critical alerts. Is there an equivalent sound dictionary support in FCM payload to send FCM notifications to iOS devices. 回答1: Answering my own question. I had to rely on notification extension to do the magic as the FCM payload doesn't support the iOS sound dictionary. I send the "critical" flag set to 1 as part of FCM data payload and use it in notification extension to mark a notification as critical.

iOS - APNS how to use loc_key in payload

六月ゝ 毕业季﹏ 提交于 2019-12-08 03:25:30
问题 I have a message string i want to localize before i let APNS send a message to devices. I wish i could see the json payload itself to make me understand the structure instead of the device parsing it out for me. but anyway, how do i use the loc_key and loc_args argument ? from the docs i found: loc-key string A key to an alert-message string in a Localizable.strings file for the current localization (which is set by the user’s language preference). The key string can be formatted with %@ and

PyAPNs and the need to Sleep between Sends

人盡茶涼 提交于 2019-12-08 02:04:25
问题 I am using PyAPNs to send notifications to iOS devices. I am often sending groups of notifications at once. If any of the tokens is bad for any reason, the process will stop. As a result I am using the enhanced setup and the following method: apns.gateway_server.register_response_listener I use this to track which token was the problem and then I pick up from there sending the rest. The issue is that when sending the only way to trap these errors is to use a sleep timer between token sends.

How to post push notifications in APNS and how to show the notifications in iPhone?

£可爱£侵袭症+ 提交于 2019-12-08 01:59:28
问题 I have several doubts about APNS. Am trying myself to make clear on the APNS but still need some clarifications. I have to know how we are posting push notification in APN Server and how we push the notification to Apple APN Server? And also how am i receive the notification from Apple and show the notification to user? I know we are receive the Notifications from below delegate, -(void)application:(UIApplication *)app didReceiveRemoteNotification:(NSDictionary *)userInfo How we should show

How to get APNS push notification in background in iOS6?

孤街浪徒 提交于 2019-12-08 01:34:57
问题 I am implementing APNS in my iOS application. I am getting apple push notifications in foreground, but when my app goes in background or inactive mode, my app does not receive any push notification. My code which I tried is as follows: - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { UIApplicationState state = [application applicationState]; if (state == UIApplicationStateActive) { NSLog(@"active"); NSDictionary *apsInfo = [userInfo

Send push notifications from AIR desktop client without middleware (eg. PHP)

为君一笑 提交于 2019-12-08 01:06:23
问题 With this PHP code: <?php $apnsHost = 'gateway.sandbox.push.apple.com'; $apnsCert = 'apns-dev.pem'; $apnsPort = 2195; $streamContext = stream_context_create(); stream_context_set_option($streamContext, 'ssl', 'local_cert', $apnsCert); $apns = stream_socket_client('ssl://' . $apnsHost . ':' . $apnsPort, $error, $errorString, 2, STREAM_CLIENT_CONNECT, $streamContext); $payload['aps'] = array('alert' => 'Oh hai!', 'badge' => 1, 'sound' => 'default'); $output = json_encode($payload); $token =

MQTT Service for iOS Push Notifications

孤街醉人 提交于 2019-12-07 20:21:19
问题 The low reliability of GCM on Android is such that I have moved to another service to handle push messages: Pushy, (https://pushy.me/) The service relies on MQTT, and from my experience as well as many other reviews, the real time feature-set holds up to its name and rarely does a message get dropped. However, contacting support, they noted that there is no iOS integration and only support Android. I have searched widely but have not found a suitable replacement for iOS that supports MQTT out