Macos Parse.com刷新用户信息

Macos Parse.com刷新用户信息,macos,swift,parse-platform,refresh,Macos,Swift,Parse Platform,Refresh,我已经编写了一个使用Parse.com的iOS应用程序。当我需要更改有关用户的信息时,我使用refreshinbackgroundithblock。我现在正在为Mac OS X编写应用程序,但我似乎无法使用refreshInBackgroundWithBlock。有什么建议吗 下面是代码 //Refresh the User Info currentUser.refreshInBackgroundWithBlock { (object, error) -> Void in //Fetch

我已经编写了一个使用Parse.com的iOS应用程序。当我需要更改有关用户的信息时,我使用
refreshinbackgroundithblock
。我现在正在为Mac OS X编写应用程序,但我似乎无法使用
refreshInBackgroundWithBlock
。有什么建议吗

下面是代码

//Refresh the User Info
currentUser.refreshInBackgroundWithBlock { (object, error) -> Void in
//Fetch the User Info
currentUser.fetchIfNeededInBackgroundWithBlock { (result, error) -> Void in
    //Check if the comments read is nil
    if object.objectForKey("commentsRead") === nil {
         println("Comments Read is empty")                     
    } else {                       
         var currentRead:[Int] = []
         //If not empty assign the array to the value
         currentRead = object.objectForKey("commentsRead") as Array
         currentRead.append(0)
         var user = PFUser.currentUser()
         user.setObject(currentRead, forKey: "commentsRead")
         user.saveInBackgroundWithBlock { (result, error) -> Void in
         println("Completed!")
     }

}

根据parse文档,
refreshinbackgroundithblock
已被弃用,并被
fetchinbackgroundithblock
()


因此,您不需要调用
refreshinbackgroundithblock

Parse的文档说明了什么?iOS和OSX的情况似乎是一样的。在Mac上,我看到
“PFUser”没有名为“refreshinbackgroundithblock”的成员。
。我强烈建议实际发布生成错误的实际代码。我已添加了上述代码。不推荐使用刷新,请使用fetch