0
votes

i am developing an iOS application which uses push notifications. i send push notifications using the java notnoop-apns library. using the sandbox apns server, i was able to send push notifications to the device. i want to test using the production server. for that, i tried the following steps:

1) get an ad-hoc provisioning profile and install on the test device.
2) download the Apple Production IOS Push Services certificate.
3) Generate the .p12 file using the certificate and the private key from Keychain access.
4) change code to use production apns server

after following the above steps, i get the following error:

[Thread-54] INFO com.notnoop.apns.internal.ApnsConnectionImpl - Exception while
waiting for error code
java.net.SocketException: Socket is closed
        at sun.security.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1467)
        at sun.security.ssl.AppInputStream.read(AppInputStream.java:103)
        at java.io.InputStream.read(InputStream.java:101)

am i missing something or doing something wrong?

1

1 Answers

0
votes

You can not test APNS notifications with Production certificate in sandbox mode ie. once your application becomes available on appstore, then only you can use production certificate to post notifications to your app.