I am trying out Core Bluetooth framework introduced in iOS 5.0. According to many threads (one of many) on StackOverflow itself:
if you call scanForPeripherals function in didUpdateState delegate then it works because delegate functions can't return.