scheduleBackgroundRefresh / WatchBackgroundRefresh broken on Apple Watch, Simulator Works
| Originator: | brunob | ||
| Number: | rdar://28391765 | Date Originated: | 9/20/2016 |
| Status: | open | Resolved: | |
| Product: | watchOS | Product Version: | 3.0 (14S326) |
| Classification: | Reproducible: | Always |
Summary: WatchBackgroundRefresh (official Apple sample code), the call to scheduleBackgroundRefresh doesn't work on an Apple Watch with watchOS 3.0 (14S326). It does work on the Watch Simulator. Specifically no callbacks to handle(...) are made after the call to scheduleBackgroundRefresh for either background processing or snapshot refresh. https://developer.apple.com/library/content/samplecode/WatchBackgroundRefresh/Introduction/Intro.html There are also other public comments about this issue: http://stackoverflow.com/questions/39202187/watchos3-handle-backgroundtasks-setwkrefreshbackgroundtask-on-device-be-ca Steps to Reproduce: 1. Download WatchBackgroundRefresh sample code: https://developer.apple.com/library/content/samplecode/WatchBackgroundRefresh/Introduction/Intro.html 2. Run on Apple Watch with watchOS 3.0 (14S326) 3. Press "Schedule Refresh" button 4. Put app in background by pressing digital crown to return to home screen 5. Watch Xcode logs for activity Expected Results: Callbacks to handle(...) are made for WKApplicationRefreshBackgroundTask. This is indicated by Xcode log: "received background task: ..." Also callback expected for snapshot refresh, i.e. WKSnapshotRefreshBackgroundTask Actual Results: No callbacks occur Version: watchOS 3.0 (14S326) Notes: If the issue is background budget for example, then debug mode should give indication of the cause rather than silently failing. Configuration: watchOS 3.0 (14S326) 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!