phhe
phhe

Reputation: 209

How can I access Documents folder of iOS App with C#

I want to push a file from Windows (c#) to an iPad and get it back later. I have no Network connection so I need to do this via USB cable.

I have found Manzana but seems not to support iTunes FileSharing.

Any hints ? I googled a lot but couldn't find anything useful.

There are some functions like "AMDeviceStartHouseArrest" but I don't know how to use them to get my Files.

Upvotes: 3

Views: 4142

Answers (2)

phhe
phhe

Reputation: 209

There is a way to get this done.

Thanks to a blogpost from Simon (http://blog.victornet.de/2011/04/10/c-manzana-iphoneipad-hausarrest/) and some Mails it finally worked.

I'm now using Manzana with the expansion from Simon:

MobileDevice.AMDeviceStartHouseArrestService(iPhoneHandle,      
MobileDevice.CFStringMakeConstantString(bundleIdentifier), null, ref hService, 0);

Starting the 'Housearrest' for a specific App (by bundleIdentifier) makes its '/Documents' Folder accessible via the default Manzana methods. So there is no need for jailbreaking the iDevice. Finally I'm able to push files to the iDevice and read them back.

Thanks again to Simon for the great support!

Upvotes: 5

Venatu
Venatu

Reputation: 1294

Im not quite sure what you are asking. If you want to access standard files on an ipad, it can be set as a USB mass storage device. I believe the standard IO methods (System.IO) would then be able to read and write to the device, if you pass in the correct path. If you are talking about accessing an applications files, I do not believe this is possible due to security concerns with iOS (at least not in a standard, non-jailbroken way)

Upvotes: 0

Related Questions