I am testing some code to connect bluetooth devices on an iPhone app that works with WatchKit. As Apple watch is not out yet I need to rely on the simulator/Xcode to test it. Is there a way to simulate a bluetooth device on Xcode and link this to the iPhone simulator and WatchKit extension processes? I know how to attach the Watch app to the iPhone simulator but I am unaware of any technique to simulate BLE.
            Asked
            
        
        
            Active
            
        
            Viewed 5,520 times
        
    3
            
            
        - 
                    No, simulator doesn't allow of use of Bluetooth now. – itsji10dra Apr 16 '15 at 16:12
 - 
                    1Is there any way to use Bluetooth explorer to sniff the devices and connect it to the simulator? http://stackoverflow.com/questions/5863088/bluetooth-sniffer-preferably-mac-osx – mm24 Apr 17 '15 at 08:02
 
1 Answers
2
            
            
        Yes you can.
get yourself a BLE USB dongle. you need to be on OS X 10.7 and you need also to set an NVRAM setting:
$sudo nvram bluetoothHostControllerSwitchBehavior="never"
        BriniH
        
- 35
 - 11
 
- 
                    
 - 
                    
 - 
                    Hi BriniH, I wonder do you know how to use my Mac Pro keyboard used as a bluetooth keyboard of simulator iPhones in Xcode? I need to handle the bluetooth keyboard input in my app, but I don't have a real magic keyboard now. – newszer Jan 10 '18 at 07:28