googlesamples / ios-nearby

69 stars 30 forks source link

iOS11 background mode not working after 3mins running in background #34

Open vsyw opened 6 years ago

vsyw commented 6 years ago

Hi, I ran the sample code on a iPhoneX and a iPhone6S, both running on iOS11, it worked fine on foreground, but both devices couldn't be detected after entering background mode for 3 minutes, is this the expected behavior?

ritesh124 commented 5 years ago

It will work in BLE ONLY mode.

"Background operations must use the BLE medium only; audio is not supported. There is an added battery cost for background BLE. The cost is low, but you should measure it before deciding to use background mode. iOS will ask the user for permission to advertise via BLE in the background."