PostHog / posthog-ios

PostHog iOS SDK
https://posthog.com/docs/libraries/ios
MIT License
35 stars 41 forks source link

Unable to see the privacy manifest using SPM #111

Closed hsingh-texada closed 7 months ago

hsingh-texada commented 7 months ago

Description

Hi,

Unable to reopen #109. We are still facing this issue, as we are using SPM and the privacy file did not make it through to our archive. I think you need to add the privacy file to the package.swift file as follows.

    targets: [
        // Targets are the basic building blocks of a package. A target can define a module or a test suite.
        // Targets can depend on other targets in this package, and on products in packages this package depends on.
        .target(
            name: "PostHog",
            path: "PostHog",
            resources: [
                .copy("PrivacyInfo.xcprivacy")
            ]
        ),
        .testTarget(
            name: "PostHogTests",
            dependencies: [
                "PostHog",
                "Quick",
                "Nimble",
                "OHHTTPStubs",
                .product(name: "OHHTTPStubsSwift", package: "OHHTTPStubs"),
            ],
            path: "PostHogTests"
        ),
    ]

Please test before closing as follows:

To generate a privacy report, Archive the app which consumes the library using SPM, and then in Xcode -> Window -> Organizer -> Under Archives, right click on the archive -> Generate Privacy Report.

marandaneto commented 7 months ago

Ups, sorry, I expected the PMs to do this automatically.