Skip to content

Commit

Permalink
fix: privacy info manifest set also in the PM config (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
marandaneto authored Feb 26, 2024
1 parent b06ec77 commit 3b2f03f
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 19 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Next

- PrivacyInfo manifest set in the SPM and CocoaPods config [#112](https://github.com/PostHog/posthog-ios/pull/112)

## 3.2.0 - 2024-02-23

- read `$app_name` from `CFBundleDisplayName` as a fallback if `CFBundleName` isn't available [#108](https://github.com/PostHog/posthog-ios/pull/108)
Expand Down
5 changes: 4 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ let package = Package(
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "PostHog",
path: "PostHog"
path: "PostHog",
resources: [
.copy("Resources/PrivacyInfo.xcprivacy"),
]
),
.testTarget(
name: "PostHogTests",
Expand Down
1 change: 1 addition & 0 deletions PostHog.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ Pod::Spec.new do |s|
s.source_files = [
'PostHog/**/*'
]
s.resource_bundles = { "PostHog" => "PostHog/Resources/PrivacyInfo.xcprivacy" }
end
10 changes: 9 additions & 1 deletion PostHog.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@
3AC745B7296D6FE60025C109 /* PostHog */ = {
isa = PBXGroup;
children = (
69BA38E62B893F2200AA69D6 /* Resources */,
69779BED2AE6B29E00D7A48E /* Models */,
3AC745B8296D6FE60025C109 /* PostHog.h */,
3AA4C09B2988315D006C4731 /* Utils */,
Expand All @@ -448,7 +449,6 @@
6926DA8D2ADD2876005760D2 /* PostHogContext.swift */,
69779BEB2AE68E6900D7A48E /* UIViewController.swift */,
690FF0C42AEFAE8200A0B06B /* PostHogLegacyQueue.swift */,
69BA38D62B888E8500AA69D6 /* PrivacyInfo.xcprivacy */,
);
path = PostHog;
sourceTree = "<group>";
Expand Down Expand Up @@ -569,6 +569,14 @@
path = "Preview Content";
sourceTree = "<group>";
};
69BA38E62B893F2200AA69D6 /* Resources */ = {
isa = PBXGroup;
children = (
69BA38D62B888E8500AA69D6 /* PrivacyInfo.xcprivacy */,
);
path = Resources;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXHeadersBuildPhase section */
Expand Down
17 changes: 0 additions & 17 deletions PostHog/PrivacyInfo.xcprivacy

This file was deleted.

44 changes: 44 additions & 0 deletions PostHog/Resources/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyCollectedDataTypes</key>
<array>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeProductInteraction</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
</array>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeOtherUsageData</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
</array>
</dict>
</array>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
</array>
</dict>
</array>
</dict>
</plist>

0 comments on commit 3b2f03f

Please sign in to comment.