Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GPUImage3 simulator error (`Error: MPS does not support the iOS simulator.')

enter image description here

Using GPUImage3 framwork on iOS 13 ,

I have these errors:

Touch the screen of the simulator -> error. `Error: MPS does not support the iOS simulator.'

Can't run simulator using metal kit?

Thank you.

like image 327
joy Avatar asked Dec 01 '25 03:12

joy


1 Answers

Starting with iOS 13 the simulator now supports Metal but without Metal Performance Shaders.

If you want to run GPUImage3 on the simulator you can change this:

if #available(iOS 9, macOS 10.13, *) {
    self.metalPerformanceShadersAreSupported = MPSSupportsMTLDevice(device)
} else {
    self.metalPerformanceShadersAreSupported = false
}

to the following:

#if targetEnvironment(simulator)
    self.metalPerformanceShadersAreSupported = false
#else
    if #available(iOS 9, macOS 10.13, *) {
        self.metalPerformanceShadersAreSupported = MPSSupportsMTLDevice(device)
    } else {
        self.metalPerformanceShadersAreSupported = false
    }
#endif
like image 123
Josh Bernfeld Avatar answered Dec 03 '25 05:12

Josh Bernfeld



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!