A long-running Parse operation is being executed on the main thread

后端 未结 4 1320
甜味超标
甜味超标 2020-11-30 07:27

I am getting the error:

\"A long-running Parse operation is being executed on the main thread. Break on warnParseOperationOnMainThread() to debug.\"

4条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-30 08:03

    For me this happened when I called:

    [[PFUser currentUser] refresh];
    

    The solution was to replace it with:

    [[PFUser currentUser] refreshInBackgroundWithBlock:nil];
    

    See also this answer on the Parse Help site.

提交回复
热议问题