I have a mobile app that needs to transfer files to a database. However, one of the specifications for this is that, if the user does not have a wireless network set up it should be able to be plugged into a mac and transfer a file to the database. The issue I am running into, however, is how to get said files off the iPad and onto the computer via USB.
I have spent the last week looking into various solutions, mainly IOKit and applescript, but both of these seem to be unable to locate the iOS device when it is plugged in with a USB cable. While I know that I could jailbreak the device and then it should be simple, this is not an option.
I have had a difficult time finding information on this subject, which makes me worry that it is hopeless.
However, I know there must be a way to do this without jailbreaking because there exists this beautiful app. I have been able to access the files I need to through this app so I know for sure it is possible. This, however, is not an ideal solution as I really don't have the option to use third party software for my application. I suspect that the app uses applescript to do it as it has an executable called appleScriptServer in the install directory that looks like it may be what handles this.
What I need is to understand how they access the files and implement a similar scheme for my (much simpler) needs.
Does anyone know of some way to do this? If it is possible in IOKit or through applescript, I would like some resources that help me understand how to properly locate and access an iPad when plugged into the USB port on a mac. The closest I have come was using user$ system_profiler SPUSBDataType from this thread that lets me know:
iPad:
Product ID: 0x12a4
Vendor ID: 0x05ac (Apple Inc.)
Version: 3.10
Serial Number: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Speed: Up to 480 Mb/sec
Manufacturer: Apple Inc.
Location ID: 0x1d110000 / 7
Current Available (mA): 500
Current Required (mA): 500
Extra Operating Current (mA): 1600
but I don't know that I can use any of the information it gives me other than to verify that it is plugged in via USB.
Thank you very much for any help you can give me.
You can use the MobileDevice framework, as explained in this answer to a question similar to yours.
Related
I'm planning to use tcpdump for development of an iPhone app.
But i'm not sure will Apple allow it or not with iOS 8.0 onwards to be used in iPhone app development.
Please provide your comments on this
Thanks
You won't be able to open a BPF device on iOS - by default, XNU creates BPF devices with permissions rw-------, owned by root, so even if a process running in a sandbox (which all non-Apple iOS applications - and probably most Apple iOS applications - on a non-jailbroken iOS machine are) is allowed to open files in /dev, your program won't be able to capture network traffic.
I also think sandboxed applications may not be allowed to fork and exec or posix_spawn() arbitrary programs, so your application probably wouldn't be able to run tcpdump as a program - assuming it's even shipped with iOS, which it might not be.
You might be able to incorporate tcpdump code in your application, but without being able to capture traffic, all it will be able to do is to read existing captures, and that's probably easier to do on your Mac.
So this is probably a project of interest only on a jailbroken machine.
I updated iOS on my phone to 8.3 and I saw this message popup on first boot, but I have not seen it since:
I have been searching all day for information and I can't find a single reference to this message or to Xcode supporting wifi debug.
I am using a macbook pro 2009 model, and I have read that this is not compatible with the new continuity features (as well as airdrop etc). I am wondering if this is part of the wifi debug (and also if BTLE is involved at all). Of course it is all speculation since I cannot find any documentation about this.
Has anybody used wifi debug, or can point me to any documentation?
No, the feature was disabled as it causes serious security flows, for example when debugging you can fake location for any app, access confidential data like your number, udid etc. WiFi can be used now only to sync using iTunes.
It's restricted to USB only. You would need to write a bridge between USB and WiFi. You could in theory connect iPhone to Raspberry Pi, use open source crossplatform libMobileDevice. And mirror all USB requests from your XCode to this device USB.
I looked around for an answer but couldn't find anything related. My question is if I can connect another device with the iPhone/iPod/iPad via USB. Maybe I would need another device to connect the two, because I don't think this would work out of the box.
I want to write an app which can read out things like the temperature, humidity and other collected data from a device my company developed. You can read it out only by connecting it to the computer at the moment. Also it needs a special driver. I can access the driver's code and every thing else. So my question is if it would be possible to develop such an app and how. Do I have to build another connector or would it work if I connected the device and the iPhone directly via USB.
Another thought is, would it work over a Bluetooth connection? In the future my company has plans to build Bluetooth into their device to make it easier to communicate with other devices.
This may sound a little strange, so I have to tell you why I am making this app. I just got a very old iMac that has very low processing power. I am attempting to make an application for my iPod Touch that can make it act as an external processor for OS X Panther. I have almost everything worked out, but I need the iPhone to be able to interact directly with the OS X app I am making, like iTunes does.
To be clear, I only want the iPod to work as an external processor by moving data from my OS X app to the iPod app, complete the code blocks, and send it back (thats the easy part). It does not have to work with any other OS X app. What I need to know is how I can send data through the cable to my iOS app directly. If this cannot be done, I have a backup data transmitting solution, but the cable would be much faster. Any ideas?
Good idea, don't post good idea's online ;-)
I'm going to tell you up front; unless you are lucky I don't think you will be able to get this to work.
I know that someone once found out that iTunes uses some kind of daemon program to communicate with your iDevices. I'm not sure if this is still true, but that daemon is undocumented but 'available'. I have no more clues than this, maybe you get lucky and find something on Google.
I'd go with wireless communication, I don't think speed is such an issue if we're talking about small instruction sets.
Also there's this, but I'm not sure if that will be of any help to you.
UPDATE:
found this post: Where is the mount point for the iPod/iPhone in Mac?
Which should help you write to the iDevice disk. You should be able to continuously look for filesystem updates on your device to process the data, and vice versa, to establish some kind of transfer system.
As part of a BlackBerry project I'm working on I need the ability to store data. As per RIM's documentation, on handsets running v5 or later OS, we can use the SQLite database versus the more typical PersistenceStore methods.
What I noticed is when my handset (A Torch 2) is plugged-in via the USB cable - so that I can run code through the debugger - the "SDCard/" and the "store/" are no longer available (both of these are NO longer enumerated when calling FileSystemRegistry.listRoots). Only "system/" is available, but as it's a read-only file system this does me little good.
I need a read/write file system that will be available even if the handset is attached to a PC.
It's worth noting that when I plug my handset in I get a dialog that asks how I want this connected: Sync Media, Mass storage device, or Charge Only are the 3 options. It does not matter which I choose ... the effects are the same in that only "system/" is available for a file system.
Any advice or help is greatly appreciated.
-------------------------------------- UPDATE --------------------------------------
I spoke with RIM's developer tech support on this issue and was simply informed this is a FAD. Their advice was
"This is not a bug, it is how the device is meant to function. You can
listen for when the device is connected via USB and the data
unavailable using SystemListener2."
As such it appears all we can do is alert the user to the fact that by plugging their handsets into the USB cables whatever functionaltiy you might require in your application that would include the file system will temporarily be unavailable. It might be functions as designed but I hope at some point they'll improve the design.
I'm afraid to say I struggled briefly with this and then gave up.
In my experience RIM mounts the SD card on the pc filesystem when you connect it via USB no matter what you do.
If you "eject" your device from the machine you should be able to access the sd card.