I am attempting to integrate Google Cloud Messaging with my Heroku Apache PHP Server so as to allow for push notification to sync app data with the server as new data arises. However, the present step in GCM requires the servers (Heroku App's) IP address to integrate with Google Cloud Messaging. In the Heroku developers console there does not appear any direct way to access the apps IP.
How can I access the Heroku App's IP address?
I implemented GCM on heroku (but with python) and there is no need to access the dyno IP. However how Maxim Leonovich mentioned above it's not possible. But there is a addon proximo.
We basically open a socket connection to gcm servers and send data.
After we are finished we get all errors and deactivated devices back.
The push appears on phone.
I believe that IP address is dynamic on Heroku.
When we first deployed our project there, we pinged the hostname that Heroku gave to us and used this IP in DNS record. Very quickly (in about a week) it became outdated and our project went down until we realized where's the problem.
So, you should use hostname that heroku assigns to every app if possible, otherwise you should probably invent some proxied solution using another node with known IP...