Skip to content

Commit

Permalink
[SSDK-545] Add xcprivacy (#174)
Browse files Browse the repository at this point in the history
### Description
**Ticket**: [SSDK-545](https://mapbox.atlassian.net/browse/SSDK-545)

- Add PrivacyInfo.xcprivacy support
    - Follow guide at https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_data_use_in_privacy_manifests
- MapboxSearch
    - Uses location data _if the app has permissions_
    - Uses other identifiers (software versions) for User Agents
- MapboxSearchUI
    - Does not collect information
- Privacy report from Demo app:
    - [Demo-PrivacyReport 2024-02-12 12-46-04.pdf](https://github.com/mapbox/mapbox-search-ios/files/14245941/Demo-PrivacyReport.2024-02-12.12-46-04.pdf)
    - (No entries for MapboxSearchUI because it does not collect info).

### Checklist
- [x] Update `CHANGELOG`

[SSDK-545]: https://mapbox.atlassian.net/browse/SSDK-545
  • Loading branch information
aokj4ck authored Feb 13, 2024
1 parent 6c54220 commit 1bd33bf
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 11 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Guide: https://keepachangelog.com/en/1.0.0/

<!-- Add changes for active work here -->

- [Core] Add xcprivacy for MapboxSearch and MapboxSearchUI

- [SearchUI] Update Maki icons to all SVG, latest versions from https://github.com/mapbox/maki
- [SearchUI] Remove all custom Maki icons
- [Unit Tests] Update and correct tests for iOS 17 using all mocked data.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,6 @@
"version": "10.2.0"
}
},
{
"package": "MapboxMobileEvents",
"repositoryURL": "https://github.com/mapbox/mapbox-events-ios.git",
"state": {
"branch": null,
"revision": "e29f48d9ed02b31ef51f9774a9c45f1d7c2c2b78",
"version": "1.0.6"
}
},
{
"package": "MapboxMaps",
"repositoryURL": "[email protected]:mapbox/mapbox-maps-ios.git",
Expand Down
28 changes: 28 additions & 0 deletions MapboxSearch.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
042477C62B72CCB000D870D5 /* geocoding-reverse-geocoding.json in Resources */ = {isa = PBXBuildFile; fileRef = 042477C42B72CCB000D870D5 /* geocoding-reverse-geocoding.json */; };
042477C72B72CCB000D870D5 /* geocoding-reverse-geocoding.json in Resources */ = {isa = PBXBuildFile; fileRef = 042477C42B72CCB000D870D5 /* geocoding-reverse-geocoding.json */; };
043A3D4D2B30F38300DB681B /* CoreAddress+AddressComponents.swift in Sources */ = {isa = PBXBuildFile; fileRef = 043A3D4C2B30F38300DB681B /* CoreAddress+AddressComponents.swift */; };
04970F8D2B7A97C900213763 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 04970F8C2B7A97C900213763 /* PrivacyInfo.xcprivacy */; };
04AB0B4B2B6AADB700FDE7D5 /* mapbox.places.san.francisco.json in Resources */ = {isa = PBXBuildFile; fileRef = 04AB0B4A2B6AADB700FDE7D5 /* mapbox.places.san.francisco.json */; };
04AB0B4C2B6AADB700FDE7D5 /* mapbox.places.san.francisco.json in Resources */ = {isa = PBXBuildFile; fileRef = 04AB0B4A2B6AADB700FDE7D5 /* mapbox.places.san.francisco.json */; };
04AB0B4D2B6AADB700FDE7D5 /* mapbox.places.san.francisco.json in Resources */ = {isa = PBXBuildFile; fileRef = 04AB0B4A2B6AADB700FDE7D5 /* mapbox.places.san.francisco.json */; };
Expand All @@ -22,6 +23,8 @@
04C127582B62FFDB00884325 /* ApiType+Core.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C127572B62FFDB00884325 /* ApiType+Core.swift */; };
04E5FF962B48828500DADC18 /* SearchAddressCountry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E5FF952B48828500DADC18 /* SearchAddressCountry.swift */; };
04E5FF992B48829200DADC18 /* SearchAddressRegion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E5FF982B48829200DADC18 /* SearchAddressRegion.swift */; };
04E84D122B76BA230056C269 /* Resources-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 04E84D112B76BA230056C269 /* Resources-Info.plist */; };
04E84D132B7A8F4D0056C269 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 04E84D072B7691610056C269 /* PrivacyInfo.xcprivacy */; };
140D1BDC286DB479001A51C2 /* SearchResultAccuracy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 140D1BDB286DB479001A51C2 /* SearchResultAccuracy.swift */; };
140E47A2298BC90E00677E30 /* Discover.swift in Sources */ = {isa = PBXBuildFile; fileRef = 140E47A1298BC90E00677E30 /* Discover.swift */; };
140E47A5298BC94D00677E30 /* Discover+Options.swift in Sources */ = {isa = PBXBuildFile; fileRef = 140E47A4298BC94D00677E30 /* Discover+Options.swift */; };
Expand Down Expand Up @@ -491,6 +494,7 @@
042477C12B7290E700D870D5 /* SearchEngineGeocodingIntegrationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchEngineGeocodingIntegrationTests.swift; sourceTree = "<group>"; };
042477C42B72CCB000D870D5 /* geocoding-reverse-geocoding.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "geocoding-reverse-geocoding.json"; sourceTree = "<group>"; };
043A3D4C2B30F38300DB681B /* CoreAddress+AddressComponents.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CoreAddress+AddressComponents.swift"; sourceTree = "<group>"; };
04970F8C2B7A97C900213763 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
04AB0B4A2B6AADB700FDE7D5 /* mapbox.places.san.francisco.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = mapbox.places.san.francisco.json; sourceTree = "<group>"; };
04BBC6332B61898F00E24E99 /* LocalhostMockServiceProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalhostMockServiceProvider.swift; sourceTree = "<group>"; };
04C0848C2B4C82F3002F9C69 /* SdkInformation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SdkInformation.swift; sourceTree = "<group>"; };
Expand All @@ -505,6 +509,8 @@
04E84D032B768F210056C269 /* Fastfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Fastfile; sourceTree = "<group>"; };
04E84D042B768F210056C269 /* .env */ = {isa = PBXFileReference; lastKnownFileType = text; path = .env; sourceTree = "<group>"; };
04E84D052B768F210056C269 /* Matchfile */ = {isa = PBXFileReference; lastKnownFileType = text; path = Matchfile; sourceTree = "<group>"; };
04E84D072B7691610056C269 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
04E84D112B76BA230056C269 /* Resources-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Resources-Info.plist"; sourceTree = "<group>"; };
140D1BDB286DB479001A51C2 /* SearchResultAccuracy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchResultAccuracy.swift; sourceTree = "<group>"; };
140E47A1298BC90E00677E30 /* Discover.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Discover.swift; sourceTree = "<group>"; };
140E47A4298BC94D00677E30 /* Discover+Options.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Discover+Options.swift"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -916,6 +922,14 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
04970F8B2B7A97C900213763 /* Resources */ = {
isa = PBXGroup;
children = (
04970F8C2B7A97C900213763 /* PrivacyInfo.xcprivacy */,
);
path = Resources;
sourceTree = "<group>";
};
04C127562B62FFD000884325 /* Engine */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -944,6 +958,14 @@
path = .fastlane;
sourceTree = "<group>";
};
04E84D062B7691420056C269 /* Resources */ = {
isa = PBXGroup;
children = (
04E84D072B7691610056C269 /* PrivacyInfo.xcprivacy */,
);
path = Resources;
sourceTree = "<group>";
};
140E47A0298BC8F800677E30 /* Discover API */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1582,6 +1604,7 @@
FEEDD2C02508DFE400DC0A98 /* MapboxSearch */ = {
isa = PBXGroup;
children = (
04E84D062B7691420056C269 /* Resources */,
FEEDD2C12508DFE400DC0A98 /* InternalAPI */,
FEEDD2D42508DFE400DC0A98 /* PublicAPI */,
);
Expand Down Expand Up @@ -1683,6 +1706,8 @@
FEEDD31E2508E02700DC0A98 /* MapboxSearchUI */ = {
isa = PBXGroup;
children = (
04E84D112B76BA230056C269 /* Resources-Info.plist */,
04970F8B2B7A97C900213763 /* Resources */,
FEEDD34E2508E02700DC0A98 /* ActivityProgressView.swift */,
FEEDD33F2508E02700DC0A98 /* ActivityProgressView.xib */,
FE4F260525F8E8B700454BC5 /* AddToFavoritesCell.swift */,
Expand Down Expand Up @@ -2062,6 +2087,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
04E84D132B7A8F4D0056C269 /* PrivacyInfo.xcprivacy in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -2183,6 +2209,8 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
04E84D122B76BA230056C269 /* Resources-Info.plist in Resources */,
04970F8D2B7A97C900213763 /* PrivacyInfo.xcprivacy in Resources */,
FEC6EEE5246BFBB30051732D /* MapboxSearchUIResources.bundle in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
8 changes: 7 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,18 @@ let package = Package(
"MapboxCommon",
],
exclude: ["Info.plist"],
resources: [
.copy("Resources/PrivacyInfo.xcprivacy"),
],
linkerSettings: [.linkedLibrary("c++")]
),
.target(
name: "MapboxSearchUI",
dependencies: ["MapboxSearch"],
exclude: ["Info.plist", "Resources-Info.plist"]
exclude: ["Info.plist", "Resources-Info.plist"],
resources: [
.copy("Resources/PrivacyInfo.xcprivacy"),
]
),

coreSearchTarget(
Expand Down
52 changes: 52 additions & 0 deletions Sources/MapboxSearch/Resources/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?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/>
<key>NSPrivacyTrackingDomains</key>
<array/>
<key>NSPrivacyCollectedDataTypes</key>
<array>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeOtherDiagnosticData</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeCoarseLocation</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypePreciseLocation</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<false/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
</array>
<key>NSPrivacyTracking</key>
<false/>
</dict>
</plist>
14 changes: 14 additions & 0 deletions Sources/MapboxSearchUI/Resources/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?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/>
<key>NSPrivacyTrackingDomains</key>
<array/>
<key>NSPrivacyCollectedDataTypes</key>
<array/>
<key>NSPrivacyTracking</key>
<false/>
</dict>
</plist>
1 change: 0 additions & 1 deletion Sources/MapboxSearchUI/SearchHistoryTableViewSource.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import CoreLocation
import MapboxSearch
import UIKit

Expand Down

0 comments on commit 1bd33bf

Please sign in to comment.