Resolve crash on start on iOS 12
Thanks for your PR. Can you please provide a description on why this PR is required and what it actually does? I don't have any iOS device to test this on, so having a bit more background will help me in deciding if I want to merge this.
On iOS 12 the app crash on start on this line.
From stack trace, it shows a crash will happen if a QWindow's create() method is called directly or indirectly when the surfaceType is set to QSurface::MetalSurface. The winId() calls create() underneath. The creath() method then does a bunch of stuff, then when it tries to set the main window to be the parent of the QWindow just created, iOS runtime accesses an invalid pointer in response.
The change is to create a dummy Metal layer directly in Objective-C to avoid bad interaction between Qt and iOS 12.
If you want I could provide a stack trace.
A caveat is that I only have an iOS device with iOS 12 on it. Nevertheless this change shouldn't break later version of iOS since it's technically quite simple.
Thanks and regards!
Closing this for now. The iOS port/build and release is done by LunarG and I don't want to interfere with their build processes.