It doesn't crash on iPhone 5S. I tested it in airplane mode and with wireless turned off.
Thanks Erel, in airplane mode it works fine.
I'm using an iphone 5c
It only crash when wifi is off (not airplane mode)
it is like that will crash if the iPhone doesn't have data/internet connection.
then I think that the code is wrong in somewhere..
When not internet connection is available it has to work as you saw in airplane mode.
I have bought an Bluetooth for debug without wifi, awaiting for it arrive.