Access iOS app documents directory from OS X - iphone

I'm working on an iOS app that creates some files and saves it in its documents directory. It would be really helpful for this app if I could create an OS X app that could access that apps documents directory as well as the pictures on the device. I know it's possible because of this app, but I can't seem to find a way to implement it. The iOS app does need to be approved by apple, but the desktop app doesn't. With these apps I am targeting non-jailbroken iOS 5 devices and OS X Lion. Any ideas on how I could do this?
A few other solutions I am considering:
upload the apps documents directory to iCloud and then download it on the desktop
upload to dropbox for auto syncing
make the desktop app into a server and upload from the app to the desktop over the network
Those are all backup solutions, but it would be great if I could do this without having to depend on the network.

Take a look at: libimobiledevice. It's a library designed just for that. Anyway, all of this is not supported by Apple, as there isn't any public API for accessing the filesystem.

You can make your device to act as a HTTP server. There are several 3rd parties libraries that can help you get started. I personally have used iPhonrHTTPServer3 which is based on CocoaHTTPServer?

Related

Is it possible to test an app in an iOS device without having a Mac?

I believe this is a duplicate question, but examining the others I could not find my problem exactly.
I have developed a flutter app and I intend to publish it. So I rented a virtual Mac, loaded the project in XCode and tested it on a simulator. Everything worked fine.
I have an Apple Developer Account, Certificates, registered an iPhone, etc., but it seems that I have to physically connect the device to the computer to be able to run it on the iPhone. No way to do that remotely (I'm in Brazil and the virtual Machine in NY).
XCode tells me to plug in the device so it can register it (but I have registered it already in the developer's site).
I thought it would be possible to generate some kind of executable to download to my iPhone, but it appears that is note the case.
Is there any other way I can do that?
Maybe I can skip this step and try to publish the app, because it is the same project as an Android app already tested and published in Play Store.
The answer is yes, the modern answer is probably TestFlight. But this has always been possible using OTA downloads. To do this, archive your app, create an OTA manifest and put this on a web server somewhere. Then you can download the app straight to your phone (assuming it's signed with the correct provisioning profile and all that). We used to do this a lot before TestFlight came along.
This question and
this article are somewhat related to what you want to do
I was having trouble to test without an iphone what I did is register this device on my account https://messapps.com/wp-content/uploads/2016/08/udid.png and so far I could build the app for iOS.

How can I make an SQLite database within an iPhone app available to the desktop?

My Android app stores its SQLite database on the SD card, so that when the phone is connected to a PC my desktop application can access it using an ODBC driver. Is a similar technique possible on the iPhone?
I know that iPhones do not have SD cards.
I use iTunes file sharing to access sqlite DBs on both the iPhone and iMac; iTunes moves the data. Enabled in the plist
As it has been said, it can't be done.
However what you could do is to embed a small Web Server into your App, and let the users to download the DB ( or even visualize it ), via WiFi on their homes/work. This approach would work for Windows/Mac/Linux users, and several apps are already doing it this way.
Good luck!
Not built-in, unfortunately. You'll have to roll your own Wi-Fi syncing system. You could use iCloud when it comes out in the fall, but that only works on Macs for now.
SQLite is present in the iPhone SDK, but there's no way to flag a file stored by your application as being visible to the file system when you plug your iPhone into the computer. As stated already by Chris Long, Apple's answer to this criticism is iCloud, which allows you to do synchronisation between arbitrarily many devices without cables, but that isn't available yet. The iOS 5 beta is available to registered developers and is publicly known to function with iCloud, so you could start developing now.
More painful temporary alternatives are to email the database out (there's a supplied way to do in-app email) or to expect your user to drag and drop the thing out of iTunes.

Accessing the iPhone filesystem from a Mac OS X application

I need to get a file (sms.db) from an iPhone connected to a Mac. I cannot find any way to access the iPhone filesystem searching in Apple Developers Connection...
I cannot SSH to the iPhone, the application I want to develop is meant to be used on non-jailbroken iPhones... And I would like to avoid some MacFuse modules I found googling, too... I would like to access the filesystem thru some sort of API, the simpler the better.
Thanks!
This api was developed to allow access to ios devices:
http://www.libimobiledevice.org/
There is no Apple-documented public API for accessing the entire filesystem on a stock OS iOS device. Even private OS/API calls won't work due to the app sandbox restrictions.
Xcode, iTunes, and probably other apps that take over the iTunes USB driver, are using a non-Apple-documented private API that only works over the USB connection.
It appears that DiskAid silences all nay sayers. That app seems to have complete access to the iOS device filesystem - whether or not iTunes is running and whether or not the files are shared. It even sees files down to root level. I am still trying to figure out how it is done. Oh yea, this is all on a non jailbroken device.
It is not possible for non-jailbroken iPhone due to file system restrictions.
You can't access the filesystem from an OSX application, the filesystem is locked down.
Phoneview (as mentioned in a few comments) does not allow access to the file system.
It uses public APIs to get things like call data and contacts, and allows you to copy files into one location on the phone.
From the FAQ: "PhoneView will store your files in the media section of the iPhone's disk"
Smoke and mirrors.
If it's for your own app, use the document sharing included in iOS 4.x. You can then have files show up in iTunes, and drop files from the desktop into your app's section.
A tutorial is found here:
Ray Wenderlich's nice tutorial

List of applications installed on a iPhone, via the iPhone itself or iTunes

Is it possible to get a list of all installed applications from an iPhone itself? I have read myths of people accessing the internal iTunes data, getting the list of installed apps that way.
1/ A app installed on the iPhone itself and is able to report all installed apps to an external website.
2/ A desktop application that would parse the iTunes data and gather the required information before posting it to an external website.
Anyone have any (A) experience on either of the above or (B) better ideas on how one would go about gathering the App Store name of an application installed on a iPhone.
It is not possible to get a complete list of applications that are installed on the iPhone from the iPhone itself, unless you work on a jailbroken iPhone. You can test for some applications by testing whether there's an application that responds to a particular URL scheme (using UIApplication's canOpenURL method)
A desktop application can do this by reading the data itself. However, it is not programmatically supported, so you're on your own there.

Can an iPhone OS app do a search of the device's filesystem?

Can I do a search of the iPhone filesystem from within an application? I need to search an iPhone OS device and return a list of all apps installed on an iPhone OS device. I am fairly aware of Apple's restrictions and rules concerning what apps can and mostly cannot do outside of the sandbox -- and know that aside from the Photo Album an Address Book (via specified classes) an application is not allowed to access much of anything outside of its home directory (sandbox) for security. But the boundaries are fuzzy.
Anyway, back to the question: Can UISearchBarDelegate (or any other class/protocol) allow me to search the iPhone device?
Unfortunatly you are still sandboxed, the only way to access the devices' filesystem is to create an application that is a jailbreak designed application.
Not strictly true - the app FileSystem, for example, allows you to browse the iOS file structure and view many (though not all) of the files. You can access almost all of the files from the iTunes backup however.