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.
After researching a lot I came to an important conclusion :
I was dealing with same kind of issue and it was really hurting. So after checking the code deep and debugging the ultimate result for this is to manage the UI changes which you are performing while displaying the Picker. The transition of displaying the picker and the UI changes generates the irritate behaviour and ultimately crashes and hangs.
So my suggestion would be minimize the UI updation and make those changes in background so that the opening of picker is seamless.
My issue was solved after making those changes.