How jamf/certificatesdk works
Main Components
• CertificateSDK XCFramework: Represented as an external library/framework that encapsulates all certificate request logic. Indicate that it supports various architectures (ios-arm64, simulator versions, xros-arm64, etc.).
• Sample Application Modules: There are two main client apps:
• Certificate SDK Sample iOS: Contains view controllers (e.g., ActionLogViewController, SetupTestViewController), storyboard files, and app delegate logic.
• Certificate SDK Sample visionOS: A SwiftUI-based app with components like ContentView, RequestTypeView, and dedicated entry points.
• Shared Module (Certificate SDK Sample Shared): Contains common code for handling certificate requests (CertificateRequestManager), keychain operations (KeychainHandler), configuration (CertRequestConfiguration.swift), and local notifications.
Additional External Elements
• Jamf Pro Server (External Dependency): Show how the configuration is used to communicate with the Jamf Pro server to obtain the certificate using the keys defined in the managed app configuration.
Relationships and Interactions
• Both client apps (iOS and visionOS) leverage the shared module to access common certificate management features.
• The shared module, particularly the CertificateRequestManager, interacts directly with the CertificateSDK (external framework) to initiate certificate requests.
• The CertificateSDK, in turn, encapsulates the lower-level API calls and encryption, interfacing with the external Jamf Pro server over the network.
Architectural Patterns and Design Principles
• Separation of Concerns: The project clearly separates presentation (iOS and visionOS apps), business logic (shared module), and the certificate functionality encapsulated in the CertificateSDK XCFramework.
• Modularity: The use of Swift Package Manager for installing the SDK and the shared structure allow the certificate request functionality to be reused across different platforms.
• Platform-Specific Adaptations: While the business logic is shared, the UI and interaction components are tailored to each platform.