###前提・実現したいこと
ここに質問したいことを詳細に書いてください
https://sites.google.com/a/gclue.jp/swift-docs/ni-yinki100-ios/11-corebluetooth/bluetooth
こちらのブログのサンプルコードについての質問です
###発生している問題・エラーメッセージ
エラーメッセージ
Objective-C method 'centralManager:didDiscoverPeripheral:advertisementData:RSSI:' provided by method 'centralManager(:didDiscoverPeripheral:advertisementData:RSSI:)' conflicts with optional requirement method 'centralManager(:didDiscoverPeripheral:advertisementData:RSSI:)' in protocol 'CBCentralManagerDelegate'
###該当のソースコード
*/
func centralManager(central: CBCentralManager!, didDiscoverPeripheral peripheral: CBPeripheral!, advertisementData: [NSObject : AnyObject]!, RSSI: NSNumber!) {
print("pheripheral.name: (peripheral.name)")
print("advertisementData:(advertisementData)")
print("RSSI: (RSSI)")
print("peripheral.identifier.UUIDString: (peripheral.identifier.UUIDString)")
var name: NSString? = advertisementData["kCBAdvDataLocalName"] as? NSString if (name == nil) { name = "no name"; }
###試したこと
課題に対してアプローチしたことを記載してください
ネットで調べたが解決しませんでした
###補足情報(言語/FW/ツール等のバージョンなど)
より詳細な情報
swiftを使っています
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。