MoltenVK Gets Patches To Workaround iOS API Issue, App Store Rejection
Written by Michael Larabel in Vulkan on 9 July 2018 at 10:29 AM EDT. 25 Comments
VULKAN --
A new pull request has been submitted to MoltenVK, the open-source project for mapping the Vulkan graphics/compute API over Apple's Metal to run on iOS/macOS. This pull request is working to address the issue that caused at least one MoltenVK-using iPhone/iPad game to be rejected from the Apple App Store.

As covered Sunday morning, an iOS game was rejected from the App Store on the basis of using a "non-public API" in MoltenVK for allowing Vulkan rendering over Metal. While it wouldn't surprise us at all to see Apple reject applications on the basis of not conforming to their in-house graphics/compute API, it turns out that MoltenVK was in fact using non-public interfaces.

Valve Software developer Nat Brown commented yesterday in our forums with his hypothesis. "I know app rejections and the Apple ecosystem rules can be frustrating and cause a lot of consternation, but in this case I *think* this is likely a legitimate rejection for using the kIOSurfaceIsGlobal=true flag when creating an IOSurface - Apple documents this as private and not allowed by sandboxed apps on iOS, and there are legitimate security & sandbox reasons to not support IOSurfaces that can be guessed and mapped to a foreign process using IOSurfaceLookup(). It's likely Apple's static analyzer found this during submission. We (Valve) worked to add this type of IOSurface-backed MTLTexture for Vulkan VR support for macOS and I suspect it slipped into the iOS build inadvertently - we don't need that support on iOS (yet? If somebody knows the developer and can point them my way I'd be happy to figure out if this was the only issue, and I'll create a PR for MoltenVK to drop the global flag out of the iOS build. Apple graphics folks I work with are fine with MoltenVK, and many Apple and AMD folks have provided concrete technical feedback to improve the performance of MoltenVK, and we have uncovered bugs in HLSL->GLSL->SPIR-V->MSL together which should help make the entire graphics ecosystem stronger."

I put him in touch yesterday with the indie game studio in question who faced App Store rejection for their MoltenVK-using game. IOSurface is part of the iOS 11.0+ and macOS 10.6+ SDKs for sharing of hardware-accelerated buffer data across multiple processes and can be used for managing image memory more efficiently.

It looks like MoltenVK's IOSurface may indeed be to blame for getting turned down from the App Store. Nat Brown just sent out a pull request against the MoltenVK open-source code-base that removes IOSurface support within the iOS version. As commented by Nat in the forums, this shouldn't have any immediate impact at least until if/when MoltenVK/Vulkan VR becomes a thing on iOS or mandated by other advanced use-cases.

When we hear if this appeases Apple to accepting MoltenVK-using software again in their software store or anything else, we'll update.
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 10,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Related Vulkan News
Popular News This Week