سؤال

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?

هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top