Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions QUICKCONNECT.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,10 @@ reconciler (the shared tunnel intent, section 3). The July draft in
else, so `widgets/Assets.xcassets/gen_connector_symbols.py` rebuilds the
connector mark analytically (a 128-unit square whose corners are five
quarter-circle arcs of radius 8, alternating convex/concave) and emits two
Template v7 symbol SVGs with the interpolation sources Ultralight-S,
Regular-S, Black-S and Regular-M. The outline variant is a true filled ring
Template v6 symbol SVGs (SF Symbols 6 / Xcode 16 -- CI pins Xcode 16.4 and
its actool rejects a newer template outright) with the interpolation
sources Ultralight-S, Regular-S, Black-S and Regular-M. The outline
variant is a true filled ring
(lines inset by w, convex arcs shrunk to 8−w, concave arcs grown to 8+w),
because symbols must be path-based, not stroked. `actool` validates both.
- **State** (`ControlValueProvider.currentValue`): the app's configuration is
Expand Down
10 changes: 10 additions & 0 deletions app/network/Shared/Widgets/WidgetRefresh.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,20 @@ enum WidgetRefresh {

/// The Control Center / Lock Screen / Action button toggle (iOS 18,
/// macOS 26). A no-op on earlier systems.
///
/// iOS only at compile time: `ControlCenter` is a macOS 26 symbol, so it
/// is simply absent from the macOS 15 SDK the CI toolchain (Xcode 16.4)
/// builds against, and the `#available` check below cannot help — that is
/// a runtime test, and the declaration has to exist to compile at all.
/// The control ships on iOS only in practice, so on macOS this is a no-op
/// rather than a missing method: `reloadAll()` and the app, tunnel
/// extension and widget targets that call it all still build.
static func reloadControl() {
#if os(iOS)
if #available(iOS 18.0, macOS 26.0, *) {
ControlCenter.shared.reloadControls(ofKind: WidgetKinds.quickConnectControl)
}
#endif
}

