iOS Core Bluetooth (LE): App crash when handling different views -



iOS Core Bluetooth (LE): App crash when handling different views -

i have 2 views: 1 central tableview discovered devices appear , 1 detailview loads when user selects connect 1 of discovered devices.

it works until next point:

discovering devices connect device read services, characteristics , subscribe them values of char's beingness read , displayed on detailview

when homecoming detailview through "back"-button callback-function

override func viewdidappear(animated: bool) { if(!firststart){ tableview.reloaddata() println("appeared!") discoverdevices() }

}

gets called after end in exc_bad_access. discoverdevices() function following:

func discoverdevices() { println("discovering devices......") centralmanager.scanforperipheralswithservices(nil, options: nil) }

there seems error in "centralmanager.scanforperipheralswithservices(nil, options: nil)" - after callback. right start fine. have set delegate somewhere? can't figure out "exc_bad_access"-error.

do have re-initialize centralmanager? have restart it?

thanks help in advance.

kind regards, stevil

i found out myself. problem peripheral.delegate had set 1 time again in main tableview. running smooth.

maybe helps other newbies.

ios bluetooth exc-bad-access bluetooth-lowenergy cbcentralmanager

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -