Phase 4.A.1: Live Activity + Dynamic Island für laufende Gassi-Tour

Neues Widget-Extension-Target BanYaroGoWidgetExtension:
- Bundle-ID app.banyaro.ios.BanYaroGoWidget
- NSExtensionPointIdentifier = com.apple.widgetkit-extension
- Synced root group + explizite Info.plist + Embed-Phase in App-Target
- Cross-Membership der Shared/WalkActivityAttributes.swift in beiden Targets

Shared/WalkActivityAttributes.swift:
- ActivityAttributes mit startedAt (fix)
- ContentState mit distanceMeters, elapsedSeconds, pointCount, isPaused, isAutoPaused

BanYaroGoWidget/WalkLiveActivity.swift:
- Lock-Screen-View: Pfote-Icon + Status-Pille (Live/Pause/Auto-Pause) +
  Stats-Spalten (Distanz/Dauer/Punkte)
- Dynamic Island compact: Pfote leading, Distanz trailing
- Dynamic Island minimal: nur Pfote
- Dynamic Island expanded: Distanz/Dauer/Status mit Pfote zentriert

WalkActivityController:
- @MainActor Facade um ActivityKit
- start() prüft areActivitiesEnabled, killt orphaned current, request mit Initial-State
- update() async via Task
- end() mit dismissalPolicy.immediate

TrackingView:
- .onChange(of: tracker.isTracking) → Start/End
- persistTicker (5s) → update
- .onChange(of: tracker.isPaused/isAutoPaused) → sofort update für saubere UX

BanYaroGo-Info.plist: NSSupportsLiveActivities = true
This commit is contained in:
rene 2026-05-30 11:35:43 +02:00
parent fec7c79b05
commit 500a645bfd
8 changed files with 458 additions and 0 deletions

View file

