Alien
Alien

Reputation: 11

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.

Upvotes: 1

Views: 1090

Answers (1)

Mehul Patel
Mehul Patel

Reputation: 23053

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

enter image description here

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.

Upvotes: 1

Related Questions