How jamf/reenroller works
• User Interface (UI) Layer – Represented by files such as Main.storyboard (in Base.lproj) and view controllers (e.g., HelpViewController.swift, SourceMdmViewController.swift, ViewController.swift). This layer handles user interactions like entering configuration details and displaying help information.
• Business Logic/Controller Layer – Include files like Command.swift, Globals.swift, and Alert.swift. These manage core logic, decision-making, and global parameters for the enrollment process.
• Networking/API Layer – Highlight components dealing with remote communications with Jamf Pro servers. Files such as ApiCall.swift and JamfPro.swift handle API requests, authentication (including bearer token support), and error handling.
• Installation and Scripting Artifacts – The preinstall and postinstall directories (ReEnroller/1 and ReEnroller/2) contain scripts executed during the enrollment package installation. Also note the presence of helper scripts like apiMDM_removal and the mobileconfig file (ReEnrollerNotification.mobileconfig) required for newer macOS versions.
• Configuration and Assets – This includes property list files (Info.plist, settings.plist, and ReEnroller-component.plist), entitlements (ReEnroller.entitlements), and asset catalogs (Assets.xcassets). These files describe the app’s resources, settings, and permissions.
Architectural Patterns and Technologies
• API Integration – Clearly indicate that the application communicates with external Jamf Pro servers using defined API calls. Label these components with authentication techniques (including the use of bearer tokens as mentioned in the README).
• Package and Deployment – Make a note that the application can build deployment packages containing preinstall and postinstall scripts, along with configuration profiles (mobileconfig) to manage enrollment on modern macOS versions.