Comments (5)
Hey @vicktor, this should behave exactly like the CBCentralManager callback. If your app is restored by the system, the callback will be passed an array of RZBPeripherals, as described in the documentation:
An array (an instance of NSArray) of CBPeripheral objects that contains all of the peripherals that were connected to the central manager (or had a connection pending) at the time the app was terminated by the system.
The CBPeripheral will be wrapped with RZBPeripherals and then the callback block is triggered. Often the next step is to check to make sure that the correct notify blocks are configured, but what needs to be done here varies on the application.
from rzbluetooth.
Thanks Brian, please can you write some sample code? even if callback is empty.
thanks!
from rzbluetooth.
Something like this?
centralManager.restorationHandler = { peripherals in
for peripheral in peripherals {
peripheral.doMyAppSyncThing()
}
}
from rzbluetooth.
from rzbluetooth.
Good luck!
from rzbluetooth.
Related Issues (20)
- Allow methods to be called with a timeout parameter instead of using global timeout HOT 1
- Reading from non-existent characteristic causes all reads to fail
- Can't figure out how to scan for peripherals supporting specific service
- Writing chunked data without response not working HOT 1
- support new API in iOS 13
- Create new release HOT 1
- clearNotifyBlock should not `setNotify: NO` if disconnected HOT 6
- RZBConnectCommand executeCommandWithContext:error: crashes with assert that peripheral != nil HOT 7
- Allow opting in for CBCentralManagerOptionShowPowerAlertKey HOT 1
- Add a way to cancel all pending commands for a peripheral HOT 1
- Carthage Support HOT 1
- RZBEnableMock() doesn't work in Swift HOT 6
- Mocking cannot be enabled and disabled on demand HOT 2
- Unit tests crash using Xcode 9.2/macOS 10.12.6 HOT 1
- Regression calling stopScan in RZBSimulatedTestCase context between 1.0.2 and 1.2.2 HOT 16
- Build warnings using CocoaPods HOT 6
- Support for simulated peripherals HOT 1
- Crash in -[RZBPeripheral clearNotifyBlocks] HOT 2
- Crash in -[RZBPeripheral cancelAllCommands] due to infinite loop HOT 4
- RZBPeripheral.cancelConnection cancels commands for all peripherals HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rzbluetooth.