You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/development/retroarch/compilation/ios.md
+40-17
Original file line number
Diff line number
Diff line change
@@ -2,32 +2,41 @@
2
2
3
3
The following is a non-developer guide to install RetroArch on non-jailbroken iOS or tvOS devices.
4
4
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.
6
6
7
7
!!! 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).
9
9
10
10
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.
11
11
12
12
## Environment configuration
13
13
14
-
The following software needs to be installed:
14
+
### Xcode
15
15
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.
17
17
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
21
19
22
20
- Open Xcode Preferences (Xcode -> Preferences)
23
21
- Click the "Accounts" tab
24
22
- Hit the "+" at the bottom left and choose "Apple ID" and sign in with your Apple ID
25
23
- Once you’ve successfully logged in, a new team called "(Your Name) Personal Team" with the role "User" will appear beneath your Apple ID.
26
24
27
-
### Pair Xcode with your iOS or tvOS Device
25
+
####Pair Xcode with your iOS or tvOS Device
28
26
29
27
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.
30
28
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`.
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.
142
151
143
152
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.
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.
Once the application has been built, installed, and run on your device, it can be run again directly from the device without needing Xcode.
154
171
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
+
155
178
## Additional Tips:
156
179
157
180
### Cores
@@ -175,7 +198,7 @@ Top Shelf for tvOS will display up to five entries from each of the History and
175
198
176
199
#### Where do I start?
177
200
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.
179
202
180
203
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`.
@@ -43,11 +20,20 @@ Be sure to read instructions that are given on this page.
43
20
44
21
## Environment configuration
45
22
46
-
The following software needs to be installed:
23
+
### Xcode
47
24
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.
49
26
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`.
@@ -109,18 +95,22 @@ There are several Xcode projects and workspaces in the `pkg/apple` directory in
109
95
| Xcode Project/Workspace File Name | OS support | Purpose |
110
96
-----------------------------------------|-|-
111
97
|`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. |
114
98
|`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. |
115
101
|`RetroArch_OSX107.xcodeproj`| 10.7+ | An old development line that is no longer in use. |
116
102
117
103
### Building RetroArch separately
118
104
119
-
Open Xcode. Open your chosen project file in the Xcode IDE and build (**⌘-B**) and run (**⌘-R**) it there.
105
+
Open Xcode. Open your chosen project file in the Xcode IDE and build (**⌘-B**) and run (**⌘-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.
120
110
121
-
##Core Compilation
111
+
### libretro-super (deprecated)
122
112
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.
124
114
125
115
To build all cores for OSX, run
126
116
@@ -135,3 +125,21 @@ In case you only want to build one and/or more cores instead of all, you can spe
135
125
```
136
126
137
127
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/).
Copy file name to clipboardexpand all lines: docs/guides/generating-retroarch-logs.md
+12-6
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,8 @@ The answer to this dilemma involves "logs", which RetroArch and other libretro s
16
16
5. (optional) Adjust "Frontend / Core Logging Level" to get more or less detailed information
17
17
6. (optional) Activate "Timestamp Log Files" if you don't want to overwrite the log at each startup
18
18
19
+
This will place the logs in the System Events Logs directory, visible in the "Directory" settings.
20
+
19
21
### Generating Logs in Lakka
20
22
[Please see the Troubleshooting Lakka doc](http://www.lakka.tv/doc/Troubleshooting-Lakka/).
21
23
@@ -54,10 +56,11 @@ The answer to this dilemma involves "logs", which RetroArch and other libretro s
54
56
55
57
### Generating Logs in OS X
56
58
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.
61
64
62
65
### Generating Logs in Android
63
66
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._
86
89
#### Generating Logs via Android App
87
90
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.
88
91
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".
0 commit comments