Xcode iOS simulator's Settings > Bluetooth just spins and doesn't turn on - iphone

I'm trying Apples BTLE Core Bluetooth test app.
But when I run on the iOS Simulator, it doesn't work because Simulator's Settings > Bluetooth was off.
But when I click Settings > Bluetooth to turn it on, it opens the right-hand Bluetooth pane and just shows the busy rotator, and never turns on.
Same problem simulating iPhone or iPad.
POSSIBLE SOLUTION ALREADY:
I just found this Apple Tech note,
http://developer.apple.com/library/ios/#technotes/tn2295/_index.html
If solution, then I will add the answer to this question, so that others may benefit.

This is no longer supported, unfortunately. (As of Xcode 5.0, iOS7) The tech note has been taken down and this third-party article describes some of the changes, including loss of BTLE support in the simulator: http://www.doubleencore.com/2013/09/whats-new-in-bluetooth-le-ios-7/

This tech note from Apple describes the complete procedure for getting ios simulator to do Bluetooth.
http://developer.apple.com/library/ios/#technotes/tn2295/_index.html
I bought the Bluetooth LE USB dongle at Best Buy. Be sure to ask for one with Bluetooth 4.0 because they still sell 2.0 (cheap).

Related

how to detect nearest BLE 4.0 ios devices using corebluetooth?

I worked on detecting nearest BLE 4.0 ios devices using corebluetooth by referring this link
http://olesitune.mine.nu/blelogg/?page_id=180
It's not detecting any ios device.can anyone provide some information regarding this.
Thanks in advance
Are you using iOS 6? Only iOS 6 has support for setting the iOS device as server/peripheral. Remember that you can not discover any BLE devices from iOS just using the standard bluetooth settings, you have to write an app for both sides of the communication.
That guide will not help you discover any iOS devices, only standard BLE devices like heart rate monitors, temperatur sensors and such if you don't have an iOS6 device which is configured as a peripheral device.
I see that you have also posted this question elsewhere, but please submit some of your project code, results, debug data before expecting any helpful answers

List (and connect to) Bluetooth devices from within iOS App

I have a device that broadcasts data via bluetooth. It is MFI certified and I already have an application on the AppStore that communicates with it, using the External Accessory Framework.
The problem is that my application assumes the device is already paired.
Is there a way to enumerate all such devices within reach and allow the user to select (and therefore pair) to one of the devices in the list?
No, you can not do this unless two criteria are first met.
Your device must be a Bluetooth Low-Energy device.
The device must have the Bluetooth 4.0 integrated chip which, at the moment, is just the iPhone 4S and the New iPad.
These devices, if operating in the low-energy mode, can be discovered and paired through the CoreBluetooth framework. There is no walk-through form of documentation on this framework, but if you are a seasoned iOS developer, you should be able to figure out how to use the framework through the cut-and-dry framework docs.
As mentioned, information regarding the MFi program and hardware development is locked down under an Apple NDA. However, the information regarding pairing to these devices in this manner is readily available through information in Apple's own documentation.
In IOS 6.0, they introduced showBluetoothAccessoryPickerWithNameFilter:completion:
I haven't had much success with it (when it does find devices, they become lost a few seconds later, but this may be an issue with my code).

Possible to mirror iPhone/iPad screen on a monitor without jailbreaking?

