my iOS swift app is deployed in heroku using Parse SDK, my question is how to execute php script in parse-server side when an action happend in ios app , eg: send confirmation email when new user signup using ios app by executing php script in the server side.
any idea ?
Thanks
Parse server is based on NodeJS and not PHP. the only scripts that you can execute in parse-server should be written in NodeJS. If you have some 3-party scripts written in PHP and those scripts are exposed in REST api you have 2 options:
[EDIT] in order to execute scripts when events occurs (eg user created, class updated etc) you can use cloud code triggers
for example a code that will be executed before a user is saved to the database is (from parse cloud code docs) :
Parse.Cloud.beforeSave(Parse.User, function(request, response) {
if (!request.object.get("email")) {
response.error("email is required for signup");
} else {
response.success();
}
});
Hope it helps.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.