T12-T14: platform liveness via geolocator; drop flutter_foreground_task
geolocator_android's ForegroundNotificationConfig raises a service with foregroundServiceType=location and holds a wake lock for as long as the position stream is subscribed, and the plugin declares that service in its own manifest. That covers everything the native TrackingService used a foreground service and a PARTIAL_WAKE_LOCK for, so flutter_foreground_task is gone -- and with it both deprecation warnings that were recorded under T01. Known parity gap for T27: geolocator's notification cannot carry actions, so the native Pause/Resume buttons in the shade are not reproduced. iOS: UIBackgroundModes plus allowBackgroundLocationUpdates keep the isolate and the writer timer alive while updates flow. Two settings matter more than they look -- pauseLocationUpdatesAutomatically is false because CoreLocation does not reliably restart, and activityType is otherNavigation rather than automotiveNavigation, which would snap fixes to the road network and silently falsify the recorded path. Usage strings are specific, not generic. Android deliberately does not request ACCESS_BACKGROUND_LOCATION: a foreground service with a visible notification is exactly the supported case, and asking would trigger the harder "Allow all the time" flow for no benefit. T14 process-death resume is implemented and called at startup, covered by four tests including the 111 km crash-gap guard. Verified by building both platforms and launching on the iOS simulator: Drift opened, Riverpod resolved, restore found no active trip, controls correct. lib/main.dart is a harness so the pipeline can be exercised on hardware before Phase 4 builds screens; T15 replaces it. Phase 3 done: 145 tests passing, analyze clean. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,21 +1,15 @@
|
||||
PODS:
|
||||
- Flutter (1.0.0)
|
||||
- flutter_foreground_task (0.0.1):
|
||||
- Flutter
|
||||
|
||||
DEPENDENCIES:
|
||||
- Flutter (from `Flutter`)
|
||||
- flutter_foreground_task (from `.symlinks/plugins/flutter_foreground_task/ios`)
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
Flutter:
|
||||
:path: Flutter
|
||||
flutter_foreground_task:
|
||||
:path: ".symlinks/plugins/flutter_foreground_task/ios"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Flutter: 71a624a5bc0c04062bf19101d501e466baf2fb47
|
||||
flutter_foreground_task: a159d2c2173b33699ddb3e6c2a067045d7cebb89
|
||||
|
||||
PODFILE CHECKSUM: 3ba3a73b1b12adcf321a227a745625fe0888cc82
|
||||
|
||||
|
||||
@@ -205,7 +205,6 @@
|
||||
97C146EC1CF9000F007C117D /* Resources */,
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||
3501FC32F25039A72E487F54 /* [CP] Embed Pods Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -283,23 +282,6 @@
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
3501FC32F25039A72E487F54 /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
|
||||
@@ -66,5 +66,25 @@
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<!-- Location usage strings.
|
||||
|
||||
Apple Guideline 5.1.1 rejections are most often caused by generic text like
|
||||
"This app needs location". These say specifically what is collected, why, and
|
||||
what the user gets for it. -->
|
||||
<key>NSLocationWhenInUseUsageDescription</key>
|
||||
<string>Rippr records the GPS track of your ride so you can see your route, speed and distance afterwards. Nothing is recorded until you press Start.</string>
|
||||
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
|
||||
<string>Rippr keeps recording your route while your phone is in your pocket or the screen is off, so a ride you started is captured from beginning to end. Recording stops the moment you press Stop.</string>
|
||||
|
||||
<!-- Keeps the process, the Dart isolate and the writer timer alive while location
|
||||
updates are being delivered. Without this the OS suspends the app the moment the
|
||||
screen locks and the ride simply stops being recorded.
|
||||
|
||||
Paired in code with allowBackgroundLocationUpdates and
|
||||
pauseLocationUpdatesAutomatically = false; see geolocator_location_source.dart. -->
|
||||
<key>UIBackgroundModes</key>
|
||||
<array>
|
||||
<string>location</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
Reference in New Issue
Block a user