iCloud UIDocumentPicker crashes intermittently and hangs

前端 未结 4 1241
醉梦人生
醉梦人生 2021-01-02 04:28

Issue:

When choosing a document from iCloud the application randomly crashes, for most of the time the following code will work, but on rare occasions it will fail.

4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-02 05:12

    When calling the method, make sure you call it in background thread. It will fix the problem.

    dispatch_async(dispatch_get_global_queuue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0),^{ // CALL YOUR METHOD });

提交回复
热议问题