NSFilePresenter called as a result of its own actions
| Originator: | neilmggall | ||
| Number: | rdar://11002274 | Date Originated: | 7 March 2012 |
| Status: | Open | Resolved: | |
| Product: | iPhone SDK | Product Version: | 5.0.1 |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: A coordinated file access using an NSFileCoordinator on behalf of an NSFilePresenter instance should not result in calls to the NSFilePresenter. Under normal circumstances this works. If the coordinated file access occurs on entering the background, the NSFilePresenter is called - sometimes immediately but usually on return to the foreground. Steps to Reproduce: 1. Create an NSFilePresenter for a local directory containing one file 2. In response to a UIApplicationDidEnterBackgroundNotification, perform a coordinated write to the file inside the NSFilePresenter's directory, on behalf of the NSFilePresenter (i.e. pass the NSFilePresenter to the NSFileCoordinator's initWithFilePresenter:). Use a UIApplication background task to ensure this has time to complete, 3. Observe call to [NSFilePresenter presentedSubItemDidChangeAtURL:] on returning to the foreground. Expected Results: An NSFilePresenter should never be invoked as a result of its own actions. Actual Results: The NSFilePresenter can be invoked if it performs an action while the app is transitioning to the background. Regression: NO Notes:
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!