evothings / cordova-ble

Bluetooth Low Energy plugin for Cordova
http://www.evothings.com/
Apache License 2.0
242 stars 103 forks source link

Configure use of background mode on iOS #101

Open ghost opened 8 years ago

ghost commented 8 years ago

The plugin is configured by default to support bluetooth-central background mode on iOS. Apps maight however don't want this, Apple may reject apps that have background mode enabled but don't demonstrate/motivate its use.

Task is to make use of background mode configurable. This entails the setting in plugin.xml, plus somehow configuring the code in EVOBLE.m (disabling 'CBCentralManagerOptionRestoreIdentifierKey: @"EVOCentralManagerIdentifier"'). Perhaps a conditional compile would work?

dagrinchi commented 6 years ago

Same error! Apple rejects the app with this message:

Guideline 2.5.4 - Performance - Software Requirements

Your app declares support for bluetooth-central in the UIBackgroundModes key in your Info.plist but does not provide Bluetooth Low Energy functionality. The Bluetooth Background modes are for apps that communicate to other devices using Bluetooth Low Energy and the Core Bluetooth framework.

Next Steps

To resolve this issue, please revise your app to add support for Bluetooth Low Energy communication through Core Bluetooth in your app or remove the bluetooth- values from the UIBackgroundModes key.

Any ideas?, thanks!