Skip to content

Commit

Permalink
Feature/remove tracking domain & tracking boolean (#58)
Browse files Browse the repository at this point in the history
* Remove domain and set NSPrivacyTracking to false based on research

* Update example app to support ATT and privacy status to try to reproduce the customer's issue
  • Loading branch information
gazreese authored May 24, 2024
1 parent 145922f commit 1104787
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 15 deletions.
7 changes: 5 additions & 2 deletions Example/FlagsmithClient.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
TargetAttributes = {
607FACCF1AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
DevelopmentTeam = RYCT86V4LM;
LastSwiftMigration = 1020;
};
};
Expand Down Expand Up @@ -292,7 +293,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -342,7 +343,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand All @@ -355,6 +356,7 @@
baseConfigurationReference = 9DFD4B33E10902546A38D90F /* Pods-FlagsmithClient_Example.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = RYCT86V4LM;
INFOPLIST_FILE = FlagsmithClient/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MODULE_NAME = ExampleApp;
Expand All @@ -369,6 +371,7 @@
baseConfigurationReference = 5357A0EF6DA00FB7B1E84F8C /* Pods-FlagsmithClient_Example.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = RYCT86V4LM;
INFOPLIST_FILE = FlagsmithClient/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MODULE_NAME = ExampleApp;
Expand Down
4 changes: 4 additions & 0 deletions Example/FlagsmithClient/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSUserTrackingUsageDescription</key>
<string>Just for Flagsmith Analytics</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.developer-tools</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
Expand Down
26 changes: 26 additions & 0 deletions Example/FlagsmithClient/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,33 @@

import UIKit
import FlagsmithClient
import AppTrackingTransparency
import AdSupport

class ViewController: UIViewController {

override func viewDidLoad() {
super.viewDidLoad()
// Request user authorization for tracking
ATTrackingManager.requestTrackingAuthorization { status in
switch status {
case .authorized:
// Tracking authorization granted
print("Tracking authorization granted")
case .denied:
// Tracking authorization denied
print("Tracking authorization denied")
case .restricted:
// Tracking restricted
print("Tracking restricted")
case .notDetermined:
// Tracking authorization not determined
print("Tracking authorization not determined")
@unknown default:
// Handle other cases
print("Unknown tracking authorization status")
}
}
}

}
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.5.0)
- FlagsmithClient (3.6.0)

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

SPEC CHECKSUMS:
FlagsmithClient: 505f315402ddf4482c3477dd4a6124ab8e63361e
FlagsmithClient: 101151384696085c085d06b1c202946827e058d6

PODFILE CHECKSUM: 9fc876dee0cf031cae843156b0740a94b4994d8c

Expand Down
4 changes: 2 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.

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.

6 changes: 1 addition & 5 deletions FlagsmithClient/Classes/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,8 @@
</array>
</dict>
</array>
<key>NSPrivacyTrackingDomains</key>
<array>
<string>edge.api.flagsmith.com</string>
</array>
<key>NSPrivacyTracking</key>
<true/>
<false/>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
Expand Down

0 comments on commit 1104787

Please sign in to comment.