Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7763251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:36:47+00:00 2026-06-01T14:36:47+00:00

The subject says it all, really. Documentation, insofar as it exists at all, suggests

  • 0

The subject says it all, really. Documentation, insofar as it exists at all, suggests that apps written against the CoreBluetooth framework running on iOS devices can add “bluetooth-central” to their background privilege list and so process some kind of Bluetooth events whilst inactive, but which exact events do and do not get delivered?

For example:

  1. Can I carry on communications with a device I already established a pairing with?
  2. Can I issue periodic discovery requests to find devices which are out of range / I’ve never seen before? (For example if I wanted to be able to deliver a notification when a new interesting device is encountered)
  3. What if a device goes out of range and then comes back? Will I get disconnected and connected events without user intervention, or will I need to be foregrounded and have the user explicitly request reconnection?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T14:36:48+00:00Added an answer on June 1, 2026 at 2:36 pm

    Nobody seemed to know, so I bought an iOS developer account and ran some experiments. Here’s what I found:

    When running in the foreground, you can start a scan using CBCentralManager::scanForPeripheralsWithServices. Your scan can be restricted to devices advertising a particular service, or unrestricted (pass nil for that call’s parameter). It can also allow or disallow duplicates; in the former case you’ll get a didDiscoverPeripheral callback every time the iPhone receives an advertisment packets; in the latter you’ll only get one callback per device found.

    When you enter the background, the rules appear to be as follows:

    • If you were running an unrestricted scan, it will be silently cancelled. You will not get any didDiscover callbacks.
    • If your scan was restricted (i.e. you specified one or more service UUIDs you were looking for), your scan will continue to run, but the allow duplicates flag will be ignored. This means that you will now only get didDiscoverPeripheral callbacks for new devices. If all devices were seen whilst in the foreground you will get no callbacks at all.
    • Starting and stopping the scan does not reset which devices are considered new. If there is one device present, you will only get a single callback, even across multiple scans, unless…
    • If you connect to a device, then disconnect, then scan again, the device will be enumerated again (i.e. you will get one more call to didDiscoverPeripheral). I guess iOS regards that as having “shown interest” in the device.

    I don’t know whether connect attempts to nonconnectable devices (e.g. BLE Advertisers, like those implementing the proximity profile) is good enough as my example devices are connectable. However at least for connectable devices, this scan/connect/disconnect/scan procedure suffices to poll for a device’s presence in the background.

    The above results were gathered using an iPhone 4S running iOS 5.0.1

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The subject line says it all really, I just assumed that you could use
Subject says it all really...Is there anywhere a good tutorial for Xcode's Debugger out
The subject says it all. Looking for a (polyfill) code that will reset all
Subject says it all: the program, running under Linux, needs to know how it
Well, the subject says it all, basically. I have a command-line utility that may
Basically the subject says it all: We have a couple of components running on
The subject really says it all: Is there a WPF progressbar like the Windows
The subject says it all. Trying to see if I can't change that loading
I think the subject says it all, I'm trying to open a console (really
Well, the subject says it all but I will explain a little further. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.