# Metal Performance Overlay

I noticed someone found some kind of setting to enable a (hidden?) performance overlay in certain apps running on iOS. You can find some useful information like FPS, GPU usage and memory usage. I will show you how to enable it here.

### Prerequisites

* A Mac or PC with an active Internet connection
* Lightning cable for connecting the device to your computer (alternatively, use WiFi sync)

### Installing `libimobiledevice`

A good tool to use for mounting developer disk images is `libimobiledevice`. It also comes with a lot of other useful stuff, but we're interested in one of them.

You can find the installation steps for other operating systems [here](https://libimobiledevice.org/#get-started), i will only list Windows and macOS here.

{% tabs %}
{% tab title="Windows" %}
`libimobiledevice` is not officially compiled for Windows yet, so you'll either have to download an unofficial build or build it yourself.

You can find the build instructions [here](https://github.com/libimobiledevice/libimobiledevice), or a download link below.

{% file src="<https://559382774-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MS3PE7YXQ5Lwcc2TXNI%2Fuploads%2FQXFHj01LSw4lpcXnLarm%2Flibimobiledevice.1.2.1-r1122-win-x64.zip?alt=media&token=a2445cc2-27ff-4aea-949b-71ca9ae57369>" %}
Libimobiledevice for Windows x64.
{% endfile %}

If you downloaded the archive, you'll have to extract it, and prepend all your commands with the path of the extracted folder. `idevice_id` -> `C:\Users\username\Downloads\libimobiledevice\idevice_id`

You can also append this path to your PATH or environment variables.
{% endtab %}

{% tab title="macOS" %}
àUsing `homebrew`, we can use one command to install this library.

If you haven't done that already, install homebrew [from here](https://brew.sh/).

Now, you can open your terminal and enter this command:

`brew install libimobiledevice```l`
{% endtab %}
{% endtabs %}

### Mounting the developer disk image

As of writing this, the latest beta of iOS 16 is Developer Beta 3. You can find the developer disk image below. Please note that i have not verified that this is official, but it does work for my device.

{% file src="<https://559382774-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MS3PE7YXQ5Lwcc2TXNI%2Fuploads%2Fca5ZNsrjHXv7uodpmiTm%2F16.0.zip?alt=media&token=93cec5e4-d967-481d-8229-8188d5d7d707>" %}
Developer Disk Image for iOS 16 Developer Beta.
{% endfile %}

Now, we'll use `libimobiledevice` to mount this image.

Plug your device in to your computer.

Extract the archive you downloaded to a place you'll remember, open a terminal or command prompt, and follow these commands:

&#x20;1\. `idevice_id`

Note down the string before `(USB)`, you'll need this in the next command. This is called a UUID.

Enter the folder you extracted, and copy the path of `DeveloperDiskImage.dmg`. You'll also need this in the next command. You can make a text file or note containing this next command, since this is what you'll need to enter to mount the image again later.&#x20;

&#x20;2\. `ideviceimagemounter -u <UUID> <path_to_disk_image>`

After executing this command, it should output `Status: Complete`. If it does not, make sure your device is on iOS 16, and restart it.

### Enabling the Performance Overlay

1. On your iOS device, open Settings
2. Open "Developer"
3. Scroll down to the bottom and enable the toggle "Show Graphics HUD" under `GRAPHICS_HUD`. This name may be changed later.

![Screenshot of the toggle you have to enable. "Show Graphics HUD"](https://559382774-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MS3PE7YXQ5Lwcc2TXNI%2Fuploads%2FSdRwLEMleiYEsuhDrvw6%2F0CE91D79-1129-4D45-87C6-DF3A1CD84046.jpeg?alt=media\&token=51115154-0475-4e2a-90e1-4f5a91e626df)

### Supported apps

Now that you have enabled this toggle, the overlay is enabled. I've only found some apps that utilize this feature.

* UTM

If you find any other apps that utilize this overlay, please contact me via email: <bludood@bludood.com>, or Discord: BluDood#0001
