KhronosGroup / MoltenVK

MoltenVK is a Vulkan Portability implementation. It layers a subset of the high-performance, industry-standard Vulkan graphics and compute API over Apple's Metal graphics framework, enabling Vulkan applications to run on macOS, iOS and tvOS.
Apache License 2.0
4.64k stars 402 forks source link

OLD: Improve support for iOS App Store rules by using dynamic XCFramework. #2166

Closed billhollings closed 4 months ago

billhollings commented 4 months ago

Apple's iOS App Store does not permit an app to link to naked dylibs. Instead, these must be placed in frameworks, which are embedded in a dynamic version of MoltenVK.xcframework.

@richard-lunarg

richard-lunarg commented 4 months ago

Fetch dependencies is failing for me too.

========== glslang and SPIRV-Tools ==========

ERROR stderr contains: Cloning into 'cereal'... Note: switching to '51cbda5f30e56c801c07fe3d3aba5d7fb9e6cca4'.

You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example:

git switch -c

Or undo this operation with:

git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 51cbda5f Merge branch 'develop' for release 1.2.2 Cloning into 'SPIRV-Cross'... Note: switching to '64f64c837a8ba7e32e91cebcc6c796e9b45ab186'.

You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example:

git switch -c

Or undo this operation with:

git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 64f64c83 Merge pull request #2266 from KhronosGroup/pr-2257 checkdir: cannot create extraction directory: glslang/External/spirv-tools No such file or directory

billhollings commented 4 months ago

Fetch dependencies is failing for me too.

@richard-lunarg I missed updating the XCFrameworks for the dependencies in the initial PR.

It's fixed, and should be good now.

richard-lunarg commented 4 months ago

@billhollings Yes, building fine now. I'll do some additional tests on this today.

richard-lunarg commented 4 months ago

For app store compatibility, we still need to remove the symbolic link to libMoltenVK.dylib. Here's a screen shot from the App Store validation tool:

image
richard-lunarg commented 4 months ago

A couple other details. It's okay to put the MoltenVK.json in /MoltenVK/Package/Release/MoltenVK/dynamic/dylib/macOS, just don't put it inside the framework. The iOS framework (simulator and hardware) have a folder "Template.framework" that is likely not intended.

billhollings commented 4 months ago

This PR is replaced by PR #2170.