Domanda

I have tried for some days to solve this. Searched everything that has something to do with MoonAPNs, but my specific Error none of you have had.

As Title says I am using Moon APNs to send Push Notification to iOS Devices. I have folowed step by step instructions in the Blog, installed Certificates (.cer and .p12), etc. Everything looks pretty simple, but....

But whole time, after a 2-3 minutes waiting to connect to APNs

(Line in PushNotification.cs at line: 
  _apnsClient.Connect(host, port);), 

I receive a SocketException.

What does it means. Is it something with Port 2195 (already checked with Admins, it is not blocked). Can it be something with certificate or something????

One more point. Certificate that I use is: "Apple Production IOS Push Services" and I am testing only on .ipa file that I installed on my device (I have read that for test on .ipa it should be used Production Cer). I have not created this certificates myself because I haven't developed the App, I only have to send out Push Notifications to this App, when my Algorithm find it necessary.

È stato utile?

Soluzione

I have found the reason for SocketEception. It was server firewall restiction. It is important to open this ports:

■TCP port 5223 (used by devices to communicate to the APNs servers)

■TCP port 2195 (used to send notifications to the APNs)

■TCP port 2196 (used by the APNs feedback service)

■TCP Port 443 (used as a fallback on Wi-fi only, when devices are unable to communicate to APNs on port 5223)

After opening all of the ports everthing was alright. I hope that someone can use this info!

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top