简体   繁体   中英

BlueTooth Low Energy iOS App

I am connecting mac as a "Centerl" with my iPhone as a "Peripheral" using BlueTooth Low Energy.Both Peripheral and central connected successfully and work in both mode foreground and background.

But my problem is that during background mode,if i manually on or off the bluetooth of my device, i dectected my blue tooth is off or on during background mode , but Central not connected with peripheral anymore during background mode.

You need to enable Background Modes for location update and for bluetooth low energy for your project target.

Select Xcode project properties >> project target >> Go to Capabilities >> Background Modes

在此处输入图片说明

As shown in above image check mark below properties:

  1. Location Updates
  2. Uses Bluetooth LE accessories

Edit:

Check device settings:

  1. Check whether enable the background app refresh in Settings -> General -> Background App Refresh
  2. Check whether enable the location service in Settings -> Privacy -> Location Services
  3. Check whether enable the WiFi, even there not wifi signal.

If all above is enabled, but still not working, Try to reset the network settings in Settings -> General -> Reset or reboot the device.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM