Skip to content

Commit 4e74ba8

Browse files
Merge pull request #1002 from warmenhoven/warmenhoven/pr/apple
Update some of the docs for apple platforms
2 parents c661800 + e894457 commit 4e74ba8

File tree

8 files changed

+130
-85
lines changed

8 files changed

+130
-85
lines changed

docs/development/retroarch/compilation/ios.md

+40-17
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,41 @@
22

33
The following is a non-developer guide to install RetroArch on non-jailbroken iOS or tvOS devices.
44

5-
The minimum version of iOS supported is iOS 6.0. However, older versions have fewer features and worse core support.
5+
The minimum version of iOS supported is iOS 6.0. However, older versions have fewer features and worse core support. Additionally, building for old versions of iOS requires [old versions of Xcode](https://developer.apple.com/support/xcode/), which require old versions of macOS, all of which may be hard to come by.
66

77
!!! note
8-
If you just want to sideload from an IPA file, then you can find a working build (version {{ unit.stable }}) [here for tvOS](http://buildbot.libretro.com/stable/{{ unit.stable }}/apple/tvos-arm64/RetroArchTV.ipa) and [here for iOS](http://buildbot.libretro.com/stable/{{ unit.stable }}/apple/ios-arm64/RetroArch.ipa). Instructions for installing the IPA are [here](/guides/install-ios/).
8+
If you just want to sideload from an IPA file, then you can find a working build (version {{ unit.stable }}) [here for tvOS](http://buildbot.libretro.com/stable/{{ unit.stable }}/apple/tvos-arm64/RetroArchTV.ipa) and [here for iOS](http://buildbot.libretro.com/stable/{{ unit.stable }}/apple/ios-arm64/RetroArch.ipa). Instructions for installing the IPA are [here](../../..//guides/install-ios.md).
99

1010
Because iOS requires that all code be signed, iOS does not support installing/updating cores at runtime. Instead, all cores must be built and added to the RetroArch source tree before building RetroArch.
1111

1212
## Environment configuration
1313

14-
The following software needs to be installed:
14+
### Xcode
1515

16-
- Xcode (macOS only)
16+
The only requirement for building is Xcode, which is only available for macOS. You can get Xcode from the App Store. If you have never used Xcode before, you will need to open the Xcode preferences, and in Accounts, log in with your Apple ID.
1717

18-
You can get Xcode from the Mac App Store.
19-
20-
### Sign in with your Apple ID
18+
#### Sign in with your Apple ID
2119

2220
- Open Xcode Preferences (Xcode -> Preferences)
2321
- Click the "Accounts" tab
2422
- Hit the "+" at the bottom left and choose "Apple ID" and sign in with your Apple ID
2523
- Once you’ve successfully logged in, a new team called "(Your Name) Personal Team" with the role "User" will appear beneath your Apple ID.
2624

27-
### Pair Xcode with your iOS or tvOS Device
25+
#### Pair Xcode with your iOS or tvOS Device
2826

2927
Connect your iPhone to your computer. For AppleTV, because you cannot connect it directly, follow the [instructions in this Apple support article](https://support.apple.com/en-gb/HT208088) to pair your device in Xcode. When finished, you should see your specific device when you go, in Xcode, to Windows -> Devices & Simulators.
3028

29+
### retroarch-apple-deps (optional but recommended)
30+
31+
RetroArch optionally will automatically link with supporting libraries (including MoltenVK) that are provided by the retroarch-apple-deps repo. By default Xcode will look for these dependencies in `/usr/local/share/retroarch-apple-deps`.
32+
33+
To get retroarch-apple-deps, run:
34+
35+
```shell
36+
git clone https://github.com/warmenhoven/retroarch-apple-deps.git retroarch-apple-deps
37+
sudo ln -s $PWD/retroarch-apple-deps /usr/local/share
38+
```
39+
3140
## Fetching the code
3241

3342
### libretro-super
@@ -141,17 +150,31 @@ codesign -fs '[Your Full Developer Certificate Name]' *.dylib
141150
There are multiple Xcode project files in `pkg/apple`, based on minimum iOS version. The following will use `pkg/apple/RetroArch_iOS13.xcodeproj` (the latest as of this writing) as an example.
142151

143152
1. Open Xcode.
144-
2. Open the following project file `pkg/apple/RetroArch_iOS13.xcodeproj`
145-
3. In the Navigator Pane on the left, select the `Retroarch_iOS13` project
146-
4. In the Project and Targets list on the left side, choose the `RetroArchiOS` (or `RetroArchTV` for tvOS) target. Select the Target (the one with the RetroArch icon), not the project.
147-
5. In the `Signing & Capabilities` tab, change the "Team" under Signing to be your developer name.
148-
6. Set the active scheme to `RetroArch iOS Release` (or `RetroArch tvOS Release` for tvOS), and select your connected iOS/tvOS device as the device.
149-
6. Run (**⌘-R**)
150-
151-
![Xcode Steps](/image/guides/ios-install-pic-1.png)
153+
1. Open the following project file `pkg/apple/RetroArch_iOS13.xcodeproj`
154+
1. Change the identifiers and signing for the target
155+
1. In the Navigator Pane on the left, select the `Retroarch_iOS13` project
156+
1. In the Project and Targets list on the left side, choose the `RetroArchiOS` (or `RetroArchTV` for tvOS) target. Select the Target (the one with the RetroArch icon), not the project.
157+
1. In the `Signing & Capabilities` tab, change the "Team" under Signing to be your developer name.
158+
1. In the `Signing & Capabilities` tab, Change the "Bundle Identifier" to something globally unique (e.g. `your.email.address.RetroArch`).
159+
1. Change the signing for the extensions
160+
1. In the Navigator Pane on the left, select the `Retroarch_iOS13` project
161+
1. In the Project and Targets list on the left side, choose the `RetroArchWidgetExtensionExtension` (or `RetroArchTopShelfExtension` for tvOS) target.
162+
1. In the `Signing & Capabilities` tab, change the "Team" under Signing to be your developer name.
163+
1. In the `Signing & Capabilities` tab, Change the "Bundle Identifier" to the bundle identifier you chose for the target plus a suffix (e.g. `your.email.address.RetroArch.RetroArchWidgetExtension`).
164+
1. For tvOS, in order for Top Shelf to work, you additionally need to set up the App Groups properly, described below.
165+
1. Set the active scheme to `RetroArch iOS Release` (or `RetroArch tvOS Release` for tvOS), and select your connected iOS/tvOS device as the device.
166+
1. Run (**⌘-R**)
167+
168+
![Xcode Steps](../../../image/guides/ios-install-pic-1.png)
152169

153170
Once the application has been built, installed, and run on your device, it can be run again directly from the device without needing Xcode.
154171

172+
## App Store Build
173+
174+
Building for the Mac App Store requires being logged into Xcode with the Apple Developer account associated with the Bundle ID for the app. The app also builds with Push Notification and CloudKit entitlements for the iCloud cloud sync driver (and Top Shelf for tvOS). Once all of the signing and entitlements are set up, creating the build is simply changing the scheme to `RetroArch AppStore`.
175+
176+
There is an automated [fastlane](http://docs.fastlane.tools) script available in pkg/apple/fastlane that will update the build numbers and upload the built prodduct to TestFlight using an [App Store Connect API Key](http://docs.fastlane.tools/app-store-connect-api/).
177+
155178
## Additional Tips:
156179

157180
### Cores
@@ -175,7 +198,7 @@ Top Shelf for tvOS will display up to five entries from each of the History and
175198

176199
#### Where do I start?
177200

178-
The RetroArch codebase can be daunting, especially if you're used to iOS development in Objective C or Swift. Objective C is a subset of C so the syntax should look somewhat familiar to you.
201+
The RetroArch codebase can be daunting, especially if you're used to iOS development in Objective C or Swift. Objective C is a superset of C so the syntax should look somewhat familiar to you.
179202

180203
The first and main entrypoint you should look at is in `core/griffin/griffin.c`. This is where all the code is included, with compiler flags used to bring in code specific to the platform. For iOS, you should pay attention to the compiler flags like `__APPLE__`, `TARGET_OS_IPHONE`, `HAVE_COCOATOUCH`.
181204

docs/development/retroarch/compilation/osx.md

+40-32
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,7 @@
22

33
This compilation guide will teach you how to build RetroArch for macOS/OSX.
44

5-
The following versions of the operating system are supported:
6-
7-
- OSX 10.5 (Leopard)
8-
- OSX 10.6 (Snow Leopard)
9-
- OSX 10.7 (Lion)
10-
- OSX 10.8 (Mountain Lion)
11-
- OSX 10.9 (Mavericks)
12-
- OSX 10.10 (Yosemite)
13-
- OSX 10.11 (El Capitan)
14-
- macOS 10.12 (Sierra)
15-
- macOS 10.13 (High Sierra)
16-
- macOS 10.14 (Mojave)
17-
- macOS 10.15 (Catalina)
18-
- macOS 11 (Big Sur)
19-
- macOS 12 (Monterey)
20-
- macOS 13 (Ventura)
21-
22-
RetroArch can work on:
23-
24-
- 32bit PPC processor-powered Macs
25-
- 64bit PPC processor-powered Macs
26-
- 32bit Intel processor-powered Macs
27-
- 64bit Intel processor-powered Macs
28-
- 64bit ARM processor-powered Macs
5+
All versions of the operating system since 10.5 are supported. RetroArch can work on PPC, Intel, and ARM processor-powered Macs.
296

307
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/fPO-9jescmo" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
318

@@ -43,11 +20,20 @@ Be sure to read instructions that are given on this page.
4320

4421
## Environment configuration
4522

46-
The following software needs to be installed:
23+
### Xcode
4724

48-
- Xcode (macOS only)
25+
The only requirement for building is Xcode, which is only available for macOS. You can get Xcode from the App Store. If you have never used Xcode before, you will need to open the Xcode preferences, and in Accounts, log in with your Apple ID.
4926

50-
You can get Xcode from the App Store. If you have never used Xcode before, you will need to open the Xcode preferences, and in Accounts, log in with your Apple ID.
27+
### retroarch-apple-deps (optional but recommended)
28+
29+
RetroArch optionally will automatically link with supporting libraries (including MoltenVK) that are provided by the retroarch-apple-deps repo. By default Xcode will look for these dependencies in `/usr/local/share/retroarch-apple-deps`.
30+
31+
To get retroarch-apple-deps, run:
32+
33+
```shell
34+
git clone https://github.com/warmenhoven/retroarch-apple-deps.git retroarch-apple-deps
35+
sudo ln -s $PWD/retroarch-apple-deps /usr/local/share
36+
```
5137

5238
## Fetching the code
5339

@@ -109,18 +95,22 @@ There are several Xcode projects and workspaces in the `pkg/apple` directory in
10995
| Xcode&nbsp;Project/Workspace&nbsp;File&nbsp;Name | OS support | Purpose |
11096
-----------------------------------------|-|-
11197
| `RetroArch.xcworkspace` | 10.13+ | The primary workspace for the latest Metal build. Most active development happens here. |
112-
| `RetroArch.xcodeproj` | 10.6+ | The current non-Metal build. |
113-
| `RetroArch_PPC.xcodeproj` | 10.5+ | Building for PowerPC processor-powered Macs. |
11498
| `RetroArch_Metal.xcodeproj` | 10.13+ | The project for the latest Metal build. You can use this directly but typically it's preferred to use the Workspace. |
99+
| `RetroArch.xcodeproj` | 10.6+ | The outdated non-Metal build, only for Intel processor-powered Macs. |
100+
| `RetroArch_PPC.xcodeproj` | 10.5+ | Building for PowerPC processor-powered Macs. |
115101
| `RetroArch_OSX107.xcodeproj` | 10.7+ | An old development line that is no longer in use. |
116102

117103
### Building RetroArch separately
118104

119-
Open Xcode. Open your chosen project file in the Xcode IDE and build (**&#8984;-B**) and run (**&#8984;-R**) it there.
105+
Open Xcode. Open your chosen project file in the Xcode IDE and build (**&#8984;-B**) and run (**&#8984;-R**) it there. The default scheme should be `RetroArch` and that is what is used for building the DMG image available on the buildbot.
106+
107+
## Core Compilation (optional)
108+
109+
RetroArch on OSX by default will be configured to download cores from the buildbot; you do not need to build the cores yourself.
120110

121-
## Core Compilation
111+
### libretro-super (deprecated)
122112

123-
The easiest way to build all the cores is to use libretro-super.
113+
If you choose to build the cores yourself, the easiest way to build all the cores is to use libretro-super.
124114

125115
To build all cores for OSX, run
126116

@@ -135,3 +125,21 @@ In case you only want to build one and/or more cores instead of all, you can spe
135125
```
136126

137127
Once finished, you can find the libretro cores inside directory `dist/osx`.
128+
129+
### GitLab CI mimicry
130+
131+
Cores on the buildbot are built using the GitLab CI infrastructure. Each core provides its own `.gitlab-ci.yml` file with instructions for how to build it. Almost all cores reference one of the [CI Templates](https://git.libretro.com/libretro-infrastructure/ci-templates). Between the `.gitlab-ci.yml` file and the templates, you should have complete instructions for how to build each core.
132+
133+
## Store Builds
134+
135+
### Steam Build
136+
137+
Building for Steam differs from the normal app build in two ways: the scheme is `RetroArchSteam`, and it requires bundling [mist](https://git.libretro.com/libretro-steam/mist) and linking against libmist. Simply download the latest artifacts for mist from GitLab, and set the `MIST_PATH` variable in the Xcode project with its location.
138+
139+
Once the Steam app is built, it is no different from the app available in the Steam store, and will communicate with Steam to fetch cores and update presence.
140+
141+
### Mac App Store Build
142+
143+
Building for the Mac App Store requires being logged into Xcode with the Apple Developer account associated with the Bundle ID for the app. The app also builds with Push Notification and CloudKit entitlements for the iCloud cloud sync driver. Once all of the signing and entitlements are set up, creating the build is simply changing the scheme to `RetroArch AppStore`.
144+
145+
There is an automated [fastlane](http://docs.fastlane.tools) script available in pkg/apple/fastlane that will update the build numbers and upload the built prodduct to TestFlight using an [App Store Connect API Key](http://docs.fastlane.tools/app-store-connect-api/).

docs/guides/generating-retroarch-logs.md

+12-6
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ The answer to this dilemma involves "logs", which RetroArch and other libretro s
1616
5. (optional) Adjust "Frontend / Core Logging Level" to get more or less detailed information
1717
6. (optional) Activate "Timestamp Log Files" if you don't want to overwrite the log at each startup
1818

19+
This will place the logs in the System Events Logs directory, visible in the "Directory" settings.
20+
1921
### Generating Logs in Lakka
2022
[Please see the Troubleshooting Lakka doc](http://www.lakka.tv/doc/Troubleshooting-Lakka/).
2123

@@ -54,10 +56,11 @@ The answer to this dilemma involves "logs", which RetroArch and other libretro s
5456

5557
### Generating Logs in OS X
5658
1. Open a console window with the OS X "Terminal" app.
57-
2. Navigate to the RetroArch folder using the `cd` command.
58-
3. Start RetroArch in 'verbose' mode with this command:<br />
59-
`retroarch -v --log-file ~/retroarch.log` or `retroarch -v >> ~/retroarch.log 2>&1`
60-
4. Once you exit RetroArch, a file called `retroarch.log` should be stored in your home directory.
59+
2. Navigate to the RetroArch.app folder using the `cd` command.
60+
3. Inside the RetroArch.app folder, navigate to the Contents/MacOS filter.
61+
4. Start RetroArch in 'verbose' mode with this command:<br />
62+
`./RetroArch -v --log-file ~/retroarch.log` or `./RetroArch -v >> ~/retroarch.log 2>&1`
63+
5. Once you exit RetroArch, a file called `retroarch.log` should be stored in your home directory.
6164

6265
### Generating Logs in Android
6366
There is a range of variation in the logging systems available to Android device depending on the combination of hardware and operating system in use. There are two general approaches to generating logs in Android: tethering to a PC via a USB cable or using a `logcat` app.
@@ -86,8 +89,11 @@ _Based on Stackexchange posts by Leandros and Nicolas Raoul._
8689
#### Generating Logs via Android App
8790
Gathering log files in Android requires a third-party app that can interface with the `logcat` system. Many free apps are available via Android's "Play Store" system. You can still generate RetroArch logs from the menu.
8891

89-
### Generating Logs in iOS
90-
You can generate RetroArch logs from the menu, and App Store installations can opt to send crash logs to the RetroArch developers for analysis, if desired.
92+
### Generating Logs in iOS and tvOS
93+
94+
You can generate RetroArch logs from the menu, described above. Logs by default go into the RetroArch/logs directory accessible through the Files app on iOS or the webserver on tvOS.
95+
96+
App Store installations can opt to send crash logs to the RetroArch developers for analysis, if desired. This can be configured through the Settings app in "Privacy & Security" under "Analytics & Improvements" by turning on "Share With App Developers".
9197

9298
### Generating Logs with Nintendo Switch
9399

0 commit comments

Comments
 (0)