Home → WINDEV Mobile 21 → Apple Push Noitification stopped working
Apple Push Noitification stopped working
Started by Luca, Mar., 10 2017 12:05 PM - 1 reply
Posted on March, 10 2017 - 12:05 PM
Hi everyone,
I'm new to this forum and I'll try to give enough information.

We developed a new system of APPs that works this way:
a new business customer (e.g. company DUMMY) want his own app and we give it to him with some functions related to his business. The app allow also the company DUMMY to send news (e.g. some discount, a new product is online) via PUSH notifications directly on the end-user smartphone.

The system works this way:
- the DUMMY company go to our website (realized with WebDev) and authenticate with his own username and password;
- in a page with some text box, they fill the fileds with a title, a message (and other fileds);
- the website loads the specific apple certificate for that APP id and send out the push notifications (with the webservice provided in WebDev) to all the devices stored in our database (with their identifiers);

Now, on the website, there are:
- 2 demo accounts linked with 2 demo apps, they are used by our resellers to show the app to the customers
- 5 accounts of 5 business company

The whole system seems working because the same procedure sends PUSH notification also on android devices and they are working, the problem seems to hit only the apple push notification service.

Last Monday, we found that the first (and oldest) account for our first demo, suddenly stopped working.

If we go on our website and try to send out a push notification, only the android smartphone receive the notification, on the website the only error is:
Socket connection refused.

At first I thought the problem was because the app was previously published with a different account and now we have transfered to us and after an update with some features it stopped working. So i re-created the .p12 certificate and everything wents fine but now it stopped working again.

After a few days a couple of other apps stopped working BUT another one is still working!!

I read online that Apple has removed some deprecated method on the Apple Push Notifications system, is the WinDev Mobile and WebDev update with the most recent methods and classes?

Another question: the apple push notification service has some restrictions? Does it block connection?

Thanks for your time.

Best regards,
Posted on March, 15 2017 - 10:56 AM
I hope this could help someone else.

The problem was related to the registration of the device to the APN.

The device was registrating itself as "False" = Test so if you installed the app from the AppStore, it wasn't correct, because the APN works on the "True" = Production method.

We changed the registration to "True" and now it works.