Skip to content

Commit

Permalink
[iOS] supply AppPrivacy manifest via .podspec resource_files configur…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
christocracy committed Mar 28, 2024
1 parent 9825414 commit edc2ad3
Show file tree
Hide file tree
Showing 36 changed files with 2,031 additions and 42 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# CHANGELOG

## 4.15.1 — 2024-03-20
* [iOS] Move PrivacyInfo -> TSLocationManager.framework
## 4.15.1 — 2024-03-27
* [iOS] Add PrivacyInfo -> TSLocationManager.xcframework
* [iOS] codesign TSLocationManager.xcframework
* [iOS] Update `CocoaLumberjack` version -> `3.8.5` (version which includes its own `PrivacyInfo`)
.
## 4.15.0 — 2024-03-19
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e3d385acf2d12b6b91329a5f394d9531
c30704a378a2840b2ba6f8b6dac58d8a
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3ea77566b3f15963f39057bc083529fdc4d39cd4
fc1c1d2ca59ff2c2b3e4b62a4ddb4cfc1e80170f
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0971fa90e5260c85d040cf09ddfd19cae0297bebc97625765a677c8fbd2f59e7
a4544983be563ad9cd152b20a5a1b74f8d637728d0ada5ee4e9b14af05e6daa5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1a947fcd13c911d1cbb144ee9337964e732a5677c8f6910f45c8af56fe2f89162739266a0fda626c7591ecffe1d0a4c741afa281c40a64a09a2b7ad26235cd48
19ab7d57d009b7162653091216f8d27250d6170d15f418b521d23c7aab386dd90abc4f7404069642ee0f18c5e3f2392df1df396e5f211035f2074e7996f224f8
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
<version>3.5.3</version>
<version>3.5.4</version>
</versions>
<lastUpdated>20240320010615</lastUpdated>
<lastUpdated>20240325201713</lastUpdated>
</versioning>
</metadata>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6598f22abd8bc5cecea9b5b2c87ebd4f
f81ee76d1a10b183a18852b29aeb8d51
Original file line number Diff line number Diff line change
@@ -1 +1 @@
76debc7f1489446d3ca2cc0e013a6bc4497a5dd3
0aa06143f2f1057882c48fc7930cc86f12f541d3
Original file line number Diff line number Diff line change
@@ -1 +1 @@
880b9defc76a46181bc3f287a9ed87035913725d0a83a629132f7904f9e64b5d
7ef59e7f8081741f788288ed0e03f1755da7af3d461ea236255a590c0d5bc8e0
Original file line number Diff line number Diff line change
@@ -1 +1 @@
64731b53b3800186eb47d0a95c8bd59c053e248d34db6c56d9627d6c9f4970081f01bb8f099ec7a88cd5622ef899871fe13e491b1e738a357a9841b419ed6d35
123a74a3149292661ee1efc48f1d31b24d8c1a3cbf5f5390b05cdd67ea12f22d6c4f338b7d5834a15a7bb05aa9f75df75b71a1312d4ebe0763598b83f685f7a2
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
<version>3.5.3</version>
<version>3.5.4</version>
</versions>
<lastUpdated>20240320010615</lastUpdated>
<lastUpdated>20240325201713</lastUpdated>
</versioning>
</metadata>
20 changes: 10 additions & 10 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
PODS:
- background_fetch (1.2.1):
- background_fetch (1.3.2):
- Flutter
- CocoaLumberjack (3.7.4):
- CocoaLumberjack/Core (= 3.7.4)
- CocoaLumberjack/Core (3.7.4)
- CocoaLumberjack (3.8.5):
- CocoaLumberjack/Core (= 3.8.5)
- CocoaLumberjack/Core (3.8.5)
- Flutter (1.0.0)
- flutter_background_geolocation (4.15.0):
- CocoaLumberjack (~> 3.7.2)
- flutter_background_geolocation (4.15.1):
- CocoaLumberjack (~> 3.8.5)
- Flutter
- shared_preferences_foundation (0.0.1):
- Flutter
Expand Down Expand Up @@ -38,11 +38,11 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/url_launcher_ios/ios"

SPEC CHECKSUMS:
background_fetch: 896944864b038d2837fc750d470e9841e1e6a363
CocoaLumberjack: 543c79c114dadc3b1aba95641d8738b06b05b646
background_fetch: 2319bf7e18237b4b269430b7f14d177c0df09c5a
CocoaLumberjack: 6a459bc897d6d80bd1b8c78482ec7ad05dffc3f0
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_background_geolocation: f37bbe663b15b88521dd60372abf8deabb610f63
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
flutter_background_geolocation: c6200425adf092ce27df5dd1c1bfe478549f7dfa
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
url_launcher_ios: 6116280ddcfe98ab8820085d8d76ae7449447586