I have been looking for a way to show the iPhone screen (not the simulator) on a monitor or projector for demo purposes.
Previous SO post suggested jailbreak (Veency, iDemo/DemoGod, screensplitr) or simulator.
Release notes iOS 3.2 (External Display Support) and iOS 4.0 (Inherited Improvements) mentions that it should be possible to connect external displays to iOS 4.0 devices.
Is it now possible to demo an iPhone device on a monitor without using the simulator, or are the release notes about other improvements?
Anyone tried to display an iOS 4.0 device on a projector or monitor?
Update 22.Jul.2010:
To mirror iPhone screen: Jailbreak
and use Veency, iDemo or
screensplitr
To output to
external device from your
application: Implement External Display Support in your app in iOS
3.2, 4.0
Update 15.Apr.2011 ;))
It is now possible to mirror iPad2 on a monitor
Update 1.Dec.2011:
It is now possible to mirror iPhone 4S on a monitor
The iPhone 4 supports the VGA adapter that launched with the iPad. Within your application, any external display appears as an additional UIScreen instance. You can create a UIWindow, associate it with the UIScreen, and place content there that you would like to have displayed on the secondary monitor.
I show how to do this in the video for the iPad session of my course on iTunes U, and provide some code for this in the course notes. Matt Gemmell also has a nice writeup on the subject.
http://code.google.com/p/iphoneos-screen-mirroring/ Has code to allow you to mirror your screen using the cables mentioned above. This code uses private apis so make sure you don't ship with it. This can be done by creating a new target in xcode and conditionally compiling the mirroring code in.
Check Apple Composite AV Cable and Apple Component AV Cable. These connect to a TV and computer so may be you can find a way to get it on a projector.
Since iPad 2 "The Apple VGA Adapter mirrors exactly what you see on iPad 2 so that everyone in the room can enjoy it." Same hardware that needs special coding on original iPad then on iPad 2 by default mirrors.
If you are using a smart TV as a monitor, you can use the AirPlay function. However, not all Smart TVs support this function. You can simply test it by connecting your iPhone and TV to the same network to see if you can use AirPlay. If not, you can try MirrorMeister's free mirroring app, it works on all iOS and macOS devices as long as you connect to the same Wi-Fi.

Two part question about submitting bluetooth-enabled apps for the iPhone

I have a couple questions about submitting blue-tooth enabled apps on the iPhone.
I want to first say that bluetooth is merely an option in the application. The application does not completely rely on bluetooth as there are many modes the user can go in.
First, do they require you to have the "peer-peer" key set in UIRequiredDeviceCapabilities even if bluetooth interface options can be disabled or hidden for non-bluetooth enabled devices? Basically, it's just an OPTION in the game and there are many other modes the player can play.. Does Apple not allow you to do that? I'm just curious, because it seems like something they would do.
Adding to that, how do you check for it's functionality at runtime? In essence, how do you check UIRequiredDeviceCapabilities at runtime. I'm aware of checking iPhone device types, so would that be a proper way of going about it?
I'm also sort of unaware which devices can run bluetooth gamekit, there doesn't seem to be a proper reference at the SDK site, or I'm unable to find it.
Thanks for reading!
[edit] I can confirm the existance of somebody rejected for submitting a bluetooth enabled app which didn't work on a iPhone 2G.. Of course, they didn't say if that was the MAIN function of the app, though.
For devices that do not support this capability, see the Game Kit Programming Guide:
Bluetooth networking is not supported
on the original iPhone or the
first-generation iPod Touch. It is
also not supported in Simulator.
If this is an optionally-enabled feature, you might be able to get by with disabling it for the appropriate devices by detecting first-generation iPhones and iPod touches using code like Jeff LaMarche's UIDevice category. If you hide this option when running on unsupported devices, if a reviewer happens to use one of those devices they won't even see that there's something nonfunctional.

Does Safari and/or WebKit implement the equivalent of window.navigator.online?

Does Safari have anything equivalent to the HTML 5.0 spec for window.navigator.online?
http://www.whatwg.org/specs/web-apps/current-work/#browser-state
If not are there any alternatives to polling to establish connectivity state?
My question pertains to Safari 4.0+ and iPhone software 2.1+
It's there, but it apparently isn't working (for me, on iPad with iOS 3.2.2). My code is showing it is always returning true, in both airplane mode and with the wireless explicitly turned off (I don't have 3G turned on). If someone else on an iPad has this working, I'd be interested in hearing about it.
It'd also be nice if Apple adopted navigator.connection (see link text), but that will obviously be a cold day in Hades before that happens.
Yes. I think it's been in Safari from 3.0 but I haven't checked. A quick test on the iPhone shows that it is available from iPhone OS 2.2.