My test app can receive apple push notification and my server saves the user’s token in database.
I want to know how to judge user close the push notification or delete the my app, then I can via webservice delete the user’s info, so it can reduce server pressure.
Unfortunately you will not be able to detect when a user dismisses the push notification dialog. But you can pull the APNS Feedback Service for inactive/uninstalled devices.
You can read up on how the Feedback Service works toward the end of this documentations.