├── LICENSE ├── README.md ├── Silicon Info.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcuserdata │ └── billycastelli.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── images ├── Icon-128.png ├── arm-example.png ├── finder.png ├── indicator-icon.png ├── security.png ├── window.png └── x86-example.png └── silicon-info ├── Assets.xcassets ├── AccentColor.colorset │ └── Contents.json ├── AppIcon.appiconset │ ├── Contents.json │ ├── Icon-1024.png │ ├── Icon-128.png │ ├── Icon-256.png │ ├── Icon-257.png │ ├── Icon-32.png │ ├── Icon-33.png │ ├── Icon-512.png │ ├── Icon-513.png │ ├── Icon-64.png │ └── icon-16.png ├── Contents.json ├── processor-icon-arm.imageset │ ├── Contents.json │ └── processor-icon-arm.svg ├── processor-icon-empty.imageset │ ├── Contents.json │ └── processor-icon-empty.svg ├── processor-icon-intel.imageset │ ├── Contents.json │ └── processor-icon-intel.svg └── processor-icon.imageset │ ├── Contents.json │ └── processor-icon.svg ├── ContentView.swift ├── Info.plist ├── Preview Content └── Preview Assets.xcassets │ └── Contents.json ├── silicon-info.entitlements └── silicon-infoApp.swift /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 William Castelli 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Silicon Info 2 | 3 | ## About 4 | ![Icon](images/Icon-128.png) 5 | 6 | Silicon Info is a tiny menu bar application allows the user to quickly view the architecture of the currently running application. 7 | 8 | Useful for quickly determining if an application is running natively on Apple Silicon or running via Rosetta 2. 9 | 10 | **Update**: [**Now on the Mac App Store**](https://apps.apple.com/us/app/silicon-info/id1542271266) 11 | 12 | ![ARM](images/finder.png) 13 | 14 | ## Installation 15 | ### Download from Mac App Store 16 | - [App store link](https://apps.apple.com/us/app/silicon-info/id1542271266) 17 | 18 | ### Download from Homebrew 19 | - `brew install --cask silicon-info` 20 | 21 | ### Download release from Github 22 | - [Download zip](https://github.com/billycastelli/Silicon-Info/releases/download/1.0.3/Silicon.Info.app.zip) from repo 23 | - Move .app file to Applications folder 24 | - Open application 25 | - If “`Silicon Info.app` can’t be opened because Apple cannot check it for malicious software" appears, open Systems Preferences to the Security and Privacy window. 26 | ![ARM](images/security.png) 27 | - Select "Open Anyway" 28 | 29 | ## Screenshots 30 | ### Indicator icon in status bar 31 | Indicator-icon 32 | 33 | #### Example of a native ARM application 34 | ![ARM](images/arm-example.png) 35 | 36 | #### Example of an application running using Rosetta 37 | ![x86](images/x86-example.png) 38 | 39 | -------------------------------------------------------------------------------- /Silicon Info.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 06B1C290256B5CE6000CE962 /* silicon-infoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06B1C28F256B5CE6000CE962 /* silicon-infoApp.swift */; }; 11 | 06B1C292256B5CE6000CE962 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06B1C291256B5CE6000CE962 /* ContentView.swift */; }; 12 | 06B1C294256B5CE8000CE962 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 06B1C293256B5CE8000CE962 /* Assets.xcassets */; }; 13 | 06B1C297256B5CE8000CE962 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 06B1C296256B5CE8000CE962 /* Preview Assets.xcassets */; }; 14 | /* End PBXBuildFile section */ 15 | 16 | /* Begin PBXFileReference section */ 17 | 06B1C28C256B5CE6000CE962 /* Silicon Info.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Silicon Info.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 18 | 06B1C28F256B5CE6000CE962 /* silicon-infoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "silicon-infoApp.swift"; sourceTree = ""; }; 19 | 06B1C291256B5CE6000CE962 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 20 | 06B1C293256B5CE8000CE962 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 21 | 06B1C296256B5CE8000CE962 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 22 | 06B1C298256B5CE8000CE962 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 23 | 06B1C299256B5CE8000CE962 /* silicon-info.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "silicon-info.entitlements"; sourceTree = ""; }; 24 | /* End PBXFileReference section */ 25 | 26 | /* Begin PBXFrameworksBuildPhase section */ 27 | 06B1C289256B5CE6000CE962 /* Frameworks */ = { 28 | isa = PBXFrameworksBuildPhase; 29 | buildActionMask = 2147483647; 30 | files = ( 31 | ); 32 | runOnlyForDeploymentPostprocessing = 0; 33 | }; 34 | /* End PBXFrameworksBuildPhase section */ 35 | 36 | /* Begin PBXGroup section */ 37 | 06B1C283256B5CE6000CE962 = { 38 | isa = PBXGroup; 39 | children = ( 40 | 06B1C28E256B5CE6000CE962 /* silicon-info */, 41 | 06B1C28D256B5CE6000CE962 /* Products */, 42 | ); 43 | sourceTree = ""; 44 | }; 45 | 06B1C28D256B5CE6000CE962 /* Products */ = { 46 | isa = PBXGroup; 47 | children = ( 48 | 06B1C28C256B5CE6000CE962 /* Silicon Info.app */, 49 | ); 50 | name = Products; 51 | sourceTree = ""; 52 | }; 53 | 06B1C28E256B5CE6000CE962 /* silicon-info */ = { 54 | isa = PBXGroup; 55 | children = ( 56 | 06B1C28F256B5CE6000CE962 /* silicon-infoApp.swift */, 57 | 06B1C291256B5CE6000CE962 /* ContentView.swift */, 58 | 06B1C293256B5CE8000CE962 /* Assets.xcassets */, 59 | 06B1C298256B5CE8000CE962 /* Info.plist */, 60 | 06B1C299256B5CE8000CE962 /* silicon-info.entitlements */, 61 | 06B1C295256B5CE8000CE962 /* Preview Content */, 62 | ); 63 | path = "silicon-info"; 64 | sourceTree = ""; 65 | }; 66 | 06B1C295256B5CE8000CE962 /* Preview Content */ = { 67 | isa = PBXGroup; 68 | children = ( 69 | 06B1C296256B5CE8000CE962 /* Preview Assets.xcassets */, 70 | ); 71 | path = "Preview Content"; 72 | sourceTree = ""; 73 | }; 74 | /* End PBXGroup section */ 75 | 76 | /* Begin PBXNativeTarget section */ 77 | 06B1C28B256B5CE6000CE962 /* Silicon Info */ = { 78 | isa = PBXNativeTarget; 79 | buildConfigurationList = 06B1C29C256B5CE8000CE962 /* Build configuration list for PBXNativeTarget "Silicon Info" */; 80 | buildPhases = ( 81 | 06B1C288256B5CE6000CE962 /* Sources */, 82 | 06B1C289256B5CE6000CE962 /* Frameworks */, 83 | 06B1C28A256B5CE6000CE962 /* Resources */, 84 | ); 85 | buildRules = ( 86 | ); 87 | dependencies = ( 88 | ); 89 | name = "Silicon Info"; 90 | productName = "arch-menu"; 91 | productReference = 06B1C28C256B5CE6000CE962 /* Silicon Info.app */; 92 | productType = "com.apple.product-type.application"; 93 | }; 94 | /* End PBXNativeTarget section */ 95 | 96 | /* Begin PBXProject section */ 97 | 06B1C284256B5CE6000CE962 /* Project object */ = { 98 | isa = PBXProject; 99 | attributes = { 100 | LastSwiftUpdateCheck = 1220; 101 | LastUpgradeCheck = 1220; 102 | ORGANIZATIONNAME = "William Castelli"; 103 | TargetAttributes = { 104 | 06B1C28B256B5CE6000CE962 = { 105 | CreatedOnToolsVersion = 12.2; 106 | }; 107 | }; 108 | }; 109 | buildConfigurationList = 06B1C287256B5CE6000CE962 /* Build configuration list for PBXProject "Silicon Info" */; 110 | compatibilityVersion = "Xcode 9.3"; 111 | developmentRegion = en; 112 | hasScannedForEncodings = 0; 113 | knownRegions = ( 114 | en, 115 | Base, 116 | ); 117 | mainGroup = 06B1C283256B5CE6000CE962; 118 | productRefGroup = 06B1C28D256B5CE6000CE962 /* Products */; 119 | projectDirPath = ""; 120 | projectRoot = ""; 121 | targets = ( 122 | 06B1C28B256B5CE6000CE962 /* Silicon Info */, 123 | ); 124 | }; 125 | /* End PBXProject section */ 126 | 127 | /* Begin PBXResourcesBuildPhase section */ 128 | 06B1C28A256B5CE6000CE962 /* Resources */ = { 129 | isa = PBXResourcesBuildPhase; 130 | buildActionMask = 2147483647; 131 | files = ( 132 | 06B1C297256B5CE8000CE962 /* Preview Assets.xcassets in Resources */, 133 | 06B1C294256B5CE8000CE962 /* Assets.xcassets in Resources */, 134 | ); 135 | runOnlyForDeploymentPostprocessing = 0; 136 | }; 137 | /* End PBXResourcesBuildPhase section */ 138 | 139 | /* Begin PBXSourcesBuildPhase section */ 140 | 06B1C288256B5CE6000CE962 /* Sources */ = { 141 | isa = PBXSourcesBuildPhase; 142 | buildActionMask = 2147483647; 143 | files = ( 144 | 06B1C292256B5CE6000CE962 /* ContentView.swift in Sources */, 145 | 06B1C290256B5CE6000CE962 /* silicon-infoApp.swift in Sources */, 146 | ); 147 | runOnlyForDeploymentPostprocessing = 0; 148 | }; 149 | /* End PBXSourcesBuildPhase section */ 150 | 151 | /* Begin XCBuildConfiguration section */ 152 | 06B1C29A256B5CE8000CE962 /* Debug */ = { 153 | isa = XCBuildConfiguration; 154 | buildSettings = { 155 | ALWAYS_SEARCH_USER_PATHS = NO; 156 | CLANG_ANALYZER_NONNULL = YES; 157 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 158 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 159 | CLANG_CXX_LIBRARY = "libc++"; 160 | CLANG_ENABLE_MODULES = YES; 161 | CLANG_ENABLE_OBJC_ARC = YES; 162 | CLANG_ENABLE_OBJC_WEAK = YES; 163 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 164 | CLANG_WARN_BOOL_CONVERSION = YES; 165 | CLANG_WARN_COMMA = YES; 166 | CLANG_WARN_CONSTANT_CONVERSION = YES; 167 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 168 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 169 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 170 | CLANG_WARN_EMPTY_BODY = YES; 171 | CLANG_WARN_ENUM_CONVERSION = YES; 172 | CLANG_WARN_INFINITE_RECURSION = YES; 173 | CLANG_WARN_INT_CONVERSION = YES; 174 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 175 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 176 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 177 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 178 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 179 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 180 | CLANG_WARN_STRICT_PROTOTYPES = YES; 181 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 182 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 183 | CLANG_WARN_UNREACHABLE_CODE = YES; 184 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 185 | COPY_PHASE_STRIP = NO; 186 | DEBUG_INFORMATION_FORMAT = dwarf; 187 | ENABLE_STRICT_OBJC_MSGSEND = YES; 188 | ENABLE_TESTABILITY = YES; 189 | GCC_C_LANGUAGE_STANDARD = gnu11; 190 | GCC_DYNAMIC_NO_PIC = NO; 191 | GCC_NO_COMMON_BLOCKS = YES; 192 | GCC_OPTIMIZATION_LEVEL = 0; 193 | GCC_PREPROCESSOR_DEFINITIONS = ( 194 | "DEBUG=1", 195 | "$(inherited)", 196 | ); 197 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 198 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 199 | GCC_WARN_UNDECLARED_SELECTOR = YES; 200 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 201 | GCC_WARN_UNUSED_FUNCTION = YES; 202 | GCC_WARN_UNUSED_VARIABLE = YES; 203 | MACOSX_DEPLOYMENT_TARGET = 11.0; 204 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 205 | MTL_FAST_MATH = YES; 206 | ONLY_ACTIVE_ARCH = YES; 207 | SDKROOT = macosx; 208 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 209 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 210 | }; 211 | name = Debug; 212 | }; 213 | 06B1C29B256B5CE8000CE962 /* Release */ = { 214 | isa = XCBuildConfiguration; 215 | buildSettings = { 216 | ALWAYS_SEARCH_USER_PATHS = NO; 217 | CLANG_ANALYZER_NONNULL = YES; 218 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 219 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 220 | CLANG_CXX_LIBRARY = "libc++"; 221 | CLANG_ENABLE_MODULES = YES; 222 | CLANG_ENABLE_OBJC_ARC = YES; 223 | CLANG_ENABLE_OBJC_WEAK = YES; 224 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 225 | CLANG_WARN_BOOL_CONVERSION = YES; 226 | CLANG_WARN_COMMA = YES; 227 | CLANG_WARN_CONSTANT_CONVERSION = YES; 228 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 229 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 230 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 231 | CLANG_WARN_EMPTY_BODY = YES; 232 | CLANG_WARN_ENUM_CONVERSION = YES; 233 | CLANG_WARN_INFINITE_RECURSION = YES; 234 | CLANG_WARN_INT_CONVERSION = YES; 235 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 236 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 237 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 238 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 239 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 240 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 241 | CLANG_WARN_STRICT_PROTOTYPES = YES; 242 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 243 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 244 | CLANG_WARN_UNREACHABLE_CODE = YES; 245 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 246 | COPY_PHASE_STRIP = NO; 247 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 248 | ENABLE_NS_ASSERTIONS = NO; 249 | ENABLE_STRICT_OBJC_MSGSEND = YES; 250 | GCC_C_LANGUAGE_STANDARD = gnu11; 251 | GCC_NO_COMMON_BLOCKS = YES; 252 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 253 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 254 | GCC_WARN_UNDECLARED_SELECTOR = YES; 255 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 256 | GCC_WARN_UNUSED_FUNCTION = YES; 257 | GCC_WARN_UNUSED_VARIABLE = YES; 258 | MACOSX_DEPLOYMENT_TARGET = 11.0; 259 | MTL_ENABLE_DEBUG_INFO = NO; 260 | MTL_FAST_MATH = YES; 261 | SDKROOT = macosx; 262 | SWIFT_COMPILATION_MODE = wholemodule; 263 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 264 | }; 265 | name = Release; 266 | }; 267 | 06B1C29D256B5CE8000CE962 /* Debug */ = { 268 | isa = XCBuildConfiguration; 269 | buildSettings = { 270 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 271 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 272 | CODE_SIGN_ENTITLEMENTS = "silicon-info/silicon-info.entitlements"; 273 | CODE_SIGN_IDENTITY = "Apple Development"; 274 | CODE_SIGN_STYLE = Automatic; 275 | COMBINE_HIDPI_IMAGES = YES; 276 | CURRENT_PROJECT_VERSION = 5; 277 | DEVELOPMENT_ASSET_PATHS = "\"silicon-info/Preview Content\""; 278 | DEVELOPMENT_TEAM = 2J6P9NJJH8; 279 | ENABLE_HARDENED_RUNTIME = YES; 280 | ENABLE_PREVIEWS = YES; 281 | INFOPLIST_FILE = "silicon-info/Info.plist"; 282 | LD_RUNPATH_SEARCH_PATHS = ( 283 | "$(inherited)", 284 | "@executable_path/../Frameworks", 285 | ); 286 | MACOSX_DEPLOYMENT_TARGET = 11.0; 287 | MARKETING_VERSION = 1.0.3; 288 | PRODUCT_BUNDLE_IDENTIFIER = "com.wcastelli.silicon-info"; 289 | PRODUCT_NAME = "$(TARGET_NAME)"; 290 | PROVISIONING_PROFILE_SPECIFIER = ""; 291 | SWIFT_VERSION = 5.0; 292 | }; 293 | name = Debug; 294 | }; 295 | 06B1C29E256B5CE8000CE962 /* Release */ = { 296 | isa = XCBuildConfiguration; 297 | buildSettings = { 298 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 299 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 300 | CODE_SIGN_ENTITLEMENTS = "silicon-info/silicon-info.entitlements"; 301 | CODE_SIGN_IDENTITY = "Apple Development"; 302 | CODE_SIGN_STYLE = Automatic; 303 | COMBINE_HIDPI_IMAGES = YES; 304 | CURRENT_PROJECT_VERSION = 5; 305 | DEVELOPMENT_ASSET_PATHS = "\"silicon-info/Preview Content\""; 306 | DEVELOPMENT_TEAM = 2J6P9NJJH8; 307 | ENABLE_HARDENED_RUNTIME = YES; 308 | ENABLE_PREVIEWS = YES; 309 | INFOPLIST_FILE = "silicon-info/Info.plist"; 310 | LD_RUNPATH_SEARCH_PATHS = ( 311 | "$(inherited)", 312 | "@executable_path/../Frameworks", 313 | ); 314 | MACOSX_DEPLOYMENT_TARGET = 11.0; 315 | MARKETING_VERSION = 1.0.3; 316 | PRODUCT_BUNDLE_IDENTIFIER = "com.wcastelli.silicon-info"; 317 | PRODUCT_NAME = "$(TARGET_NAME)"; 318 | PROVISIONING_PROFILE_SPECIFIER = ""; 319 | SWIFT_VERSION = 5.0; 320 | }; 321 | name = Release; 322 | }; 323 | /* End XCBuildConfiguration section */ 324 | 325 | /* Begin XCConfigurationList section */ 326 | 06B1C287256B5CE6000CE962 /* Build configuration list for PBXProject "Silicon Info" */ = { 327 | isa = XCConfigurationList; 328 | buildConfigurations = ( 329 | 06B1C29A256B5CE8000CE962 /* Debug */, 330 | 06B1C29B256B5CE8000CE962 /* Release */, 331 | ); 332 | defaultConfigurationIsVisible = 0; 333 | defaultConfigurationName = Release; 334 | }; 335 | 06B1C29C256B5CE8000CE962 /* Build configuration list for PBXNativeTarget "Silicon Info" */ = { 336 | isa = XCConfigurationList; 337 | buildConfigurations = ( 338 | 06B1C29D256B5CE8000CE962 /* Debug */, 339 | 06B1C29E256B5CE8000CE962 /* Release */, 340 | ); 341 | defaultConfigurationIsVisible = 0; 342 | defaultConfigurationName = Release; 343 | }; 344 | /* End XCConfigurationList section */ 345 | }; 346 | rootObject = 06B1C284256B5CE6000CE962 /* Project object */; 347 | } 348 | -------------------------------------------------------------------------------- /Silicon Info.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Silicon Info.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Silicon Info.xcodeproj/xcuserdata/billycastelli.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Silicon Info.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | arch-menu.xcscheme_^#shared#^_ 13 | 14 | orderHint 15 | 0 16 | 17 | silicon-info.xcscheme_^#shared#^_ 18 | 19 | orderHint 20 | 0 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /images/Icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billycastelli/Silicon-Info/25a05143a5967802f0a49520d42c2c76e1c90c5e/images/Icon-128.png -------------------------------------------------------------------------------- /images/arm-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billycastelli/Silicon-Info/25a05143a5967802f0a49520d42c2c76e1c90c5e/images/arm-example.png -------------------------------------------------------------------------------- /images/finder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billycastelli/Silicon-Info/25a05143a5967802f0a49520d42c2c76e1c90c5e/images/finder.png -------------------------------------------------------------------------------- /images/indicator-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billycastelli/Silicon-Info/25a05143a5967802f0a49520d42c2c76e1c90c5e/images/indicator-icon.png -------------------------------------------------------------------------------- /images/security.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billycastelli/Silicon-Info/25a05143a5967802f0a49520d42c2c76e1c90c5e/images/security.png -------------------------------------------------------------------------------- /images/window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billycastelli/Silicon-Info/25a05143a5967802f0a49520d42c2c76e1c90c5e/images/window.png -------------------------------------------------------------------------------- /images/x86-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billycastelli/Silicon-Info/25a05143a5967802f0a49520d42c2c76e1c90c5e/images/x86-example.png -------------------------------------------------------------------------------- /silicon-info/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 | -------------------------------------------------------------------------------- /silicon-info/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "icon-16.png", 5 | "idiom" : "mac", 6 | "scale" : "1x", 7 | "size" : "16x16" 8 | }, 9 | { 10 | "filename" : "Icon-32.png", 11 | "idiom" : "mac", 12 | "scale" : "2x", 13 | "size" : "16x16" 14 | }, 15 | { 16 | "filename" : "Icon-33.png", 17 | "idiom" : "mac", 18 | "scale" : "1x", 19 | "size" : "32x32" 20 | }, 21 | { 22 | "filename" : "Icon-64.png", 23 | "idiom" : "mac", 24 | "scale" : "2x", 25 | "size" : "32x32" 26 | }, 27 | { 28 | "filename" : "Icon-128.png", 29 | "idiom" : "mac", 30 | "scale" : "1x", 31 | "size" : "128x128" 32 | }, 33 | { 34 | "filename" : "Icon-257.png", 35 | "idiom" : "mac", 36 | "scale" : "2x", 37 | "size" : "128x128" 38 | }, 39 | { 40 | "filename" : "Icon-256.png", 41 | "idiom" : "mac", 42 | "scale" : "1x", 43 | "size" : "256x256" 44 | }, 45 | { 46 | "filename" : "Icon-513.png", 47 | "idiom" : "mac", 48 | "scale" : "2x", 49 | "size" : "256x256" 50 | }, 51 | { 52 | "filename" : "Icon-512.png", 53 | "idiom" : "mac", 54 | "scale" : "1x", 55 | "size" : "512x512" 56 | }, 57 | { 58 | "filename" : "Icon-1024.png", 59 | "idiom" : "mac", 60 | "scale" : "2x", 61 | "size" : "512x512" 62 | } 63 | ], 64 | "info" : { 65 | "author" : "xcode", 66 | "version" : 1 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /silicon-info/Assets.xcassets/AppIcon.appiconset/Icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billycastelli/Silicon-Info/25a05143a5967802f0a49520d42c2c76e1c90c5e/silicon-info/Assets.xcassets/AppIcon.appiconset/Icon-1024.png -------------------------------------------------------------------------------- /silicon-info/Assets.xcassets/AppIcon.appiconset/Icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billycastelli/Silicon-Info/25a05143a5967802f0a49520d42c2c76e1c90c5e/silicon-info/Assets.xcassets/AppIcon.appiconset/Icon-128.png -------------------------------------------------------------------------------- /silicon-info/Assets.xcassets/AppIcon.appiconset/Icon-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billycastelli/Silicon-Info/25a05143a5967802f0a49520d42c2c76e1c90c5e/silicon-info/Assets.xcassets/AppIcon.appiconset/Icon-256.png -------------------------------------------------------------------------------- /silicon-info/Assets.xcassets/AppIcon.appiconset/Icon-257.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billycastelli/Silicon-Info/25a05143a5967802f0a49520d42c2c76e1c90c5e/silicon-info/Assets.xcassets/AppIcon.appiconset/Icon-257.png -------------------------------------------------------------------------------- /silicon-info/Assets.xcassets/AppIcon.appiconset/Icon-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billycastelli/Silicon-Info/25a05143a5967802f0a49520d42c2c76e1c90c5e/silicon-info/Assets.xcassets/AppIcon.appiconset/Icon-32.png -------------------------------------------------------------------------------- /silicon-info/Assets.xcassets/AppIcon.appiconset/Icon-33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billycastelli/Silicon-Info/25a05143a5967802f0a49520d42c2c76e1c90c5e/silicon-info/Assets.xcassets/AppIcon.appiconset/Icon-33.png -------------------------------------------------------------------------------- /silicon-info/Assets.xcassets/AppIcon.appiconset/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billycastelli/Silicon-Info/25a05143a5967802f0a49520d42c2c76e1c90c5e/silicon-info/Assets.xcassets/AppIcon.appiconset/Icon-512.png -------------------------------------------------------------------------------- /silicon-info/Assets.xcassets/AppIcon.appiconset/Icon-513.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billycastelli/Silicon-Info/25a05143a5967802f0a49520d42c2c76e1c90c5e/silicon-info/Assets.xcassets/AppIcon.appiconset/Icon-513.png -------------------------------------------------------------------------------- /silicon-info/Assets.xcassets/AppIcon.appiconset/Icon-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billycastelli/Silicon-Info/25a05143a5967802f0a49520d42c2c76e1c90c5e/silicon-info/Assets.xcassets/AppIcon.appiconset/Icon-64.png -------------------------------------------------------------------------------- /silicon-info/Assets.xcassets/AppIcon.appiconset/icon-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/billycastelli/Silicon-Info/25a05143a5967802f0a49520d42c2c76e1c90c5e/silicon-info/Assets.xcassets/AppIcon.appiconset/icon-16.png -------------------------------------------------------------------------------- /silicon-info/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /silicon-info/Assets.xcassets/processor-icon-arm.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "processor-icon-arm.svg", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /silicon-info/Assets.xcassets/processor-icon-arm.imageset/processor-icon-arm.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /silicon-info/Assets.xcassets/processor-icon-empty.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "processor-icon-empty.svg", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /silicon-info/Assets.xcassets/processor-icon-empty.imageset/processor-icon-empty.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /silicon-info/Assets.xcassets/processor-icon-intel.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "processor-icon-intel.svg", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /silicon-info/Assets.xcassets/processor-icon-intel.imageset/processor-icon-intel.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /silicon-info/Assets.xcassets/processor-icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "processor-icon.svg", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /silicon-info/Assets.xcassets/processor-icon.imageset/processor-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /silicon-info/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // silicon-info 4 | // 5 | // Created by Billy Castelli on 11/22/20. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | let appName: String 12 | let architecture: String 13 | let appIcon: NSImage 14 | var body: some View { 15 | Label { 16 | Text(appName).font(.title) 17 | } icon: { 18 | Image(nsImage: appIcon) 19 | } 20 | VStack { 21 | Text(architecture) 22 | } 23 | } 24 | } 25 | 26 | struct ContentView_Previews: PreviewProvider { 27 | static var previews: some View { 28 | ContentView(appName: "", architecture: "", appIcon: NSImage(named: "processor-icon") ?? NSImage()) 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /silicon-info/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 | $(MARKETING_VERSION) 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | LSApplicationCategoryType 22 | public.app-category.utilities 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | LSUIElement 26 | 27 | NSHumanReadableCopyright 28 | Copyright © 2020 William Castelli 29 | 30 | 31 | -------------------------------------------------------------------------------- /silicon-info/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /silicon-info/silicon-info.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 | -------------------------------------------------------------------------------- /silicon-info/silicon-infoApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SiliconInfoApp.swift 3 | // silicon-info 4 | // 5 | // Created by Billy Castelli on 11/22/20. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct RunningApplication { 11 | let appName: String 12 | let architecture: String 13 | let appImage: NSImage 14 | let processorIcon: NSImage 15 | } 16 | 17 | @main 18 | struct SiliconInfoApp: App { 19 | @NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate 20 | var body: some Scene { 21 | Settings { 22 | EmptyView() 23 | } 24 | } 25 | } 26 | 27 | class AppDelegate: NSObject, NSApplicationDelegate, NSMenuDelegate { 28 | // Set notification for active applications 29 | override init(){ 30 | super.init() 31 | NSWorkspace.shared.notificationCenter.addObserver(self, 32 | selector: #selector(iconSwitcher(notification:)), 33 | name: NSWorkspace.didActivateApplicationNotification, 34 | object:nil) 35 | 36 | } 37 | var application: NSApplication = NSApplication.shared 38 | var statusBarItem: NSStatusItem? 39 | let menu = NSMenu() 40 | 41 | // Run function when application first opens 42 | func applicationDidFinishLaunching(_ notification: Notification) { 43 | menu.delegate = self; 44 | 45 | // Grab application information from frontmost application 46 | let app = getApplicationInfo(application: NSWorkspace.shared.frontmostApplication) 47 | 48 | // Set view 49 | let contentView = ContentView(appName: app.appName, architecture: app.architecture, appIcon: app.appImage) 50 | let menuItem = NSMenuItem() 51 | let view = NSHostingView(rootView: contentView) 52 | view.frame = NSRect(x: 0, y: 0, width: 200, height: 100) 53 | menuItem.view = view 54 | menu.addItem(menuItem) 55 | menu.addItem(NSMenuItem(title: "Quit Silicon Info", action: #selector(NSApplication.terminate(_:)), keyEquivalent: "q")) 56 | 57 | // Set initial app icon 58 | statusBarItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength) 59 | let itemImage = app.processorIcon; 60 | itemImage.isTemplate = true 61 | statusBarItem?.button?.image = itemImage 62 | statusBarItem?.menu = menu 63 | } 64 | 65 | 66 | // Run function when menu bar icon is clicked 67 | func menuWillOpen(_ menu: NSMenu) { 68 | // Grab application information from frontmost application 69 | let app = getApplicationInfo(application: NSWorkspace.shared.frontmostApplication) 70 | 71 | // Set view 72 | let contentView = ContentView(appName: app.appName, architecture: app.architecture, appIcon: app.appImage) 73 | let menuItem = NSMenuItem() 74 | let view = NSHostingView(rootView: contentView) 75 | view.frame = NSRect(x: 0, y: 0, width: 200, height: 100) 76 | menuItem.view = view 77 | menu.removeAllItems() 78 | menu.addItem(menuItem) 79 | menu.addItem(NSMenuItem(title: "Quit Silicon Info", action: #selector(NSApplication.terminate(_:)), keyEquivalent: "q")) 80 | 81 | // Update icon 82 | let itemImage = app.processorIcon; 83 | itemImage.isTemplate = true 84 | statusBarItem?.button?.image = itemImage 85 | } 86 | 87 | // Run function when a new application is sent to front 88 | @objc func iconSwitcher(notification: NSNotification) { 89 | guard let notification = notification.userInfo else { 90 | return; 91 | } 92 | guard let runningApplication = notification["NSWorkspaceApplicationKey"] else { 93 | return 94 | } 95 | let app = getApplicationInfo(application: runningApplication as? NSRunningApplication) 96 | let itemImage = app.processorIcon; 97 | itemImage.isTemplate = true 98 | statusBarItem?.button?.image = itemImage 99 | } 100 | 101 | func getApplicationInfo(application: NSRunningApplication?) ->RunningApplication{ 102 | // Check if application is nil, passed in item is not guaranteed to be an object 103 | guard let runningApp = application else { 104 | return RunningApplication(appName: "Unknown", architecture: "Cannot identify frontmost app", appImage: NSImage(named: "processor-icon-empty") ?? NSImage(), processorIcon: NSImage(named: "processor-icon-empty") ?? NSImage()) 105 | } 106 | // After checking for nil, we can refer to runningApp, guarenteed to be NSRunningApplication 107 | let frontAppName = runningApp.localizedName ?? String() 108 | let frontAppImage = runningApp.icon ?? NSImage() 109 | let architectureInt = runningApp.executableArchitecture 110 | 111 | 112 | var architecture = "" 113 | var processorIcon = NSImage() 114 | switch architectureInt { 115 | case NSBundleExecutableArchitectureARM64: 116 | architecture = "arm64 • Apple Silicon" 117 | processorIcon = NSImage(named: "processor-icon") ?? NSImage() 118 | case NSBundleExecutableArchitectureI386: 119 | architecture = "x86 • Intel 32-bit" 120 | processorIcon = NSImage(named: "processor-icon-empty") ?? NSImage() 121 | case NSBundleExecutableArchitectureX86_64: 122 | architecture = "x86-64 • Intel 64-bit" 123 | processorIcon = NSImage(named: "processor-icon-empty") ?? NSImage() 124 | case NSBundleExecutableArchitecturePPC: 125 | architecture = "ppc32 • PowerPC 32-bit" 126 | processorIcon = NSImage(named: "processor-icon-empty") ?? NSImage() 127 | case NSBundleExecutableArchitecturePPC64: 128 | architecture = "ppc64 • PowerPC 64-bit" 129 | processorIcon = NSImage(named: "processor-icon-empty") ?? NSImage() 130 | default: 131 | architecture = "Unknown • Unknown" 132 | processorIcon = NSImage(named: "processor-icon-empty") ?? NSImage() 133 | } 134 | return RunningApplication(appName: frontAppName, architecture: architecture, appImage: frontAppImage, processorIcon: processorIcon) 135 | } 136 | } 137 | --------------------------------------------------------------------------------