Do Static Libraries need a PrivacyInfo.xcprivacy file? or they use the App-Level one?

Hello,

I have a project that generates a fat Static Library (NOT a Static XC Framework), and the output of that project would be a single static library file let us say: libProject.a We are distributing this libProject.a to our clients and we are not using XCFrameworks yet.

In this specific case (Static Library) do we need PrivacyInfo.xcprivacy file? and in case it is required how is it supposed to be distributed with the static library? is it enough for the ones who are calling this library in their project to add the missing XCPrivacy entries to their app "PrivacyInfo.xcprivacy" file ?

PS: I know ideally it would be better to use Static Framework instead of Static Library but that is still planned in our schedule for a future release, Since "Static Library" target type is still supported by Xcode 15.2 that means there must be a solution.

Thanks in advance,

Do you have resolved this question. I have the same question about static lib

Did you solve this? It's ridiculous that I can't use static libraries because of this problem. I'm sure there's a way.

I think we can add it to the app's Privacyinfo.

Did anyone solve this issue?

I am using static framework and even after adding privacy file to SDK apple is't able to identify the privacy file and throws error like privacy file not found when I try to generate from archive. is there any folder structure or something that we have to follow to make it work?

Hi @TheDarkMatter,

Did Apple Code Level Support Team tell how to add privacy manifest for static frameworks?

We develop a static .xcframework and ship it as a compiled binary. We have included the PrivacyInfo.xcprivacy file and sign the .xcframework as specified. The first issue that I see is that unless you embed the .xcframework in the app, then the app doesn't contain the PrivacyInfo.xcprivacy file. Being that the framework is already statically linked into the final app executable, embedding the .xcframework seems an odd requirement in and of itself. Secondly, consuming the binary .xcframework via SPM, Xcode doesn't even allow you to embed the static library in the final application.

I have just received a report from on of our customers that they were flagged for using a "required reason" API and are not certain how to get our PrivacyInfo.xcprivacy file into their application.

Do Static Libraries need a PrivacyInfo.xcprivacy file? or they use the App-Level one?
 
 
Q