@ -6,12 +6,46 @@
objectVersion = 70;
objects = {
/* Begin PBXBuildFile section */
BB0000000000000000000010 /* WalkActivityAttributes.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB0000000000000000000001 /* WalkActivityAttributes.swift */; };
BB0000000000000000000011 /* WalkActivityAttributes.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB0000000000000000000001 /* WalkActivityAttributes.swift */; };
BB0000000000000000000012 /* BanYaroGoWidgetExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = BB0000000000000000000005 /* BanYaroGoWidgetExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
BB0000000000000000000041 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = AA0000000000000000000001 /* Project object */;
proxyType = 1;
remoteGlobalIDString = BB0000000000000000000020;
remoteInfo = BanYaroGoWidgetExtension;
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
BB0000000000000000000024 /* Embed Foundation Extensions */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 13;
files = (
BB0000000000000000000012 /* BanYaroGoWidgetExtension.appex in Embed Foundation Extensions */,
);
name = "Embed Foundation Extensions";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
AA0000000000000000000005 /* BanYaroGo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BanYaroGo.app; sourceTree = BUILT_PRODUCTS_DIR; };
BB0000000000000000000001 /* WalkActivityAttributes.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WalkActivityAttributes.swift; sourceTree = "<group>"; };
BB0000000000000000000003 /* BanYaroGoWidget-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "BanYaroGoWidget-Info.plist"; sourceTree = "<group>"; };
BB0000000000000000000005 /* BanYaroGoWidgetExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = BanYaroGoWidgetExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFileSystemSynchronizedRootGroup section */
AA0000000000000000000006 /* BanYaroGo */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = BanYaroGo; sourceTree = "<group>"; };
BB0000000000000000000002 /* BanYaroGoWidget */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = BanYaroGoWidget; sourceTree = "<group>"; };
/* End PBXFileSystemSynchronizedRootGroup section */
/* Begin PBXFrameworksBuildPhase section */
@ -22,13 +56,23 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
BB0000000000000000000022 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
AA0000000000000000000002 = {
isa = PBXGroup;
children = (
BB0000000000000000000006 /* Shared */,
AA0000000000000000000006 /* BanYaroGo */,
BB0000000000000000000002 /* BanYaroGoWidget */,
BB0000000000000000000003 /* BanYaroGoWidget-Info.plist */,
AA0000000000000000000003 /* Products */,
);
sourceTree = "<group>";
@ -37,10 +81,19 @@
isa = PBXGroup;
children = (
AA0000000000000000000005 /* BanYaroGo.app */,
BB0000000000000000000005 /* BanYaroGoWidgetExtension.appex */,
);
name = Products;
sourceTree = "<group>";
};
BB0000000000000000000006 /* Shared */ = {
isa = PBXGroup;
children = (
BB0000000000000000000001 /* WalkActivityAttributes.swift */,
);
path = Shared;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@ -51,10 +104,12 @@
AA000000000000000000000D /* Sources */,
AA000000000000000000000E /* Frameworks */,
AA000000000000000000000F /* Resources */,
BB0000000000000000000024 /* Embed Foundation Extensions */,
);
buildRules = (
);
dependencies = (
BB0000000000000000000040 /* PBXTargetDependency */,
);
fileSystemSynchronizedGroups = (
AA0000000000000000000006 /* BanYaroGo */,
@ -64,6 +119,26 @@
productReference = AA0000000000000000000005 /* BanYaroGo.app */;
productType = "com.apple.product-type.application";
};
BB0000000000000000000020 /* BanYaroGoWidgetExtension */ = {
isa = PBXNativeTarget;
buildConfigurationList = BB0000000000000000000030 /* Build configuration list for PBXNativeTarget "BanYaroGoWidgetExtension" */;
buildPhases = (
BB0000000000000000000021 /* Sources */,
BB0000000000000000000022 /* Frameworks */,
BB0000000000000000000023 /* Resources */,
);
buildRules = (
);
dependencies = (
);
fileSystemSynchronizedGroups = (
BB0000000000000000000002 /* BanYaroGoWidget */,
);
name = BanYaroGoWidgetExtension;
productName = BanYaroGoWidgetExtension;
productReference = BB0000000000000000000005 /* BanYaroGoWidgetExtension.appex */;
productType = "com.apple.product-type.app-extension";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
@ -77,6 +152,9 @@
AA0000000000000000000004 = {
CreatedOnToolsVersion = 26.5;
};
BB0000000000000000000020 = {
CreatedOnToolsVersion = 26.5;
};
};
};
buildConfigurationList = AA0000000000000000000007 /* Build configuration list for PBXProject "BanYaroGo" */;
@ -93,6 +171,7 @@
projectRoot = "";
targets = (
AA0000000000000000000004 /* BanYaroGo */,
BB0000000000000000000020 /* BanYaroGoWidgetExtension */,
);
};
/* End PBXProject section */
@ -105,6 +184,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
BB0000000000000000000023 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@ -112,11 +198,28 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
BB0000000000000000000010 /* WalkActivityAttributes.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
BB0000000000000000000021 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
BB0000000000000000000011 /* WalkActivityAttributes.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
BB0000000000000000000040 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = BB0000000000000000000020 /* BanYaroGoWidgetExtension */;
targetProxy = BB0000000000000000000041 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
AA0000000000000000000009 /* Debug */ = {
isa = XCBuildConfiguration;
@ -285,6 +388,55 @@
};
name = Release;
};
BB0000000000000000000031 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = H436BR6YWX;
GENERATE_INFOPLIST_FILE = NO;
INFOPLIST_FILE = "BanYaroGoWidget-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = app.banyaro.ios.BanYaroGoWidget;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
BB0000000000000000000032 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = H436BR6YWX;
GENERATE_INFOPLIST_FILE = NO;
INFOPLIST_FILE = "BanYaroGoWidget-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = app.banyaro.ios.BanYaroGoWidget;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
@ -306,6 +458,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
BB0000000000000000000030 /* Build configuration list for PBXNativeTarget "BanYaroGoWidgetExtension" */ = {
isa = XCConfigurationList;
buildConfigurations = (
BB0000000000000000000031 /* Debug */,
BB0000000000000000000032 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = AA0000000000000000000001 /* Project object */;