Raise deployment target to iOS 26.0; enable CarPlay Live Activity
- IPHONEOS_DEPLOYMENT_TARGET 17.0 -> 26.0 (iPhone 11+, Apple's current floor) - Widget CarPlay disfavor is now unconditional (no #available guard) - Live Activity gains supplementalActivityFamilies([.small]) so it renders in the car's small slot on CarPlay Ultra (display-only: FuelBoard has no CarPlay entitlement, car taps can't launch anything)
This commit is contained in:
@@ -251,7 +251,7 @@
|
|||||||
"DEBUG=1",
|
"DEBUG=1",
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
);
|
);
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 26.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
@@ -276,7 +276,7 @@
|
|||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
GCC_NO_COMMON_BLOCKS = YES;
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 26.0;
|
||||||
MTL_ENABLE_DEBUG_INFO = NO;
|
MTL_ENABLE_DEBUG_INFO = NO;
|
||||||
SDKROOT = iphoneos;
|
SDKROOT = iphoneos;
|
||||||
SWIFT_COMPILATION_MODE = wholemodule;
|
SWIFT_COMPILATION_MODE = wholemodule;
|
||||||
|
|||||||
@@ -10,7 +10,10 @@ import WidgetKit
|
|||||||
|
|
||||||
/// The Live Activity itself — registered in the widget bundle alongside the
|
/// The Live Activity itself — registered in the widget bundle alongside the
|
||||||
/// regular price widget. No CarPlay entitlement involved: this renders on the
|
/// regular price widget. No CarPlay entitlement involved: this renders on the
|
||||||
/// Lock Screen, Dynamic Island, and (iOS 26+ / CarPlay Ultra) the car display.
|
/// Lock Screen, Dynamic Island, and the car display (CarPlay Ultra, iOS 26+).
|
||||||
|
/// `.supplementalActivityFamilies([.small])` makes it eligible for the car's
|
||||||
|
/// small Live Activity slot — display-only there (FuelBoard is not a
|
||||||
|
/// CarPlay-enabled app, so car-side taps can't launch anything).
|
||||||
struct FuelBoardLiveActivity: Widget {
|
struct FuelBoardLiveActivity: Widget {
|
||||||
var body: some WidgetConfiguration {
|
var body: some WidgetConfiguration {
|
||||||
ActivityConfiguration(for: FuelBoardLiveActivityAttributes.self) { context in
|
ActivityConfiguration(for: FuelBoardLiveActivityAttributes.self) { context in
|
||||||
@@ -37,6 +40,7 @@ struct FuelBoardLiveActivity: Widget {
|
|||||||
.font(.caption2.bold().monospacedDigit())
|
.font(.caption2.bold().monospacedDigit())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.supplementalActivityFamilies([.small])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,18 +38,9 @@ struct FuelPriceWidget: Widget {
|
|||||||
// CarPlay: mark as disfavored — FuelBoard is not a CarPlay app, so
|
// CarPlay: mark as disfavored — FuelBoard is not a CarPlay app, so
|
||||||
// widget taps there can never launch Maps (Apple only allows a widget
|
// widget taps there can never launch Maps (Apple only allows a widget
|
||||||
// to launch its own app in CarPlay, and only CarPlay-enabled apps).
|
// to launch its own app in CarPlay, and only CarPlay-enabled apps).
|
||||||
// Disfavored = read-only in the car, no dead interaction. The
|
// Disfavored = read-only in the car, no dead interaction.
|
||||||
// locations array is empty below iOS 26 where `.carPlay` doesn't
|
|
||||||
// exist, making the modifier a harmless no-op there.
|
|
||||||
baseConfiguration()
|
baseConfiguration()
|
||||||
.disfavoredLocations(carPlayLocations, for: [.systemSmall])
|
.disfavoredLocations([.carPlay], for: [.systemSmall])
|
||||||
}
|
|
||||||
|
|
||||||
private var carPlayLocations: [WidgetLocation] {
|
|
||||||
if #available(iOS 26.0, *) {
|
|
||||||
return [.carPlay]
|
|
||||||
}
|
|
||||||
return []
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private func baseConfiguration() -> some WidgetConfiguration {
|
private func baseConfiguration() -> some WidgetConfiguration {
|
||||||
|
|||||||
Reference in New Issue
Block a user