NSURLSessionUploadTask gets resumed on its own when app goes into background
| Originator: | valeriyvan | ||
| Number: | rdar://26864489 | Date Originated: | 17 JUNE 2016 |
| Status: | Open | Resolved: | |
| Product: | iOS | Product Version: | 9.3.2 |
| Classification: | Other bug | Reproducible: | Always |
Area: NSURL Summary: Documentation states that newly created NSURLSessionTask is paused and has to be explicitly resumed to start download/upload. Actually NSURLSessionUploadTask created from file for NSURLSession configured for background starts upload on its own without explicit resume after app goes into background. Sometimes it happens immediately after app goes into background. Sometimes to trigger upload task resume it’s needed move app into background and bring to foreground several times. Steps to Reproduce: 1. clone repo https://github.com/valeriyvan/NSURLSession-test; 2. build project in Xcode 7 and run it in simulator; 3. press shift-command to send app into background; 4. tap on app icon to bring app to foreground; 5. sometimes it’s needed repeat steps 3 and 4 several times; 6. see by log messages that NSURLSessionUploadTask gets resumed and starts upload. If you would like repeat these steps please remove app from simulator before building and running again. Expected Results: It’s expected that newly created upload task is paused and has to be explicitly resumed to start upload. Actual Results: Actually NSURLSessionUploadTask starts upload on its own without explicit resume after app goes into background. Sometimes it happens immediately after app goes into background. Sometimes to trigger upload task resume it’s needed move app into background and bring to foreground several times. Version: iOS 9.3.2 Notes: n/a Configuration: Any iOS simulator in xcode 7, iPhone 6s running iOS 9.3.2 Attachments:
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!