4

The project that I am going to work that already develop in android platform. Android application receive data from a desktop system as soon as USB connected device with desktop. I am quite sure, to develop this I need to use ExternalAccessory.Framework. I am searching for tutorial for this but unable to find it yet. I am planning to use apple charger cable to receive data from Desktop client or do I need to buy any special MFi cable for that. Any guideline or suggestion or any tutorial link is appreciate to get right way to develop this in iOS platform like Android. And also how I can send a dictionary from my Mac application to my iOS device using USB cable? please share idea or thought thanks

Shohrab
  • 546
  • 6
  • 21

2 Answers2

4

As duskwuff mentions, ExternalAccessory.framework is not what you are looking for.

Using the USB cable to transfer data (for 3rd party apps) is not a common thing to do in iOS. It may be possible, but it may not be the best option.

I understand you wish to transfer data between the Desktop version of your App (running on OS X or Windows) and the iOS app. If you only need to move static files between Desktop and iOS app then File Sharing via iTunes, AirDrop (Mac OS X only), or perhaps a cloud service like Dropbox would all be possibilities.

If you need realtime communication between your Desktop App and your Mobile App this is a different matter. If the data transfer is fairly small, a client-server communication over Wifi would be the best way to go (for example a small http server running in your desktop app that vends a REST interface for the client mobile app to communicate with).

But if you need realtime communication, and minimal latency & maximum data rate is more important than wireless convenience, then I suggest the PeerTalk library. It gives you a fast 'direct' link over USB between your OS X app and your iOS app. This library does not support Windows at this time, I am unaware of anything similar which does support Windows.

Community
  • 1
  • 1
alexkent
  • 1,556
  • 11
  • 25
  • thats really great ideas that you mention. but I am not allowed to use wifi or bluetooth here. because of term & condition I can't explain all project requirement. The idea behind, my application will receive small data from desktop application and based on data it will act. thanks – Shohrab Mar 16 '15 at 13:57
0

I am quite sure, to develop this I need to use ExternalAccessory.Framework.

You are incorrect. The ExternalAccessory framework can only be used to communicate with MFi-compliant accessory devices and Bluetooth devices developed with Apple's support. The iPhone USB cable (and the computer) is not such a device; you cannot use this framework here.

If you need to transfer small files between your iOS application and the computer, the most appropriate way to do this is by enabling file sharing. This will cause your application to appear in iTunes for file transfer. For details, see the question How to enable file sharing for my app?

Community
  • 1
  • 1