質問

When i connect my device to my peripheral, he asks me a passkey (a pop-up is shown on the device). I want to send this passkey programmatically during the connection.

I'm using CBCentralManager but I can't find a way to send it.

Any suggestions?

役に立ちましたか?

解決

You can't do this. This is part of the security model. If your BLE peripheral specifies that encryption is required to access one of its characteristics then pairing is required. The passkey is collected by iOS, not your application, and your application does not have any access to the passkey or the pairing/bonding process

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top