Running RetroArch on iOS 9

Hi all,

Seems there are some knowledgable people around here that have RetroArch up and running on a non-jailbroken iOS device running iOS 9+. I was wondering if anyone might be able to explain how to get it working?

I have used RetroArch for quite some time now but I have always used it while jailbroken so this is new territory for me. I tried building it from source now that Xcode 7 supports codesigning with any Apple ID but it seems I need to move around a fair bit of the system files to get a build up and running and I’m struggling a little. Is there a simpler way, or perhaps someone willing to talk me through it? I’m quite keen to use it on my 6S Plus!

Many thanks!

Decided to spend some time today and try to nut it out. Got it all working on my non-jaibroken iPhone 6S Plus running iOS9 after building the app from scratch.

I’m a bit of a noob but If anyone else wants a hand, I’d be happy to help if you reply here. I know how frustrating it is just going off bits of information on the web!

hey congrats on getting it going :slight_smile:

[QUOTE=Rapsac;29295]Decided to spend some time today and try to nut it out. Got it all working on my non-jaibroken iPhone 6S Plus running iOS9 after building the app from scratch.

I’m a bit of a noob but If anyone else wants a hand, I’d be happy to help if you reply here. I know how frustrating it is just going off bits of information on the web![/QUOTE]

Could you upload the app or ipa please?

My 6S arrive tomorrow, but i dont have Xcode/MAC for building.

but this is not a problem because ipastore service will use to sign the application and install

I’m away from my computer right now but I can upload it in a day or so. I’ve only got a single core in there at the moment, so I’ll redo it with all the cores.

I’d appreciate it very much. Thanks.

Have you got all the cores working? Even mupen64? If so, I’d love to have a step-by-step guide on how you did that…

[QUOTE=amifrank;29320]Have you got all the cores working? Even mupen64? If so, I’d love to have a step-by-step guide on how you did that…[/QUOTE]

Change in core option for mupen64 dinamic recompiler (because recompiler need jalibreak) for cache interpreter.

Hi Brujo, Sorry I haven’t been able to give you a .ipa or .app file, i’ve been away from my main computer and have been using my portable notebook instead. I should have an upload for you in a couple of days I hope.

@amifrank, as Brujo said, the interpreter based cores will work ( and the interpreter setting in mupen64) on jailed devices but the won’t be as good as the dynamic recompilation based ones. I’ve only tested the PSX core ‘reARMed’ and its runs about 95-98% smooth on my 6S Plus. Like I said earlier, I don’t really know what i’m doing so I can post a rough step-by-step guide for you and if you have any issues with some of the steps you can reply and ill try help out as best as I can.

To start you’ll need: [ol] [li]A Mac with Xcode 7 (download from the Mac App store)[/li][li]An iOS device running iOS 9 or later[/li][li]An Apple ID[/li][/ol]

First, you’ll need the source code: [ol] [li]Open Xcode 7[/li][li]Go to the Source control menu > Check out[/li][li]Enter: https://github.com/libretro/RetroArch.git and download the directory files to your desktop or documents or something.[/li][li]Select the ‘Wayland’ Branch (this has the iOS project files in it).[/li][li]Next go to https://github.com/libretro/retroarch-assets and download the assets folder, rename the folder from ‘retrarch-assets’ to ‘assets’ then put this folder inside the media folder inside the Retroarch folder downloaded from step 3 above (TBH not sure if this step is even necessary but this is the way I did it).[/li][/ol]

Next we need to make an iPhone developer certificate to ‘codesign’ the app and its cores. This can be done with just an Apple ID and not a paid developer account thanks to Xcode 7 and iOS 9: [ol] [li]In Xcode 7 go to Xcode>Preferences and then click on the accounts tab.[/li][li]Sign in with your Apple ID and click on ‘view details’[/li][li]Click on the create button next to iOS development.[/li][li]Alternatively to the Above this can be done through keychain access>certificate assistant>create a certificate>iOS development.[/li][/ol]

Then we need to build the base Retroarch App: [ol] [li]In Xcode go to Window>Projects and select the Retroarch (or Retroarch_ios) project. This will be here if you correctly downloaded the source code through Source control menu > Check out. Alternatively go your downloaded RetroArch folder then open the RetroArch_iOS.xcodeproj file inside RetroArch/Apple/iOS/RetroArch_iOS.xcodeproj.[/li][li]You should see the project open up, here I get a little hazy on the details, let me know how this goes,[/li][li]Connect you iOS device by USB[/li][li]Select your device as the target in the top leftish corner next to the play and stop buttons[/li][li]Select RetroArch (not RetroArch iOS6) for the TARGET on the left. Then under the general tab in the centre of the window, under Identity give your bundle identifier a unique name e.g. com.<anything>.RetroArch, you could use com.sdasdjhgksjadhg.RetroArch as long as that its never been used for an App before.[/li][li]Also under Identity, select your iOS development licence under Team, if you don’t see your licence here, select add an account and follow the prompts[/li][li]Under the general tab in the centre of the window, under ‘Deployment Info’ select iOS 9 as the Deployment target[/li][li]Under the Build settings tab, select the ‘combined’ sub-tab. Under Build options, change ‘Enable Bitcode’ from yes>no[/li][li]Under the Build Phases open the Copy Bundle Resources drop down and remove all items other than:[/li][/ol]

