I'm developing a custom electronic device - think of it as a special kind of data logger, and I need to connect a computer to it to configure it and to extract the data.
I know I can do this without too much trouble on a PC, but I'd like to use an iOS device to do this.
Two questions:
Can I do this with a regular dock connector / USB cable? Will the EA framework let me do all the communicating?
Once I have extracted the data, what's the best way to get that out of the iPad? Make an email with it, save to a dropbox or something?
Thanks!
Connect a USB drive or an SD card readerAttach the USB drive or SD card reader to the charging port on your iPhone using a compatible connector or adapter. You may need the Lightning to USB Camera Adapter, Lightning to USB 3 Camera Adapter, or Lightning to SD Card Camera Reader (all sold separately).
In Settings, go to Face ID & Passcode or Touch ID & Passcode, and turn on USB Accessories under Allow Access When Locked. When the USB Accessories setting is off, as in the image above, you might need to unlock your iOS or iPadOS device to connect USB accessories.
Step 1: Connect your iPhone to your computer using n USB cable through any of the USB ports available on your computer. Step 2: Open iTunes, click the "Files" tab and check the boxes to sync or transfer your files. Step 3: Select your desired destination folder for the files and click "Sync" to complete the transfer.
Connect iPhone and your computer with a cable. In the iTunes app on your PC, click the iPhone button near the top left of the iTunes window. Select the type of content you want to sync (for example, Movies or Books) in the sidebar on the left.
Afaik, you need to join the MFi program to make USB accessories for iPad/iPhone. That will give you all the technical resources needed.
As for data transfer there are only "opinions", I say the more options of sending, the better. Just don't force the user to choose more than once, then make it changeable in settings.
If you're doing very light communication, you might be able to get away with using the headphone jack.
Apps communicate to the headphone port through the various audio frameworks on iOS. AVFoundation is a high-level abstract framework to do various audio operations, but for fine-tuning the communication to a device over this interface, you will likely be using the C-language callback-based Audio Queue Services framework to do audio I/O.
This is nice because your device can be cross-platform (iOS, Android, Mac/PC) as long as you write the corresponding software, and because you don't need to go through Apple's MFi approval program. Think like the Square credit card scanner.
You will have to write the communication stack between the device and your iOS device but yes, you can.
there's very few docs about using the EA.framework. All the juicy parts are in the Mfi program but Apple is very strict about giving access to it.
So if you succeed, sharing a tuto will make you a EA hero ;)
About sharing your data, imho, email + CSV is a winning combo.
If you want to plug something into the dock connector, you want to have a look at https://developer.apple.com/programs/mfi/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With