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

Xcode 15 is't able to identify Privacy file #12470

Closed
manohara347 opened this issue Mar 5, 2024 · 9 comments
Closed

Xcode 15 is't able to identify Privacy file #12470

manohara347 opened this issue Mar 5, 2024 · 9 comments
Assignees

Comments

@manohara347
Copy link

Description

I have added GoogleDataTransport.xcframework to the project and generate privacy report I am still getting error like "The archive does not contain any PrivacyInfo.xcprivacy files"
Any solution for this? Also I noticed you guys have added "GoogleDataTransport_Privacy.bundle" but when I archive it's not added in the final bundle of the app. I am using Xcode 15.

some of the frameworks are distributed as static frameworks do we need to add privacy-file in the app for those?

Any recommendations?

Reproducing the issue

  1. create any sample app 2. Add the GoogleDataTransport.xcframework in framework section and archive the project and generate privacy report and it throws error like "The archive does not contain any PrivacyInfo.xcprivacy files" even though i see GoogleDataTransport_Privacy.bundle contains the privacy file.

Firebase SDK Version

10.22.0

Xcode Version

15

Installation Method

Zip

Firebase Product(s)

Crashlytics

Targeted Platforms

iOS

Relevant Log Output

"The archive does not contain any PrivacyInfo.xcprivacy files"

If using Swift Package Manager, the project's Package.resolved

Expand Package.resolved snippet
Replace this line with the contents of your Package.resolved.

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
Replace this line with the contents of your Podfile.lock!
@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@ncooke3
Copy link
Member

ncooke3 commented Mar 5, 2024

Hi @manohara347, can you confirm that the framework is added with the "embed and sign" option?

Screenshot 2024-03-05 at 10 06 03 AM

@ncooke3 ncooke3 self-assigned this Mar 5, 2024
@manohara347
Copy link
Author

manohara347 commented Mar 5, 2024

Thanks for responce. I am able to see report after adding the Embed & Sign. But this is static framework why we have to Embed & Sign this results into bump in the App size?

@ncooke3
Copy link
Member

ncooke3 commented Mar 5, 2024

It shouldn't significantly affect app size because Xcode 15 introduced behavior to remove the static archive when embedding a static framework. If you inspect the app bundle, you may see a GoogleDataTransport.framework/GoogleDataTransport executable but this is actually an empty dylib that Xcode swaps the static archive in for during a build phase.

From https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes:

Fixed: Embedding a static framework using a Copy Files build phase now removes the static archive from the framework when it is embedded in the target bundle. The REMOVE_STATIC_EXECUTABLES_FROM_EMBEDDED_BUNDLES build setting can be set to NO to opt out of this behavior. The COPY_RESOURCES_FROM_STATIC_FRAMEWORKS build setting, previously used in the legacy build system to extract and copy the resources from a static framework to the target bundle, no longer has any effect with the new build system as the entire framework is copied instead (minus the static archive as described above). (47164939)

@ncooke3 ncooke3 closed this as completed Mar 5, 2024
@manohara347
Copy link
Author

manohara347 commented Mar 5, 2024

Thanks for the response i see its not adding complete binary, If we are integrating this using cocoapods then we don't have option to change to Embed & Sign how to solve for that scenarios? if distributed as static framework in cocoapods.

@ncooke3
Copy link
Member

ncooke3 commented Mar 5, 2024

If we are integrating this using cocoapods then we don't have option to change to Embed & Sign how to solve for that scenarios?

For CocoaPods that vend a static framework, there is workaround where you can specify a resource bundle in the podspec and that will ensure the resource bundle is embedded in the app bundle. In this case, only the resource bundle in the podspec will be embedded as CocoaPods will not embed the static framework vended by the pod.

@manohara347
Copy link
Author

Thanks for the response. Is Apple ok with adding resources in bundle? is any documentation from apple regarding this? How you guys taking care of this for Swift Package manager we don't have option to add resources in binary binaryTarget(name:path:), binaryTarget(name:url:checksum:)?

@ncooke3
Copy link
Member

ncooke3 commented Mar 5, 2024

Is Apple ok with adding resources in bundle? is any documentation from apple regarding this?

From what I've heard, this approach is acceptable. I don't think there is official Apple documentation about privacy manifests and resource bundles though. I do not know anything about how Apple will enforce the specifics on a technical level.

How you guys taking care of this for Swift Package manager we don't have option to add resources in binary binaryTarget(name:path:), binaryTarget(name:url:checksum:)?

There was an undocumented, subtle behavior change in Xcode 15.3 where binary targets vending static xcframeworks will be automatically embedded.

@ManoharaReddyP
Copy link

Thanks @ncooke3, All my queries are resolved.

@firebase firebase locked and limited conversation to collaborators Apr 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants