apns

Apple Push Notification Service: Certificate Install Server Side?

I've followed the instructions at How to build an Apple Push Notification provider server (tutorial) in an attempt to set up a push notification server. When I attempt to connect with the following PHP code // connect to apns server $strAPNSUrl = 'ssl://gateway.sandbox.push.apple.com:2195; $strAPNSCert = 'dev.pem'; // generate stream ...

will APNS generate new device token every time for a single device?

I want to know that does apple's Push Notification Server generate new device token every time when requesting from a same device? ...

Sending multiple iPhone notifications

Hi Guys, My code works ok when I need to send one notification, but each time when I need to send more than one, it only sends the first one. Here is the code: <?php $device_token = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; $apnsHost = 'gateway.sandbox.push.apple.com'; $apnsPort = 2195; $apnsCert = 'apns-dev.pem'; $...

APNS result legend

Hi Guys, Does anyone knows what does int return values for APNS send push messages mean. To be more specific, here is my PHP server side directive: $res = fwrite($apns, $apnsMessage); Sometimes $res is 169, sometimes some other number. Has anyone deciphered this? Regardz, Mladen ...

How long is an APNS token valid for?

With APNS, when a device registers, how long is the token it registers with good for? The entire time the app is installed? I seem to recall a note in the documentation saying it was only good until sync/reset, but looking at the docs again I can't find that note (and it hasn't held true in my (admittedly non-extensive) testing). Can any...

How to send a push notification using Erlang?

I'm trying to send a push notification to APNs using Erlang. This is the code I came up with so far: -module(apnstest2). -export([connect/0]). connect() -> application:start(ssl), ssl:seed("someseedstring"), Address = "gateway.sandbox.push.apple.com", Port = 2195, Cert = "/path/to/Certificate.pem", Key = "/path/...

Multiple iPhone APN messages, single connection.

I have a strange issue. I'm trying to get Apple Push Notifications working with Python. I can connect and send individual messages without a problem. The issues pop up when I start sending more than one message, but it's more bizarre than even that. I'm testing with multiple devices... some iPhones and some iPod Touches. I can send mult...

Creating .pem file for APNS ?

Hi all, how to create a .pem file to be stored in the hosting server for APN payload data ? thanks ...

APN Error in Server Script (php)

Hi All, I am getting this error in my php script , while sending payload data. Warning: stream_socket_client() [function.stream-socket-client]: Unable to set private key file `/Applications/XAMPP/xamppfiles/htdocs/test/apn/apns-dev.pem' in /Applications/XAMPP/xamppfiles/htdocs/test/apn/push.php on line 42 Warning: stream_socket_client...

PushNotification Alert Title

Hi All, By default the Alert view title in the PushNotification displays the "Bundle Display name" from info.plist. Is is possible to change the AlertView title ? Thanks ...

Delay in receiving APN on iPhone

Hi, Sometimes I am experiecing a delay while receiving APN , while at other times its working absolutely fine. I am also connecting to the feedback server at ssl://feedback.sandbox.push.apple.com , but its not showing any data. What are the possible reasons for the delay? Thanks ...

Truncating unicode so it fits a maximum size when encoded for wire transfer

Given a Unicode string and these requirements: The string be encoded into some byte-sequence format (e.g. UTF-8 or JSON unicode escape) The encoded string has a maximum length For example, the iPhone push service requires JSON encoding with a maximum total packet size of 256 bytes. What is the best way to truncate the string so that...

what kind of certificate do I need to test apns using ad-hoc distribution?

I can't understand from Apple's docs if I need a production certificate or a development certificate... ...

Getting errors using APNS PHP

heres the code I'm using <?php $deviceToken = 'my device key'; // not putting in for security $payload['aps'] = array('alert' => 'This is the alert text', 'badge' => 1, 'sound' => 'default'); $payload = json_encode($payload); $apnsHost = 'gateway.sandbox.push.apple.com'; $apnsPort = 2195; $apnsCert = 'apns-dev.pem'; $streamContext...

The button(s) on iphone notification message

Hi all, i am using Apple Push Notification Service for sending some notification messages. I am able to send text notification message but there is no "ok" or "view-close" buttons. In order to put these buttons to the notification message, what can i do? ...

iPhone APNS Sandbox vs. Production for not yet approved apps

Is it true that the production APNS is unavailable until an app is approved to the app store? I can use the sandbox certificates fine, but production yields no results. ...

iPhone APNS Device Tokens in sandbox vs. production

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? ...

No APNS launchoptions if launched later?

Hi, my APNS notification works fine, but I have noticed a strange behavior for which I would like to ask for confirmations. I'm retrieving the notification payload either during "didFinishLaunchingWithOptions" or "didReceiveRemoteNotification". In "didFinishLaunchingWithOptions" I'm checking NSDictionary* userInfo = [launchOptions val...

Java Sockets and Dropped Connections

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 Ap...

SslStream.AuthenticateAsClient Exception when using iPhone Apple Push Notification Provider (apns-sharp) C#

I receive the following exception when using the Apple Push Notification Provider (apns-sharp). The push notifications work on my development machine however it will not work within the Rackspace Cloud hosting. I have the exact Rackspace Cloud custom medium trust configuration running with my dev. machine so the medium trust can't be ...