Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing API declaration for NSPrivacyAccessedAPICategoryDiskSpace when integrated via SPM #408

Open
ksdjfksd opened this issue Apr 22, 2024 · 6 comments · May be fixed by #409
Open

Missing API declaration for NSPrivacyAccessedAPICategoryDiskSpace when integrated via SPM #408

ksdjfksd opened this issue Apr 22, 2024 · 6 comments · May be fixed by #409

Comments

@ksdjfksd
Copy link

We integrate DeviceKit 5.2.3 via Swift Package Manager (SPM).

Upon upload for review to the AppStore we receive the mail by Apple with the warning about missing API declaration for NSPrivacyAccessedAPICategoryDiskSpace.

I investigated the payload of the uploaded .ipa and it contains DeviceKit_DeviceKit.bundle.
Inside of this bundle I can also see the PrivacyInfo.xcprivacy file.

This means the PrivacyInfo file should be recognized during the AppStore review process. But the issue is: It does not get recognized and our app is flagged for using NSPrivacyAccessedAPICategoryDiskSpace without declaration.

I have tried to upload a version to app review where I removed DeviceKit from the app.
This version passed review without being flagged.
So it must be an issue with the DeviceKit SPM package integration.

@iharkatkavets
Copy link

I faced the same issue. Thank you for reporting @ksdjfksd !

@iharkatkavets
Copy link

iharkatkavets commented Apr 23, 2024

We almost have no time until May 1. Could anybody raise the priority for the ticket ? For me it's a blocker.

@MaximeLM
Copy link

MaximeLM commented Apr 25, 2024

Similar discussion and workaround for Firebase here
Apparently AppStore Connect is not seeing the privacy reports from SPM dependencies because they are statically linked.
A workaround could be to manually add the required reasons of your dependencies in your app's privacy report (not tested).

@iharkatkavets
Copy link

iharkatkavets commented Apr 27, 2024

Hmmm, the bug is related to Swift Package Manager and it was opened Feb 4.
apple/swift-package-manager#7317

@iharkatkavets
Copy link

Few days ago Apple updated their documentation related to static libs

Distribute your static library with a privacy manifest
A static library is an archive of object files with the .a file extension. It doesn’t support resources such as the privacy manifest. If you currently distribute a static library as an SDK and want to update it to include a privacy manifest in Xcode, create a new static framework target that includes all your static library’s source files and resources, then add the privacy manifest to the target’s resource.
If you don’t use Xcode to build your static library, create a static framework bundle for your static library manually, then add the privacy manifest to the bundle as a resource. For more information about framework bundle structure, see Placing content in a bundle. To identify the privacy manifest location in the static framework, see Add a privacy manifest to your framework.

The link to documentation is here

@thejeff77
Copy link

Sounds like the offending code should be pulled into another library, or this library should add suggestions for how to add the privacy reasons to your app that this violates..

I don't see any other way around this, do you guys?

@Zandor300 Zandor300 linked a pull request Apr 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants