UIDocument completion handlers never called

Originator:spencer.samuel1
Number:rdar://15555843 Date Originated:Nov. 27, 2013 10:00 PM
Status:Closed Resolved:
Product:iOS SDK Product Version:7.0
Classification: Reproducible:Sometimes
 
Summary:
In an Objective-C iOS Application built with Xcode (any version), UIDocument will frequently hang. When calling openWithCompletionHandler: or closeWithCompletionHandler: UIDocument will refuse to call the completion handler on either of those methods. No error message is passed. No value is returned. It seems that as soon as either method is called, UIDocument hangs and won't do either of those operations until the application is completely restarted.

Steps to Reproduce:
1. Open Xcode and create a project that uses iCloud document storage and UIDocument
2. Using the samples provided by Apple's developer documentation (http://bit.ly/1gk885K), add some basic document operations with UIDocument (ex. openWithCompletionHandler:, saveToURL:, etc.).
3. Now create and edit a document. Save the changes.
4. Try to open the document again after saving the changes. -- Happens here sometimes
5. Create a new document and save it.
6. Try to open any document -- Happens here most of the time

Expected Results:
UIDocument should be responsive and call its completion handlers in a timely manner. If it does not, it should return some kind of value, pass an error, notify a delegate, or do something.

Actual Results:
UIDocument fails to respond in a majority of cases and rarely calls its completion handlers. No values are returned, no errors are passed, no logs are made in the console, no crashes, no exceptions, no notifications, no delegate method calls, nothing. Nothing happens. Call the openWithCompletionHandler: or closeWithCompletionHandler: and the completion handlers hardly ever get called.

Version:
iOS Version 7.0.3 (Simulator - 11B508)
iOS Version 7.0.4 (iPhone 4S - 11B554a)

Configuration:
This occurs on any hardware or software configuration - Mac (OS X 10.9.0), iPad (iOS 7.0.3), iPhone (iOS 7.0.4), and iOS Simulator (Various)

Notes:
Please use this open-source project on GitHub to easily reproduce this issue: https://github.com/iRareMedia/iCloudDocumentSync

Related rdar that has the same issue with an earlier iOS SDK version: rdar://12364611

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!