I am looking to send out Push Notifications from a 4D Server. I have been following Ray Wenderlich's tutorial, but get stuck when trying to use 4D Server to "push". Anyone know how to do this?
Asked
Active
Viewed 243 times
1
-
Please explain further the issue. – tjg184 Jun 13 '12 at 20:29
-
1I am running 4D Server (v12.3) and want to use it to send push notifications to Apple's servers in order to receive push notifications on an iPhone. I do not know how to create the method required to do this in 4D Server. – sangony Jun 14 '12 at 12:33
1 Answers
1
A thanks for the technical support team at 4D for pointing me in the right direction on this and to Ray Wenderlich's excellent tutorial which included the PHP script needed to connect to Apple.
To use PHP in 4D Server I used the PHP Execute command in 4D to run the PHP script I have stored in the database folder. simplepush.php is the name of my script document.
C_TEXT($result)
C_BOOLEAN($isOK)
$isOK:=PHP Execute("simplepush.php";"";$result)
Example 5 of the PHP EXECUTE command reference in the 4D Language Manual also shows how to modify the php script document from within 4D by doing a character(s) search and replace.
Make sure to keep the php script document and the .pem certificate in the same folder as the 4D Server and data files.

Tim Penner
- 3,551
- 21
- 36

sangony
- 11,636
- 4
- 39
- 55