├── About ├── About.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcuserdata │ │ │ └── jordansinger.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── jordansinger.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist └── About │ ├── About.entitlements │ ├── AboutApp.swift │ ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── ContentView.swift │ ├── Info.plist │ └── Preview Content │ └── Preview Assets.xcassets │ └── Contents.json └── README.md /About/About.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 86CA943A24C28F0F00E8294F /* AboutApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86CA943924C28F0F00E8294F /* AboutApp.swift */; }; 11 | 86CA943C24C28F0F00E8294F /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86CA943B24C28F0F00E8294F /* ContentView.swift */; }; 12 | 86CA943E24C28F1000E8294F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 86CA943D24C28F1000E8294F /* Assets.xcassets */; }; 13 | 86CA944124C28F1000E8294F /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 86CA944024C28F1000E8294F /* Preview Assets.xcassets */; }; 14 | /* End PBXBuildFile section */ 15 | 16 | /* Begin PBXFileReference section */ 17 | 86CA943624C28F0F00E8294F /* About.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = About.app; sourceTree = BUILT_PRODUCTS_DIR; }; 18 | 86CA943924C28F0F00E8294F /* AboutApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutApp.swift; sourceTree = ""; }; 19 | 86CA943B24C28F0F00E8294F /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 20 | 86CA943D24C28F1000E8294F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 21 | 86CA944024C28F1000E8294F /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 22 | 86CA944224C28F1000E8294F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 23 | 86CA944324C28F1000E8294F /* About.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = About.entitlements; sourceTree = ""; }; 24 | /* End PBXFileReference section */ 25 | 26 | /* Begin PBXFrameworksBuildPhase section */ 27 | 86CA943324C28F0F00E8294F /* Frameworks */ = { 28 | isa = PBXFrameworksBuildPhase; 29 | buildActionMask = 2147483647; 30 | files = ( 31 | ); 32 | runOnlyForDeploymentPostprocessing = 0; 33 | }; 34 | /* End PBXFrameworksBuildPhase section */ 35 | 36 | /* Begin PBXGroup section */ 37 | 86CA942D24C28F0F00E8294F = { 38 | isa = PBXGroup; 39 | children = ( 40 | 86CA943824C28F0F00E8294F /* About */, 41 | 86CA943724C28F0F00E8294F /* Products */, 42 | ); 43 | sourceTree = ""; 44 | }; 45 | 86CA943724C28F0F00E8294F /* Products */ = { 46 | isa = PBXGroup; 47 | children = ( 48 | 86CA943624C28F0F00E8294F /* About.app */, 49 | ); 50 | name = Products; 51 | sourceTree = ""; 52 | }; 53 | 86CA943824C28F0F00E8294F /* About */ = { 54 | isa = PBXGroup; 55 | children = ( 56 | 86CA943924C28F0F00E8294F /* AboutApp.swift */, 57 | 86CA943B24C28F0F00E8294F /* ContentView.swift */, 58 | 86CA943D24C28F1000E8294F /* Assets.xcassets */, 59 | 86CA944224C28F1000E8294F /* Info.plist */, 60 | 86CA944324C28F1000E8294F /* About.entitlements */, 61 | 86CA943F24C28F1000E8294F /* Preview Content */, 62 | ); 63 | path = About; 64 | sourceTree = ""; 65 | }; 66 | 86CA943F24C28F1000E8294F /* Preview Content */ = { 67 | isa = PBXGroup; 68 | children = ( 69 | 86CA944024C28F1000E8294F /* Preview Assets.xcassets */, 70 | ); 71 | path = "Preview Content"; 72 | sourceTree = ""; 73 | }; 74 | /* End PBXGroup section */ 75 | 76 | /* Begin PBXNativeTarget section */ 77 | 86CA943524C28F0F00E8294F /* About */ = { 78 | isa = PBXNativeTarget; 79 | buildConfigurationList = 86CA944624C28F1000E8294F /* Build configuration list for PBXNativeTarget "About" */; 80 | buildPhases = ( 81 | 86CA943224C28F0F00E8294F /* Sources */, 82 | 86CA943324C28F0F00E8294F /* Frameworks */, 83 | 86CA943424C28F0F00E8294F /* Resources */, 84 | ); 85 | buildRules = ( 86 | ); 87 | dependencies = ( 88 | ); 89 | name = About; 90 | productName = About; 91 | productReference = 86CA943624C28F0F00E8294F /* About.app */; 92 | productType = "com.apple.product-type.application"; 93 | }; 94 | /* End PBXNativeTarget section */ 95 | 96 | /* Begin PBXProject section */ 97 | 86CA942E24C28F0F00E8294F /* Project object */ = { 98 | isa = PBXProject; 99 | attributes = { 100 | LastSwiftUpdateCheck = 1200; 101 | LastUpgradeCheck = 1200; 102 | TargetAttributes = { 103 | 86CA943524C28F0F00E8294F = { 104 | CreatedOnToolsVersion = 12.0; 105 | }; 106 | }; 107 | }; 108 | buildConfigurationList = 86CA943124C28F0F00E8294F /* Build configuration list for PBXProject "About" */; 109 | compatibilityVersion = "Xcode 9.3"; 110 | developmentRegion = en; 111 | hasScannedForEncodings = 0; 112 | knownRegions = ( 113 | en, 114 | Base, 115 | ); 116 | mainGroup = 86CA942D24C28F0F00E8294F; 117 | productRefGroup = 86CA943724C28F0F00E8294F /* Products */; 118 | projectDirPath = ""; 119 | projectRoot = ""; 120 | targets = ( 121 | 86CA943524C28F0F00E8294F /* About */, 122 | ); 123 | }; 124 | /* End PBXProject section */ 125 | 126 | /* Begin PBXResourcesBuildPhase section */ 127 | 86CA943424C28F0F00E8294F /* Resources */ = { 128 | isa = PBXResourcesBuildPhase; 129 | buildActionMask = 2147483647; 130 | files = ( 131 | 86CA944124C28F1000E8294F /* Preview Assets.xcassets in Resources */, 132 | 86CA943E24C28F1000E8294F /* Assets.xcassets in Resources */, 133 | ); 134 | runOnlyForDeploymentPostprocessing = 0; 135 | }; 136 | /* End PBXResourcesBuildPhase section */ 137 | 138 | /* Begin PBXSourcesBuildPhase section */ 139 | 86CA943224C28F0F00E8294F /* Sources */ = { 140 | isa = PBXSourcesBuildPhase; 141 | buildActionMask = 2147483647; 142 | files = ( 143 | 86CA943C24C28F0F00E8294F /* ContentView.swift in Sources */, 144 | 86CA943A24C28F0F00E8294F /* AboutApp.swift in Sources */, 145 | ); 146 | runOnlyForDeploymentPostprocessing = 0; 147 | }; 148 | /* End PBXSourcesBuildPhase section */ 149 | 150 | /* Begin XCBuildConfiguration section */ 151 | 86CA944424C28F1000E8294F /* Debug */ = { 152 | isa = XCBuildConfiguration; 153 | buildSettings = { 154 | ALWAYS_SEARCH_USER_PATHS = NO; 155 | CLANG_ANALYZER_NONNULL = YES; 156 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 157 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 158 | CLANG_CXX_LIBRARY = "libc++"; 159 | CLANG_ENABLE_MODULES = YES; 160 | CLANG_ENABLE_OBJC_ARC = YES; 161 | CLANG_ENABLE_OBJC_WEAK = YES; 162 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 163 | CLANG_WARN_BOOL_CONVERSION = YES; 164 | CLANG_WARN_COMMA = YES; 165 | CLANG_WARN_CONSTANT_CONVERSION = YES; 166 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 167 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 168 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 169 | CLANG_WARN_EMPTY_BODY = YES; 170 | CLANG_WARN_ENUM_CONVERSION = YES; 171 | CLANG_WARN_INFINITE_RECURSION = YES; 172 | CLANG_WARN_INT_CONVERSION = YES; 173 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 174 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 175 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 176 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 177 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 178 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 179 | CLANG_WARN_STRICT_PROTOTYPES = YES; 180 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 181 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 182 | CLANG_WARN_UNREACHABLE_CODE = YES; 183 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 184 | COPY_PHASE_STRIP = NO; 185 | DEBUG_INFORMATION_FORMAT = dwarf; 186 | ENABLE_STRICT_OBJC_MSGSEND = YES; 187 | ENABLE_TESTABILITY = YES; 188 | GCC_C_LANGUAGE_STANDARD = gnu11; 189 | GCC_DYNAMIC_NO_PIC = NO; 190 | GCC_NO_COMMON_BLOCKS = YES; 191 | GCC_OPTIMIZATION_LEVEL = 0; 192 | GCC_PREPROCESSOR_DEFINITIONS = ( 193 | "DEBUG=1", 194 | "$(inherited)", 195 | ); 196 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 197 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 198 | GCC_WARN_UNDECLARED_SELECTOR = YES; 199 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 200 | GCC_WARN_UNUSED_FUNCTION = YES; 201 | GCC_WARN_UNUSED_VARIABLE = YES; 202 | MACOSX_DEPLOYMENT_TARGET = 10.16; 203 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 204 | MTL_FAST_MATH = YES; 205 | ONLY_ACTIVE_ARCH = YES; 206 | SDKROOT = macosx; 207 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 208 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 209 | }; 210 | name = Debug; 211 | }; 212 | 86CA944524C28F1000E8294F /* Release */ = { 213 | isa = XCBuildConfiguration; 214 | buildSettings = { 215 | ALWAYS_SEARCH_USER_PATHS = NO; 216 | CLANG_ANALYZER_NONNULL = YES; 217 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 218 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 219 | CLANG_CXX_LIBRARY = "libc++"; 220 | CLANG_ENABLE_MODULES = YES; 221 | CLANG_ENABLE_OBJC_ARC = YES; 222 | CLANG_ENABLE_OBJC_WEAK = YES; 223 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 224 | CLANG_WARN_BOOL_CONVERSION = YES; 225 | CLANG_WARN_COMMA = YES; 226 | CLANG_WARN_CONSTANT_CONVERSION = YES; 227 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 228 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 229 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 230 | CLANG_WARN_EMPTY_BODY = YES; 231 | CLANG_WARN_ENUM_CONVERSION = YES; 232 | CLANG_WARN_INFINITE_RECURSION = YES; 233 | CLANG_WARN_INT_CONVERSION = YES; 234 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 235 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 236 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 237 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 238 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 239 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 240 | CLANG_WARN_STRICT_PROTOTYPES = YES; 241 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 242 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 243 | CLANG_WARN_UNREACHABLE_CODE = YES; 244 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 245 | COPY_PHASE_STRIP = NO; 246 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 247 | ENABLE_NS_ASSERTIONS = NO; 248 | ENABLE_STRICT_OBJC_MSGSEND = YES; 249 | GCC_C_LANGUAGE_STANDARD = gnu11; 250 | GCC_NO_COMMON_BLOCKS = YES; 251 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 252 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 253 | GCC_WARN_UNDECLARED_SELECTOR = YES; 254 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 255 | GCC_WARN_UNUSED_FUNCTION = YES; 256 | GCC_WARN_UNUSED_VARIABLE = YES; 257 | MACOSX_DEPLOYMENT_TARGET = 10.16; 258 | MTL_ENABLE_DEBUG_INFO = NO; 259 | MTL_FAST_MATH = YES; 260 | SDKROOT = macosx; 261 | SWIFT_COMPILATION_MODE = wholemodule; 262 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 263 | }; 264 | name = Release; 265 | }; 266 | 86CA944724C28F1000E8294F /* Debug */ = { 267 | isa = XCBuildConfiguration; 268 | buildSettings = { 269 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 270 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 271 | CODE_SIGN_ENTITLEMENTS = About/About.entitlements; 272 | CODE_SIGN_STYLE = Automatic; 273 | COMBINE_HIDPI_IMAGES = YES; 274 | DEVELOPMENT_ASSET_PATHS = "\"About/Preview Content\""; 275 | ENABLE_PREVIEWS = YES; 276 | INFOPLIST_FILE = About/Info.plist; 277 | LD_RUNPATH_SEARCH_PATHS = ( 278 | "$(inherited)", 279 | "@executable_path/../Frameworks", 280 | ); 281 | MACOSX_DEPLOYMENT_TARGET = 10.16; 282 | PRODUCT_BUNDLE_IDENTIFIER = example.About; 283 | PRODUCT_NAME = "$(TARGET_NAME)"; 284 | SWIFT_VERSION = 5.0; 285 | }; 286 | name = Debug; 287 | }; 288 | 86CA944824C28F1000E8294F /* Release */ = { 289 | isa = XCBuildConfiguration; 290 | buildSettings = { 291 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 292 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 293 | CODE_SIGN_ENTITLEMENTS = About/About.entitlements; 294 | CODE_SIGN_STYLE = Automatic; 295 | COMBINE_HIDPI_IMAGES = YES; 296 | DEVELOPMENT_ASSET_PATHS = "\"About/Preview Content\""; 297 | ENABLE_PREVIEWS = YES; 298 | INFOPLIST_FILE = About/Info.plist; 299 | LD_RUNPATH_SEARCH_PATHS = ( 300 | "$(inherited)", 301 | "@executable_path/../Frameworks", 302 | ); 303 | MACOSX_DEPLOYMENT_TARGET = 10.16; 304 | PRODUCT_BUNDLE_IDENTIFIER = example.About; 305 | PRODUCT_NAME = "$(TARGET_NAME)"; 306 | SWIFT_VERSION = 5.0; 307 | }; 308 | name = Release; 309 | }; 310 | /* End XCBuildConfiguration section */ 311 | 312 | /* Begin XCConfigurationList section */ 313 | 86CA943124C28F0F00E8294F /* Build configuration list for PBXProject "About" */ = { 314 | isa = XCConfigurationList; 315 | buildConfigurations = ( 316 | 86CA944424C28F1000E8294F /* Debug */, 317 | 86CA944524C28F1000E8294F /* Release */, 318 | ); 319 | defaultConfigurationIsVisible = 0; 320 | defaultConfigurationName = Release; 321 | }; 322 | 86CA944624C28F1000E8294F /* Build configuration list for PBXNativeTarget "About" */ = { 323 | isa = XCConfigurationList; 324 | buildConfigurations = ( 325 | 86CA944724C28F1000E8294F /* Debug */, 326 | 86CA944824C28F1000E8294F /* Release */, 327 | ); 328 | defaultConfigurationIsVisible = 0; 329 | defaultConfigurationName = Release; 330 | }; 331 | /* End XCConfigurationList section */ 332 | }; 333 | rootObject = 86CA942E24C28F0F00E8294F /* Project object */; 334 | } 335 | -------------------------------------------------------------------------------- /About/About.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /About/About.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /About/About.xcodeproj/project.xcworkspace/xcuserdata/jordansinger.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jordansinger/about-this-mac-swiftui/fe1ceffb09797177bb6960f035420e852b04299e/About/About.xcodeproj/project.xcworkspace/xcuserdata/jordansinger.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /About/About.xcodeproj/xcuserdata/jordansinger.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | About.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /About/About/About.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /About/About/AboutApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AboutApp.swift 3 | // About 4 | // 5 | // Created by Jordan Singer on 7/17/20. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct AboutApp: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /About/About/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /About/About/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "scale" : "1x", 6 | "size" : "16x16" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "scale" : "2x", 11 | "size" : "16x16" 12 | }, 13 | { 14 | "idiom" : "mac", 15 | "scale" : "1x", 16 | "size" : "32x32" 17 | }, 18 | { 19 | "idiom" : "mac", 20 | "scale" : "2x", 21 | "size" : "32x32" 22 | }, 23 | { 24 | "idiom" : "mac", 25 | "scale" : "1x", 26 | "size" : "128x128" 27 | }, 28 | { 29 | "idiom" : "mac", 30 | "scale" : "2x", 31 | "size" : "128x128" 32 | }, 33 | { 34 | "idiom" : "mac", 35 | "scale" : "1x", 36 | "size" : "256x256" 37 | }, 38 | { 39 | "idiom" : "mac", 40 | "scale" : "2x", 41 | "size" : "256x256" 42 | }, 43 | { 44 | "idiom" : "mac", 45 | "scale" : "1x", 46 | "size" : "512x512" 47 | }, 48 | { 49 | "idiom" : "mac", 50 | "scale" : "2x", 51 | "size" : "512x512" 52 | } 53 | ], 54 | "info" : { 55 | "author" : "xcode", 56 | "version" : 1 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /About/About/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /About/About/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // About This Mac 4 | // 5 | // Created by Jordan Singer on 7/17/20. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | var body: some View { 12 | NavigationView { 13 | Sidebar() 14 | Overview() 15 | } 16 | } 17 | } 18 | 19 | struct Sidebar: View { 20 | @State private var selection: Set = [0] 21 | 22 | var body: some View { 23 | List(selection: $selection) { 24 | NavigationLink(destination: Overview()) { 25 | Label("Overview", systemImage: "menubar.dock.rectangle") 26 | } 27 | .tag(0) 28 | 29 | NavigationLink(destination: Displays()) { 30 | Label("Displays", systemImage: "display") 31 | } 32 | .tag(1) 33 | 34 | NavigationLink(destination: Storage()) { 35 | Label("Storage", systemImage: "externaldrive") 36 | } 37 | .tag(2) 38 | 39 | Label("Support", systemImage: "lifepreserver") 40 | Label("Service", systemImage: "wrench.and.screwdriver") 41 | } 42 | .listStyle(SidebarListStyle()) 43 | .frame(minWidth: 160, idealWidth: 160, maxWidth: 160, maxHeight: .infinity) 44 | .toolbar { Spacer() } 45 | } 46 | } 47 | 48 | struct Overview: View { 49 | var body: some View { 50 | VStack(alignment: .leading, spacing: 4) { 51 | Image(systemName: "menubar.dock.rectangle") 52 | .resizable() 53 | .aspectRatio(contentMode: .fit) 54 | .foregroundColor(.blue) 55 | .frame(height: 48) 56 | Text("macOS Big Sur") 57 | .font(.title) 58 | Text("Version 11.0") 59 | 60 | VStack(alignment: .leading, spacing: 2) { 61 | Text("MacBook Pro (13-inch, 2020, Four Thunderbolt 3 ports)") 62 | .fontWeight(.medium) 63 | HStack { 64 | Text("Processor") 65 | .fontWeight(.medium) 66 | Text("2 GHz Quad-Core Intel Core i5") 67 | } 68 | HStack { 69 | Text("Memory") 70 | .fontWeight(.medium) 71 | Text("16 GB 3733 MHz LPDDR4X") 72 | } 73 | HStack { 74 | Text("Graphics") 75 | .fontWeight(.medium) 76 | Text("Intel Iris Plus Graphics 1536 MB") 77 | } 78 | HStack { 79 | Text("Serial Number") 80 | .fontWeight(.medium) 81 | Text("JHBHVJYKU78") 82 | } 83 | } 84 | .font(.callout) 85 | .padding(.top) 86 | } 87 | .navigationTitle("Overview") 88 | .frame(minWidth: 480, idealWidth: 480, maxWidth: 480, maxHeight: .infinity) 89 | } 90 | } 91 | 92 | struct Displays: View { 93 | var body: some View { 94 | VStack(alignment: .leading, spacing: 12) { 95 | Image(systemName: "display") 96 | .resizable() 97 | .aspectRatio(contentMode: .fit) 98 | .foregroundColor(.blue) 99 | .frame(height: 48) 100 | 101 | Text("Built-in Retina Display") 102 | .font(.headline) 103 | 104 | VStack(alignment: .leading, spacing: 2) { 105 | Text("13.3-inch (2560 x 1600)") 106 | Text("Intel Iris Plus Graphics 1536 MB graphics") 107 | } 108 | .font(.callout) 109 | .padding(.top) 110 | } 111 | .navigationTitle("Displays") 112 | .frame(minWidth: 480, idealWidth: 480, maxWidth: 480, maxHeight: .infinity) 113 | } 114 | } 115 | 116 | struct Storage: View { 117 | var body: some View { 118 | VStack(alignment: .leading, spacing: 12) { 119 | Image(systemName: "externaldrive") 120 | .resizable() 121 | .aspectRatio(contentMode: .fit) 122 | .foregroundColor(.secondary) 123 | .frame(height: 48) 124 | Text("500 GB Flash Storage") 125 | .font(.headline) 126 | 127 | VStack(alignment: .leading, spacing: 4) { 128 | Text("256 GB available of 480 GB") 129 | HStack(spacing: 0) { 130 | Rectangle() 131 | .fill(Color.red) 132 | .frame(width: 64, height: 24) 133 | Rectangle() 134 | .fill(Color.orange) 135 | .frame(width: 32, height: 24) 136 | Rectangle() 137 | .fill(Color.blue) 138 | .frame(width: 24, height: 24) 139 | Rectangle() 140 | .fill(Color.green) 141 | .frame(width: 24, height: 24) 142 | Rectangle() 143 | .fill(Color.clear) 144 | .frame(width: 128, height: 24) 145 | } 146 | .clipShape(RoundedRectangle(cornerRadius: 4)) 147 | .background(Color(NSColor.unemphasizedSelectedContentBackgroundColor)) 148 | .cornerRadius(4) 149 | } 150 | .font(.callout) 151 | .padding(.top) 152 | } 153 | .navigationTitle("Storage") 154 | .frame(minWidth: 480, idealWidth: 480, maxWidth: 480, maxHeight: .infinity) 155 | } 156 | } 157 | 158 | struct ContentView_Previews: PreviewProvider { 159 | static var previews: some View { 160 | ContentView() 161 | } 162 | } 163 | -------------------------------------------------------------------------------- /About/About/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSMinimumSystemVersion 22 | $(MACOSX_DEPLOYMENT_TARGET) 23 | 24 | 25 | -------------------------------------------------------------------------------- /About/About/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | About This Mac in SwiftUI 2 | 3 | ![About This Mac](https://user-images.githubusercontent.com/110813/87843355-fd0c4e80-c881-11ea-8d71-6d7d4fc8b5f6.png) 4 | --------------------------------------------------------------------------------