Apple push notification doesn’t work

OMG, finally, as the code runs from the plugin, the current working directory is set to wp-admin whereas when i run it manually it set for /wp-content/plugins…

So, when the push function is called, just add the following line of code:

chdir(ABSPATH . 'wp-content/plugins/*your plugins folder name*/');