在Parse中调度后台作业

时间:2014-05-22 07:10:13

标签: ios parse-platform background-process

我已经搜索了很多,但可以找到关于解析后台作业调度的任何事情。我是解析新的请举例说明如何以及在哪里用调度程序在解析中实现后台作业,因为没有任何示例

2 个答案:

答案 0 :(得分:1)

您可以在仪表板中安排后台作业。代码中不可能

答案 1 :(得分:-2)

要获得有关解析的详细信息,您必须查看https://www.parse.com/docs/ios_guide#top/iOS

提供的指南

根据您的问题,大多数工作都在后台进行解析,例如

-if you want to update user detail you can use without completion block:
 PFUser *user = [PFUser currentUser];
    user [@"firstname"] = self.firstnameTextFeild.text;
    [user saveInBackground];

-if you want to update user detail you can use with completion block:
 PFUser *user = [PFUser currentUser];
    user [@"firstname"] = self.firstnameTextFeild.text;
    [user saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {
//Do anything you want
}];

-if you want to update user detail even if you are offline:
 PFUser *user = [PFUser currentUser];
    [@"firstname"] = self.firstnameTextFeild.text;
    [user saveEventually]; // This will update user as device gets online