问题
Currently, iOS does not support the combination GAP Central role and ATT Server role as well as the combination GAP Peripheral role and ATT Client role.
Is Apple working on this? Does someone know when it will be possible to do so ?
回答1:
If you develop a non iOS peripheral, then you should be able to start acting as ATT client once the iOS central connected to you. The ATT database is shared accross applications and should be accessible this way. You can initialize it in a separate app or in the same app using a CPBeripheralManager.
Otherwise, there has been no indication from Apple that they would be considering this use case so I wouldn't expect it be implemented in the foreseeable future.
来源:https://stackoverflow.com/questions/20655068/ios-corebluetooth-central-server-and-peripheral-client