Connecting 2 iDevices via Bluetooth automatically - objective-c

So I don't like how I can connect two iPhones with game kit, because you have to choose the iPhone you want to connect to, the other iPhone has to accept... I think this way sucks. I want to have the Bluetooth ON on my two iDevices and I want them to connect automatically between them. Is there a way to do this, or does Apple not approve of it?

I believe it's Bluetooth that won't let this happen. Check out the options presented here: http://en.wikipedia.org/wiki/Bluetooth#Pairing.2FBonding
You can see that only the first SSP option could possibly allow a non-confirmed pairing, and that's not available for devices with security capabilities.

Related

Camera Remote API beta SDK: How to synchronize multiple DSC QX 100 cameras

Can we control multiple DSC-QX100 cameras using the Camera Remote API SDK from an iPad OS7?
The objective is to cause multiple cameras to "snap" picture at the exact same time. Perhaps each camera has an address (serial number)...can the software communicate with all cameras at the same time using multiple addresses? Need is limited to still photos and so-called fast, rapid photography. Video not necessary.
If so, how?
Unfortunately you can only control one QX100 lens at a time. This is because the lens connects over WiFi and you are limited to only a single WiFi connection at once on an iPad. It may be possible using a desktop PC with multiple wireless cards installed but that would be the only way.
As the Sony rep said, there's no way to do this with "officially supported" techniques.
The reason for this is that the camera acts as a WiFi Access Point (AP) - so while multiple devices can connect to it, most mobile devices can only connect to it and not anything else (since iOS and Android don't support connection to multiple APs simultaneously). This is also why you can't use other network interfaces when connected to the camera. (I don't know about iOS, but Android always prioritizes WiFi over cell network data, for example.)
Android devices have a feature called "WiFi Direct" that provides more flexibility in terms of peer-to-peer interconnection, but iOS does not support WFD. The QX100 DOES respond to WFD invites, and you can accept a pairing request with (if I remember correctly) a long-press of the shutter button. However, the official app only supports normal WiFi AP connections.
I have not yet attempted to see if using Sony's remote API in combination with the (unsupported but apparently present) WiFi Direct capability works.
More info on Wifi Direct and Android can be found at http://developer.android.com/guide/topics/connectivity/wifip2p.html
Marlin SONY, I disagree, wifi is Ethernet and by definition can handle multiple devices on the same network. If you run a phone or iPad as a hotspot and connect multiple devices, it works.
Multicam Switcher Basic is an example of a free app that supports cutting together multiple camera angles live. Unfortunately the app is still being developed so features like third party camera support isn't included, but it does show what is possible and awaits development.
I think this should be possible. Apps like CollabraCamâ„¢ (Multicam Social Video Production) or RecoLive MultiCam prove that is possible to use mulitple cams simultaneous.
I need someone too to develop an App to be able to use "two" sony dsc-qx for 3D shoots. Please, if You know how or who can do this contact me email#3-d.re

CoreBluetooth - get all devices connected to Bluetooth peripheral

Is there a way how to get list of all devices connected to the Bluetooth peripheral?
I want to connect to iBeacon and check if another iPhone is connected to it.
No, two reasons why not:
iBeacons are not connected to the iOS device, iBeacons are broadcast only and no back communication exist from the phone to the beacon.
Knowing details of other BT 4.0 Centrals connected to a Peripheral are not in line with the the privacy features of Bluetooth 4.0. iOS and other Centrals are are using resolvable private addresses, in order to avoid situation like you are describing.
#barbazoo is correct that you cannot do exactly what you are asking because iBeacons only transmit data -- they have no idea what devices see them.
You can accomplish something similar, however, if you have an app running on each of the iOS devices you mention, and you have a server where you can build a web service. The web service would expose two methods:
reportIBeaconVisible(iBeaconProximityUUID, iBeaconMajor, iBeaconMinor, myPhoneAdvertisingId)
queryVisiblePhones(iBeaconProximityUUID, iBeaconMajor, iBeaconMinor)
The app would report each iBeacon it sees using the first method, passing the iBeacon's identifiers, along with the phone's advertising identifier to the server.
The app could then use the second method to ask the server what other phones have seen the exact same iBeacon, which would return a list of phone advertising identifiers.
You'd have to have logic on the phone to only report data to the server at a reasonable frequency. You'd also need code on the server to automatically delete phone records in the list if the phones haven't reported seeing a beacon in a certain time interval.

How to link to a specific preference pane in iOS 5

Background
The company I'm working in would like to launch an iOS app to support an hardware device that interacts with some mechanical automatism (aimed to home and building automation) we already produce.
Such automatism receives the pulse needed to activate itself from a nearby bluetooth device, whose MAC address is known by a white list.
We already know of the need to sign up to the MFi program for Bluetooth hardware to connect and talk effectively with Apple devices, exchanging significant messages, but what it is demanded here is to simply detect the presence of such MAC address. No need to establish protocol sessions and the like.
The facts
Investigating how to programmatically enable/disable Bluetooth interface in iOS, I learned it is impossible without private frameworks, as this post states; that is not an option for us, as the app has to be published on the App Store and it is known that Apple rejects apps including code that is coming from private frameworks.
By the way, the app usability would greatly benefit from a direct access to that feature, so I started thinking if, instead of directly interact with Bluetooth on/off state, would it be possible to let the user access to the Bluetooth preference pane straight from the application.
Does anyone know about that?
No, unfortunately it's not possible. There was a trick with:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"prefs://"]];
but it was opening only the preferences (not straight to bluetooth settings) and it's disabled in iOS 5.1. So your only chance is to make a really good help screen (with nice graphics and animations maybe) that explains the user how to enable the bluetooth.

Controlling Network Settings in IOS 5

I have a project where it's highly desired to have some control over network settings in IOS 5 for an iPad device. The ideal scenario would be to have to ability to change the device's wifi connection to a specific SSID. My gut tells me that this is probably functionality that isn't exposed in the SDK but I figured I'd ask.
An alternate goal, if my first assumption about directly changing a connection is correct, would be to allow the app to prompt the user to change network settings and direct the user to the settings screen. I've seen a handful of apps offer this when, for example, the device is in airplane mode and the app requires an internet connection. The major difference in my case is that I'm not necessarily looking to prompt the user just when the device is not on the internet but when whatever connection the device already may (or may not) have isn't the one I'm looking for (in this case, I'm looking for a closed/non-internet-facing Wifi ssid on an aircraft).
I appreciate any pointers that can lead me in the right direction.
It might not fit perfectly what you want but I think CaptiveNetwork is the closest you can get.
The API bindings for CaptiveNetwork are available in recent MonoTouch releases.

Turn iPhone into a server programmatically?

I want to make my iPhone app display on a Mac's screen, kind of like AirPlay does with other machines. The only way I have heard to do this is, although I do not like it, turn the iPhone into a server. Unfortunately, I cannot figure out how to do so. I also wanted to set it up in such a way that my Mac automatically detects it. I have seen a similar setup in the game Chopper 2. My Mac app will have a simple timer that fires every few seconds to look for the iPhone, in the same way that Chopper 2's "Find iPhone" button does.
Is there a simple way to turn the iPhone into a server, or start a "session" like Game Center does?
One last thing: I know it is somehow possible, because another app I have actually gives my iPhone a web address at the click of a button. It is called the Dicenomicon, if you want proof.
First there is no easy way to redirect your display to Mac, even if you made it a server of some kind.
Second, to discover or publish customized services on WLAN, you may want to refer to the samples on Bonjour:
CocoaHTTPServer: a simple TCP/HTTP server.
WiTap: an app that discovers and connects to services of the same kind on WLAN by Bonjour.
I'm not really sure what you mean by "server", because there is no way to share the screen of an iPhone using the official SDK, although this is possible by jailbreaking.
It would be possible, however, to send data back and forth between the Mac and iPhone, and display the data on the iPhone, on a Mac. Using that data, you could try to recreate the interface on the Mac. All of this could be accomplished using sockets. A class that might help with that would be cocoaAsyncSocket, which makes network programming a lot easier.
The auto-discovery of iPhones on the local network is achievable with Bonjour. Without getting into too many details, NSNetService would allow you to publish a service for your app from an iPhone, and NSNetServiceBrowser would allow you to find that service on the local network from the Mac. From the NSNetServiceBrowser, you could establish a socket connection with the iPhone.
Good luck!
You might want to take a look at the GameKit APIs, I know they do something similar between two iOS devices.
http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/GameKit_Guide/Introduction/Introduction.html