Skip to content

Commit

Permalink
Merge pull request #1282 from vhakulinen/bugfix/fix-will-restore-state
Browse files Browse the repository at this point in the history
ios: fix willRestoreState event
  • Loading branch information
marcosinigaglia authored Nov 4, 2024
2 parents c040c07 + f9464bb commit 666d6d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ios/BleManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ class BleManager: RCTEventEmitter, CBCentralManagerDelegate, CBPeripheralDelegat
peripheral.delegate = self
}

NotificationCenter.default.post(name: Notification.Name("BleManagerCentralManagerWillRestoreState"), object: nil, userInfo: ["peripherals": data])
self.sendEvent(withName:"BleManagerCentralManagerWillRestoreState", body: ["peripherals": data])
}
}
}
Expand Down
7 changes: 7 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,13 @@ export interface BleManagerDidUpdateNotificationStateForEvent {
readonly code: number;
}

/**
* [iOS only]
*/
export interface BleManagerCentralManagerWillRestoreState {
peripherals: Peripheral[];
}

/**
* [Android only]
*
Expand Down

0 comments on commit 666d6d4

Please sign in to comment.