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

uerceg
  • 4,637
  • 6
  • 45
  • 63
  • hey bro, did you solved this issue? im facing the exact same problem http://stackoverflow.com/questions/39290613/apns-http2-api-not-returning-status-410-after-uninstalling-app – user1546652 Sep 02 '16 at 12:38
  • Actually I found out how to test this. Will write an answer tomorrow. In case I forgot, ping me. Cheers – uerceg Sep 02 '16 at 21:26
  • just to remember about the answer about this bro, this apns http2 is scarying me if it doesnt return the 410.. thanks in advance! – user1546652 Sep 03 '16 at 23:59
  • Thanks for ping, will answer in a jiffy. – uerceg Sep 04 '16 at 15:59

1 Answers1

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.

uerceg
  • 4,637
  • 6
  • 45
  • 63
  • 1
    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?? – user1546652 Sep 05 '16 at 03:57
  • 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. – uerceg Sep 05 '16 at 07:17
  • 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 apis – user1546652 Sep 07 '16 at 06:16
  • 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. :) – uerceg Sep 07 '16 at 09:02
  • @ugi I'm trying to test the same on production but my curl is failing with error 52 empty response from server – Rahul Vyas Jul 29 '20 at 05:09
  • @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 200 – Rahul Vyas Jul 29 '20 at 05:22
  • 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. – uerceg Jul 29 '20 at 22:42