swift-webgpu icon indicating copy to clipboard operation
swift-webgpu copied to clipboard

Using Dawn triggers a privacy-manifest problem with apple appstoreconnect submissions

Open SoylentGraham opened this issue 1 year ago • 4 comments

Dawn uses abseil, which appears on apple's "privacy api using" list. Dawn only uses string functions (Lost url to this citation), and abseil itself apparently is safe https://github.com/abseil/abseil-cpp/pull/1604

To remedy this, the target that uses abseil (the emails from apple cite libwebgpu_dawn.dylib) we can add a PrivacyInfo.xcprivacy resource to our target (I'm using DawnNative as that's where I have my xcframework)

This generates a .bundle in my final .app output containing the privacy manfiest, which hopefully allows submission

SoylentGraham avatar Nov 09 '24 14:11 SoylentGraham

Note; adding to the DawnNative target, means app now also need to include the DawnNative.lib generated by swift. Maybe we can move the privacy to WebGpu target... have to see what apple approve

SoylentGraham avatar Nov 09 '24 15:11 SoylentGraham

The above change hasn't worked - I think I need to turn that dylib into a framework and include it there https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/adding_a_privacy_manifest_to_your_app_or_third-party_sdk Or possibly I can manually make a .bundle (as spm generates) and perhaps that will make it into the .xcframework swift-webgpu_DawnNative.bundle.zip

SoylentGraham avatar Nov 09 '24 15:11 SoylentGraham

Note to self, I have resolved this and the privacy meta, it can be injected into the framework as we build the xcframework - as I couldn't work out how to get it into the dawn cmake instructions when the .framework was built. Which then means the xcframework needs to resign https://github.com/NewChromantics/swift-webgpu/blob/LockingRender/Sources/DawnNative/PrivacyInfo.xcprivacy https://github.com/NewChromantics/swift-webgpu/blob/LockingRender/Sources/DawnNative/CreateXCFramework.sh

SoylentGraham avatar Dec 10 '24 12:12 SoylentGraham

Thanks for your investigation into this.

I have to admit, I have no experience of submitting to the app store (at least not in the last 10 years!), so I will probably need to update my knowledge on this!

henrybetts avatar Dec 11 '24 23:12 henrybetts