I am performing image manipulation using UIGraphicsImageRenderer(size: size, format: format)
. If the image is too large, it will fail with an assertion:
failed assertion `MTLTextureDescriptor has width (15488) greater than the maximum allowed size of 8192.'
I'd like to prevent this by first checking the image does not exceed the maximum allowed size. I'm not sure that 8192 is a constant for all devices, and would like to obtain this programmatically instead of hard coding it.