Xcode Vulkan is opening two windows instead of one.

I'm a newbee at Vulkan and Xcode. I have my project on github https://github.com/flocela/OrangeSpider/

Whenever I run, two windows open instead of only one. I added testing, which means I have an OrangeSpider.xctestplan in the OrangeSpider/TestsOrangeSpider/ folder.

This is my first time adding testing to an XCode project, so I think this may be where the problem is.

I also get this error message:

ViewBridge to RemoteViewService Terminated: Error Domain=com.apple.ViewBridge Code=18 "(null)" UserInfo={com.apple.ViewBridge.error.hint=this process disconnected remote view controller -- benign unless unexpected, com.apple.ViewBridge.error.description=NSViewBridgeErrorCanceled}
Answered by FloBee in 846287022

In order for Vulkan to only create 1 window instead of 2, I added a sleep_for method as the first line in my main method. This is a work around. I'm not sure why it works. (I didn't come up with it myself.)

int main() {
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
...
}

Hello,

We're unable to provide support for Vulkan, MoltenVK or other 3rd-party GPU APIs. We're happy to answer questions about Metal.

I have made a new post which only references Xcode. It turns out, I get two windows opening every time I run, except if I restart Xcode. So, that's why I created a new post under Xcode. I'm okay with this post being deleted, since I have that new post.

Accepted Answer

In order for Vulkan to only create 1 window instead of 2, I added a sleep_for method as the first line in my main method. This is a work around. I'm not sure why it works. (I didn't come up with it myself.)

int main() {
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
...
}

Hello again @FloBee,

It was good speaking with you other day and seeing your project.

Glad you found a workaround for the issue. It does however seem brittle so we would encourage you to reach out to the Vulkan community to explore a more robust solution with Xcode.

Xcode Vulkan is opening two windows instead of one.
 
 
Q