Scanning for Peripherals does not start reliable after App suspended by the system
| Originator: | iPhone5001 | ||
| Number: | rdar://32870370 | Date Originated: | June 20 2017 |
| Status: | Open | Resolved: | |
| Product: | iOS | Product Version: | 11 |
| Classification: | Bug | Reproducible: | Sometimes |
Area: Core Bluetooth Summary: The sample App is the central and starts scanning when UIApplicationDidBecomeActive is fired and stops scanning when UIApplicationWillResignActive is fired. When pulling up the control center the app stops/starts scanning reliably. But when the app is suspended when pressing the home button and the user waits a little bit and opens the app again, scanning does NOT start. Steps to Reproduce: 1. Add a service UUID to the sample project of a peripheral that is in the vicinity. 2. Open the App. The text view should be filled with logs of the peripherals properties and a log count. 3. Close the App by pressing the home button. 4. Wait for a short amount of time (~10s). 5. Open the App again. 6. The app now may NOT get new didDiscover peripheral calls. Expected Results: The app should get new didDiscover peripheral calls after scanForPeripherals was called when UIApplicationDidBecomeActive was fired. Observed Results: The app does NOT get new didDiscover peripheral calls after scanForPeripherals was called when UIApplicationDidBecomeActive was fired. Version: iOS 11 Beta 1 (15A5278f) iPhone 6 (Model: NG4A2ZD/A) Notes: A sample project is attached with a video that shows the issue in action. The bug is not always reproducible. Configuration: The circumstances that show the bug are random and not clear.
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!