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.
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"
Related
iOS devices can only be connected to one other device (PC or accessory) at once. I am currently developing a MFI accessory, and I can't access the debugger while working on the accessory because the iPhone is already connected to the accessory. Does anyone have any experience with such a problem? It is really hard to debug without the debugger.
As of Xcode 9 and iOS 11, remote debugging is supported. You can run and debug an app from Xcode with any pre-configured device on your network. Choose "Connect via network" in the Devices and Simulators window and it should work.
See How do you perform wireless debugging in Xcode 9 with iOS 11, Apple TV 4K, etc? for details.
I want to create a watch app for an existing iOS app.
But I am in a situation that i don't own a apple watch and my existing iOS app will run only on real devices not on simulator.
Is it possible to run the app on the iphone device and test my watch app in the watch simulator?
Pairing a real iPhone and a Watch simulator is not possible at least at the moment. I make this conclusion because of 3 reasons:
A Watch simulator automatically pairs to an iPhone simulator during the installation process.
It is not possible to unpair a Watch simulator from the interface at all.
Bluetooth is not accessible on a simulator to communicate with real devices. Here's a proof.
I m goggling the things from few days about the debugging the iPhone application from Xcode(Version 6.2 (6C131e)) without using cable.
i have heard that OS X Yosemite of MAC have feature that can connect iPhone to Mac without cable.if is it so,than is anybody have any idea that how to build project into device from XCode without cable (Wi-Fi / Bluetooth)?.
is there any way to workaround to build or debug project in to device without using cable?
Apple has not specified how to build an Application on a device which is not connected through cable. If they do so in future, external ascessory, Multipeer connectivity framework (for WiFi) and CoreBluetooth Peripheral Manager (for bluetooth) will certainly come into account but before that, will Bluetooth or WiFi streaming withstand the code transfer load from Xcode to a device? And what if you device is already connected to some other WiFi or Bluetooth network?
This is now a reality! With Xcode 9 and iOS 11 you can now perform wireless builds to a device.
I am new to iOS app development. I have to test an app using BTLE on iOS 8.1 simulator. I am not able to find how to switch on the bluetooth in the simulator. Could any one please help how to test a BTLE based app on the simualtor. Also it be of great help if anyone can answer if paying $99 is mandatory to deploy my app on my iPHone/iPad usinng my MacBook Air?
Systems Details are:
OS X 10.9.4
Xcode 6.1
iOS 8.1 Simulator
iOS SDK 8.1
Bluetooth Low Energy is not supported in the simulator. You need to test on a real device.
To install an application onto a device you will need a paid membership of the Apple developer programme
Although BLE is not supported in the iOS Simulator, Core Bluetooth is supported on newer Macs in OS X apps. So if you put all the iOS app's Bluetooth code in a a controller or model object separate from the UIKit UI code, you can also use that same BLE code inside an OS X app to test it out.
Hello I was searching in all topics of the forum about how can i test an app which uses multipeer connectivity framework. Can someone tell me how can i test an app by using an iPhone device and a simulator simultaneously, player one for device and player two on the simulator and vice versa. I already test the app by using two simulators one per mac - user on a mac and its working but it is not convenient to continuously switch users to test an app.
I tried all the alternatives, running once in simulator and one on device at the same time,make second target, nothing happened.
Thanks in advance
If you put your iPhone and your Mac on the same WiFi network they should able to discover each other without any problem.
Yes you can test your app on Device an Simulator simultaneously.
I'm developing an app with Multipeer Connectivity right now and communication between
Iphone and Simulator works fine.
I'm running it on a MacBook Air.
All you have to do is to make sure, that Bluetooth is enabled on your Mac.
You can do this in System Preferences -> Bluetooth.
In addition to testing on WiFi, you can also test your app based on "Multipeer Connectivity framework" on simulator and any IOS device using Bluetooth, As long as simulator and devices are connected in same Personal area network.
For example, on Iphone you can turn on Personal Hotspot (in your phone General settings) to connect your phone with your mac in same personal area network via bluetooth or WiFi and then try testing your app sharing messages between simulator and Iphone using any personal network based on Bluetooth or WiFi.
All the combination will work as long as app using "Mutlipeer connectivity framework" are on same personal area network.