I am successfully getting Apple APNS feedback data through PHP. The structure I get (after some processing) looks something like this:
time stamp
device token
My question is how to find out which device tokens should be removed from my database and stop sending them notifications.
Regardz,
Mladjo
. , Apple, , โโ , . , .
, , , . , Apple . , Apple , , , , ( ) . Apple , , , Apple .
, , " " . , . Apple:
Apple APN
@argon, .
, push-, . , , didRegisterForRemoteNotificationsWithDeviceToken deviceToken, . , APNS , , ( ), , APNS, โ โ .
, APNS UTC, , , UTC ISO. , , .
@fyasar,
, - ( ). , , ? , , , , , . , , , , push-.
, , apple doc , , , . , .
( _t), , APN . , , 12:00 1 1970 . UTC.
, db. mysql php
$sql="SELECT insert_time from device_tokens ORDER BY insert_time DESC LIMIT 1";
db,
$sql1="SELECT UNIX_TIMESTAMP(' $timestamp')";
, , apns,
if($inactive_Timestamp>$dbTime_stamp) { foreach ($apnsfeedback_tokens as $key => $value) { # code... $inactive_Token=$value['devtoken']; $sql= "DELETE FROM device_tokens WHERE device_token='$inactive_Token'"; if ($conn->query($sql) === TRUE) { echo "Record deleted successfully"; } else { echo "Error deleting record: " . $conn->error; }
, . . db.