iOS USB HID programming - ios

I am trying to make some code regarding USB HID devices. I have found an article about Bluetooth programming which uses Game Kit Framework.
Now I'm looking for some tutorial or maybe some code to work on connecting HID device via USB. Where should I look? Is Game Kit the right way? Is it difficult to implement communication between iOS and HID device?

Actually I just found out that you can develop for external devices with MFi program. It's nicely described here. Also some technical info in Apple's documentation.
But I don't really know what that means... ?

You can use IOKit for USB, but it's a private framework on iOS - so it depends if you want to deploy to the App Store.
Here is the USB Intro for Mac, I'm not sure if it's the same on iOS - but just to get the idea.

Related

How to connect to USB device from iOS with Xcode or swift

I'm trying to connect USB camera to iOS in Xcode using Swift or Objective C.
I saw online to try and use IOKit.framework, but I believe it's for MAC, which I'm not using. dos NSSstring converters but I'm unsure that will work either. I'm trying to do it through iOS.
I also have a WIFI adapter that will connect to my NIKON DSLR and shoot photos to a PC over wifi but not sure how to get the iOS device to connect and download these images.
Thanks in advance!
Looks like this isn't possible, at least for what you want.
Communicating with an external accessory requires you to work closely
with the accessory manufacturer to understand the services provided by
that accessory. Manufacturers must build explicit support into their
accessory hardware for communicating with iOS. As part of this
support, an accessory must support at least one command protocol
These USB devices obviously have not been designed with iOS in mind, so there is a very small chance you can get it to work the apple way.
Alternatively, you can look into jailbreaking and that sorta deal with the cameraconnectionkit library. This is way out of my scope though, so good luck!

Retrieve the WPA2 Enterprise username in iOS

I have an interesting requirement that I'm not sure is even possible. Currently, I'm developing an iPad app for a fleet of tablets. The tablets connected to a WPA2 Enterprise WIFI network. Is it possible using Objective-C or Swift or C magic or whatever is necessary to get the identity/username that is connected to the wireless network?
I've poked around CaptiveNetwork, but it doesn't seem to be what I want. I'm not sure if there is something to CWNetwork, but that seems to be Mac only. You can do this on Android (I know, because I'm currently doing it with the key android.net.wifi.WifiConfiguration$EnterpriseField).
Can anybody help?
I did some reading and was thinking this would be possible through SCPreferences in the SystemConfiguration framework, but unless your device is jailbroken, the APIs you need are not available on iOS.
The only way that comes to mind is with an MDM such as AirWatch or Good.

Is there a library which supports bluetooth 2.0 for xamarin?

I'm trying to make a bluetooth communication on xamarin for ios. I already tried core bluetooth and monkey robotics bluetooth but neither of them worked. I looked somethings up on google and found out that it's not possible to communicate with a BLE 2.0. Even the ipad I'm testing doesn't recognise the device I'm trying to connect.
Thank you

iOS and bluetooth

I want to develop an app which will communicate with devices via bluetooth. I am not able to find any tutorial to help me with this. I don't mean bluetooth 4.0 LE but classic bluetooth. All I have found is CoreBluetooth framework but I think this is only for bluetooth LE. I have found also something like IOBluetooth and IOBluetoothUI but I am not sure if it is for Mac OS or for iOS. But still can't find any tutorial or something to help me understand whole process (discovering, establish connection, communication,...). Can you help me with this?
OK so I just found this article.
According to this article there are 5 ways how to work with Bluetooth:
Enroll MFI program - expensive and long period process
CoreBluetooth framework - works only with Bluetooth 4.0 LE devices
GameKit framework - only for iOS device (two iPhones) so you can't work with other device then with iOS
Private API - app with private API won't be approved by Apple on the Appstore
Jailbreak
It seems there isn't normal official way how to work with bluetooth.
My case: I want to communicate with not iOS device which has bluetooth 2.1 and I want to have it on the app store -> I can use only first one so I am screwed...
You can check out GameKit's bluetooth feature. A basic tutorial here
Also you can check Ray Wenderlich's tutorial which is a bit more enchanced one. Can be found here.

IPhone Bluetooth Connectivity to Non IOS Devices

I was wondering, if there is a way to use IPhone as an HID device, with some other device like PS3. I checked out the Bluetooth specification and IOS Devices do support HID Profile. So I thought it would be easy to pair my iPhone using passkey mechanism and should be able to start using my iPhone as keyboard or mouse without much hassle. But I found very soon that this assumption is naive and I need to develop custom solution.
I was initially thinking about using GameKit framework, but I think it only works between two compatible IOS Devices. If I want to extend this capability, then I have to use iPhone External Accessory API .In my analysis, I also found that iPhone will only communicate and pair with devices that are licensed by Apple. (Made for iPhone\iPod program). Does it mean that, if I want to use iPhone with another device, I need to get that device approved by Apple. ( Which will not surprise me one bit). Also if someone could point me to more detailed documentation on this, that will also be helpful.( What is an MFI developer board ??)
I do not want a solution that needs me to jailbreak an iPhone. (or any solution that will disqualify my app by Apple).
So to summarize:
1- Please validate my findings, correct them if they are wrong?
2a- How does External Accessory API Work?
b- Can I use this to connect to third party accessories ? (or is this only for accessory developers).
3- Or is there a better solution without using External Accessory API?
Please provide supportive documentation or link if you can. Thank You.
You are unlikely to get on the External accessory program from apple unless you are a big company ( you can try, but I have read this a number of places) . iPhones use a proprietary Bluetooth interface that and hardware must also implement this interface, so not much chance of getting it to connect to any other hardware directly.
Most apps like this (Remote Mouse) for example, connect to your wifi network, and have another application installed on your computer. The iphone can then talk to this application over the wi-fi network, but not bluetooth. I would suggest that the only way I can see this would be possible to to create the server app that you install on a computer on the wi-fi network that then in turn controls the 3rd party device if there is an API that you can use from the desktop app to control the 3rd party device.
This is just what I have found when I researched about this for making an app for iPhone to control a bluetooth watch. I had to jailbreak in the end to replace the bluetooth stack on the iPhone with one that could connect to any hardware device. Not limited by apple.

Resources