Skip to content

Commit

Permalink
feat: add macos native support
Browse files Browse the repository at this point in the history
  • Loading branch information
Lakr233 authored and Lessica committed Jan 16, 2024
1 parent 1d4605e commit e7bfc1a
Show file tree
Hide file tree
Showing 61 changed files with 763 additions and 235 deletions.
60 changes: 25 additions & 35 deletions Reveil.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@
0FF1CDBF2AD57109004A6D43 /* NetworkUsage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FF1CDBE2AD57109004A6D43 /* NetworkUsage.swift */; };
0FF356652AEFEE9D0011033A /* ThreadInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FF356642AEFEE9D0011033A /* ThreadInfo.swift */; };
0FF356682AEFF6320011033A /* ThreadState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FF356672AEFF6320011033A /* ThreadState.swift */; };
5024F6EC2B1829EE000CEAB5 /* library_stub.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC7DC28E2AF3EB1300D50EDC /* library_stub.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
5024F6EC2B1829EE000CEAB5 /* library_stub.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CC7DC28E2AF3EB1300D50EDC /* library_stub.framework */; settings = {ATTRIBUTES = (Required, ); }; };
5024F6ED2B1829EE000CEAB5 /* library_stub.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = CC7DC28E2AF3EB1300D50EDC /* library_stub.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
503DF9C32B55934A0034F760 /* ArgumentParser in Frameworks */ = {isa = PBXBuildFile; productRef = 503DF9C22B55934A0034F760 /* ArgumentParser */; };
503DF9DF2B5596AD0034F760 /* Color.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 503DF9DE2B5596AD0034F760 /* Color.xcassets */; };
504B8C632B40243C00AABC12 /* AnimatedText.swift in Sources */ = {isa = PBXBuildFile; fileRef = 504B8C622B40243C00AABC12 /* AnimatedText.swift */; };
504B8C652B4033F600AABC12 /* ColorfulBackground.swift in Sources */ = {isa = PBXBuildFile; fileRef = 504B8C642B4033F600AABC12 /* ColorfulBackground.swift */; };
50E143102B400C6F000A7191 /* View+Brand.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50E1430F2B400C6F000A7191 /* View+Brand.swift */; };
Expand Down Expand Up @@ -135,10 +136,7 @@
CC9D24A92B3D97D200A18513 /* FileIntegrityCheck.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCA095FB2AEE22B300F5E55F /* FileIntegrityCheck.swift */; };
CC9D24AA2B3D97E300A18513 /* Explainable.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCA095FE2AEE22CE00F5E55F /* Explainable.swift */; };
CC9D24AB2B3D97EA00A18513 /* IntegrityCheckerTarget.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCA096042AEE239300F5E55F /* IntegrityCheckerTarget.swift */; };
CCA0954E2AE786CF00F5E55F /* QuickLook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CCA0954D2AE786CF00F5E55F /* QuickLook.framework */; };
CCA0956D2AE8D5E900F5E55F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CCA0956C2AE8D5E900F5E55F /* UIKit.framework */; };
CCA0956F2AE8D5EE00F5E55F /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CCA0956E2AE8D5EE00F5E55F /* SwiftUI.framework */; };
CCA095CC2AE8E6D100F5E55F /* Color+Platform.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCA095CB2AE8E6D100F5E55F /* Color+Platform.swift */; };
CCA095CC2AE8E6D100F5E55F /* Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCA095CB2AE8E6D100F5E55F /* Color.swift */; };
CCA095DF2AED419B00F5E55F /* JailbreakChecker.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCA095D32AED419A00F5E55F /* JailbreakChecker.swift */; };
CCA095E12AED419B00F5E55F /* ProxyChecker.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCA095D42AED419A00F5E55F /* ProxyChecker.swift */; };
CCA095E32AED419B00F5E55F /* ReverseEngineeringToolsChecker.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCA095D52AED419A00F5E55F /* ReverseEngineeringToolsChecker.swift */; };
Expand Down Expand Up @@ -237,6 +235,7 @@
0FF356642AEFEE9D0011033A /* ThreadInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThreadInfo.swift; sourceTree = "<group>"; };
0FF356672AEFF6320011033A /* ThreadState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThreadState.swift; sourceTree = "<group>"; };
5028D8B22AE7628E008D4294 /* Reveil.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Reveil.entitlements; sourceTree = "<group>"; };
503DF9DE2B5596AD0034F760 /* Color.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Color.xcassets; sourceTree = "<group>"; };
504B8C622B40243C00AABC12 /* AnimatedText.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimatedText.swift; sourceTree = "<group>"; };
504B8C642B4033F600AABC12 /* ColorfulBackground.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorfulBackground.swift; sourceTree = "<group>"; };
50E1430F2B400C6F000A7191 /* View+Brand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "View+Brand.swift"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -326,7 +325,7 @@
CCA0956E2AE8D5EE00F5E55F /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/System/iOSSupport/System/Library/Frameworks/SwiftUI.framework; sourceTree = DEVELOPER_DIR; };
CCA095702AE8D5F600F5E55F /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/System/Library/Frameworks/AppKit.framework; sourceTree = DEVELOPER_DIR; };
CCA095722AE8D5FA00F5E55F /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/System/Library/Frameworks/SwiftUI.framework; sourceTree = DEVELOPER_DIR; };
CCA095CB2AE8E6D100F5E55F /* Color+Platform.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Color+Platform.swift"; sourceTree = "<group>"; };
CCA095CB2AE8E6D100F5E55F /* Color.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Color.swift; sourceTree = "<group>"; };
CCA095D32AED419A00F5E55F /* JailbreakChecker.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JailbreakChecker.swift; sourceTree = "<group>"; };
CCA095D42AED419A00F5E55F /* ProxyChecker.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ProxyChecker.swift; sourceTree = "<group>"; };
CCA095D52AED419A00F5E55F /* ReverseEngineeringToolsChecker.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReverseEngineeringToolsChecker.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -369,12 +368,9 @@
files = (
CCD54D2C2AD9047D007ED1AF /* Collections in Frameworks */,
CC77C7B62B526EBB00FAB4E3 /* ColorfulX in Frameworks */,
CCA0956D2AE8D5E900F5E55F /* UIKit.framework in Frameworks */,
CCD54D2E2AD9047D007ED1AF /* DequeModule in Frameworks */,
5024F6EC2B1829EE000CEAB5 /* library_stub.framework in Frameworks */,
CCA0956F2AE8D5EE00F5E55F /* SwiftUI.framework in Frameworks */,
0F08193D2ADAF1C600BB626C /* DictionaryCoder in Frameworks */,
CCA0954E2AE786CF00F5E55F /* QuickLook.framework in Frameworks */,
CCD54D302AD9047D007ED1AF /* OrderedCollections in Frameworks */,
CC7DC2A12AF3EEBB00D50EDC /* ZIPFoundation in Frameworks */,
);
Expand Down Expand Up @@ -470,7 +466,8 @@
children = (
CC3F94232B4C505600E67A19 /* Backports */,
CC549EFD2AFA7DB300219CF8 /* Foundation */,
CCA095CB2AE8E6D100F5E55F /* Color+Platform.swift */,
CCA095CB2AE8E6D100F5E55F /* Color.swift */,
503DF9DE2B5596AD0034F760 /* Color.xcassets */,
CC9D249A2B3D954F00A18513 /* URL+Path.swift */,
50E1430F2B400C6F000A7191 /* View+Brand.swift */,
);
Expand Down Expand Up @@ -907,6 +904,7 @@
CC21B5282ACD4B87003EC114 /* rsc-004-carriers.json in Resources */,
CC21B52B2ACD4B87003EC114 /* rsc-006-ipod-models.json in Resources */,
CC21B5262ACD4B87003EC114 /* rsc-001-country-mapping.json in Resources */,
503DF9DF2B5596AD0034F760 /* Color.xcassets in Resources */,
CC21B5272ACD4B87003EC114 /* rsc-003-iphone-models.json in Resources */,
CC21B4BD2ACAE5E5003EC114 /* Localizable.strings in Resources */,
CC21B52A2ACD4B87003EC114 /* rsc-005-ipad-models.json in Resources */,
Expand Down Expand Up @@ -1068,7 +1066,7 @@
CC21B4F42ACBD004003EC114 /* UsageCell.swift in Sources */,
0F16593A2AF9FD4500268572 /* URLSchemeItem.swift in Sources */,
CCA095EB2AED419B00F5E55F /* FileChecker.swift in Sources */,
CCA095CC2AE8E6D100F5E55F /* Color+Platform.swift in Sources */,
CCA095CC2AE8E6D100F5E55F /* Color.swift in Sources */,
CC21B4C22ACAE6E6003EC114 /* BartyCrouch.swift in Sources */,
CCA095FC2AEE22B300F5E55F /* FileIntegrityCheck.swift in Sources */,
CCD54D322AD9385D007ED1AF /* NetworkStatistics.swift in Sources */,
Expand Down Expand Up @@ -1133,12 +1131,11 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Automatic;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = GXZ23M5TP2;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu17;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MACOSX_DEPLOYMENT_TARGET = 12.0;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
Expand All @@ -1152,12 +1149,11 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Automatic;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = GXZ23M5TP2;
ENABLE_HARDENED_RUNTIME = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu17;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MACOSX_DEPLOYMENT_TARGET = 12.0;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_VERSION = 5.0;
Expand Down Expand Up @@ -1290,7 +1286,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Reveil/Reveil.entitlements;
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_ASSET_PATHS = "";
Expand All @@ -1309,15 +1305,14 @@
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.0;
PRODUCT_BUNDLE_IDENTIFIER = com.reveil.app;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = YES;
Expand All @@ -1333,7 +1328,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = Reveil/Reveil.entitlements;
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_ASSET_PATHS = "";
Expand All @@ -1352,15 +1347,14 @@
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.0;
PRODUCT_BUNDLE_IDENTIFIER = com.reveil.app;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = YES;
Expand All @@ -1373,22 +1367,21 @@
CC7DC2972AF3EB1300D50EDC /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = GXZ23M5TP2;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_MODULE_VERIFIER = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu17;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"@executable_path/Frameworks",
"@loader_path/Frameworks",
Expand All @@ -1398,7 +1391,6 @@
"@loader_path/Frameworks",
);
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 1.0;
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
Expand All @@ -1407,7 +1399,7 @@
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = auto;
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator";
SUPPORTS_MACCATALYST = NO;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
SWIFT_EMIT_LOC_STRINGS = YES;
Expand All @@ -1421,22 +1413,21 @@
CC7DC2982AF3EB1300D50EDC /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Manual;
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = YES;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = GXZ23M5TP2;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_MODULE_VERIFIER = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu17;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"@executable_path/Frameworks",
"@loader_path/Frameworks",
Expand All @@ -1446,7 +1437,6 @@
"@loader_path/Frameworks",
);
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MACOSX_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 1.0;
MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
Expand All @@ -1455,7 +1445,7 @@
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = auto;
SKIP_INSTALL = YES;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator";
SUPPORTS_MACCATALYST = NO;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"identity" : "colorfulx",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Lakr233/ColorfulX",
"location" : "https://github.com/Lakr233/ColorfulX.git",
"state" : {
"revision" : "11aae9e92a2f846ed26d275d0d3d6fad85d16837",
"version" : "2.3.1"
Expand Down
40 changes: 39 additions & 1 deletion Reveil/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// Created by Lessica on 2023/10/2.
//

import UIKit
import SwiftUI

struct ContentView: View {
Expand All @@ -15,9 +14,11 @@ struct ContentView: View {
if horizontalSizeClass == .compact {
return true
}
#if canImport(UIKit)
if UIDevice.current.userInterfaceIdiom != .pad {
return true
}
#endif
return false
}

Expand Down Expand Up @@ -52,7 +53,9 @@ struct TabsView: View {

NavigationView {
AboutView()
#if os(iOS)
.navigationBarTitleDisplayMode(.inline)
#endif
.background(ColorfulBackground())
}
.tabItem {
Expand All @@ -71,9 +74,15 @@ struct SidebarView: View {
DashboardView()
.navigationTitle(NSLocalizedString("DASHBOARD", comment: "Dashboard"))
.background(ColorfulBackground())
#if os(macOS)
.limitMinSize()
#endif
} label: {
Label(NSLocalizedString("DASHBOARD", comment: "Dashboard"), systemImage: "square.grid.2x2")
}
#if os(macOS)
.buttonStyle(.plain)
#endif
}

Section(NSLocalizedString("DETAILS", comment: "Details")) {
Expand All @@ -84,20 +93,49 @@ struct SidebarView: View {
NavigationLink {
AboutView()
.background(ColorfulBackground())
#if os(macOS)
.limitMinSize()
#endif
} label: {
Label(NSLocalizedString("ABOUT", comment: "About"), systemImage: "info.circle")
}
#if os(macOS)
.buttonStyle(.plain)
#endif
}
}
.navigationTitle(NSLocalizedString("Reveil", comment: "Reveil"))

DashboardView()
.navigationTitle(NSLocalizedString("DASHBOARD", comment: "Dashboard"))
.background(ColorfulBackground())
#if os(macOS)
.limitMinSize()
#endif
}
.listStyle(SidebarListStyle())
#if canImport(AppKit)
.toolbar {
ToolbarItem(placement: .navigation) {
Button {
NSApp.sendAction(#selector(NSSplitViewController.toggleSidebar(_:)), to: nil, from: nil)
} label: {
Label("Toggle Sidebar", systemImage: "sidebar.leading")
}
}
}
#endif
}
}

#if os(macOS)
fileprivate extension View {
@ViewBuilder
func limitMinSize() -> some View {
frame(minWidth: 550, minHeight: 350)
}
}
#endif

// MARK: - Previews

Expand Down
7 changes: 3 additions & 4 deletions Reveil/DataModels/Presets/SecurityPresets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,10 @@ struct SecurityPresets: Codable {
secureMobileProvisioningProfileHashes.insert(profileHashValue)
}

var updatedHashes: Dictionary<String, String> = secureResourceHashes
var updatedHashes: [String: String] = secureResourceHashes
for secureResourceName in secureResourceHashes.keys {
let resourcePath = bundle.path(forResource: secureResourceName, ofType: nil)
if let resourcePath, let resourceHashValue = IntegrityChecker.calculateHashValue(path: resourcePath)
{
if let resourcePath, let resourceHashValue = IntegrityChecker.calculateHashValue(path: resourcePath) {
updatedHashes.updateValue(resourceHashValue, forKey: secureResourceName)
}
}
Expand Down Expand Up @@ -101,7 +100,7 @@ struct SecurityPresets: Codable {
"",
]

var secureResourceHashes: Dictionary<String, String> = [
var secureResourceHashes: [String: String] = [
"library_stub.zip": "",
"rsc-001-country-mapping.json": "",
"rsc-002-ios-versions.json": "",
Expand Down
Loading

0 comments on commit e7bfc1a

Please sign in to comment.