Reputation: 1002
Is it possible to have an iphone (iphone 1) send out BLE signals in the background with information such as an id number and time sent? This signal will be read by another iphone (iphone 2) running the BLE app in the foreground. iphone 2 does not need to communicate with iphone 1. It just needs to recieve the signal which i know it can, but i'm just not sure if iphone 1 will be able to send out this signal in the background.
Upvotes: 0
Views: 284
Reputation: 585
To have iPhone 1 act as a peripheral (sending data) in the background, make sure you add (in your Info.plist file), "Required background modes" -> "App shares data using CoreBluetooth".
This project lets you easily set up an iPhone to share an array of strings while in background mode with another iPhone in foreground mode: SimpleShare
Upvotes: 0
Reputation: 119031
If you're using iBeacon - no, it can't.
If you use the underlying BTLE support via CBPeripheralManager
- yes, it can.
Upvotes: 1