As Metal is a GPU framework for all Apple platforms, you have to test your app on a real device or at least on their simulators. In this short episode, I'm going to show you how to set up your device for Metal diagnostics and explain what limitations simulators and real devices have.
Be super careful when you debug or profile Metal on a simulator! Though the simulator is able to represent some real device behavior and even provide some profiling data, there are a few limitations:
So you can use a simulator for developing Metal-based features, but keep these cases and limitations in mind.
If you work with a hardware-near technology, you should use a real device.
First of all, only on the target device you can see how it would actually work. Moreover, I recommend using the lowest-end device you have to support so that you don't miss any unsupported API functionality and have a complete picture of performance.
Also, if you develop for a mobile device, you can forcibly change its condition so you can check your app's behavior in different emulated edge states of network, GPU, and thermal. You can find that in the Window -> Devices and Simulators menu.

There you can see a list of your devices, their information, logs, console, installed apps, and conditions. We're interested in the last one, but logs and the console might be helpful too.

When you start a condition, you'll see the icon on your device. If you want to stop the condition from device side, tap on it and then stop:


Here you can emulate different network conditions. Though it's out of the series scope, it could be helpful in some use cases, so now you know (if you didn't before) that it exists.

This one emulates different conditions for the GPU, which the OS normally sets depending on thermal state, utilization, system settings, etc. When you set the state, the OS tries to keep it while it's possible and safe.
That's very helpful during profiling and optimization to check how your app behaves in different conditions. Ideally it should work smoothly even on the Minimum level.

This condition sets the thermal profile that the OS should follow and uimpacts both GPU and CPU. That could be helpful in two ways:
Fair condition if your device is already heated by previous experiments or other apps.Critical condition to check how your app behaves even if it normally doesn't heat your device to that level (because other apps could).