iCloud UIDocumentPicker crashes intermittently and hangs

前端 未结 4 1367
醉梦人生
醉梦人生 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:08

    I recently stumpled opon the same problem:

    *** Assertion failure in -[UIDocumentPickerViewController _commonInitWithCompletion:]

    is caused due to lacking App-Capabilities. Go to your Build and choose Capabilities -> iCloud

    Activate it via the switch on the right hand side and toggle iCloud Documents and CloudKit ON. (Notice: This will only work with a payed developer account)

    Rebuild->Run

    Also have in mind:

    iCloud entitlements are available only to apps submitted to the App Store or to the Mac App Store. (Source)

提交回复
热议问题