Skip to content

Commit

Permalink
feat: add privacy manifest file support for ios v2 sdk (#496)
Browse files Browse the repository at this point in the history
* chore: update podfile.lock

* refactor: rudderlabs to rudderstack

This is needed for Privacy Tracking Domain

* feat: add PrivacyInfo.xcprivacy file

* chore: change mail to [email protected]

* feat: add Privacy Manifest support for cocoapods

* feat: add Privacy Manifest support for spm

* fix: correct the privacy tracking domain

Append slash as the suffix
  • Loading branch information
1abhishekpandey authored Apr 8, 2024
1 parent c3d40c8 commit cb7ec68
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 7 deletions.
5 changes: 4 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ let package = Package(
.target(
name: "Rudder",
path: "Sources",
sources: ["Classes/"]
sources: ["Classes/"],
resources: [
.copy("Resources/PrivacyInfo.xcprivacy")
]
),
.testTarget(
name: "RudderTests",
Expand Down
6 changes: 3 additions & 3 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- Rudder (2.3.0)
- Rudder (2.4.3)

DEPENDENCIES:
- Rudder (from `.`)
Expand All @@ -9,8 +9,8 @@ EXTERNAL SOURCES:
:path: "."

SPEC CHECKSUMS:
Rudder: 368691bcf2588f00cc99004cbc2026675b9cb16f
Rudder: 831e9e84722969781103845b287bdbe7b0c9f833

PODFILE CHECKSUM: ee379229e6a0b60bc98226700ace2de002171547

COCOAPODS: 1.11.3
COCOAPODS: 1.14.3
3 changes: 2 additions & 1 deletion Rudder.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ Pod::Spec.new do |s|

s.homepage = "https://github.com/rudderlabs/rudder-sdk-ios"
s.license = { :type => "Apache", :file => "LICENSE" }
s.author = { "RudderStack" => "arnab@rudderlabs.com" }
s.author = { "RudderStack" => "sdk@rudderstack.com" }
s.source = { :git => "https://github.com/rudderlabs/rudder-sdk-ios.git", :tag => "v#{s.version}" }
s.resource_bundles = { s.name => 'Sources/Resources/PrivacyInfo.xcprivacy' }

s.swift_version = '5.3'
s.ios.deployment_target = '12.0'
Expand Down
4 changes: 2 additions & 2 deletions Sources/Classes/Common/Constants/RSConstants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@

import Foundation

public let RSDataPlaneUrl = "https://hosted.rudderlabs.com"
public let RSDataPlaneUrl = "https://hosted.rudderstack.com"
public let RSFlushQueueSize: Int = 30
public let RSDBCountThreshold: Int = 10000
public let RSSleepTimeout: Int = 10
public let RSControlPlaneUrl = "https://api.rudderlabs.com"
public let RSControlPlaneUrl = "https://api.rudderstack.com"
public let RSTrackLifeCycleEvents = true
public let RSRecordScreenViews = false
let RETRY_FLUSH_COUNT = 3
Expand Down
64 changes: 64 additions & 0 deletions Sources/Resources/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?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>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
</array>
</dict>
</array>
<key>NSPrivacyCollectedDataTypes</key>
<array>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>App Version</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeDeveloperAdvertising</string>
<string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
</array>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>App Name</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeDeveloperAdvertising</string>
<string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
</array>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeDeviceID</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
<string>NSPrivacyCollectedDataTypePurposeDeveloperAdvertising</string>
<string>NSPrivacyCollectedDataTypePurposeThirdPartyAdvertising</string>
</array>
</dict>
</array>
<key>NSPrivacyTrackingDomains</key>
<array>
<string>rudderstack.com/</string>
</array>
</dict>
</plist>

0 comments on commit cb7ec68

Please sign in to comment.