How to test Apple Push Notifications Feedback Service?
Asked Answered
F

1

6

What I did as a test is following:

1 - 1.5 hours after deletion, I am still getting 200 as an answer.

Do you maybe know how often does Apple refresh push tokens list and when I can expect to eventually start getting 410? And also - is 410 status (and Instant Feedback in general) testable at all while testing the app outside of production environment?

Thanks in advance for any kind of answer.

Cheers

Frieda answered 24/5, 2016 at 9:57 Comment(4)
hey bro, did you solved this issue? im facing the exact same problem #39291113Cubicle
Actually I found out how to test this. Will write an answer tomorrow. In case I forgot, ping me. CheersFrieda
just to remember about the answer about this bro, this apns http2 is scarying me if it doesnt return the 410.. thanks in advance!Cubicle
Thanks for ping, will answer in a jiffy.Frieda
F
7

Okay, so from what I have discovered, seems that Instant Feedback service from Apple is working just fine and is able to detect uninstall pretty fast. There was a small trick in how to test these things properly with sandbox service.

If you make an app which you are testing locally on your device and your app is the only one installed on your phone from that provisioning profile (vendor), stuff which I faced as an issue in my question will be encountered. For some reason, even if you uninstall the app (which was the only one on the phone installed from your provisioning profile), Apple is always responding with 200.

What needs to be done is following: After you install your app which you are testing, create a new dummy app with another bundle ID, but which also coming from your provisioning profile, enable push notifications in it as well and install it on your device. So now, you have two apps that you made - one which you are developing and testing the Instant Feedback service with and another one which kinda "zombie" app which just sits in there and does nothing.

After this, uninstall your test app, try to send silent push notification and Apple will respond with status code 410 as expected.

Dummy way, but for some reason that's how it should be while testing. Behaviour in production should be as expected and w/o any need to have a dummy (or any other) app from same vendor installed on iOS device.

Frieda answered 4/9, 2016 at 16:11 Comment(7)
Dude.. right now im standing up and clapping to your answer.. awesome as the hat on your pic.. thanks a lot bro. I used the production/distribution certificate and provisional-profile instead of development and finally me and apns smoked the peace pipe. The solution of installing a dummy app with different bundle-id and same provisional-profile cant be done on developer account.. so if using development credentials the app must be installed in another device.. ppff great trick for mac-ers to make more money??Cubicle
Thing is, it actually worked quite well for me in development "mode" as well. I have created two app IDs (com.example.a and com.example.b) in the Apple Developer Portal where I enabled Push Notifications for both of them. Then I have created Development SSL Certificate for Push Notifications for both of them as well -> downloaded them -> stored them on my Mac. Then I made two new Xcode projects where I made two new iOS apps with app IDs I mentioned above. Installed both on the phone, uninstalled first and made http2 request with the first app's token. And it worked. Got 410.Frieda
Interesting.. i did same thing, i could only reuse the same developer certificate but i made different bundle-ids, different pushnotifications developer certificates, different provisional-profiles and different xcode projects and could not make it work as you described. Then i supposed i had to install twice the same app and as i only have one test iphone i decided to go for the distribution/production and this totally worked as expected for both binary an http2 apisCubicle
Hm. Interesting. Dunno what to say, this worked for me like a charm. But anyway, good that you finally made it and managed to test the thing properly. :)Frieda
@ugi I'm trying to test the same on production but my curl is failing with error 52 empty response from serverShannonshanny
@ugi What I did is installed the app from Store and registered for PUSH. After that I sent some dummy push to test. Then I deleted the app and It's already 24 hours and I'm still not getting 410 in response always getting 200Shannonshanny
Oh, it's been quite a while since I looked at this topic, so far from sure what's the state of things in here 4 years later. Will try to look at this and share what I've discovered. On vacation at the moment, so in week++ will be able to check. In case you don't hear from me, feel free to ping. Cheers.Frieda

© 2022 - 2024 — McMap. All rights reserved.