[ul] [li]shaders_glsl[/li][li]ic_pause.png[/li][li]InfoPlist.strings[/li][li]Media.xcassets[/li][li]PauseIndicatorView.xib[/li][li]modules[/li][li]assets[/li][li]overlays[/li][/ul] Removing the other items won’t be a problem because we can add them back in with the online updater, I just removed them because I was lazy at fixing them up.

Lastly, go to Product>Archive to build the App, this may fail due to licensing, if this happens you should see a window popup with a ‘fix issue’ button. Click this button to fix the issue and It should compile successfully. An archives window will popup when you successfully build the app. you can then find the app in user/library/Developer/Xcode/DerivedData/RetroArch-ooxxvzzsbbdsdf/Build/Products/Release-iphoneos. You can get to the hidden library folder on you computer by going to finder>go>go to folder type: ~/Library.

The App has now been signed by compiling with your Apple ID developer licence, now we need to get and codesign the cores: [ol] [li]harakari2 in the other thread did a great job at appropriation the cores to work on iOS 9, you can download them here: https://mega.nz/#!eEQ2FAYQ!MFMjYRkkg…Wyg17VNG8D-WbM[/li][li]Once downloaded, the cores will need to be codesigned. I feel this is easiest done in terminal, if you’re not familiar with terminal (like I am) heres a basic guide:[/li][/ol]

[ul] [li]Open Terminal on your mac, Terminal should open up to your User folder on startup by default.[/li][li]You can see the folders in your current directory by typing the command ‘ls’ (without the quotation marks of course).[/li][li]You can change to a different directory by typing 'cd <name of directory> for example ‘cd Documents’[/li][li]Navigate to the folder with the downloaded cores, again, you can see if you’re in the right place by typing ‘ls’. If you see the list of cores, you’re in the right place[/li][li]Once here type the command: codesign -fs “iPhone Developer: <name or email> <(assorted numbers and letters here)>” <core name here>.dylib[/li][li]To find your developer details oper keychain access, and look for the iPhone Developer certificate under the ‘login’ tab[/li][li]An example might be: codesign -fs “iPhone Developer: [email protected] (X3D4A7892)” pcsx_rearmed_interpreter_libretro_ios.dylib[/li][li]If you’ve done this correctly Terminal should tell you that it is ‘replacing existing signature’[/li][li]Your core is now codesigned! You can download iFunBox from the web and drag it into the cores folder on your phone.[/li][/ul]

Now you can run the app: [ol] [li]On your iPhone go to settings>general>profiles and select your developer certificate[/li][li]Trust your provisioning profile[/li][li]Open the app[/li][li]Go to the ‘online updater’[/li][li]Update everything EXCEPT THE CORES, updating core info is fine.[/li][li]You’re good to go![/li][/ol]

Roms: [ol] [li]Add roms using iFunBox, put them in the cores folder or something so you know where they are[/li][li]You need to run the rom 'load content>select file(and detect core if you want)>var/mobile/containers/data/application/ajskfhksdfjh>cores(or wherever you put it).[/li][/ol]

Bios: [ol] [li]PSX bios should be copied to the System folder with iFunBox[/li][/ol]

Thats about it, kinda tired at the moment so I more than likely missed something so hit me up when you find an error.

As a disclaimer I have no idea what I’m doing so some of those steps may be able to be skipped or changed! Pros can step in and correct me!

Cheers

You should be able to compile it without the step where you switch to the Wayland branch, which is basically just giving you a super-old snapshot. Otherwise, looks good! :slight_smile:

I haven’t been able to successfully compile with Xcode 7. Some of the files listed in the “Copy Bundle Resources” weren’t there (though I don’t think that caused the build fail). The error I received was:

command/Xcode.app/contents/developer/toolchains/xcodefault/xctoolchain/usr/bin/clang failed with exit code one.

It appear to be tied to the audio section of the code string. I’ve compiled apps for side loading before, but I have minimal debugging ability. Any suggestions or a different .xcodeproj I could leverage?

[QUOTE=Creaseface;29521]I haven’t been able to successfully compile with Xcode 7. Some of the files listed in the “Copy Bundle Resources” weren’t there (though I don’t think that caused the build fail). The error I received was:

command/Xcode.app/contents/developer/toolchains/xcodefault/xctoolchain/usr/bin/clang failed with exit code one.

It appear to be tied to the audio section of the code string. I’ve compiled apps for side loading before, but I have minimal debugging ability. Any suggestions or a different .xcodeproj I could leverage?[/QUOTE]

Read coment #9 on this post. Thx

I followed Rapsac’s guide and that’s the result I obtained. I tried many times and received the same failure. I’m not on El Capitan yet, would that matter?

@Rapsac can you come to IRC? #retroarch at freenode? Thanks