static func reloadDashboard() {
Expand Down
45 changes: 32 additions & 13 deletions app/widgets/Assets.xcassets/gen_connector_symbols.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@
produce true outline rings per weight (lines shift by w, convex arcs shrink to
8-w, concave arcs grow to 8+w; tangency is preserved).

Output: two symbol template SVGs (Template v.7.0 layout, as exported by the
SF Symbols app) with the interpolation sources Ultralight-S, Regular-S,
Black-S plus Regular-M.
Output: two symbol template SVGs (Template v.6.0, i.e. SF Symbols 6 / Xcode
16) with the interpolation sources Ultralight-S, Regular-S, Black-S plus
Regular-M.

The version has to stay at 6.0: CI pins Xcode 16.4, and its actool rejects a
newer template outright -- "Template format 7.0 is newer than the version that
this software supports (6.0)" -- before it reads any of the artwork. The SF
Symbols app on a current machine exports 7.0, so if you re-export from it,
re-apply the 6.0 changes here rather than committing its output.
"""
import math
import os
Expand Down Expand Up @@ -133,7 +139,9 @@ def glyph(size, inset, y_center):
return d


# Template geometry copied from an SF Symbols app v7 export (viewBox 3300x2200).
# Artboard geometry as exported by the SF Symbols app (viewBox 3300x2200).
# Only the version banner and the v7-only style metadata (see STYLE below)
# were changed to target 6.0; these coordinates are left exactly as exported.
BASELINE = {"S": 696.0, "M": 1126.0, "L": 1556.0}
CAPLINE = {"S": 625.541, "M": 1055.54, "L": 1485.54}
CAP_HEIGHT = BASELINE["M"] - CAPLINE["M"] # 70.46
Expand All @@ -150,13 +158,24 @@ def glyph(size, inset, y_center):
H_REFERENCE = ("M0.7 0L0.7-70.5L11.4-70.5L11.4-40.7L44.8-40.7L44.8-70.5L55.5-70.5L55.5 0"
"L44.8 0L44.8-31.8L11.4-31.8L11.4 0Z")

STYLE = """.defaults {-sfsymbols-variable-value-mode:color;-sfsymbols-draw-reverses-motion-groups:true}

.monochrome-0 {-sfsymbols-motion-group:0;-sfsymbols-layer-tags:564789760d3a318d}

.multicolor-0:tintColor {-sfsymbols-motion-group:0;-sfsymbols-layer-tags:564789760d3a318d}

.hierarchical-0:primary {-sfsymbols-motion-group:0;-sfsymbols-layer-tags:564789760d3a318d}
# Style block for a 6.0 template. The four -sfsymbols-* properties a v7 export
# writes here are all v7 vocabulary and are omitted: -sfsymbols-motion-group and
# -sfsymbols-draw-reverses-motion-groups configure the SF Symbols 7 Draw
# animation, -sfsymbols-layer-tags is v7's per-layer identity token, and
# -sfsymbols-variable-value-mode selects between color and draw as the thing
# variable value drives, which is only a choice once draw exists. None of the
# four does anything for this symbol -- it is a single static layer with no
# variable value and no Draw animation -- so dropping them costs nothing.
#
# The three layer classes stay, with empty bodies: they are what each path's
# class attribute binds to, naming the monochrome / hierarchical / multicolor
# layers. .defaults goes entirely -- it carried nothing but the two v7
# document-level properties.
STYLE = """.monochrome-0 {}

.multicolor-0:tintColor {}

.hierarchical-0:primary {}

.SFSymbolsPreviewWireframe {fill:none;opacity:1.0;stroke:black;stroke-width:0.5}
"""
Expand Down Expand Up @@ -210,8 +229,8 @@ def template(name, outline):
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 559.711 322)">Ultralight</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 1449.84 322)">Regular</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 2933.4 322)">Black</text>
<text id="template-version" style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:end;" transform="matrix(1 0 0 1 3036 1933)">Template v.7.0</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:end;" transform="matrix(1 0 0 1 3036 1951)">Requires Xcode 26 or greater</text>
<text id="template-version" style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:end;" transform="matrix(1 0 0 1 3036 1933)">Template v.6.0</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:end;" transform="matrix(1 0 0 1 3036 1951)">Requires Xcode 16 or greater</text>
<text id="descriptive-name" style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:end;" transform="matrix(1 0 0 1 3036 1969)">Generated from %s</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:end;" transform="matrix(1 0 0 1 3036 1987)">Typeset at 100.0 points</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 726)">Small</text>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions app/widgets/Control/QuickConnectControl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@
// connected/disconnected value text.
//

// iOS only at compile time: ControlWidget, StaticControlConfiguration,
// ControlWidgetToggle and ControlValueProvider are macOS 26 symbols, absent
// from the macOS 15 SDK that the CI toolchain (Xcode 16.4) builds against.
// The `@available` annotations below stay because they are still the correct
// runtime guard on iOS; only the compile-time platform test can keep the
// macOS leg from needing declarations its SDK does not have.
//

#if os(iOS)

import AppIntents
import SwiftUI
import WidgetKit
Expand Down Expand Up @@ -79,3 +89,5 @@ extension QuickConnectControl {
}
}
}

#endif
6 changes: 6 additions & 0 deletions app/widgets/URnetworkWidgets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,14 @@ struct URnetworkWidgetBundle: WidgetBundle {
DashboardWidget()
ProviderGlobeWidget()
ContractsWidget()
// iOS only at compile time: the control's WidgetKit types are
// macOS 26 symbols and are absent from the macOS 15 SDK CI builds
// against, so QuickConnectControl itself is not compiled there. The
// macOS bundle is still valid, with the three Home Screen widgets.
#if os(iOS)
if #available(iOS 18.0, macOS 26.0, *) {
QuickConnectControl()
}
#endif
}
}
Loading