I’ve tried working from the starter project forward and the final project backwards with the same result. After you add the blit command encoder the app will crash on my iPhone X with:
[MTLDebugBlitCommandEncoder internalValidateCopyFromTexture:sourceSlice:sourceLevel:sourceOrigin:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:options:]:473: failed assertion `(sourceOrigin.x + sourceSize.width)(1125) must be <= width(375).'
Tracing this down, it seems like somehow MTKView is getting dimensions from the macOS side of things. Unfortunately, I can’t seem to figure out why that is.
BTW, the final project, after commenting out the blit code, works fine but is SUPER slow (i.e. 6 fps slow) on my iPhone X. It does not seem like that should be expected. It’s also super slow on my MBP but I’m not surprised with the NVIDIA GPU.