PODFILE CHECKSUM: cf0c950f7e9a456b4e325f5b8fc0f98906a3705a
Expand Down
55 changes: 55 additions & 0 deletions example/ios/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?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">
<!--
PrivacyInfo.xcprivacy
TSLocationManager
Created by Christopher Scott on 2024-03-20.
Copyright (c) 2024 Christopher Scott. All rights reserved.
-->
<plist version="1.0">
<dict>
<key>NSPrivacyTrackingDomains</key>
<array/>

<key>NSPrivacyAccessedAPITypes</key>
<array>
<!-- background-fetch & background-geolocation -->
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>

<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
<string>1C8F.1</string>
</array>
</dict>
<!-- CocoaLumberjack (required by background-geolocation) -->
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
<string>0A2A.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>E174.1</string>
</array>
</dict>

</array>

<key>NSPrivacyCollectedDataTypes</key>
<array/>

<key>NSPrivacyTracking</key>
<false/>
</dict>
</plist>
18 changes: 14 additions & 4 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
67B3CEE91CA97466B4DAA9A7 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F4FB182D63BCD68900007F3D /* libPods-Runner.a */; };
836774E82BB453EA006FB1B2 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 836774E72BB453EA006FB1B2 /* PrivacyInfo.xcprivacy */; };
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
Expand Down Expand Up @@ -37,6 +38,7 @@
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
836774E72BB453EA006FB1B2 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
97C146EE1CF9000F007C117D /* BG Geo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "BG Geo.app"; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -85,6 +87,7 @@
97C146E51CF9000F007C117D = {
isa = PBXGroup;
children = (
836774E72BB453EA006FB1B2 /* PrivacyInfo.xcprivacy */,
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
Expand Down Expand Up @@ -203,6 +206,7 @@
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
836774E82BB453EA006FB1B2 /* PrivacyInfo.xcprivacy in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -217,12 +221,18 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/flutter_background_geolocation/TSLocationManager.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/CocoaLumberjack/CocoaLumberjackPrivacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/background_fetch/TSBackgroundFetch.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/flutter_background_geolocation/TSLocationManagerPrivacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/shared_preferences_foundation/shared_preferences_foundation_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/url_launcher_ios/url_launcher_ios_privacy.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TSLocationManager.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/CocoaLumberjackPrivacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TSBackgroundFetch.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TSLocationManagerPrivacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/shared_preferences_foundation_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/url_launcher_ios_privacy.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -461,7 +471,7 @@
"-framework",
"\"TSLocationManager\"",
);
PRODUCT_BUNDLE_IDENTIFIER = com.transistorsoft.flutterBackgroundGeolocationExample;
PRODUCT_BUNDLE_IDENTIFIER = com.transistorsoft.flutter.demo;
PRODUCT_NAME = "BG Geo";
PROVISIONING_PROFILE_SPECIFIER = "";
VERSIONING_SYSTEM = "apple-generic";
Expand Down Expand Up @@ -509,7 +519,7 @@
"-framework",
"\"TSLocationManager\"",
);
PRODUCT_BUNDLE_IDENTIFIER = com.transistorsoft.flutterBackgroundGeolocationExample;
PRODUCT_BUNDLE_IDENTIFIER = com.transistorsoft.flutter.demo;
PRODUCT_NAME = "BG Geo";
PROVISIONING_PROFILE_SPECIFIER = "";
VERSIONING_SYSTEM = "apple-generic";
Expand Down
4 changes: 2 additions & 2 deletions example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
<string>[CHANGEME] When in use</string>
<key>NSMotionUsageDescription</key>
<string>[CHANGEME] Motion always</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
Expand All @@ -70,7 +72,5 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>
4 changes: 4 additions & 0 deletions example/lib/advanced/home_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ class HomeViewState extends State<HomeView> with TickerProviderStateMixin<HomeVi
bg.BackgroundGeolocation.onEnabledChange(_onEnabledChange);
bg.BackgroundGeolocation.onNotificationAction(_onNotificationAction);

bg.BackgroundGeolocation.onAuthorization((bg.AuthorizationEvent event) {
print("********************** Authorization: $event");
});

bg.TransistorAuthorizationToken token = await bg.TransistorAuthorizationToken.findOrCreate(orgname, username, ENV.TRACKER_HOST);

// 2. Configure the plugin
Expand Down
35 changes: 35 additions & 0 deletions ios/Resources/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?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">
<!--
PrivacyInfo.xcprivacy
TSLocationManager
Created by Christopher Scott on 2024-03-20.
Copyright (c) 2024 Christopher Scott. All rights reserved.
-->
<plist version="1.0">
<dict>
<key>NSPrivacyTrackingDomains</key>
<array/>

<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>

<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
<string>1C8F.1</string>
</array>
</dict>
</array>

<key>NSPrivacyCollectedDataTypes</key>
<array/>

<key>NSPrivacyTracking</key>
<false/>
</dict>
</plist>
10 changes: 5 additions & 5 deletions ios/TSLocationManager.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,32 @@
<key>BinaryPath</key>
<string>TSLocationManager.framework/TSLocationManager</string>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>TSLocationManager.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>TSLocationManager.framework/TSLocationManager</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>TSLocationManager.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit edc2ad3

Please sign in to comment.