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

feat: Add Privacy Manifest and SPM Support #17

Merged
merged 2 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ playground.xcworkspace
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
.build/
Package.resolved

# CocoaPods
#
Expand Down
28 changes: 28 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "mParticle-Optimizely",
platforms: [ .iOS(.v10), .tvOS(.v10) ],
products: [
.library(
name: "mParticle-Optimizely",
targets: ["mParticle_Optimizely"]),
],
dependencies: [
.package(name: "mParticle-Apple-SDK",
url: "https://github.com/mParticle/mparticle-apple-sdk",
.upToNextMajor(from: "8.0.0")),
.package(name: "Optimizely",
url: "https://github.com/optimizely/swift-sdk",
.upToNextMajor(from: "4.0.0")),
],
targets: [
.target(
name: "mParticle_Optimizely",
dependencies: ["mParticle-Apple-SDK", "Optimizely"],
path: "mParticle_Optimizely",
publicHeadersPath: "."
),
]
)
2 changes: 1 addition & 1 deletion mParticle-Optimizely.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Pod::Spec.new do |s|
s.source = { :git => "https://github.com/mparticle-integrations/mparticle-apple-integration-optimizely.git", :tag => s.version.to_s }
s.social_media_url = "https://twitter.com/mparticle"
s.dependency 'mParticle-Apple-SDK/mParticle', '~> 8.0'
s.dependency 'OptimizelySwiftSDK', '~> 3.0'
s.dependency 'OptimizelySwiftSDK', '~> 4.0'
s.swift_versions = ['5.0']

s.ios.deployment_target = "10.0"
Expand Down
6 changes: 6 additions & 0 deletions mParticle_Optimizely.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
D377139824042B1000CF4773 /* Optimizely.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D37713932404247E00CF4773 /* Optimizely.framework */; };
D377139924042B2200CF4773 /* mParticle_Apple_SDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D37713952404249200CF4773 /* mParticle_Apple_SDK.framework */; };
D377139B24042B2200CF4773 /* OCMock.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D377139A24042B2200CF4773 /* OCMock.framework */; };
D3B8187D2BC6C002001F09BB /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = D3B8187C2BC6C002001F09BB /* PrivacyInfo.xcprivacy */; };
D3B8187E2BC6C002001F09BB /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = D3B8187C2BC6C002001F09BB /* PrivacyInfo.xcprivacy */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -62,6 +64,7 @@
D37713932404247E00CF4773 /* Optimizely.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Optimizely.framework; path = Carthage/Build/tvOS/Optimizely.framework; sourceTree = "<group>"; };
D37713952404249200CF4773 /* mParticle_Apple_SDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = mParticle_Apple_SDK.framework; path = Carthage/Build/tvOS/mParticle_Apple_SDK.framework; sourceTree = "<group>"; };
D377139A24042B2200CF4773 /* OCMock.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OCMock.framework; path = Carthage/Build/tvOS/OCMock.framework; sourceTree = "<group>"; };
D3B8187C2BC6C002001F09BB /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -152,6 +155,7 @@
D316BD4D217F67BC00688E56 /* MPKitOptimizely.m */,
D316BD35217F670500688E56 /* mParticle_Optimizely.h */,
D316BD36217F670600688E56 /* Info.plist */,
D3B8187C2BC6C002001F09BB /* PrivacyInfo.xcprivacy */,
);
path = mParticle_Optimizely;
sourceTree = "<group>";
Expand Down Expand Up @@ -323,6 +327,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D3B8187E2BC6C002001F09BB /* PrivacyInfo.xcprivacy in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -337,6 +342,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D3B8187D2BC6C002001F09BB /* PrivacyInfo.xcprivacy in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
18 changes: 18 additions & 0 deletions mParticle_Optimizely/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?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>NSPrivacyTracking</key>
<false/>
<key>NSPrivacyTrackingDomains</key>
<array/>
<key>NSPrivacyCollectedDataTypes</key>
<array>
<dict/>
</array>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict/>
</array>
</dict>
</plist>