├── Images ├── Info.png ├── SIPEnabled.png ├── SIPUnknown.png └── SIPDisabled.png ├── .gitignore ├── MenuBarSIPDetector ├── Assets.xcassets │ ├── Contents.json │ ├── AppIcon.appiconset │ │ ├── AppIcon-128.png │ │ ├── AppIcon-16.png │ │ ├── AppIcon-256.png │ │ ├── AppIcon-32.png │ │ ├── AppIcon-512.png │ │ ├── AppIcon-16@2x.png │ │ ├── AppIcon-32@2x.png │ │ ├── AppIcon-128@2x.png │ │ ├── AppIcon-256@2x.png │ │ ├── AppIcon-512@2x.png │ │ └── Contents.json │ └── AccentColor.colorset │ │ └── Contents.json ├── MenuBarSIPDetector.entitlements ├── Info.plist ├── SIP.swift ├── InfoViewController.swift ├── AppDelegate.swift └── Base.lproj │ └── Main.storyboard ├── MenuBarSIPDetector.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ ├── pietrocaruso.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ │ └── itztravelintime.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── swiftpm │ │ └── Package.resolved ├── xcuserdata │ ├── pietrocaruso.xcuserdatad │ │ ├── xcdebugger │ │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ │ └── xcschememanagement.plist │ └── itztravelintime.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist └── project.pbxproj ├── README.md └── LICENSE /Images/Info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ITzTravelInTime/MenuBarSIPDetector/HEAD/Images/Info.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | MenuBarSIPDetector/Assets.xcassets/.DS_Store 3 | MenuBarSIPDetector/.DS_Store 4 | .DS_Store 5 | -------------------------------------------------------------------------------- /Images/SIPEnabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ITzTravelInTime/MenuBarSIPDetector/HEAD/Images/SIPEnabled.png -------------------------------------------------------------------------------- /Images/SIPUnknown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ITzTravelInTime/MenuBarSIPDetector/HEAD/Images/SIPUnknown.png -------------------------------------------------------------------------------- /Images/SIPDisabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ITzTravelInTime/MenuBarSIPDetector/HEAD/Images/SIPDisabled.png -------------------------------------------------------------------------------- /MenuBarSIPDetector/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /MenuBarSIPDetector/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ITzTravelInTime/MenuBarSIPDetector/HEAD/MenuBarSIPDetector/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png -------------------------------------------------------------------------------- /MenuBarSIPDetector/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ITzTravelInTime/MenuBarSIPDetector/HEAD/MenuBarSIPDetector/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png -------------------------------------------------------------------------------- /MenuBarSIPDetector/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ITzTravelInTime/MenuBarSIPDetector/HEAD/MenuBarSIPDetector/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png -------------------------------------------------------------------------------- /MenuBarSIPDetector/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ITzTravelInTime/MenuBarSIPDetector/HEAD/MenuBarSIPDetector/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png -------------------------------------------------------------------------------- /MenuBarSIPDetector/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ITzTravelInTime/MenuBarSIPDetector/HEAD/MenuBarSIPDetector/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png -------------------------------------------------------------------------------- /MenuBarSIPDetector/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ITzTravelInTime/MenuBarSIPDetector/HEAD/MenuBarSIPDetector/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png -------------------------------------------------------------------------------- /MenuBarSIPDetector/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ITzTravelInTime/MenuBarSIPDetector/HEAD/MenuBarSIPDetector/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png -------------------------------------------------------------------------------- /MenuBarSIPDetector/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ITzTravelInTime/MenuBarSIPDetector/HEAD/MenuBarSIPDetector/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png -------------------------------------------------------------------------------- /MenuBarSIPDetector/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ITzTravelInTime/MenuBarSIPDetector/HEAD/MenuBarSIPDetector/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png -------------------------------------------------------------------------------- /MenuBarSIPDetector/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ITzTravelInTime/MenuBarSIPDetector/HEAD/MenuBarSIPDetector/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png -------------------------------------------------------------------------------- /MenuBarSIPDetector.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /MenuBarSIPDetector/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 | -------------------------------------------------------------------------------- /MenuBarSIPDetector.xcodeproj/xcuserdata/pietrocaruso.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /MenuBarSIPDetector.xcodeproj/project.xcworkspace/xcuserdata/pietrocaruso.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ITzTravelInTime/MenuBarSIPDetector/HEAD/MenuBarSIPDetector.xcodeproj/project.xcworkspace/xcuserdata/pietrocaruso.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /MenuBarSIPDetector.xcodeproj/project.xcworkspace/xcuserdata/itztravelintime.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ITzTravelInTime/MenuBarSIPDetector/HEAD/MenuBarSIPDetector.xcodeproj/project.xcworkspace/xcuserdata/itztravelintime.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /MenuBarSIPDetector/MenuBarSIPDetector.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 | -------------------------------------------------------------------------------- /MenuBarSIPDetector.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "object": { 3 | "pins": [ 4 | { 5 | "package": "SwiftLoggedPrint", 6 | "repositoryURL": "https://github.com/ITzTravelInTime/SwiftLoggedPrint", 7 | "state": { 8 | "branch": null, 9 | "revision": "5236d5d1bcf0306d316bb6ac0af9ee6f07894f2f", 10 | "version": "3.2.0" 11 | } 12 | }, 13 | { 14 | "package": "TINUIORegistry", 15 | "repositoryURL": "https://github.com/ITzTravelInTime/TINUIORegistry", 16 | "state": { 17 | "branch": null, 18 | "revision": "1fe4e9601c4b86d2f695ff0f6b8ef33b9a9d7ba9", 19 | "version": "0.0.3" 20 | } 21 | }, 22 | { 23 | "package": "TINURecovery", 24 | "repositoryURL": "https://github.com/ITzTravelInTime/TINURecovery.git", 25 | "state": { 26 | "branch": null, 27 | "revision": "26d45ef7436c4e7f0da475d549ce358b66bbf78d", 28 | "version": "4.1.2" 29 | } 30 | } 31 | ] 32 | }, 33 | "version": 1 34 | } 35 | -------------------------------------------------------------------------------- /MenuBarSIPDetector/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 19 | CFBundleShortVersionString 20 | $(MARKETING_VERSION) 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | LSApplicationCategoryType 24 | public.app-category.developer-tools 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | LSUIElement 28 | 29 | NSMainStoryboardFile 30 | Main 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /MenuBarSIPDetector/SIP.swift: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | MenuBarSIPDetector: A simple app to know the current status of the System Integrity Protection. 4 | Copyright (C) 2021 Pietro Caruso (ITzTravelInTime) 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | */ 21 | 22 | import Foundation 23 | import AppKit 24 | import TINURecovery 25 | 26 | class DebugSIP: SIP{ 27 | public override class var simulatedStatus: SIPStatus?{ 28 | return nil 29 | } 30 | } 31 | 32 | extension SIP.SIPStatus{ 33 | func statusBadge() -> NSImage?{ 34 | if let stat = self.resultsEnabled{ 35 | return stat.badge() 36 | }else{ 37 | return NSImage(named: NSImage.statusPartiallyAvailableName) 38 | } 39 | } 40 | } 41 | 42 | extension Bool{ 43 | func badge() -> NSImage?{ 44 | return NSImage(named: self ? NSImage.statusAvailableName : NSImage.statusUnavailableName) 45 | } 46 | } 47 | 48 | 49 | -------------------------------------------------------------------------------- /MenuBarSIPDetector/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "AppIcon-16.png", 5 | "idiom" : "mac", 6 | "scale" : "1x", 7 | "size" : "16x16" 8 | }, 9 | { 10 | "filename" : "AppIcon-16@2x.png", 11 | "idiom" : "mac", 12 | "scale" : "2x", 13 | "size" : "16x16" 14 | }, 15 | { 16 | "filename" : "AppIcon-32.png", 17 | "idiom" : "mac", 18 | "scale" : "1x", 19 | "size" : "32x32" 20 | }, 21 | { 22 | "filename" : "AppIcon-32@2x.png", 23 | "idiom" : "mac", 24 | "scale" : "2x", 25 | "size" : "32x32" 26 | }, 27 | { 28 | "filename" : "AppIcon-128.png", 29 | "idiom" : "mac", 30 | "scale" : "1x", 31 | "size" : "128x128" 32 | }, 33 | { 34 | "filename" : "AppIcon-128@2x.png", 35 | "idiom" : "mac", 36 | "scale" : "2x", 37 | "size" : "128x128" 38 | }, 39 | { 40 | "filename" : "AppIcon-256.png", 41 | "idiom" : "mac", 42 | "scale" : "1x", 43 | "size" : "256x256" 44 | }, 45 | { 46 | "filename" : "AppIcon-256@2x.png", 47 | "idiom" : "mac", 48 | "scale" : "2x", 49 | "size" : "256x256" 50 | }, 51 | { 52 | "filename" : "AppIcon-512.png", 53 | "idiom" : "mac", 54 | "scale" : "1x", 55 | "size" : "512x512" 56 | }, 57 | { 58 | "filename" : "AppIcon-512@2x.png", 59 | "idiom" : "mac", 60 | "scale" : "2x", 61 | "size" : "512x512" 62 | } 63 | ], 64 | "info" : { 65 | "author" : "xcode", 66 | "version" : 1 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MenuBarSIPDetector 2 | 3 | This is a DEMO app for my Swift library [TINURecovery](https://github.com/ITzTravelInTime/TINURecovery) and it is a macOS menu bar app that displays the current status of SIP (System Integrity Protection) including all the details. 4 | 5 | This app has been mostly made for Developers and people who often changes the status of SIP and want to always know what is it's current value precisely. 6 | 7 | ![SIP on](./Images/SIPEnabled.png) 8 | 9 | ![SIP off](./Images/SIPDisabled.png) 10 | 11 | ![SIP unknown](./Images/SIPUnknown.png) 12 | 13 | ![Info Windows](./Images/Info.png) 14 | 15 | # Credits 16 | 17 | - ITzTravelInTime (Pietro Caruso) - Project creator and main developer 18 | 19 | # Contacts 20 | 21 | - ITzTravelInTime (Pietro Caruso): piecaruso97@gmail.com 22 | 23 | # Legal info 24 | 25 | MenuBarSIPDetector: A simple app to know the current status of the System Integrity Protection. 26 | Copyright (C) 2021 Pietro Caruso (ITzTravelInTime) 27 | 28 | This program is free software; you can redistribute it and/or modify 29 | it under the terms of the GNU General Public License as published by 30 | the Free Software Foundation; either version 2 of the License, or 31 | (at your option) any later version. 32 | 33 | This program is distributed in the hope that it will be useful, 34 | but WITHOUT ANY WARRANTY; without even the implied warranty of 35 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 36 | GNU General Public License for more details. 37 | 38 | You should have received a copy of the GNU General Public License along 39 | with this program; if not, write to the Free Software Foundation, Inc., 40 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 41 | 42 | -------------------------------------------------------------------------------- /MenuBarSIPDetector.xcodeproj/xcuserdata/pietrocaruso.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Demo (Playground) 1.xcscheme 8 | 9 | isShown 10 | 11 | orderHint 12 | 2 13 | 14 | Demo (Playground) 2.xcscheme 15 | 16 | isShown 17 | 18 | orderHint 19 | 3 20 | 21 | Demo (Playground) 3.xcscheme 22 | 23 | isShown 24 | 25 | orderHint 26 | 4 27 | 28 | Demo (Playground) 4.xcscheme 29 | 30 | isShown 31 | 32 | orderHint 33 | 5 34 | 35 | Demo (Playground) 5.xcscheme 36 | 37 | isShown 38 | 39 | orderHint 40 | 6 41 | 42 | Demo (Playground) 6.xcscheme 43 | 44 | isShown 45 | 46 | orderHint 47 | 7 48 | 49 | Demo (Playground) 7.xcscheme 50 | 51 | isShown 52 | 53 | orderHint 54 | 8 55 | 56 | Demo (Playground) 8.xcscheme 57 | 58 | isShown 59 | 60 | orderHint 61 | 9 62 | 63 | Demo (Playground).xcscheme 64 | 65 | isShown 66 | 67 | orderHint 68 | 0 69 | 70 | MenuBarSIPDetector.xcscheme_^#shared#^_ 71 | 72 | orderHint 73 | 0 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /MenuBarSIPDetector.xcodeproj/xcuserdata/itztravelintime.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Demo (Playground) 1.xcscheme 8 | 9 | isShown 10 | 11 | orderHint 12 | 3 13 | 14 | Demo (Playground) 2.xcscheme 15 | 16 | isShown 17 | 18 | orderHint 19 | 4 20 | 21 | Demo (Playground) 3.xcscheme 22 | 23 | isShown 24 | 25 | orderHint 26 | 5 27 | 28 | Demo (Playground) 4.xcscheme 29 | 30 | isShown 31 | 32 | orderHint 33 | 6 34 | 35 | Demo (Playground) 5.xcscheme 36 | 37 | isShown 38 | 39 | orderHint 40 | 7 41 | 42 | Demo (Playground) 6.xcscheme 43 | 44 | isShown 45 | 46 | orderHint 47 | 8 48 | 49 | Demo (Playground) 7.xcscheme 50 | 51 | isShown 52 | 53 | orderHint 54 | 9 55 | 56 | Demo (Playground) 8.xcscheme 57 | 58 | isShown 59 | 60 | orderHint 61 | 10 62 | 63 | Demo (Playground).xcscheme 64 | 65 | isShown 66 | 67 | orderHint 68 | 2 69 | 70 | MenuBarSIPDetector.xcscheme_^#shared#^_ 71 | 72 | orderHint 73 | 0 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /MenuBarSIPDetector/InfoViewController.swift: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | MenuBarSIPDetector: A simple app to know the current status of the System Integrity Protection. 4 | Copyright (C) 2021 Pietro Caruso (ITzTravelInTime) 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | */ 21 | 22 | import AppKit 23 | 24 | @IBDesignable class InfoViewController: NSViewController{ 25 | 26 | @IBOutlet weak var infoLabel: NSTextField! 27 | @IBOutlet weak var currentStatusImageView: NSImageView! 28 | @IBOutlet weak var currentStatusLabel: NSTextField! 29 | 30 | private var bit: DebugSIP.SIPBits? 31 | private var status: Bool = false 32 | 33 | private static var instance: NSWindowController? = nil 34 | 35 | static func createAndShow( fromBit bit: DebugSIP.SIPBits, withStatus cstatus: Bool ){ 36 | 37 | if instance == nil{ 38 | instance = (NSStoryboard.init(name: "Main", bundle: Bundle.main).instantiateController(withIdentifier: "InfoWindowController") as? NSWindowController) 39 | 40 | if instance == nil{ 41 | return 42 | } 43 | } 44 | 45 | instance?.window?.title = "Info about: \(bit.name)" 46 | 47 | guard let content = instance?.contentViewController as? InfoViewController else { return } 48 | 49 | content.bit = bit 50 | content.status = cstatus 51 | 52 | if content.infoLabel != nil && content.currentStatusLabel != nil && content.currentStatusImageView != nil{ 53 | content.viewDidAppear() 54 | } 55 | 56 | instance?.showWindow(self) 57 | instance?.window?.makeKeyAndOrderFront(self) 58 | 59 | } 60 | 61 | override func viewDidAppear() { 62 | super.viewDidAppear() 63 | 64 | self.infoLabel.stringValue = self.bit?.userDescription ?? "[Error getting info]" 65 | self.currentStatusLabel.stringValue = status ? "Currently enabled" : "Currently disabled" 66 | self.currentStatusImageView.image = status.badge() 67 | } 68 | 69 | } 70 | 71 | class BitMenuItem: NSMenuItem{ 72 | var bit: DebugSIP.SIPBits? 73 | var bitStatus: Bool = false 74 | } 75 | -------------------------------------------------------------------------------- /MenuBarSIPDetector/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | MenuBarSIPDetector: A simple app to know the current status of the System Integrity Protection. 4 | Copyright (C) 2021 Pietro Caruso (ITzTravelInTime) 5 | 6 | This program is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 2 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along 17 | with this program; if not, write to the Free Software Foundation, Inc., 18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 19 | 20 | */ 21 | 22 | import Cocoa 23 | import TINURecovery 24 | 25 | @main 26 | class AppDelegate: NSObject, NSApplicationDelegate { 27 | 28 | @IBOutlet weak var menu: NSMenu? 29 | @IBOutlet weak var firstMenuItem: NSMenuItem? 30 | @IBOutlet weak var refreshMenuItem: NSMenuItem? 31 | 32 | private var statusItem: NSStatusItem? 33 | private var itemsAdded = false 34 | 35 | func applicationDidFinishLaunching(_ aNotification: Notification) { 36 | awakeFromNib() 37 | } 38 | 39 | func applicationWillTerminate(_ aNotification: Notification) { 40 | // Insert code here to tear down your application 41 | } 42 | 43 | override func awakeFromNib() { 44 | super.awakeFromNib() 45 | 46 | 47 | if refreshMenuItem != nil { 48 | refreshMenuItem?.isHidden = !Recovery.status 49 | } 50 | 51 | DispatchQueue.global(qos: .userInteractive).async { 52 | let status = DebugSIP.status 53 | 54 | DispatchQueue.main.sync { 55 | 56 | self.statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength) 57 | 58 | let itemImage = status.statusBadge() 59 | let title = status.statusStrig() 60 | 61 | //itemImage?.isTemplate = true 62 | self.statusItem?.button?.title = title 63 | self.statusItem?.button?.image = itemImage 64 | self.statusItem?.button?.imagePosition = NSControl.ImagePosition.imageLeft 65 | 66 | if !self.itemsAdded{ 67 | 68 | self.itemsAdded.toggle() 69 | 70 | for i in self.menu?.items ?? []{ 71 | if i as? BitMenuItem != nil{ 72 | self.menu?.removeItem(i) 73 | } 74 | } 75 | 76 | for bit in status.detailedConfiguration.sorted(by: { $0.key.rawValue > $1.key.rawValue }){ 77 | let m = BitMenuItem(title: bit.key.name , action: #selector(self.openBitInfo(_:)), keyEquivalent: "") 78 | 79 | m.bit = bit.key 80 | m.bitStatus = bit.value 81 | 82 | m.image = bit.value.badge() 83 | 84 | self.menu?.insertItem(m, at: 0) 85 | } 86 | } 87 | 88 | if let menu = self.menu { 89 | self.statusItem?.menu = menu 90 | } 91 | 92 | } 93 | } 94 | 95 | } 96 | 97 | @IBAction func openBitInfo( _ sender: BitMenuItem){ 98 | if sender.bit == nil{ 99 | return 100 | } 101 | 102 | InfoViewController.createAndShow(fromBit: sender.bit!, withStatus: sender.bitStatus) 103 | } 104 | 105 | @IBAction func checkOnGithub(_ sender: Any) { 106 | let _ = NSWorkspace.shared.open(URL(string: "https://github.com/ITzTravelInTime/MenuBarSIPDetector")!) 107 | } 108 | 109 | @IBAction func showInFinder(_ sender: Any) { 110 | NSWorkspace.shared.selectFile(Bundle.main.bundlePath, inFileViewerRootedAtPath: Bundle.main.bundleURL.deletingLastPathComponent().path) 111 | } 112 | 113 | @IBAction func refresh( _ sender: Any){ 114 | 115 | 116 | 117 | self.itemsAdded = false 118 | awakeFromNib() 119 | } 120 | 121 | 122 | } 123 | 124 | -------------------------------------------------------------------------------- /MenuBarSIPDetector/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | -------------------------------------------------------------------------------- /MenuBarSIPDetector.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 52; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C6254B94268B07BB0082C7F5 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6254B93268B07BB0082C7F5 /* AppDelegate.swift */; }; 11 | C6254B98268B07BD0082C7F5 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C6254B97268B07BD0082C7F5 /* Assets.xcassets */; }; 12 | C6254B9B268B07BD0082C7F5 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C6254B99268B07BD0082C7F5 /* Main.storyboard */; }; 13 | C659BE6326A4D58500786905 /* InfoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C659BE6226A4D58500786905 /* InfoViewController.swift */; }; 14 | C6B2389A26A37975003AC9E2 /* SIP.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6B2389926A37974003AC9E2 /* SIP.swift */; }; 15 | C6FB65CB268B0E99007ECD56 /* TINURecovery in Frameworks */ = {isa = PBXBuildFile; productRef = C6FB65CA268B0E99007ECD56 /* TINURecovery */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXFileReference section */ 19 | C6254B90268B07BB0082C7F5 /* MenuBarSIPDetector.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MenuBarSIPDetector.app; sourceTree = BUILT_PRODUCTS_DIR; }; 20 | C6254B93268B07BB0082C7F5 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 21 | C6254B97268B07BD0082C7F5 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 22 | C6254B9A268B07BD0082C7F5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 23 | C6254B9C268B07BD0082C7F5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 24 | C6254B9D268B07BD0082C7F5 /* MenuBarSIPDetector.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = MenuBarSIPDetector.entitlements; sourceTree = ""; }; 25 | C659BE6226A4D58500786905 /* InfoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InfoViewController.swift; sourceTree = ""; }; 26 | C6B2389926A37974003AC9E2 /* SIP.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SIP.swift; sourceTree = ""; }; 27 | DD8A63BA273EDB1700DAE911 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; 28 | DD8A63BB273EDB1700DAE911 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; 29 | DD8A63BC273EDB1700DAE911 /* Images */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Images; sourceTree = ""; }; 30 | /* End PBXFileReference section */ 31 | 32 | /* Begin PBXFrameworksBuildPhase section */ 33 | C6254B8D268B07BB0082C7F5 /* Frameworks */ = { 34 | isa = PBXFrameworksBuildPhase; 35 | buildActionMask = 2147483647; 36 | files = ( 37 | C6FB65CB268B0E99007ECD56 /* TINURecovery in Frameworks */, 38 | ); 39 | runOnlyForDeploymentPostprocessing = 0; 40 | }; 41 | /* End PBXFrameworksBuildPhase section */ 42 | 43 | /* Begin PBXGroup section */ 44 | C6254B87268B07BA0082C7F5 = { 45 | isa = PBXGroup; 46 | children = ( 47 | DD8A63BC273EDB1700DAE911 /* Images */, 48 | DD8A63BB273EDB1700DAE911 /* LICENSE */, 49 | DD8A63BA273EDB1700DAE911 /* README.md */, 50 | C6254B92268B07BB0082C7F5 /* MenuBarSIPDetector */, 51 | C6254B91268B07BB0082C7F5 /* Products */, 52 | ); 53 | sourceTree = ""; 54 | }; 55 | C6254B91268B07BB0082C7F5 /* Products */ = { 56 | isa = PBXGroup; 57 | children = ( 58 | C6254B90268B07BB0082C7F5 /* MenuBarSIPDetector.app */, 59 | ); 60 | name = Products; 61 | sourceTree = ""; 62 | }; 63 | C6254B92268B07BB0082C7F5 /* MenuBarSIPDetector */ = { 64 | isa = PBXGroup; 65 | children = ( 66 | C6254B93268B07BB0082C7F5 /* AppDelegate.swift */, 67 | C6B2389926A37974003AC9E2 /* SIP.swift */, 68 | C659BE6226A4D58500786905 /* InfoViewController.swift */, 69 | C6254B97268B07BD0082C7F5 /* Assets.xcassets */, 70 | C6254B99268B07BD0082C7F5 /* Main.storyboard */, 71 | C6254B9C268B07BD0082C7F5 /* Info.plist */, 72 | C6254B9D268B07BD0082C7F5 /* MenuBarSIPDetector.entitlements */, 73 | ); 74 | path = MenuBarSIPDetector; 75 | sourceTree = ""; 76 | }; 77 | /* End PBXGroup section */ 78 | 79 | /* Begin PBXNativeTarget section */ 80 | C6254B8F268B07BB0082C7F5 /* MenuBarSIPDetector */ = { 81 | isa = PBXNativeTarget; 82 | buildConfigurationList = C6254BA0268B07BD0082C7F5 /* Build configuration list for PBXNativeTarget "MenuBarSIPDetector" */; 83 | buildPhases = ( 84 | C6254B8C268B07BB0082C7F5 /* Sources */, 85 | C6254B8D268B07BB0082C7F5 /* Frameworks */, 86 | C6254B8E268B07BB0082C7F5 /* Resources */, 87 | ); 88 | buildRules = ( 89 | ); 90 | dependencies = ( 91 | ); 92 | name = MenuBarSIPDetector; 93 | packageProductDependencies = ( 94 | C6FB65CA268B0E99007ECD56 /* TINURecovery */, 95 | ); 96 | productName = MenuBarSIPDetector; 97 | productReference = C6254B90268B07BB0082C7F5 /* MenuBarSIPDetector.app */; 98 | productType = "com.apple.product-type.application"; 99 | }; 100 | /* End PBXNativeTarget section */ 101 | 102 | /* Begin PBXProject section */ 103 | C6254B88268B07BA0082C7F5 /* Project object */ = { 104 | isa = PBXProject; 105 | attributes = { 106 | LastSwiftUpdateCheck = 1250; 107 | LastUpgradeCheck = 1250; 108 | TargetAttributes = { 109 | C6254B8F268B07BB0082C7F5 = { 110 | CreatedOnToolsVersion = 12.5.1; 111 | }; 112 | }; 113 | }; 114 | buildConfigurationList = C6254B8B268B07BA0082C7F5 /* Build configuration list for PBXProject "MenuBarSIPDetector" */; 115 | compatibilityVersion = "Xcode 9.3"; 116 | developmentRegion = en; 117 | hasScannedForEncodings = 0; 118 | knownRegions = ( 119 | en, 120 | Base, 121 | ); 122 | mainGroup = C6254B87268B07BA0082C7F5; 123 | packageReferences = ( 124 | C6FB65C9268B0E99007ECD56 /* XCRemoteSwiftPackageReference "TINURecovery" */, 125 | ); 126 | productRefGroup = C6254B91268B07BB0082C7F5 /* Products */; 127 | projectDirPath = ""; 128 | projectRoot = ""; 129 | targets = ( 130 | C6254B8F268B07BB0082C7F5 /* MenuBarSIPDetector */, 131 | ); 132 | }; 133 | /* End PBXProject section */ 134 | 135 | /* Begin PBXResourcesBuildPhase section */ 136 | C6254B8E268B07BB0082C7F5 /* Resources */ = { 137 | isa = PBXResourcesBuildPhase; 138 | buildActionMask = 2147483647; 139 | files = ( 140 | C6254B98268B07BD0082C7F5 /* Assets.xcassets in Resources */, 141 | C6254B9B268B07BD0082C7F5 /* Main.storyboard in Resources */, 142 | ); 143 | runOnlyForDeploymentPostprocessing = 0; 144 | }; 145 | /* End PBXResourcesBuildPhase section */ 146 | 147 | /* Begin PBXSourcesBuildPhase section */ 148 | C6254B8C268B07BB0082C7F5 /* Sources */ = { 149 | isa = PBXSourcesBuildPhase; 150 | buildActionMask = 2147483647; 151 | files = ( 152 | C6B2389A26A37975003AC9E2 /* SIP.swift in Sources */, 153 | C659BE6326A4D58500786905 /* InfoViewController.swift in Sources */, 154 | C6254B94268B07BB0082C7F5 /* AppDelegate.swift in Sources */, 155 | ); 156 | runOnlyForDeploymentPostprocessing = 0; 157 | }; 158 | /* End PBXSourcesBuildPhase section */ 159 | 160 | /* Begin PBXVariantGroup section */ 161 | C6254B99268B07BD0082C7F5 /* Main.storyboard */ = { 162 | isa = PBXVariantGroup; 163 | children = ( 164 | C6254B9A268B07BD0082C7F5 /* Base */, 165 | ); 166 | name = Main.storyboard; 167 | sourceTree = ""; 168 | }; 169 | /* End PBXVariantGroup section */ 170 | 171 | /* Begin XCBuildConfiguration section */ 172 | C6254B9E268B07BD0082C7F5 /* Debug */ = { 173 | isa = XCBuildConfiguration; 174 | buildSettings = { 175 | ALWAYS_SEARCH_USER_PATHS = NO; 176 | CLANG_ANALYZER_NONNULL = YES; 177 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 178 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 179 | CLANG_CXX_LIBRARY = "libc++"; 180 | CLANG_ENABLE_MODULES = YES; 181 | CLANG_ENABLE_OBJC_ARC = YES; 182 | CLANG_ENABLE_OBJC_WEAK = YES; 183 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 184 | CLANG_WARN_BOOL_CONVERSION = YES; 185 | CLANG_WARN_COMMA = YES; 186 | CLANG_WARN_CONSTANT_CONVERSION = YES; 187 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 188 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 189 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 190 | CLANG_WARN_EMPTY_BODY = YES; 191 | CLANG_WARN_ENUM_CONVERSION = YES; 192 | CLANG_WARN_INFINITE_RECURSION = YES; 193 | CLANG_WARN_INT_CONVERSION = YES; 194 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 195 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 196 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 197 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 198 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 199 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 200 | CLANG_WARN_STRICT_PROTOTYPES = YES; 201 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 202 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 203 | CLANG_WARN_UNREACHABLE_CODE = YES; 204 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 205 | COPY_PHASE_STRIP = NO; 206 | DEBUG_INFORMATION_FORMAT = dwarf; 207 | ENABLE_STRICT_OBJC_MSGSEND = YES; 208 | ENABLE_TESTABILITY = YES; 209 | GCC_C_LANGUAGE_STANDARD = gnu11; 210 | GCC_DYNAMIC_NO_PIC = NO; 211 | GCC_NO_COMMON_BLOCKS = YES; 212 | GCC_OPTIMIZATION_LEVEL = 0; 213 | GCC_PREPROCESSOR_DEFINITIONS = ( 214 | "DEBUG=1", 215 | "$(inherited)", 216 | ); 217 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 218 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 219 | GCC_WARN_UNDECLARED_SELECTOR = YES; 220 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 221 | GCC_WARN_UNUSED_FUNCTION = YES; 222 | GCC_WARN_UNUSED_VARIABLE = YES; 223 | MACOSX_DEPLOYMENT_TARGET = 11.3; 224 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 225 | MTL_FAST_MATH = YES; 226 | ONLY_ACTIVE_ARCH = YES; 227 | SDKROOT = macosx; 228 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 229 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 230 | }; 231 | name = Debug; 232 | }; 233 | C6254B9F268B07BD0082C7F5 /* Release */ = { 234 | isa = XCBuildConfiguration; 235 | buildSettings = { 236 | ALWAYS_SEARCH_USER_PATHS = NO; 237 | CLANG_ANALYZER_NONNULL = YES; 238 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 240 | CLANG_CXX_LIBRARY = "libc++"; 241 | CLANG_ENABLE_MODULES = YES; 242 | CLANG_ENABLE_OBJC_ARC = YES; 243 | CLANG_ENABLE_OBJC_WEAK = YES; 244 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 245 | CLANG_WARN_BOOL_CONVERSION = YES; 246 | CLANG_WARN_COMMA = YES; 247 | CLANG_WARN_CONSTANT_CONVERSION = YES; 248 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 249 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 250 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 251 | CLANG_WARN_EMPTY_BODY = YES; 252 | CLANG_WARN_ENUM_CONVERSION = YES; 253 | CLANG_WARN_INFINITE_RECURSION = YES; 254 | CLANG_WARN_INT_CONVERSION = YES; 255 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 256 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 257 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 258 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 259 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 260 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 261 | CLANG_WARN_STRICT_PROTOTYPES = YES; 262 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 263 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 264 | CLANG_WARN_UNREACHABLE_CODE = YES; 265 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 266 | COPY_PHASE_STRIP = NO; 267 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 268 | ENABLE_NS_ASSERTIONS = NO; 269 | ENABLE_STRICT_OBJC_MSGSEND = YES; 270 | GCC_C_LANGUAGE_STANDARD = gnu11; 271 | GCC_NO_COMMON_BLOCKS = YES; 272 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 273 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 274 | GCC_WARN_UNDECLARED_SELECTOR = YES; 275 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 276 | GCC_WARN_UNUSED_FUNCTION = YES; 277 | GCC_WARN_UNUSED_VARIABLE = YES; 278 | MACOSX_DEPLOYMENT_TARGET = 11.3; 279 | MTL_ENABLE_DEBUG_INFO = NO; 280 | MTL_FAST_MATH = YES; 281 | SDKROOT = macosx; 282 | SWIFT_COMPILATION_MODE = wholemodule; 283 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 284 | }; 285 | name = Release; 286 | }; 287 | C6254BA1268B07BD0082C7F5 /* Debug */ = { 288 | isa = XCBuildConfiguration; 289 | buildSettings = { 290 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 291 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 292 | CODE_SIGN_ENTITLEMENTS = MenuBarSIPDetector/MenuBarSIPDetector.entitlements; 293 | CODE_SIGN_IDENTITY = "-"; 294 | CODE_SIGN_STYLE = Manual; 295 | COMBINE_HIDPI_IMAGES = YES; 296 | CURRENT_PROJECT_VERSION = 7; 297 | DEVELOPMENT_TEAM = ""; 298 | ENABLE_HARDENED_RUNTIME = YES; 299 | INFOPLIST_FILE = MenuBarSIPDetector/Info.plist; 300 | LD_RUNPATH_SEARCH_PATHS = ( 301 | "$(inherited)", 302 | "@executable_path/../Frameworks", 303 | ); 304 | MACOSX_DEPLOYMENT_TARGET = 10.10; 305 | MARKETING_VERSION = 3.0.4; 306 | PRODUCT_BUNDLE_IDENTIFIER = org.pietrocaruso.MenuBarSIPDetector; 307 | PRODUCT_NAME = "$(TARGET_NAME)"; 308 | PROVISIONING_PROFILE_SPECIFIER = ""; 309 | SWIFT_VERSION = 5.0; 310 | }; 311 | name = Debug; 312 | }; 313 | C6254BA2268B07BD0082C7F5 /* Release */ = { 314 | isa = XCBuildConfiguration; 315 | buildSettings = { 316 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 317 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 318 | CODE_SIGN_ENTITLEMENTS = MenuBarSIPDetector/MenuBarSIPDetector.entitlements; 319 | CODE_SIGN_IDENTITY = "-"; 320 | CODE_SIGN_STYLE = Manual; 321 | COMBINE_HIDPI_IMAGES = YES; 322 | CURRENT_PROJECT_VERSION = 7; 323 | DEVELOPMENT_TEAM = ""; 324 | ENABLE_HARDENED_RUNTIME = YES; 325 | INFOPLIST_FILE = MenuBarSIPDetector/Info.plist; 326 | LD_RUNPATH_SEARCH_PATHS = ( 327 | "$(inherited)", 328 | "@executable_path/../Frameworks", 329 | ); 330 | MACOSX_DEPLOYMENT_TARGET = 10.10; 331 | MARKETING_VERSION = 3.0.4; 332 | PRODUCT_BUNDLE_IDENTIFIER = org.pietrocaruso.MenuBarSIPDetector; 333 | PRODUCT_NAME = "$(TARGET_NAME)"; 334 | PROVISIONING_PROFILE_SPECIFIER = ""; 335 | SWIFT_VERSION = 5.0; 336 | }; 337 | name = Release; 338 | }; 339 | /* End XCBuildConfiguration section */ 340 | 341 | /* Begin XCConfigurationList section */ 342 | C6254B8B268B07BA0082C7F5 /* Build configuration list for PBXProject "MenuBarSIPDetector" */ = { 343 | isa = XCConfigurationList; 344 | buildConfigurations = ( 345 | C6254B9E268B07BD0082C7F5 /* Debug */, 346 | C6254B9F268B07BD0082C7F5 /* Release */, 347 | ); 348 | defaultConfigurationIsVisible = 0; 349 | defaultConfigurationName = Release; 350 | }; 351 | C6254BA0268B07BD0082C7F5 /* Build configuration list for PBXNativeTarget "MenuBarSIPDetector" */ = { 352 | isa = XCConfigurationList; 353 | buildConfigurations = ( 354 | C6254BA1268B07BD0082C7F5 /* Debug */, 355 | C6254BA2268B07BD0082C7F5 /* Release */, 356 | ); 357 | defaultConfigurationIsVisible = 0; 358 | defaultConfigurationName = Release; 359 | }; 360 | /* End XCConfigurationList section */ 361 | 362 | /* Begin XCRemoteSwiftPackageReference section */ 363 | C6FB65C9268B0E99007ECD56 /* XCRemoteSwiftPackageReference "TINURecovery" */ = { 364 | isa = XCRemoteSwiftPackageReference; 365 | repositoryURL = "https://github.com/ITzTravelInTime/TINURecovery.git"; 366 | requirement = { 367 | kind = upToNextMajorVersion; 368 | minimumVersion = 4.1.2; 369 | }; 370 | }; 371 | /* End XCRemoteSwiftPackageReference section */ 372 | 373 | /* Begin XCSwiftPackageProductDependency section */ 374 | C6FB65CA268B0E99007ECD56 /* TINURecovery */ = { 375 | isa = XCSwiftPackageProductDependency; 376 | package = C6FB65C9268B0E99007ECD56 /* XCRemoteSwiftPackageReference "TINURecovery" */; 377 | productName = TINURecovery; 378 | }; 379 | /* End XCSwiftPackageProductDependency section */ 380 | }; 381 | rootObject = C6254B88268B07BA0082C7F5 /* Project object */; 382 | } 383 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | 294 | Copyright (C) 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | , 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | 341 | --------------------------------------------------------------------------------