Reputation: 96
There is a default function in 'cloud/main.js' of parse-server-example which is working fine I can see 'Hi' response in my iOS app simulator.
Parse.Cloud.define('hello', function(req, res)
{
res.success('Hi');
});
After I added my own function into this file as followes:
Parse.Cloud.define(testFunction', function(req, res)
{
res.success('Test function');
});
and run the following commands:
$ git add index.js
$ git commit -m "Changed configuration values"
$ git push heroku master
and call it in my app function it shows an error:
[PFCloud callFunctionInBackground:@"testFunction"
withParameters:nil
block:^(id object, NSError *error)
{
if (!error)
{
NSLog(@"%@",object);
}
NSLog(@"%@",error.debugDescription);
}
];
[Error]: Invalid function. (Code: 141, Version: 1.13.0)
But the 'hello' function is working fine. How would that work?
Upvotes: 0
Views: 338
Reputation: 5557
Parse.Cloud.define(testFunction', function(req, res)
You're missing a quote in front of testFunction'
.
Upvotes: 1