I would like to use an iOS device as a camera and stream the data to an accompanying OSX app. Wifi is not a valid option and I'm assuming Bluetooth will be too slow, so I'm planning to connect the phone via USB to the Mac.
I've gone through this networking tutorial and have looked at Apple's EADemo code with EASessionManager, etc. but haven't figured out how to put everything together.
When my iOS device is connected via USB to my Mac, it doesn't show up in
[[EAAccessoryManager sharedAccessoryManager] connectedAccessories]
so I'm kind of lost. Am I going down the wrong path? Any suggestions would be really helpful! Thanks in advance!
Related
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!
Is it possible to transfer files via iPhone hotspot i.e, iphone connected to a cellular network creates a wi-fi hotspot and one of the device is connected to that wi-fi and data transfer between these two devices over hotspot?
The iPhone has an app listening to some port or some medium through which the other device can send files to that iPhone app and record/save the files sent from the other device.
Any links or any information would be good if anyone of you can provide.
Thanks.
So this finally worked pretty easily using Apple's Multipeer Connectivity Framework.
Thanks to AppCoda's tutorial, here is the link:
http://www.appcoda.com/intro-ios-multipeer-connectivity-programming/
This tutorial doesn't talk about Hotspot usage, but I figured out a way to use the same to transfer files using personal hotspot on iPhone.
Steps to reproduce:
Install the final product of the AppCoda's on two devices. (This
might not work on Simulator for hotspot check, since no bluetooth via simulator)
Create hotspot on iPhone and connect the other device through the wi-fi created from iPhone.
Switch off bluetooth in one device and proceed with the app, browse for other device to connect.
Try to transfer files from one device to another through the hotspot connection.
Guess what? It worked for me. :) Go ahead. Try it out.
I am working on iOS app which is similar to Apple Magic Mouse, function of which is to mirror the gestures on the iOS device to the Mac after establishing connection between them using Bluetooth LE.
I've purchased a new HID bluetooth dongle and managed to set up connection using CoreBluetooth Framework for the last whole week.
However, completely no idea on what data of which format should be sent from the iOS device to reflect the gestures.
I've gone over the many tutorials and demos, but still no idea.
Please help me with the solution like the APIs or anything.
Thank you.
I am developing a iPhone app like " Eject device" on computer. which means, when I connect USB cable for connecting to computer, this application just disconnect that connection by a single Click. I was googled about this, and I got some idea about EAAccessoryManager . this EAAccessoryManager only for notification. when USB cable connects or disconnect it can notify to the user. But I need to disconnect connection programmatically . is there any API or Tutorial available for this ? Kindly help me please.
You should probably look at IOKit. I believe IOKit works with USB device both on iOS and OS X.
You may be interested to take a look at these link:
https://developer.apple.com/library/mac/#documentation/DeviceDrivers/Conceptual/USBBook/USBIntro/USBIntro.html
http://iphonedevwiki.net/index.php/IOKit.framework
Also, there is very good book on iOS/OS X kernel and I believe there is a whole chapter regarding IOKit:
http://www.amazon.com/Mac-OS-iOS-Internals-Apples/dp/1118057651
You can find the private API for the iOS Frameworks in https://github.com/kennytm/iphone-private-frameworks, but I don't think that this capability is present. The reason I think this is because there is no reason to want to do this from the iPhone, and therefore no reason for Apple to include it in the API.
I'm looking into the iOS sdk for examples of the ExternalAccessory framework to use the iphone/ipad as an USB device that can be plugged into a PC or Mac and present as external device (like a midi controller or something else)
The App i want to create requires connecting to a host (PC or Mac) the iphone via USB or bluetooth and present to the host a functionality. How can i implement this?
You'll probably have an easier time connecting via WiFi. You need to be part of the Apple Made for iPhone program, which is not easy to get into, to use Bluetooth or the dock connector to talk to peripherals. There's no such restriction on the use of WiFi. Also, you'll find a lot more helpful examples of connecting via WiFi on the web.
CoreMIDI is the appropriate API for emulating a MIDI device, which may be possible over USB using Apples Camera Connection kit.