Skip to content

Commit

Permalink
Privacy manifest inclusion for SPM and Cocoapods (#55)
Browse files Browse the repository at this point in the history
* Add support for privacy manifest for Cocoapods and SPM

https://developer.apple.com/support/third-party-SDK-requirements/

# Conflicts:
#	Example/Podfile.lock
#	Example/Pods/Manifest.lock
#	Example/Pods/Pods.xcodeproj/project.pbxproj
#	Package.swift

* Check things over with the test app, which updated the pods project etc.

* Analytics -> App Functionality in usage desc
  • Loading branch information
gazreese authored May 3, 2024
1 parent a15afa0 commit cbc9e0b
Show file tree
Hide file tree
Showing 11 changed files with 347 additions and 167 deletions.
1 change: 1 addition & 0 deletions Example/FlagsmithClient.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
VALIDATE_PRODUCT = YES;
};
name = Debug;
};
Expand Down
4 changes: 2 additions & 2 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- FlagsmithClient (3.6.0)
- FlagsmithClient (3.5.0)

DEPENDENCIES:
- FlagsmithClient (from `../`)
Expand All @@ -9,7 +9,7 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
FlagsmithClient: 3a96576f5a251c807e6aa0a3b0db55b3e1dfd0a3
FlagsmithClient: 505f315402ddf4482c3477dd4a6124ab8e63361e

PODFILE CHECKSUM: 9fc876dee0cf031cae843156b0740a94b4994d8c

Expand Down
9 changes: 7 additions & 2 deletions Example/Pods/Local Podspecs/FlagsmithClient.podspec.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Example/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

426 changes: 266 additions & 160 deletions Example/Pods/Pods.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions FlagsmithClient.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ Pod::Spec.new do |s|
s.author = { 'Kyle Johnson' => '[email protected]' }
s.source = { :git => 'https://github.com/Flagsmith/flagsmith-ios-client.git', :tag => s.version.to_s }
s.social_media_url = 'https://twitter.com/getflagsmith'
s.resource_bundles = {
'FlagSmith_Privacy' => ['Classes/PrivacyInfo.xcprivacy'],
}

s.ios.deployment_target = '12.0'

Expand Down
Empty file removed FlagsmithClient/Assets/.gitkeep
Empty file.
38 changes: 38 additions & 0 deletions FlagsmithClient/Classes/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?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>NSPrivacyCollectedDataTypeOtherDiagnosticData</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
</array>
<key>NSPrivacyTrackingDomains</key>
<array>
<string>edge.api.flagsmith.com</string>
</array>
<key>NSPrivacyTracking</key>
<true/>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
</array>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
</dict>
</array>
</dict>
</plist>
3 changes: 3 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ let package = Package(
name: "FlagsmithClient",
dependencies: [],
path: "FlagsmithClient/Classes",
resources: [
.copy("PrivacyInfo.xcprivacy"),
],
swiftSettings: [
.enableExperimentalFeature("StrictConcurrency=complete"),
.enableUpcomingFeature("ExistentialAny"), // https://github.com/apple/swift-evolution/blob/main/proposals/0335-existential-any.md
Expand Down

0 comments on commit cbc9e0b

Please sign in to comment.