Skip to content

Commit c5bb4a0

Browse files
committed
minor macOS 26 UI updates
1 parent a4abed8 commit c5bb4a0

File tree

7 files changed

+33
-17
lines changed

7 files changed

+33
-17
lines changed

.github/workflows/swift.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
jobs:
1313
build:
1414

15-
runs-on: macos-15
15+
runs-on: macos-latest
1616

1717
steps:
1818
- uses: maxim-lobanov/setup-xcode@v1

DIExample.xcodeproj/project.pbxproj

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@
311311
attributes = {
312312
BuildIndependentTargetsInParallel = 1;
313313
LastSwiftUpdateCheck = 1400;
314-
LastUpgradeCheck = 1630;
314+
LastUpgradeCheck = 2620;
315315
TargetAttributes = {
316316
8FE4F1C62888596700CF32A3 = {
317317
CreatedOnToolsVersion = 14.0;
@@ -496,6 +496,7 @@
496496
MTL_FAST_MATH = YES;
497497
ONLY_ACTIVE_ARCH = YES;
498498
SDKROOT = macosx;
499+
STRING_CATALOG_GENERATE_SYMBOLS = YES;
499500
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
500501
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
501502
SWIFT_STRICT_CONCURRENCY = complete;
@@ -567,6 +568,7 @@
567568
MTL_ENABLE_DEBUG_INFO = NO;
568569
MTL_FAST_MATH = YES;
569570
SDKROOT = macosx;
571+
STRING_CATALOG_GENERATE_SYMBOLS = YES;
570572
SWIFT_COMPILATION_MODE = wholemodule;
571573
SWIFT_OPTIMIZATION_LEVEL = "-O";
572574
SWIFT_STRICT_CONCURRENCY = complete;
@@ -598,14 +600,18 @@
598600
DEAD_CODE_STRIPPING = YES;
599601
DEVELOPMENT_ASSET_PATHS = "\"DIExample/Preview Content\"";
600602
DEVELOPMENT_TEAM = "";
603+
ENABLE_APP_SANDBOX = YES;
601604
ENABLE_HARDENED_RUNTIME = YES;
605+
ENABLE_OUTGOING_NETWORK_CONNECTIONS = YES;
602606
ENABLE_PREVIEWS = YES;
607+
ENABLE_USER_SELECTED_FILES = readonly;
603608
GENERATE_INFOPLIST_FILE = YES;
604609
INFOPLIST_KEY_NSHumanReadableCopyright = "";
605610
LD_RUNPATH_SEARCH_PATHS = (
606611
"$(inherited)",
607612
"@executable_path/../Frameworks",
608613
);
614+
MACOSX_DEPLOYMENT_TARGET = 15.6;
609615
MARKETING_VERSION = 1.0;
610616
PRODUCT_BUNDLE_IDENTIFIER = com.jamf.DIExample;
611617
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -625,14 +631,18 @@
625631
DEAD_CODE_STRIPPING = YES;
626632
DEVELOPMENT_ASSET_PATHS = "\"DIExample/Preview Content\"";
627633
DEVELOPMENT_TEAM = "";
634+
ENABLE_APP_SANDBOX = YES;
628635
ENABLE_HARDENED_RUNTIME = YES;
636+
ENABLE_OUTGOING_NETWORK_CONNECTIONS = YES;
629637
ENABLE_PREVIEWS = YES;
638+
ENABLE_USER_SELECTED_FILES = readonly;
630639
GENERATE_INFOPLIST_FILE = YES;
631640
INFOPLIST_KEY_NSHumanReadableCopyright = "";
632641
LD_RUNPATH_SEARCH_PATHS = (
633642
"$(inherited)",
634643
"@executable_path/../Frameworks",
635644
);
645+
MACOSX_DEPLOYMENT_TARGET = 15.6;
636646
MARKETING_VERSION = 1.0;
637647
PRODUCT_BUNDLE_IDENTIFIER = com.jamf.DIExample;
638648
PRODUCT_NAME = "$(TARGET_NAME)";

DIExample.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DIExample.xcodeproj/xcshareddata/xcschemes/DIExample.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1630"
3+
LastUpgradeVersion = "2620"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

DIExample/DIExample.entitlements

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
4-
<dict>
5-
<key>com.apple.security.app-sandbox</key>
6-
<true/>
7-
<key>com.apple.security.files.user-selected.read-only</key>
8-
<true/>
9-
<key>com.apple.security.network.client</key>
10-
<true/>
11-
</dict>
4+
<dict/>
125
</plist>

DIExample/Posts14/PostListView14.swift

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,11 @@ struct PostListView14: View {
4242
.navigationTitle("Posts14")
4343
.toolbar {
4444
ToolbarItem(placement: .automatic) {
45-
Text("\(viewModel.secondsSinceLastRefresh)")
45+
Text("\(viewModel.secondsSinceLastRefresh, format: .number)")
46+
.fontDesign(.monospaced)
4647
}
48+
.hideSharedBackgroundIfAvailable()
49+
4750
ToolbarItem(placement: .automatic) {
4851
Button {
4952
viewModel.refresh()
@@ -61,6 +64,16 @@ struct PostListView14: View {
6164
}
6265
}
6366

67+
extension ToolbarContent {
68+
@ToolbarContentBuilder func hideSharedBackgroundIfAvailable() -> some ToolbarContent {
69+
if #available(macOS 26.0, *) {
70+
sharedBackgroundVisibility(.hidden)
71+
} else {
72+
self
73+
}
74+
}
75+
}
76+
6477
#if DEBUG
6578
import Combine
6679
import Factory

DIExampleTests/PostListViewModelTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ final class PostListViewModelTests: XCTestCase {
9898
}
9999

100100
@MainActor func testViewModelError() async throws {
101-
class MockTypicodeError: MockTypicode {
101+
class MockTypicodeError: MockTypicode, @unchecked Sendable {
102102
enum MockError: Error {
103103
case mockError
104104
}

0 commit comments

Comments
 (0)