Themaister/RetroArch — pull request #159 by maddox (2013-03-21 02:53:04+00:00)
Title: Enable for Non-Jailbroken Phones

Currently, RetroArch uses the /var/mobile/RetroArch path for it's system directory for saving settings, save states, save rams. The problem with this is, non-jailbroken phones can't write to this path.

I've successfully built and played (awesomely) RetroArch on my own devices that are not jailbroken. So the only thing requiring a device to be jailbroken, is the path that it is writing to.

This pull request moves the retroarch system directory path to the app's Documents directory, so that it's inside the sandbox.

## Why care about non-jailbreakers

Simply, because there are a ton of them. I hack on iOS apps, but refuse to jailbreak my device. Without going into a long story, I just don't like what it does to your overall device.

But, I have a developer account, so I was able to download RetroArch, build some cores, bundle it up, and get it onto my iPad and iPhone. :metal:

If the rest of the app isn't dependent on any other Jailbreak characteristics, it seems silly to prevent this from "just working" right off of GitHub. Sure, this will never hit the App Store, but why shouldn't we be able to clone it down, and install it onto our devices. Plenty of people would do this for themselves and for their non-savvy (or without dev certs) friends. I know I will.

That makes RetroArch the first and only emulator system that can run on a non-jailbroken device! Which is awesome. (I've been waiting for this forever!)

## The Details

So what this pull does is simple.

* Moves the system directory to the app's Documents directory as a dotted, hidden file
* Enables iTunes File Sharing
* Opens the browser directly to the Documents directory

iTunes File Sharing was enabled so that users can simply plug their device in to their computer, and use iTunes to drag roms over. Boom done! Then they open the app and immediately see their roms. Beautiful.

But what about directories? You can't transfer directories via iTunes File Sharing. Nope, you can't. But that's fine. Allow the casual users the ability to just drag the 5 games they ever want to play via iTunes File Sharing. And let the hackers scp or use iTools to drag directories that scope roms by console.

This works for the casual user and the pro user. And of course nothing has changed for the Jailbreak user.