diff --git a/CHANGELOG.md b/CHANGELOG.md index 9295853..4f67995 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,27 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [1.1.0] - 2021-01 +## [2.0.0] - 2024-06-14 ### Added -- The compiled framework now includes simulator code for simulators running on Macs with Apple silicon. +- visionOS support! The compiled framework now includes support for visionOS v1.1 and +visionOS Simulator. There is also a native visionOS sample app that works just like +the iOS sample app. +- The CertificateSDK.xcframework is now signed by Jamf for added security. +### Changed +- Moved the Package.swift tool version from Swift 5.3 to Swift v5.9 in order to support visionOS. +- Moved the iOS minimum deployment target from v10 to v12. +- Described how to use `$MANAGEMENTID` to support BYOD devices with Jamf Pro v11.5.1 and newer. +### Removed +- Removed PDF file titled "Integrating the Jamf Certificate SDK into your iOS App". This information +is now available online. See the bottom of the README file for a link. + +## [1.1.1] - 2022-03-11 +### Changed +- Modified the name of the target in the `Package.swift` file so that Xcode 13.3 can find the artifact. + +## [1.1.0] - 2021-01-08 +### Added +- The compiled framework now includes simulator code for simulators running on Macs with Apple Silicon. - Added a `Package.swift` file for integration with Swift Package Manager. ### Changed @@ -26,7 +44,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - The Jamf Certificate SDK now properly handles network errors and status updates when making requests for a new Managed App Configuration. - Fixed an issue that prevented the progress of steps from starting at zero and incrementing by one up to the maxNumberOfSteps. -- Fixed an issue that prevented the NSError object from being correctly sent into the certificateRequest:errorOccurred: delegate method. +- Fixed an issue that prevented the NSError object from being correctly sent into the `certificateRequest:errorOccurred:` delegate method. ## [1.0.0] - 2018-07-24 ### Added diff --git a/Certificate SDK Sample App.xcodeproj/project.pbxproj b/Certificate SDK Sample App.xcodeproj/project.pbxproj index b553da7..9fe4b64 100644 --- a/Certificate SDK Sample App.xcodeproj/project.pbxproj +++ b/Certificate SDK Sample App.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 52; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -16,10 +16,23 @@ 97BE793C20AB6FF5009579E5 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97BE793B20AB6FF5009579E5 /* Assets.xcassets */; }; 97BE793F20AB6FF5009579E5 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97BE793D20AB6FF5009579E5 /* LaunchScreen.storyboard */; }; 97BE794720AB70D2009579E5 /* Jamf-one-color-knockout.png in Resources */ = {isa = PBXBuildFile; fileRef = 97BE794620AB70D2009579E5 /* Jamf-one-color-knockout.png */; }; - 97BE794920AF7ABA009579E5 /* CertificateSDKSetup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97BE794820AF7ABA009579E5 /* CertificateSDKSetup.swift */; }; - 97BE9ACE20B32CA00047C4E8 /* test_certificate.p12 in Resources */ = {isa = PBXBuildFile; fileRef = 97BE9ACD20B32CA00047C4E8 /* test_certificate.p12 */; }; - 97FFD0FB20DDA1BD00355359 /* KeychainHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97FFD0FA20DDA1BD00355359 /* KeychainHandler.swift */; }; - 97FFD0FD20E150E300355359 /* CertificateRequestManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97FFD0FC20E150E300355359 /* CertificateRequestManager.swift */; }; + C034E8062BEC2D7800BF02D1 /* LocalNotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = C034E8052BEC2D7800BF02D1 /* LocalNotificationService.swift */; }; + C034E8072BEC2D7800BF02D1 /* LocalNotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = C034E8052BEC2D7800BF02D1 /* LocalNotificationService.swift */; }; + C04D817A2BEBC9130024FDFC /* CertificateSDKSampleVisionOSApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = C04D81792BEBC9130024FDFC /* CertificateSDKSampleVisionOSApp.swift */; }; + C04D817C2BEBC9130024FDFC /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C04D817B2BEBC9130024FDFC /* ContentView.swift */; }; + C04D817E2BEBC9140024FDFC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C04D817D2BEBC9140024FDFC /* Assets.xcassets */; }; + C04D81872BEBC92C0024FDFC /* CertificateSDK.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 972DA467258D53C900ABD6A3 /* CertificateSDK.xcframework */; }; + C04D81882BEBC92C0024FDFC /* CertificateSDK.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 972DA467258D53C900ABD6A3 /* CertificateSDK.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + C057C9BC2BEBFCBF00D57102 /* RequestTypeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C057C9BB2BEBFCBF00D57102 /* RequestTypeView.swift */; }; + C057C9BE2BEBFDAD00D57102 /* RequestTypeModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C057C9BD2BEBFDAD00D57102 /* RequestTypeModel.swift */; }; + C06BADD42BEC0CBB00FD78B2 /* CertificateRequestManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = C06BADCF2BEC0CBB00FD78B2 /* CertificateRequestManager.swift */; }; + C06BADD52BEC0CBB00FD78B2 /* CertificateRequestManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = C06BADCF2BEC0CBB00FD78B2 /* CertificateRequestManager.swift */; }; + C06BADD62BEC0CBB00FD78B2 /* CertRequestConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = C06BADD02BEC0CBB00FD78B2 /* CertRequestConfiguration.swift */; }; + C06BADD72BEC0CBB00FD78B2 /* CertRequestConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = C06BADD02BEC0CBB00FD78B2 /* CertRequestConfiguration.swift */; }; + C06BADD82BEC0CBB00FD78B2 /* KeychainHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = C06BADD12BEC0CBB00FD78B2 /* KeychainHandler.swift */; }; + C06BADD92BEC0CBB00FD78B2 /* KeychainHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = C06BADD12BEC0CBB00FD78B2 /* KeychainHandler.swift */; }; + C06BADDA2BEC0CBB00FD78B2 /* test_certificate.p12 in Resources */ = {isa = PBXBuildFile; fileRef = C06BADD22BEC0CBB00FD78B2 /* test_certificate.p12 */; }; + C06BADDB2BEC0CBB00FD78B2 /* test_certificate.p12 in Resources */ = {isa = PBXBuildFile; fileRef = C06BADD22BEC0CBB00FD78B2 /* test_certificate.p12 */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -34,12 +47,23 @@ name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; + C04D81892BEBC92C0024FDFC /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + C04D81882BEBC92C0024FDFC /* CertificateSDK.xcframework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ 9712A85B213EED15003A2789 /* .swiftlint.yml */ = {isa = PBXFileReference; lastKnownFileType = text; path = .swiftlint.yml; sourceTree = ""; }; 972DA467258D53C900ABD6A3 /* CertificateSDK.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = CertificateSDK.xcframework; sourceTree = ""; }; - 97BE792F20AB6FF3009579E5 /* Certificate SDK Sample App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Certificate SDK Sample App.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 97BE792F20AB6FF3009579E5 /* Certificate SDK Sample iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Certificate SDK Sample iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 97BE793220AB6FF3009579E5 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 97BE793420AB6FF3009579E5 /* SetupTestViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SetupTestViewController.swift; sourceTree = ""; }; 97BE793620AB6FF3009579E5 /* ActionLogViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActionLogViewController.swift; sourceTree = ""; }; @@ -48,10 +72,18 @@ 97BE793E20AB6FF5009579E5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97BE794020AB6FF5009579E5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 97BE794620AB70D2009579E5 /* Jamf-one-color-knockout.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Jamf-one-color-knockout.png"; sourceTree = ""; }; - 97BE794820AF7ABA009579E5 /* CertificateSDKSetup.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CertificateSDKSetup.swift; sourceTree = ""; }; - 97BE9ACD20B32CA00047C4E8 /* test_certificate.p12 */ = {isa = PBXFileReference; lastKnownFileType = file; path = test_certificate.p12; sourceTree = ""; }; - 97FFD0FA20DDA1BD00355359 /* KeychainHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeychainHandler.swift; sourceTree = ""; }; - 97FFD0FC20E150E300355359 /* CertificateRequestManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CertificateRequestManager.swift; sourceTree = ""; }; + C034E8052BEC2D7800BF02D1 /* LocalNotificationService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocalNotificationService.swift; sourceTree = ""; }; + C04D81732BEBC9130024FDFC /* Certificate SDK Sample visionOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Certificate SDK Sample visionOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + C04D81792BEBC9130024FDFC /* CertificateSDKSampleVisionOSApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CertificateSDKSampleVisionOSApp.swift; sourceTree = ""; }; + C04D817B2BEBC9130024FDFC /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + C04D817D2BEBC9140024FDFC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + C04D81822BEBC9140024FDFC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + C057C9BB2BEBFCBF00D57102 /* RequestTypeView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RequestTypeView.swift; sourceTree = ""; }; + C057C9BD2BEBFDAD00D57102 /* RequestTypeModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RequestTypeModel.swift; sourceTree = ""; }; + C06BADCF2BEC0CBB00FD78B2 /* CertificateRequestManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CertificateRequestManager.swift; sourceTree = ""; }; + C06BADD02BEC0CBB00FD78B2 /* CertRequestConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CertRequestConfiguration.swift; sourceTree = ""; }; + C06BADD12BEC0CBB00FD78B2 /* KeychainHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeychainHandler.swift; sourceTree = ""; }; + C06BADD22BEC0CBB00FD78B2 /* test_certificate.p12 */ = {isa = PBXFileReference; lastKnownFileType = file; path = test_certificate.p12; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -63,6 +95,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + C04D81702BEBC9130024FDFC /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + C04D81872BEBC92C0024FDFC /* CertificateSDK.xcframework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -70,45 +110,77 @@ isa = PBXGroup; children = ( 9712A85B213EED15003A2789 /* .swiftlint.yml */, - 97BE793120AB6FF3009579E5 /* Certificate SDK Sample App */, + 97BE793120AB6FF3009579E5 /* Certificate SDK Sample iOS */, + C06BADD32BEC0CBB00FD78B2 /* Certificate SDK Sample Shared */, + C04D81742BEBC9130024FDFC /* Certificate SDK Sample visionOS */, 972DA467258D53C900ABD6A3 /* CertificateSDK.xcframework */, 97BE793020AB6FF3009579E5 /* Products */, + C04D81862BEBC92C0024FDFC /* Frameworks */, ); sourceTree = ""; }; 97BE793020AB6FF3009579E5 /* Products */ = { isa = PBXGroup; children = ( - 97BE792F20AB6FF3009579E5 /* Certificate SDK Sample App.app */, + 97BE792F20AB6FF3009579E5 /* Certificate SDK Sample iOS.app */, + C04D81732BEBC9130024FDFC /* Certificate SDK Sample visionOS.app */, ); name = Products; sourceTree = ""; }; - 97BE793120AB6FF3009579E5 /* Certificate SDK Sample App */ = { + 97BE793120AB6FF3009579E5 /* Certificate SDK Sample iOS */ = { isa = PBXGroup; children = ( 97BE793220AB6FF3009579E5 /* AppDelegate.swift */, 97BE793420AB6FF3009579E5 /* SetupTestViewController.swift */, 97BE793620AB6FF3009579E5 /* ActionLogViewController.swift */, - 97FFD0FC20E150E300355359 /* CertificateRequestManager.swift */, - 97FFD0FA20DDA1BD00355359 /* KeychainHandler.swift */, - 97BE794820AF7ABA009579E5 /* CertificateSDKSetup.swift */, 97BE793820AB6FF3009579E5 /* Main.storyboard */, 97BE793B20AB6FF5009579E5 /* Assets.xcassets */, 97BE793D20AB6FF5009579E5 /* LaunchScreen.storyboard */, 97BE794620AB70D2009579E5 /* Jamf-one-color-knockout.png */, - 97BE9ACD20B32CA00047C4E8 /* test_certificate.p12 */, 97BE794020AB6FF5009579E5 /* Info.plist */, ); - path = "Certificate SDK Sample App"; + path = "Certificate SDK Sample iOS"; + sourceTree = ""; + }; + C04D81742BEBC9130024FDFC /* Certificate SDK Sample visionOS */ = { + isa = PBXGroup; + children = ( + C04D81792BEBC9130024FDFC /* CertificateSDKSampleVisionOSApp.swift */, + C04D817B2BEBC9130024FDFC /* ContentView.swift */, + C057C9BD2BEBFDAD00D57102 /* RequestTypeModel.swift */, + C057C9BB2BEBFCBF00D57102 /* RequestTypeView.swift */, + C04D817D2BEBC9140024FDFC /* Assets.xcassets */, + C04D81822BEBC9140024FDFC /* Info.plist */, + ); + path = "Certificate SDK Sample visionOS"; + sourceTree = ""; + }; + C04D81862BEBC92C0024FDFC /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; + C06BADD32BEC0CBB00FD78B2 /* Certificate SDK Sample Shared */ = { + isa = PBXGroup; + children = ( + C06BADCF2BEC0CBB00FD78B2 /* CertificateRequestManager.swift */, + C06BADD02BEC0CBB00FD78B2 /* CertRequestConfiguration.swift */, + C06BADD12BEC0CBB00FD78B2 /* KeychainHandler.swift */, + C034E8052BEC2D7800BF02D1 /* LocalNotificationService.swift */, + C06BADD22BEC0CBB00FD78B2 /* test_certificate.p12 */, + ); + path = "Certificate SDK Sample Shared"; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 97BE792E20AB6FF3009579E5 /* Certificate SDK Sample App */ = { + 97BE792E20AB6FF3009579E5 /* Certificate SDK Sample iOS */ = { isa = PBXNativeTarget; - buildConfigurationList = 97BE794320AB6FF5009579E5 /* Build configuration list for PBXNativeTarget "Certificate SDK Sample App" */; + buildConfigurationList = 97BE794320AB6FF5009579E5 /* Build configuration list for PBXNativeTarget "Certificate SDK Sample iOS" */; buildPhases = ( 97BE792B20AB6FF3009579E5 /* Sources */, 97BE792C20AB6FF3009579E5 /* Frameworks */, @@ -120,9 +192,27 @@ ); dependencies = ( ); - name = "Certificate SDK Sample App"; + name = "Certificate SDK Sample iOS"; productName = "Certificate SDK Sample App"; - productReference = 97BE792F20AB6FF3009579E5 /* Certificate SDK Sample App.app */; + productReference = 97BE792F20AB6FF3009579E5 /* Certificate SDK Sample iOS.app */; + productType = "com.apple.product-type.application"; + }; + C04D81722BEBC9130024FDFC /* Certificate SDK Sample visionOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = C04D81832BEBC9140024FDFC /* Build configuration list for PBXNativeTarget "Certificate SDK Sample visionOS" */; + buildPhases = ( + C04D816F2BEBC9130024FDFC /* Sources */, + C04D81702BEBC9130024FDFC /* Frameworks */, + C04D81712BEBC9130024FDFC /* Resources */, + C04D81892BEBC92C0024FDFC /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "Certificate SDK Sample visionOS"; + productName = "Certificate SDK Sample VisionOS"; + productReference = C04D81732BEBC9130024FDFC /* Certificate SDK Sample visionOS.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -131,8 +221,9 @@ 97BE792720AB6FF3009579E5 /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0930; - LastUpgradeCheck = 1220; + BuildIndependentTargetsInParallel = YES; + LastSwiftUpdateCheck = 1530; + LastUpgradeCheck = 1530; ORGANIZATIONNAME = Jamf; TargetAttributes = { 97BE792E20AB6FF3009579E5 = { @@ -144,6 +235,9 @@ }; }; }; + C04D81722BEBC9130024FDFC = { + CreatedOnToolsVersion = 15.3; + }; }; }; buildConfigurationList = 97BE792A20AB6FF3009579E5 /* Build configuration list for PBXProject "Certificate SDK Sample App" */; @@ -159,7 +253,8 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 97BE792E20AB6FF3009579E5 /* Certificate SDK Sample App */, + 97BE792E20AB6FF3009579E5 /* Certificate SDK Sample iOS */, + C04D81722BEBC9130024FDFC /* Certificate SDK Sample visionOS */, ); }; /* End PBXProject section */ @@ -170,10 +265,19 @@ buildActionMask = 2147483647; files = ( 97BE793F20AB6FF5009579E5 /* LaunchScreen.storyboard in Resources */, + C06BADDA2BEC0CBB00FD78B2 /* test_certificate.p12 in Resources */, 97BE793C20AB6FF5009579E5 /* Assets.xcassets in Resources */, 97BE794720AB70D2009579E5 /* Jamf-one-color-knockout.png in Resources */, 97BE793A20AB6FF3009579E5 /* Main.storyboard in Resources */, - 97BE9ACE20B32CA00047C4E8 /* test_certificate.p12 in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C04D81712BEBC9130024FDFC /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C04D817E2BEBC9140024FDFC /* Assets.xcassets in Resources */, + C06BADDB2BEC0CBB00FD78B2 /* test_certificate.p12 in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -182,6 +286,7 @@ /* Begin PBXShellScriptBuildPhase section */ 9797329720B4A8C000CF87D8 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -191,7 +296,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; + shellScript = "export PATH=\"$PATH:/opt/homebrew/bin\"\nif which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -202,14 +307,30 @@ buildActionMask = 2147483647; files = ( 97BE793720AB6FF3009579E5 /* ActionLogViewController.swift in Sources */, + C034E8062BEC2D7800BF02D1 /* LocalNotificationService.swift in Sources */, + C06BADD42BEC0CBB00FD78B2 /* CertificateRequestManager.swift in Sources */, + C06BADD82BEC0CBB00FD78B2 /* KeychainHandler.swift in Sources */, 97BE793520AB6FF3009579E5 /* SetupTestViewController.swift in Sources */, - 97FFD0FB20DDA1BD00355359 /* KeychainHandler.swift in Sources */, - 97FFD0FD20E150E300355359 /* CertificateRequestManager.swift in Sources */, - 97BE794920AF7ABA009579E5 /* CertificateSDKSetup.swift in Sources */, + C06BADD62BEC0CBB00FD78B2 /* CertRequestConfiguration.swift in Sources */, 97BE793320AB6FF3009579E5 /* AppDelegate.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; + C04D816F2BEBC9130024FDFC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C057C9BC2BEBFCBF00D57102 /* RequestTypeView.swift in Sources */, + C057C9BE2BEBFDAD00D57102 /* RequestTypeModel.swift in Sources */, + C04D817C2BEBC9130024FDFC /* ContentView.swift in Sources */, + C04D817A2BEBC9130024FDFC /* CertificateSDKSampleVisionOSApp.swift in Sources */, + C034E8072BEC2D7800BF02D1 /* LocalNotificationService.swift in Sources */, + C06BADD92BEC0CBB00FD78B2 /* KeychainHandler.swift in Sources */, + C06BADD72BEC0CBB00FD78B2 /* CertRequestConfiguration.swift in Sources */, + C06BADD52BEC0CBB00FD78B2 /* CertificateRequestManager.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ @@ -236,6 +357,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -284,7 +406,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.3; + IPHONEOS_DEPLOYMENT_TARGET = 12; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -297,6 +419,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -339,7 +462,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.3; + IPHONEOS_DEPLOYMENT_TARGET = 12; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_COMPILATION_MODE = wholemodule; @@ -353,7 +476,9 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = "Certificate SDK Sample App/Info.plist"; + DEVELOPMENT_TEAM = ""; + INFOPLIST_FILE = "Certificate SDK Sample iOS/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 13; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -370,7 +495,9 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_STYLE = Automatic; - INFOPLIST_FILE = "Certificate SDK Sample App/Info.plist"; + DEVELOPMENT_TEAM = ""; + INFOPLIST_FILE = "Certificate SDK Sample iOS/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 13; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -382,6 +509,72 @@ }; name = Release; }; + C04D81842BEBC9140024FDFC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = ""; + DEVELOPMENT_TEAM = ""; + ENABLE_PREVIEWS = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "$(TARGET_NAME)/Info.plist"; + INFOPLIST_KEY_CFBundleDisplayName = "Jamf Cert SDK"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MARKETING_VERSION = 1.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = "com.jamf.certificate-sdk.sample.vision"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = xros; + SUPPORTED_PLATFORMS = "xros xrsimulator"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2,7"; + XROS_DEPLOYMENT_TARGET = 1.1; + }; + name = Debug; + }; + C04D81852BEBC9140024FDFC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = ""; + DEVELOPMENT_TEAM = ""; + ENABLE_PREVIEWS = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "$(TARGET_NAME)/Info.plist"; + INFOPLIST_KEY_CFBundleDisplayName = "Jamf Cert SDK"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MARKETING_VERSION = 1.0; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = "com.jamf.certificate-sdk.sample.vision"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = xros; + SUPPORTED_PLATFORMS = "xros xrsimulator"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2,7"; + XROS_DEPLOYMENT_TARGET = 1.1; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -394,7 +587,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 97BE794320AB6FF5009579E5 /* Build configuration list for PBXNativeTarget "Certificate SDK Sample App" */ = { + 97BE794320AB6FF5009579E5 /* Build configuration list for PBXNativeTarget "Certificate SDK Sample iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( 97BE794420AB6FF5009579E5 /* Debug */, @@ -403,6 +596,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + C04D81832BEBC9140024FDFC /* Build configuration list for PBXNativeTarget "Certificate SDK Sample visionOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C04D81842BEBC9140024FDFC /* Debug */, + C04D81852BEBC9140024FDFC /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = 97BE792720AB6FF3009579E5 /* Project object */; diff --git a/Certificate SDK Sample App.xcodeproj/xcshareddata/xcschemes/Certificate SDK Sample iOS.xcscheme b/Certificate SDK Sample App.xcodeproj/xcshareddata/xcschemes/Certificate SDK Sample iOS.xcscheme new file mode 100644 index 0000000..1eba692 --- /dev/null +++ b/Certificate SDK Sample App.xcodeproj/xcshareddata/xcschemes/Certificate SDK Sample iOS.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Certificate SDK Sample App.xcodeproj/xcshareddata/xcschemes/Certificate SDK Sample visionOS.xcscheme b/Certificate SDK Sample App.xcodeproj/xcshareddata/xcschemes/Certificate SDK Sample visionOS.xcscheme new file mode 100644 index 0000000..b9b281d --- /dev/null +++ b/Certificate SDK Sample App.xcodeproj/xcshareddata/xcschemes/Certificate SDK Sample visionOS.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Certificate SDK Sample App/CertificateSDKSetup.swift b/Certificate SDK Sample Shared/CertRequestConfiguration.swift similarity index 72% rename from Certificate SDK Sample App/CertificateSDKSetup.swift rename to Certificate SDK Sample Shared/CertRequestConfiguration.swift index 1b4726c..f7e1c9c 100644 --- a/Certificate SDK Sample App/CertificateSDKSetup.swift +++ b/Certificate SDK Sample Shared/CertRequestConfiguration.swift @@ -1,13 +1,12 @@ // -// CertificateSDKSetup.swift -// Certificate SDK Sample App +// SPDX-License-Identifier: MIT // https://github.com/jamf/CertificateSDK // -// Copyright © 2019 Jamf. All rights reserved. +// Copyright 2024, Jamf // /// Contains the selected options for the test run -struct CertificateSDKSetup { +struct CertRequestConfiguration { var isActual: Bool var slowSpeed: Bool var simulateError: Bool diff --git a/Certificate SDK Sample App/CertificateRequestManager.swift b/Certificate SDK Sample Shared/CertificateRequestManager.swift similarity index 82% rename from Certificate SDK Sample App/CertificateRequestManager.swift rename to Certificate SDK Sample Shared/CertificateRequestManager.swift index f73b4a5..4c09acb 100644 --- a/Certificate SDK Sample App/CertificateRequestManager.swift +++ b/Certificate SDK Sample Shared/CertificateRequestManager.swift @@ -1,13 +1,10 @@ // -// CertificateRequestManager.swift -// Certificate SDK Sample App +// SPDX-License-Identifier: MIT // https://github.com/jamf/CertificateSDK // -// Copyright © 2019 Jamf. All rights reserved. +// Copyright 2024, Jamf // - import CertificateSDK -import UIKit class CertificateRequestManager: NSObject { let keychainHelper = KeychainHandler() @@ -17,20 +14,20 @@ class CertificateRequestManager: NSObject { private var certificateRequest: CertificateRequestProtocol? - /// Starts a new request with the given setup; does nothing if a request is currently pending. + /// Starts a new request with the given configuration; does nothing if a request is currently pending. /// - /// - Parameter setup: The type of certificate request to start - func startRequest(with setup: CertificateSDKSetup) { + /// - Parameter configuration: The type of certificate request to start + func startRequest(with configuration: CertRequestConfiguration) { guard certificateRequest == nil else { // do nothing. Let the user try to run the test or re-run the test once the request is nil. return } - if setup.isActual { + if configuration.isActual { certificateRequest = CertificateRequestWorkflow(delegate: self) } else { var localRequest: CertificateRequestEmbeddedP12? - if !setup.simulateError, let p12 = Bundle.main.url(forResource: "test_certificate", + if !configuration.simulateError, let p12 = Bundle.main.url(forResource: "test_certificate", withExtension: "p12") { localRequest = CertificateRequestEmbeddedP12(delegate: self, p12File: p12, p12Password: "abc123") } else { @@ -39,7 +36,7 @@ class CertificateRequestManager: NSObject { p12Password: "a") } - if setup.slowSpeed { + if configuration.slowSpeed { localRequest?.secondsBetweenSteps = 2 } certificateRequest = localRequest @@ -84,9 +81,6 @@ extension CertificateRequestHandler: CertificateRequestDelegate { func certificateRequest(_ request: CertificateRequestProtocol, isUsingNetwork: Bool) { self.textOutputHandler?("Using network: \(isUsingNetwork)") - DispatchQueue.main.async { - UIApplication.shared.isNetworkActivityIndicatorVisible = isUsingNetwork - } } func certificateRequest(_ request: CertificateRequestProtocol, isWaitingForMAC waitingForMAC: Bool) { diff --git a/Certificate SDK Sample App/KeychainHandler.swift b/Certificate SDK Sample Shared/KeychainHandler.swift similarity index 97% rename from Certificate SDK Sample App/KeychainHandler.swift rename to Certificate SDK Sample Shared/KeychainHandler.swift index 733d9de..9f6ea1d 100644 --- a/Certificate SDK Sample App/KeychainHandler.swift +++ b/Certificate SDK Sample Shared/KeychainHandler.swift @@ -1,11 +1,9 @@ // -// KeychainHandler.swift -// Certificate SDK Sample App +// SPDX-License-Identifier: MIT // https://github.com/jamf/CertificateSDK // -// Copyright © 2019 Jamf. All rights reserved. +// Copyright 2024, Jamf // - import Foundation struct KeychainHandler { diff --git a/Certificate SDK Sample App/AppDelegate.swift b/Certificate SDK Sample Shared/LocalNotificationService.swift similarity index 58% rename from Certificate SDK Sample App/AppDelegate.swift rename to Certificate SDK Sample Shared/LocalNotificationService.swift index 1b8c658..4b509b6 100644 --- a/Certificate SDK Sample App/AppDelegate.swift +++ b/Certificate SDK Sample Shared/LocalNotificationService.swift @@ -1,108 +1,26 @@ // -// AppDelegate.swift -// Certificate SDK Sample App +// SPDX-License-Identifier: MIT // https://github.com/jamf/CertificateSDK // -// Copyright © 2019 Jamf. All rights reserved. +// Copyright 2024, Jamf // - -import UIKit import UserNotifications -@UIApplicationMain -class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDelegate { - - var window: UIWindow? - - let requestManager = CertificateRequestManager() - - func application(_ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { - // Override point for customization after application launch. - if let splitViewController = window!.rootViewController as? UISplitViewController { - let navigationController = splitViewController.viewControllers[splitViewController.viewControllers.count-1] - as? UINavigationController - navigationController?.topViewController!.navigationItem.leftBarButtonItem - = splitViewController.displayModeButtonItem - - if UIDevice.current.userInterfaceIdiom == .pad { - splitViewController.preferredDisplayMode = .allVisible - } - splitViewController.delegate = self - } - - // Register for notifications in this app delegate method to ensure all notifications are properly sent to us. - self.registerForNotifications() +class LocalNotificationService: NSObject, UNUserNotificationCenterDelegate { + static let shared = LocalNotificationService() - return true - } - - func applicationWillResignActive(_ application: UIApplication) { - // Sent when the application is about to move from active to inactive state. This can occur for certain types of - // temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the - // application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games - // should use this method to pause the game. - } - - func applicationDidEnterBackground(_ application: UIApplication) { - // Use this method to release shared resources, save user data, invalidate timers, and store enough application - // state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: - // when the user quits. - } - - func applicationWillEnterForeground(_ application: UIApplication) { - // Called as part of the transition from the background to the active state; here you can undo many of the - // changes made on entering the background. - } + weak var requestManager: CertificateRequestManager? - func applicationDidBecomeActive(_ application: UIApplication) { - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the - // application was previously in the background, optionally refresh the user interface. - } - - func applicationWillTerminate(_ application: UIApplication) { - // Called when the application is about to terminate. Save data if appropriate. See also - // applicationDidEnterBackground:. - } - - // MARK: - Split view - - func splitViewController(_ splitViewController: UISplitViewController, - collapseSecondary secondaryViewController: UIViewController, - onto primaryViewController: UIViewController) -> Bool { - guard let secondaryAsNavController = secondaryViewController as? UINavigationController else { - return false - } - guard let topAsDetailController = secondaryAsNavController.topViewController as? ActionLogViewController else { - return false - } - - if topAsDetailController.setup == nil { - // Return true to indicate that we have handled the collapse by doing nothing; - // the secondary controller will be discarded. - return true - } - return false - } -} - -// MARK: - - -typealias LocalNotificationHandler = AppDelegate - -extension LocalNotificationHandler: UNUserNotificationCenterDelegate { - static let kRenewalCategory = "com.jamf.certificate-sdk.sample.renewal.category" - static let kRenewalIdentifier = "com.jamf.certificate-sdk.sample.renewal" - static let kDelayInSeconds = 5.0 + static private let kRenewalCategory = "com.jamf.certificate-sdk.sample.renewal.category" + static private let kRenewalIdentifier = "com.jamf.certificate-sdk.sample.renewal" + static private let kDelayInSeconds = 5.0 /// These are custom actions that we put onto the notification for the user to choose how to proceed /// without launching the entire app. /// /// - renew: This is the renew button; we will try to renew the certificate in the background. /// - decline: The is the decline button; we schedule another notification to remind the user to renew later. - enum CertificateNotificationAction: String { + private enum CertificateNotificationAction: String { case renew = "com.jamf.certificate-sdk.sample.renew" case decline = "com.jamf.certificate-sdk.sample.decline" } @@ -119,7 +37,7 @@ extension LocalNotificationHandler: UNUserNotificationCenterDelegate { // enable or disable features based on authorization. // We check for authorization later anyway so...nothing to do in this callback. if error != nil { - print("Error requesting notification authorization: \(error!)") + self.requestManager?.textOutputHandler?("Error requesting notification authorization: \(error!)") } } @@ -132,7 +50,7 @@ extension LocalNotificationHandler: UNUserNotificationCenterDelegate { let declineAction = UNNotificationAction(identifier: CertificateNotificationAction.decline.rawValue, title: declineText, options: .init(rawValue: 0)) - let renewalCategory = UNNotificationCategory(identifier: LocalNotificationHandler.kRenewalCategory, + let renewalCategory = UNNotificationCategory(identifier: Self.kRenewalCategory, actions: [renewAction, declineAction], intentIdentifiers: [], options: .customDismissAction) @@ -145,7 +63,7 @@ extension LocalNotificationHandler: UNUserNotificationCenterDelegate { // First, remove any pending renewal local notifications. center.removePendingNotificationRequests(withIdentifiers: - [LocalNotificationHandler.kRenewalIdentifier]) + [Self.kRenewalIdentifier]) center.getNotificationSettings { (settings) in // Do not schedule notifications if not authorized. @@ -158,7 +76,7 @@ extension LocalNotificationHandler: UNUserNotificationCenterDelegate { // Schedule the new local notification. let content = UNMutableNotificationContent() - content.categoryIdentifier = LocalNotificationHandler.kRenewalCategory + content.categoryIdentifier = Self.kRenewalCategory content.title = NSLocalizedString("Renew SSO Cert", comment: "Short title of the notification to renew the user certificate") content.subtitle = String(format: NSLocalizedString("Expires: %@", @@ -183,17 +101,17 @@ extension LocalNotificationHandler: UNUserNotificationCenterDelegate { // In a real app, you probably want to examine the certificate expiration date, pick a day a // couple weeks in advance of that and use a UNCalendarNotificationTrigger instead. - let trigger = UNTimeIntervalNotificationTrigger(timeInterval: LocalNotificationHandler.kDelayInSeconds, + let trigger = UNTimeIntervalNotificationTrigger(timeInterval: Self.kDelayInSeconds, repeats: false) - let request = UNNotificationRequest(identifier: LocalNotificationHandler.kRenewalIdentifier, + let request = UNNotificationRequest(identifier: Self.kRenewalIdentifier, content: content, trigger: trigger) center.add(request) { error in guard let actualError = error else { return } // Could do better error handling to let user know the notification to renew failed to be scheduled. - print(actualError) + self.requestManager?.textOutputHandler?("Scheduling error: \(actualError)") } } } @@ -213,16 +131,20 @@ extension LocalNotificationHandler: UNUserNotificationCenterDelegate { willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) { - if notification.request.identifier == LocalNotificationHandler.kRenewalIdentifier { + if notification.request.identifier == Self.kRenewalIdentifier { // Since we're in the foreground already, we can automatically do this renewal and not show the alert. - self.requestManager.textOutputHandler?("Auto renew in foreground") - self.requestManager.startRequest(with: - CertificateSDKSetup(isActual: false, slowSpeed: false, simulateError: false)) + self.requestManager?.textOutputHandler?("Auto renew in foreground") + self.requestManager?.startRequest(with: + CertRequestConfiguration(isActual: false, slowSpeed: false, simulateError: false)) completionHandler(.init(rawValue: 0)) } else { // Some other kind of notification; we should show it. - completionHandler(.alert) + if #available(iOS 14.0, *) { + completionHandler(.banner) + } else { + completionHandler(.alert) + } } } @@ -242,16 +164,16 @@ extension LocalNotificationHandler: UNUserNotificationCenterDelegate { switch action { case .renew: if CertificateNotificationAction(rawValue: response.actionIdentifier) == nil { - self.requestManager.textOutputHandler?("User did not choose an action") + self.requestManager?.textOutputHandler?("User did not choose an action") } else { - self.requestManager.textOutputHandler?("User tapped renew") + self.requestManager?.textOutputHandler?("User tapped renew") } - self.requestManager.startRequest(with: - CertificateSDKSetup(isActual: false, slowSpeed: false, simulateError: false)) + self.requestManager?.startRequest(with: + CertRequestConfiguration(isActual: false, slowSpeed: false, simulateError: false)) case .decline: // Could schedule another local notification here to nag the user again. - self.requestManager.textOutputHandler?("User tapped decline; scheduling again") + self.requestManager?.textOutputHandler?("User tapped decline; scheduling again") // Again, the real app should pick some useful date here. self.scheduleLocalNotificationForRenewal(Date(timeIntervalSinceNow: 60)) } diff --git a/Certificate SDK Sample App/test_certificate.p12 b/Certificate SDK Sample Shared/test_certificate.p12 similarity index 100% rename from Certificate SDK Sample App/test_certificate.p12 rename to Certificate SDK Sample Shared/test_certificate.p12 diff --git a/Certificate SDK Sample App/ActionLogViewController.swift b/Certificate SDK Sample iOS/ActionLogViewController.swift similarity index 85% rename from Certificate SDK Sample App/ActionLogViewController.swift rename to Certificate SDK Sample iOS/ActionLogViewController.swift index 4f28e72..6300725 100644 --- a/Certificate SDK Sample App/ActionLogViewController.swift +++ b/Certificate SDK Sample iOS/ActionLogViewController.swift @@ -1,11 +1,9 @@ // -// ActionLogViewController.swift -// Certificate SDK Sample App +// SPDX-License-Identifier: MIT // https://github.com/jamf/CertificateSDK // -// Copyright © 2019 Jamf. All rights reserved. +// Copyright 2024, Jamf // - import CertificateSDK import UIKit @@ -17,7 +15,7 @@ class ActionLogViewController: UIViewController { let keychainHelper = KeychainHandler() let requestManager = (UIApplication.shared.delegate as? AppDelegate)?.requestManager - var setup: CertificateSDKSetup? + var testConfiguration: CertRequestConfiguration? override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) @@ -57,16 +55,16 @@ class ActionLogViewController: UIViewController { /// Start a new certificate request. func runTest() { - if let sdkSetup = setup { + if let configuration = testConfiguration { requestManager?.cancelPendingRequest() - requestManager?.startRequest(with: sdkSetup) + requestManager?.startRequest(with: configuration) } } /// Update the user interface for the detail item. func resetBaseTextView() { - if let sdkSetup = setup, let textView = actionLogTextView { - textView.text = "Setup: \(sdkSetup.description)" + if let configuration = testConfiguration, let textView = actionLogTextView { + textView.text = "Setup: \(configuration.description)" self.append( keychainHelper.showCertificateInfo() ) } diff --git a/Certificate SDK Sample iOS/AppDelegate.swift b/Certificate SDK Sample iOS/AppDelegate.swift new file mode 100644 index 0000000..f677e3d --- /dev/null +++ b/Certificate SDK Sample iOS/AppDelegate.swift @@ -0,0 +1,59 @@ +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// +import UIKit +import UserNotifications + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDelegate { + + var window: UIWindow? + + let requestManager = CertificateRequestManager() + + func application(_ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + if let splitViewController = window!.rootViewController as? UISplitViewController { + let navController = splitViewController.viewControllers[splitViewController.viewControllers.count-1] + as? UINavigationController + navController?.topViewController!.navigationItem.leftBarButtonItem + = splitViewController.displayModeButtonItem + + if UIDevice.current.userInterfaceIdiom == .pad { + splitViewController.preferredDisplayMode = .allVisible + } + splitViewController.delegate = self + } + + // Register for notifications in this app delegate method to ensure all notifications are properly sent to us. + let notificationService = LocalNotificationService.shared + notificationService.requestManager = self.requestManager + notificationService.registerForNotifications() + + return true + } + + // MARK: - Split view + + func splitViewController(_ splitViewController: UISplitViewController, + collapseSecondary secondaryViewController: UIViewController, + onto primaryViewController: UIViewController) -> Bool { + guard let navController = secondaryViewController as? UINavigationController else { + return false + } + guard let actionLogController = navController.topViewController as? ActionLogViewController else { + return false + } + + if actionLogController.testConfiguration == nil { + // Return true to indicate that we have handled the collapse by doing nothing. + // The secondary controller will be discarded. + return true + } + return false + } +} diff --git a/Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/Contents.json b/Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/Contents.json rename to Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-20x20@1x.png b/Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-20x20@1x.png similarity index 100% rename from Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-20x20@1x.png rename to Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-20x20@1x.png diff --git a/Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-20x20@2x-1.png b/Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-20x20@2x-1.png similarity index 100% rename from Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-20x20@2x-1.png rename to Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-20x20@2x-1.png diff --git a/Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-20x20@2x.png b/Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-20x20@2x.png similarity index 100% rename from Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-20x20@2x.png rename to Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-20x20@2x.png diff --git a/Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-20x20@3x.png b/Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-20x20@3x.png similarity index 100% rename from Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-20x20@3x.png rename to Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-20x20@3x.png diff --git a/Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-29x29@1x.png b/Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-29x29@1x.png similarity index 100% rename from Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-29x29@1x.png rename to Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-29x29@1x.png diff --git a/Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-29x29@2x-1.png b/Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-29x29@2x-1.png similarity index 100% rename from Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-29x29@2x-1.png rename to Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-29x29@2x-1.png diff --git a/Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-29x29@2x.png b/Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-29x29@2x.png similarity index 100% rename from Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-29x29@2x.png rename to Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-29x29@2x.png diff --git a/Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-29x29@3x.png b/Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-29x29@3x.png similarity index 100% rename from Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-29x29@3x.png rename to Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-29x29@3x.png diff --git a/Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-40x40@1x.png b/Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-40x40@1x.png similarity index 100% rename from Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-40x40@1x.png rename to Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-40x40@1x.png diff --git a/Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-40x40@2x-1.png b/Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-40x40@2x-1.png similarity index 100% rename from Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-40x40@2x-1.png rename to Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-40x40@2x-1.png diff --git a/Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-40x40@2x.png b/Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-40x40@2x.png similarity index 100% rename from Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-40x40@2x.png rename to Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-40x40@2x.png diff --git a/Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-40x40@3x.png b/Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-40x40@3x.png similarity index 100% rename from Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-40x40@3x.png rename to Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-40x40@3x.png diff --git a/Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-512x512@2x.png b/Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-512x512@2x.png similarity index 100% rename from Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-512x512@2x.png rename to Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-512x512@2x.png diff --git a/Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-60x60@2x.png b/Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-60x60@2x.png similarity index 100% rename from Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-60x60@2x.png rename to Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-60x60@2x.png diff --git a/Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-60x60@3x.png b/Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-60x60@3x.png similarity index 100% rename from Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-60x60@3x.png rename to Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-60x60@3x.png diff --git a/Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-76x76@1x.png b/Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-76x76@1x.png similarity index 100% rename from Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-76x76@1x.png rename to Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-76x76@1x.png diff --git a/Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-76x76@2x.png b/Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-76x76@2x.png similarity index 100% rename from Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-76x76@2x.png rename to Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-76x76@2x.png diff --git a/Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-83.5x83.5@2x.png b/Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-83.5x83.5@2x.png similarity index 100% rename from Certificate SDK Sample App/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-83.5x83.5@2x.png rename to Certificate SDK Sample iOS/Assets.xcassets/AppIcon.appiconset/icon-jamf-certificate-SDK-83.5x83.5@2x.png diff --git a/Certificate SDK Sample App/Assets.xcassets/Contents.json b/Certificate SDK Sample iOS/Assets.xcassets/Contents.json similarity index 100% rename from Certificate SDK Sample App/Assets.xcassets/Contents.json rename to Certificate SDK Sample iOS/Assets.xcassets/Contents.json diff --git a/Certificate SDK Sample App/Base.lproj/LaunchScreen.storyboard b/Certificate SDK Sample iOS/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from Certificate SDK Sample App/Base.lproj/LaunchScreen.storyboard rename to Certificate SDK Sample iOS/Base.lproj/LaunchScreen.storyboard diff --git a/Certificate SDK Sample App/Base.lproj/Main.storyboard b/Certificate SDK Sample iOS/Base.lproj/Main.storyboard similarity index 100% rename from Certificate SDK Sample App/Base.lproj/Main.storyboard rename to Certificate SDK Sample iOS/Base.lproj/Main.storyboard diff --git a/Certificate SDK Sample App/Info.plist b/Certificate SDK Sample iOS/Info.plist similarity index 100% rename from Certificate SDK Sample App/Info.plist rename to Certificate SDK Sample iOS/Info.plist diff --git a/Certificate SDK Sample App/Jamf-one-color-knockout.png b/Certificate SDK Sample iOS/Jamf-one-color-knockout.png similarity index 100% rename from Certificate SDK Sample App/Jamf-one-color-knockout.png rename to Certificate SDK Sample iOS/Jamf-one-color-knockout.png diff --git a/Certificate SDK Sample App/SetupTestViewController.swift b/Certificate SDK Sample iOS/SetupTestViewController.swift similarity index 85% rename from Certificate SDK Sample App/SetupTestViewController.swift rename to Certificate SDK Sample iOS/SetupTestViewController.swift index a1f5f3f..1a8c9fa 100644 --- a/Certificate SDK Sample App/SetupTestViewController.swift +++ b/Certificate SDK Sample iOS/SetupTestViewController.swift @@ -1,11 +1,9 @@ // -// SetupTestViewController.swift -// Certificate SDK Sample App +// SPDX-License-Identifier: MIT // https://github.com/jamf/CertificateSDK // -// Copyright © 2019 Jamf. All rights reserved. +// Copyright 2024, Jamf // - import UIKit class SegmentedCellView: UITableViewCell { @@ -34,9 +32,9 @@ class SetupTestViewController: UITableViewController { var detailViewController: ActionLogViewController? - /// This variable holds the struct that determines what kind of test will occur when - // the "Run Test" button is pressed. - var setup = CertificateSDKSetup(isActual: false, slowSpeed: true, simulateError: false) + var testConfiguration = CertRequestConfiguration(isActual: false, + slowSpeed: true, + simulateError: false) override func viewDidLoad() { super.viewDidLoad() @@ -54,11 +52,6 @@ class SetupTestViewController: UITableViewController { super.viewWillAppear(animated) } - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. - } - // MARK: - Segues override func prepare(for segue: UIStoryboardSegue, sender: Any?) { @@ -66,7 +59,7 @@ class SetupTestViewController: UITableViewController { let navController = segue.destination as? UINavigationController, let controller = navController.topViewController as? ActionLogViewController { - controller.setup = setup + controller.testConfiguration = testConfiguration controller.navigationItem.leftBarButtonItem = splitViewController?.displayModeButtonItem controller.navigationItem.leftItemsSupplementBackButton = true } @@ -80,8 +73,8 @@ class SetupTestViewController: UITableViewController { @IBAction func selectType(_ sender: UISegmentedControl) { let newActual = (sender.selectedSegmentIndex == 1) - if newActual != setup.isActual { - setup.isActual = newActual + if newActual != testConfiguration.isActual { + testConfiguration.isActual = newActual // reload the table with a nice animation. if let table = self.tableView { let rowsToAddOrDelete = [IndexPath(row: SetupRowIndices.optionSpeed.rawValue, section: 0), @@ -89,7 +82,7 @@ class SetupTestViewController: UITableViewController { table.beginUpdates() table.reloadRows(at: [IndexPath(row: SetupRowIndices.descriptionOfTestType.rawValue, section: 0)], with: .fade) - if setup.isActual { + if testConfiguration.isActual { table.deleteRows(at: rowsToAddOrDelete, with: .left) } else { table.insertRows(at: rowsToAddOrDelete, with: .left) @@ -99,7 +92,7 @@ class SetupTestViewController: UITableViewController { } } - /// The user has turned on/off an option within the setup. + /// The user has turned on/off an option within the testConfiguration. /// /// - Parameter sender: The switch the user has toggled @IBAction func toggleOption(_ sender: UISwitch) { @@ -110,10 +103,10 @@ class SetupTestViewController: UITableViewController { switch index { case .optionSpeed: - setup.slowSpeed = sender.isOn + testConfiguration.slowSpeed = sender.isOn case .optionError: - setup.simulateError = sender.isOn + testConfiguration.simulateError = sender.isOn default: // do nothing break @@ -124,9 +117,9 @@ class SetupTestViewController: UITableViewController { /// /// - Parameter _: Unused @IBAction func scheduleNotification(_ sender: UIButton) { - let notificationHandler = UIApplication.shared.delegate as? LocalNotificationHandler + let notificationService = LocalNotificationService.shared // A real app should schedule the notification to renew on some date in the future. - notificationHandler?.scheduleLocalNotificationForRenewal(Date(timeIntervalSinceNow: 60)) + notificationService.scheduleLocalNotificationForRenewal(Date(timeIntervalSinceNow: 60)) // Let the user know it's scheduled. sender.setTitle("Scheduled", for: .normal) @@ -158,7 +151,7 @@ class SetupTestViewController: UITableViewController { } override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - return (setup.isActual ? SetupNumberOfRows.actualTest : SetupNumberOfRows.simulatedTest).rawValue + return (testConfiguration.isActual ? SetupNumberOfRows.actualTest : SetupNumberOfRows.simulatedTest).rawValue } override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { @@ -176,12 +169,12 @@ class SetupTestViewController: UITableViewController { let cell = tableView.dequeueReusableCell(withIdentifier: "TypeSelection", for: indexPath) as? SegmentedCellView - cell?.segmentedControl.selectedSegmentIndex = (setup.isActual ? 1 : 0) + cell?.segmentedControl.selectedSegmentIndex = (testConfiguration.isActual ? 1 : 0) return cell! case .descriptionOfTestType: let cell = tableView.dequeueReusableCell(withIdentifier: "Description", for: indexPath) - if setup.isActual { + if testConfiguration.isActual { cell.textLabel!.text = "Makes the network calls to the Jamf Pro server to request a certificate" } else { cell.textLabel!.text = "Uses the embedded example .p12 for local testing" @@ -195,7 +188,7 @@ class SetupTestViewController: UITableViewController { cell?.textLabel!.text = "Slow speed" cell?.detailTextLabel!.text = "Simulates a slow server" - cell?.optionSwitch.isOn = setup.slowSpeed + cell?.optionSwitch.isOn = testConfiguration.slowSpeed return cell! case .optionError: let cell = tableView.dequeueReusableCell(withIdentifier: "Option", for: indexPath) as? OptionCellView @@ -205,7 +198,7 @@ class SetupTestViewController: UITableViewController { cell?.textLabel!.text = "Error simulation" cell?.detailTextLabel!.text = "Results in an error" - cell?.optionSwitch.isOn = setup.simulateError + cell?.optionSwitch.isOn = testConfiguration.simulateError return cell! case .runTestButton: let cell = tableView.dequeueReusableCell(withIdentifier: "RunTest", for: indexPath) diff --git a/Certificate SDK Sample visionOS/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Content.imageset/Contents.json b/Certificate SDK Sample visionOS/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..04056a5 --- /dev/null +++ b/Certificate SDK Sample visionOS/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "vision", + "scale" : "2x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Certificate SDK Sample visionOS/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Contents.json b/Certificate SDK Sample visionOS/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Certificate SDK Sample visionOS/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Certificate SDK Sample visionOS/Assets.xcassets/AppIcon.solidimagestack/Contents.json b/Certificate SDK Sample visionOS/Assets.xcassets/AppIcon.solidimagestack/Contents.json new file mode 100644 index 0000000..950af4d --- /dev/null +++ b/Certificate SDK Sample visionOS/Assets.xcassets/AppIcon.solidimagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "layers" : [ + { + "filename" : "Front.solidimagestacklayer" + }, + { + "filename" : "Middle.solidimagestacklayer" + }, + { + "filename" : "Back.solidimagestacklayer" + } + ] +} diff --git a/Certificate SDK Sample visionOS/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Content.imageset/Contents.json b/Certificate SDK Sample visionOS/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..04056a5 --- /dev/null +++ b/Certificate SDK Sample visionOS/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "vision", + "scale" : "2x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Certificate SDK Sample visionOS/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Contents.json b/Certificate SDK Sample visionOS/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Certificate SDK Sample visionOS/Assets.xcassets/AppIcon.solidimagestack/Front.solidimagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Certificate SDK Sample visionOS/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Content.imageset/Contents.json b/Certificate SDK Sample visionOS/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..04056a5 --- /dev/null +++ b/Certificate SDK Sample visionOS/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "vision", + "scale" : "2x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Certificate SDK Sample visionOS/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Contents.json b/Certificate SDK Sample visionOS/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Certificate SDK Sample visionOS/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Certificate SDK Sample visionOS/Assets.xcassets/Contents.json b/Certificate SDK Sample visionOS/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Certificate SDK Sample visionOS/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Certificate SDK Sample visionOS/CertificateSDKSampleVisionOSApp.swift b/Certificate SDK Sample visionOS/CertificateSDKSampleVisionOSApp.swift new file mode 100644 index 0000000..9534c77 --- /dev/null +++ b/Certificate SDK Sample visionOS/CertificateSDKSampleVisionOSApp.swift @@ -0,0 +1,18 @@ +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// +import SwiftUI + +@main +struct CertificateSDKSampleVisionOSApp: App { + var body: some Scene { + WindowGroup { + ContentView() + .frame(minWidth: 700, minHeight: 600) + } + .windowResizability(.contentMinSize) + } +} diff --git a/Certificate SDK Sample visionOS/ContentView.swift b/Certificate SDK Sample visionOS/ContentView.swift new file mode 100644 index 0000000..7401b93 --- /dev/null +++ b/Certificate SDK Sample visionOS/ContentView.swift @@ -0,0 +1,50 @@ +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// +import SwiftUI + +struct ContentView: View { + @ObservedObject var model = RequestTypeModel() + var body: some View { + NavigationSplitView { + RequestTypeView(model: model) + .navigationTitle("Select Test Type") + } detail: { + RightArea(model: model) + .navigationTitle("Action Log") + } + .onAppear { + LocalNotificationService.shared.registerForNotifications() + } + } +} + +struct RightArea: View { + @ObservedObject var model: RequestTypeModel + + var body: some View { + ProgressView(value: model.progress, total: 1.0) + ScrollView { + Text(model.completeOutput) + .lineLimit(nil) + .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .leading) + } + .padding(.leading) + .defaultScrollAnchor(.bottom) + HStack { + Button("Reset") { + model.reset() + } + Button("Rerun Test") { + model.runTest(resetOutput: false) + } + } + } +} + +#Preview(windowStyle: .automatic) { + ContentView() +} diff --git a/Certificate SDK Sample visionOS/Info.plist b/Certificate SDK Sample visionOS/Info.plist new file mode 100644 index 0000000..20f75e2 --- /dev/null +++ b/Certificate SDK Sample visionOS/Info.plist @@ -0,0 +1,15 @@ + + + + + UIApplicationSceneManifest + + UIApplicationPreferredDefaultSceneSessionRole + UIWindowSceneSessionRoleApplication + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + + + diff --git a/Certificate SDK Sample visionOS/RequestTypeModel.swift b/Certificate SDK Sample visionOS/RequestTypeModel.swift new file mode 100644 index 0000000..bbff5cc --- /dev/null +++ b/Certificate SDK Sample visionOS/RequestTypeModel.swift @@ -0,0 +1,98 @@ +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// +import Foundation + +/// Contains the selected options for the test run for use with visionOS +class RequestTypeModel: ObservableObject { + /// Whether to make actual network requests for the certificate or to use the built-in p12 file + @Published var isActual: Bool + /// If true, simulates a slower network speed. + @Published var slowSpeed: Bool + /// If true, ends the certificate request in an error. + @Published var simulateError: Bool + /// The complete output text shown in the Action Log + @Published var completeOutput = "" + /// The progress (from 0.0 to 1.0) of the network request + @Published var progress = 0.0 + /// True when the local notification has been scheduled + @Published var notificationScheduled = false + + /// The certificate request manager; the ``RequestTypeModel`` owns the + /// instance of the ``CertificateRequestManager``. + let requestManager: CertificateRequestManager + + init(isActual: Bool = false, slowSpeed: Bool = true, simulateError: Bool = false) { + self.isActual = isActual + self.slowSpeed = slowSpeed + self.simulateError = simulateError + self.completeOutput = "" + self.progress = 0.0 + self.requestManager = CertificateRequestManager() + LocalNotificationService.shared.requestManager = self.requestManager + } + + var description: String { + if isActual { + return "Actual" + } + + return "Simulated" + (slowSpeed ? " slow" : "") + (simulateError ? " with error" : "") + } + + func runTest(resetOutput: Bool) { + requestManager.textOutputHandler = { (text: String) in + self.append(text: text) + } + + requestManager.progressHandler = { (progress: Float) in + DispatchQueue.main.async { + self.progress = Double(progress) + } + } + + if resetOutput { + completeOutput = "Setup: \(description)" + progress = 0.0 + } + + let testConfiguration = CertRequestConfiguration(isActual: isActual, + slowSpeed: slowSpeed, + simulateError: simulateError) + requestManager.cancelPendingRequest() + requestManager.startRequest(with: testConfiguration) + } + + func reset() { + requestManager.cancelPendingRequest() + _ = requestManager.keychainHelper.clearKeychain() + + progress = 0.0 + + completeOutput = "Setup: \(description)" + append(text: requestManager.keychainHelper.showCertificateInfo()) + } + + func scheduleNotification() { + notificationScheduled = true + + let notificationService = LocalNotificationService.shared + + // A real app should schedule the notification to renew on some date in the future. + notificationService.scheduleLocalNotificationForRenewal(Date(timeIntervalSinceNow: 60)) + + // Reset back to schedule notification after 4 seconds. + DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 4.0, qos: .background) { + self.notificationScheduled = false + } + } + + private func append(text: String) { + DispatchQueue.main.async { + self.completeOutput += "\n\(text)" + } + } +} diff --git a/Certificate SDK Sample visionOS/RequestTypeView.swift b/Certificate SDK Sample visionOS/RequestTypeView.swift new file mode 100644 index 0000000..76f09f4 --- /dev/null +++ b/Certificate SDK Sample visionOS/RequestTypeView.swift @@ -0,0 +1,73 @@ +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// +import SwiftUI + +struct RequestTypeView: View { + @ObservedObject var model: RequestTypeModel + + var body: some View { + List { + Picker("Simulated/Actual", selection: $model.isActual) { + Text("Simulated") + .tag(false) + Text("Actual") + .tag(true) + } + .pickerStyle(.segmented) + if model.isActual { + Text("Makes network calls to the Jamf Pro server to request a certificate") + .font(.footnote) + } else { + Text("Uses the embedded example .p12 for local testing") + .font(.footnote) + SidebarSwitch(title: "Slow speed", + descriptiveText: "Simulates a slow server", + switchIsOn: $model.slowSpeed) + SidebarSwitch(title: "Error simulation", + descriptiveText: "Results in an error", + switchIsOn: $model.simulateError) + } + Button("Run Text", systemImage: "play") { + model.runTest(resetOutput: true) + } + Text("Schedule a local notification to renew the certificate in five seconds") + .font(.footnote) + Button(model.notificationScheduled ? "Scheduled" : "Schedule Notification", + systemImage: "play") { + model.scheduleNotification() + } + .disabled(model.notificationScheduled) + } + .listStyle(.sidebar) + } +} + +/// This view has a Toggle with a title and descriptive text. +struct SidebarSwitch: View { + let title: String + let descriptiveText: String + @Binding var switchIsOn: Bool + + var body: some View { + Toggle(isOn: $switchIsOn) { + VStack(alignment: .leading) { + Text(title) + .font(.title) + Text(descriptiveText) + .font(.footnote) + } + } + } +} + +#Preview(windowStyle: .automatic) { + let model = RequestTypeModel() + NavigationSplitView { + RequestTypeView(model: model) + } detail: { + } +} diff --git a/CertificateSDK.xcframework/Info.plist b/CertificateSDK.xcframework/Info.plist index df4130e..3cc3af1 100644 --- a/CertificateSDK.xcframework/Info.plist +++ b/CertificateSDK.xcframework/Info.plist @@ -5,33 +5,66 @@ AvailableLibraries + BinaryPath + CertificateSDK.framework/CertificateSDK LibraryIdentifier - ios-arm64_i386_x86_64-simulator + xros-arm64 + LibraryPath + CertificateSDK.framework + SupportedArchitectures + + arm64 + + SupportedPlatform + xros + + + BinaryPath + CertificateSDK.framework/CertificateSDK + LibraryIdentifier + ios-arm64 LibraryPath CertificateSDK.framework SupportedArchitectures arm64 - i386 - x86_64 SupportedPlatform ios + + + BinaryPath + CertificateSDK.framework/CertificateSDK + LibraryIdentifier + xros-arm64_x86_64-simulator + LibraryPath + CertificateSDK.framework + SupportedArchitectures + + arm64 + x86_64 + + SupportedPlatform + xros SupportedPlatformVariant simulator + BinaryPath + CertificateSDK.framework/CertificateSDK LibraryIdentifier - ios-arm64_armv7 + ios-arm64_x86_64-simulator LibraryPath CertificateSDK.framework SupportedArchitectures arm64 - armv7 + x86_64 SupportedPlatform ios + SupportedPlatformVariant + simulator CFBundlePackageType diff --git a/CertificateSDK.xcframework/_CodeSignature/CodeDirectory b/CertificateSDK.xcframework/_CodeSignature/CodeDirectory new file mode 100644 index 0000000..6b19ef3 Binary files /dev/null and b/CertificateSDK.xcframework/_CodeSignature/CodeDirectory differ diff --git a/CertificateSDK.xcframework/_CodeSignature/CodeRequirements b/CertificateSDK.xcframework/_CodeSignature/CodeRequirements new file mode 100644 index 0000000..1fd8f8f Binary files /dev/null and b/CertificateSDK.xcframework/_CodeSignature/CodeRequirements differ diff --git a/CertificateSDK.xcframework/_CodeSignature/CodeRequirements-1 b/CertificateSDK.xcframework/_CodeSignature/CodeRequirements-1 new file mode 100644 index 0000000..976decb Binary files /dev/null and b/CertificateSDK.xcframework/_CodeSignature/CodeRequirements-1 differ diff --git a/CertificateSDK.xcframework/_CodeSignature/CodeResources b/CertificateSDK.xcframework/_CodeSignature/CodeResources new file mode 100644 index 0000000..cdf9787 --- /dev/null +++ b/CertificateSDK.xcframework/_CodeSignature/CodeResources @@ -0,0 +1,728 @@ + + + + + files + + ios-arm64/CertificateSDK.framework/CertificateSDK + + 8gCkr71ms0cVeO/ERN1BS7x1wjU= + + ios-arm64/CertificateSDK.framework/Headers/CertificateRequestBase.h + + hLjW9WyUJS+8jyVUmK1qoWpduqk= + + ios-arm64/CertificateSDK.framework/Headers/CertificateRequestDelegate.h + + PTnCyZx+ZVpYX9ezPirk0yCgMGQ= + + ios-arm64/CertificateSDK.framework/Headers/CertificateRequestEmbeddedP12.h + + Cxit1w7Rs2j/lOoaxM5/ZMF4ZFo= + + ios-arm64/CertificateSDK.framework/Headers/CertificateRequestErrorDomain.h + + 0tufHVLiYUxzA4jOkXxCA6DSSi4= + + ios-arm64/CertificateSDK.framework/Headers/CertificateRequestProtocol.h + + j4gMIOdnBKmA7QBIbZpPbbDo/88= + + ios-arm64/CertificateSDK.framework/Headers/CertificateRequestWorkflow.h + + qVckvekXlnjMDZ4JZkYtrKr1nO0= + + ios-arm64/CertificateSDK.framework/Headers/CertificateSDK.h + + mawIEG5HK+qAG8KcrxXRcf0DMJo= + + ios-arm64/CertificateSDK.framework/Info.plist + + aHyEEqn7Hpb0+xcRJlRvkGVoAx8= + + ios-arm64/CertificateSDK.framework/Modules/module.modulemap + + tClFj0ge1TQaXuYCRNTIZQgBu0s= + + ios-arm64_x86_64-simulator/CertificateSDK.framework/CertificateSDK + + 4j6yraGRN3qGqRfctlgOa2WbJAg= + + ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestBase.h + + hLjW9WyUJS+8jyVUmK1qoWpduqk= + + ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestDelegate.h + + PTnCyZx+ZVpYX9ezPirk0yCgMGQ= + + ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestEmbeddedP12.h + + Cxit1w7Rs2j/lOoaxM5/ZMF4ZFo= + + ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestErrorDomain.h + + 0tufHVLiYUxzA4jOkXxCA6DSSi4= + + ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestProtocol.h + + j4gMIOdnBKmA7QBIbZpPbbDo/88= + + ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestWorkflow.h + + qVckvekXlnjMDZ4JZkYtrKr1nO0= + + ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateSDK.h + + mawIEG5HK+qAG8KcrxXRcf0DMJo= + + ios-arm64_x86_64-simulator/CertificateSDK.framework/Info.plist + + tJ0p1LHzNaEsfKD75+Y/tMnH58I= + + ios-arm64_x86_64-simulator/CertificateSDK.framework/Modules/module.modulemap + + tClFj0ge1TQaXuYCRNTIZQgBu0s= + + ios-arm64_x86_64-simulator/CertificateSDK.framework/_CodeSignature/CodeResources + + nCFblIZmO1Z74bkThxGlRRh4rmU= + + xros-arm64/CertificateSDK.framework/CertificateSDK + + VBAnMxN1DPLaOHwjobN9N8cmmTw= + + xros-arm64/CertificateSDK.framework/Headers/CertificateRequestBase.h + + hLjW9WyUJS+8jyVUmK1qoWpduqk= + + xros-arm64/CertificateSDK.framework/Headers/CertificateRequestDelegate.h + + PTnCyZx+ZVpYX9ezPirk0yCgMGQ= + + xros-arm64/CertificateSDK.framework/Headers/CertificateRequestEmbeddedP12.h + + Cxit1w7Rs2j/lOoaxM5/ZMF4ZFo= + + xros-arm64/CertificateSDK.framework/Headers/CertificateRequestErrorDomain.h + + 0tufHVLiYUxzA4jOkXxCA6DSSi4= + + xros-arm64/CertificateSDK.framework/Headers/CertificateRequestProtocol.h + + j4gMIOdnBKmA7QBIbZpPbbDo/88= + + xros-arm64/CertificateSDK.framework/Headers/CertificateRequestWorkflow.h + + qVckvekXlnjMDZ4JZkYtrKr1nO0= + + xros-arm64/CertificateSDK.framework/Headers/CertificateSDK.h + + mawIEG5HK+qAG8KcrxXRcf0DMJo= + + xros-arm64/CertificateSDK.framework/Info.plist + + qbZmGZxYCzNxbitkQk+Jy2FrQIY= + + xros-arm64/CertificateSDK.framework/Modules/module.modulemap + + tClFj0ge1TQaXuYCRNTIZQgBu0s= + + xros-arm64_x86_64-simulator/CertificateSDK.framework/CertificateSDK + + VyXg1Y/fyXFbsdkngd3YM9TGexw= + + xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestBase.h + + hLjW9WyUJS+8jyVUmK1qoWpduqk= + + xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestDelegate.h + + PTnCyZx+ZVpYX9ezPirk0yCgMGQ= + + xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestEmbeddedP12.h + + Cxit1w7Rs2j/lOoaxM5/ZMF4ZFo= + + xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestErrorDomain.h + + 0tufHVLiYUxzA4jOkXxCA6DSSi4= + + xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestProtocol.h + + j4gMIOdnBKmA7QBIbZpPbbDo/88= + + xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestWorkflow.h + + qVckvekXlnjMDZ4JZkYtrKr1nO0= + + xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateSDK.h + + mawIEG5HK+qAG8KcrxXRcf0DMJo= + + xros-arm64_x86_64-simulator/CertificateSDK.framework/Info.plist + + uUXAmHu9X6NKYJFOJJPqzFtzx1w= + + xros-arm64_x86_64-simulator/CertificateSDK.framework/Modules/module.modulemap + + tClFj0ge1TQaXuYCRNTIZQgBu0s= + + xros-arm64_x86_64-simulator/CertificateSDK.framework/_CodeSignature/CodeResources + + wI+X8+zAKDBQoUFjNn1Ln2/csC4= + + + files2 + + ios-arm64/CertificateSDK.framework/CertificateSDK + + hash + + 8gCkr71ms0cVeO/ERN1BS7x1wjU= + + hash2 + + qwrJYfaxJ3UDDlVMse19nMKDYSR+MPzxyKqd+Y4KTLU= + + + ios-arm64/CertificateSDK.framework/Headers/CertificateRequestBase.h + + hash + + hLjW9WyUJS+8jyVUmK1qoWpduqk= + + hash2 + + wWe6CUg0N7yw17b+1oZ67WShom4s6cGio8ARlP092kc= + + + ios-arm64/CertificateSDK.framework/Headers/CertificateRequestDelegate.h + + hash + + PTnCyZx+ZVpYX9ezPirk0yCgMGQ= + + hash2 + + 6BiT30OcqvhG5O8xPcpo89ExV6G891XxueC7xvJdb8k= + + + ios-arm64/CertificateSDK.framework/Headers/CertificateRequestEmbeddedP12.h + + hash + + Cxit1w7Rs2j/lOoaxM5/ZMF4ZFo= + + hash2 + + Ey9h/I+0/TdWScu0y5k1YfKmLx1k19EIK4tPo9Fw7LA= + + + ios-arm64/CertificateSDK.framework/Headers/CertificateRequestErrorDomain.h + + hash + + 0tufHVLiYUxzA4jOkXxCA6DSSi4= + + hash2 + + qCZ8nkXt16gpFrdGDk8r2voWrInPz4Hor6gZF0MKM48= + + + ios-arm64/CertificateSDK.framework/Headers/CertificateRequestProtocol.h + + hash + + j4gMIOdnBKmA7QBIbZpPbbDo/88= + + hash2 + + vOWSTNnIP0yyaCAt0KDj0sqoyjD2iULx8fHkjtodZQI= + + + ios-arm64/CertificateSDK.framework/Headers/CertificateRequestWorkflow.h + + hash + + qVckvekXlnjMDZ4JZkYtrKr1nO0= + + hash2 + + 3IscKjIVIEqC6diwnqoA3s81mpnxisYcjGtZszckgzE= + + + ios-arm64/CertificateSDK.framework/Headers/CertificateSDK.h + + hash + + mawIEG5HK+qAG8KcrxXRcf0DMJo= + + hash2 + + 7EsaVvw/RMWKN9VKOjlPQeqYmA92YPANzRtScsxjKcA= + + + ios-arm64/CertificateSDK.framework/Info.plist + + hash + + aHyEEqn7Hpb0+xcRJlRvkGVoAx8= + + hash2 + + GR7Fvi6udC0zGud+5LD+pScP9ZHNW6MJsMNmM+kYLDU= + + + ios-arm64/CertificateSDK.framework/Modules/module.modulemap + + hash + + tClFj0ge1TQaXuYCRNTIZQgBu0s= + + hash2 + + AIqQ0e5V5b6Cgro6ipCHJOTtDg3nX/JyMVH8HgxHpck= + + + ios-arm64_x86_64-simulator/CertificateSDK.framework/CertificateSDK + + hash + + 4j6yraGRN3qGqRfctlgOa2WbJAg= + + hash2 + + R/hPjXwC5IWrqii/W1i/A4OKipY3I9Y8qNC1ltQ7z/4= + + + ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestBase.h + + hash + + hLjW9WyUJS+8jyVUmK1qoWpduqk= + + hash2 + + wWe6CUg0N7yw17b+1oZ67WShom4s6cGio8ARlP092kc= + + + ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestDelegate.h + + hash + + PTnCyZx+ZVpYX9ezPirk0yCgMGQ= + + hash2 + + 6BiT30OcqvhG5O8xPcpo89ExV6G891XxueC7xvJdb8k= + + + ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestEmbeddedP12.h + + hash + + Cxit1w7Rs2j/lOoaxM5/ZMF4ZFo= + + hash2 + + Ey9h/I+0/TdWScu0y5k1YfKmLx1k19EIK4tPo9Fw7LA= + + + ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestErrorDomain.h + + hash + + 0tufHVLiYUxzA4jOkXxCA6DSSi4= + + hash2 + + qCZ8nkXt16gpFrdGDk8r2voWrInPz4Hor6gZF0MKM48= + + + ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestProtocol.h + + hash + + j4gMIOdnBKmA7QBIbZpPbbDo/88= + + hash2 + + vOWSTNnIP0yyaCAt0KDj0sqoyjD2iULx8fHkjtodZQI= + + + ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestWorkflow.h + + hash + + qVckvekXlnjMDZ4JZkYtrKr1nO0= + + hash2 + + 3IscKjIVIEqC6diwnqoA3s81mpnxisYcjGtZszckgzE= + + + ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateSDK.h + + hash + + mawIEG5HK+qAG8KcrxXRcf0DMJo= + + hash2 + + 7EsaVvw/RMWKN9VKOjlPQeqYmA92YPANzRtScsxjKcA= + + + ios-arm64_x86_64-simulator/CertificateSDK.framework/Info.plist + + hash + + tJ0p1LHzNaEsfKD75+Y/tMnH58I= + + hash2 + + 7ffF8G0dE498vqC3YqgE5rDX2wZjT8ugaPLOOt/vBNo= + + + ios-arm64_x86_64-simulator/CertificateSDK.framework/Modules/module.modulemap + + hash + + tClFj0ge1TQaXuYCRNTIZQgBu0s= + + hash2 + + AIqQ0e5V5b6Cgro6ipCHJOTtDg3nX/JyMVH8HgxHpck= + + + ios-arm64_x86_64-simulator/CertificateSDK.framework/_CodeSignature/CodeResources + + hash + + nCFblIZmO1Z74bkThxGlRRh4rmU= + + hash2 + + XFMVvIVjkB8KPoFWrVBCVsuNfzyD0gwZ15UjB2utAME= + + + xros-arm64/CertificateSDK.framework/CertificateSDK + + hash + + VBAnMxN1DPLaOHwjobN9N8cmmTw= + + hash2 + + msLlLKGq7axLzdNAIvwQV761j+IZNl4B6l5V3WaWzOY= + + + xros-arm64/CertificateSDK.framework/Headers/CertificateRequestBase.h + + hash + + hLjW9WyUJS+8jyVUmK1qoWpduqk= + + hash2 + + wWe6CUg0N7yw17b+1oZ67WShom4s6cGio8ARlP092kc= + + + xros-arm64/CertificateSDK.framework/Headers/CertificateRequestDelegate.h + + hash + + PTnCyZx+ZVpYX9ezPirk0yCgMGQ= + + hash2 + + 6BiT30OcqvhG5O8xPcpo89ExV6G891XxueC7xvJdb8k= + + + xros-arm64/CertificateSDK.framework/Headers/CertificateRequestEmbeddedP12.h + + hash + + Cxit1w7Rs2j/lOoaxM5/ZMF4ZFo= + + hash2 + + Ey9h/I+0/TdWScu0y5k1YfKmLx1k19EIK4tPo9Fw7LA= + + + xros-arm64/CertificateSDK.framework/Headers/CertificateRequestErrorDomain.h + + hash + + 0tufHVLiYUxzA4jOkXxCA6DSSi4= + + hash2 + + qCZ8nkXt16gpFrdGDk8r2voWrInPz4Hor6gZF0MKM48= + + + xros-arm64/CertificateSDK.framework/Headers/CertificateRequestProtocol.h + + hash + + j4gMIOdnBKmA7QBIbZpPbbDo/88= + + hash2 + + vOWSTNnIP0yyaCAt0KDj0sqoyjD2iULx8fHkjtodZQI= + + + xros-arm64/CertificateSDK.framework/Headers/CertificateRequestWorkflow.h + + hash + + qVckvekXlnjMDZ4JZkYtrKr1nO0= + + hash2 + + 3IscKjIVIEqC6diwnqoA3s81mpnxisYcjGtZszckgzE= + + + xros-arm64/CertificateSDK.framework/Headers/CertificateSDK.h + + hash + + mawIEG5HK+qAG8KcrxXRcf0DMJo= + + hash2 + + 7EsaVvw/RMWKN9VKOjlPQeqYmA92YPANzRtScsxjKcA= + + + xros-arm64/CertificateSDK.framework/Info.plist + + hash + + qbZmGZxYCzNxbitkQk+Jy2FrQIY= + + hash2 + + 1T8SOXvMNarMlTCCPBmCYwVSzpfZakvZl7XPpUHb3eY= + + + xros-arm64/CertificateSDK.framework/Modules/module.modulemap + + hash + + tClFj0ge1TQaXuYCRNTIZQgBu0s= + + hash2 + + AIqQ0e5V5b6Cgro6ipCHJOTtDg3nX/JyMVH8HgxHpck= + + + xros-arm64_x86_64-simulator/CertificateSDK.framework/CertificateSDK + + hash + + VyXg1Y/fyXFbsdkngd3YM9TGexw= + + hash2 + + sZ8qdUN7LUFAyBVoQ2YArrCwJlJOts/uQtjLQMpTlEc= + + + xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestBase.h + + hash + + hLjW9WyUJS+8jyVUmK1qoWpduqk= + + hash2 + + wWe6CUg0N7yw17b+1oZ67WShom4s6cGio8ARlP092kc= + + + xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestDelegate.h + + hash + + PTnCyZx+ZVpYX9ezPirk0yCgMGQ= + + hash2 + + 6BiT30OcqvhG5O8xPcpo89ExV6G891XxueC7xvJdb8k= + + + xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestEmbeddedP12.h + + hash + + Cxit1w7Rs2j/lOoaxM5/ZMF4ZFo= + + hash2 + + Ey9h/I+0/TdWScu0y5k1YfKmLx1k19EIK4tPo9Fw7LA= + + + xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestErrorDomain.h + + hash + + 0tufHVLiYUxzA4jOkXxCA6DSSi4= + + hash2 + + qCZ8nkXt16gpFrdGDk8r2voWrInPz4Hor6gZF0MKM48= + + + xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestProtocol.h + + hash + + j4gMIOdnBKmA7QBIbZpPbbDo/88= + + hash2 + + vOWSTNnIP0yyaCAt0KDj0sqoyjD2iULx8fHkjtodZQI= + + + xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestWorkflow.h + + hash + + qVckvekXlnjMDZ4JZkYtrKr1nO0= + + hash2 + + 3IscKjIVIEqC6diwnqoA3s81mpnxisYcjGtZszckgzE= + + + xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateSDK.h + + hash + + mawIEG5HK+qAG8KcrxXRcf0DMJo= + + hash2 + + 7EsaVvw/RMWKN9VKOjlPQeqYmA92YPANzRtScsxjKcA= + + + xros-arm64_x86_64-simulator/CertificateSDK.framework/Info.plist + + hash + + uUXAmHu9X6NKYJFOJJPqzFtzx1w= + + hash2 + + XP9fj4XMrNB+KEPh5YgkZn5P2X7MD/vYYZqRiRCKuiI= + + + xros-arm64_x86_64-simulator/CertificateSDK.framework/Modules/module.modulemap + + hash + + tClFj0ge1TQaXuYCRNTIZQgBu0s= + + hash2 + + AIqQ0e5V5b6Cgro6ipCHJOTtDg3nX/JyMVH8HgxHpck= + + + xros-arm64_x86_64-simulator/CertificateSDK.framework/_CodeSignature/CodeResources + + hash + + wI+X8+zAKDBQoUFjNn1Ln2/csC4= + + hash2 + + +LSAq5z/ihB6ED3QF/t6sMSVsUGaSg9FzHDq81590QI= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/CertificateSDK.xcframework/_CodeSignature/CodeSignature b/CertificateSDK.xcframework/_CodeSignature/CodeSignature new file mode 100644 index 0000000..eed2965 Binary files /dev/null and b/CertificateSDK.xcframework/_CodeSignature/CodeSignature differ diff --git a/CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/CertificateSDK b/CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/CertificateSDK new file mode 100755 index 0000000..ba9cc26 Binary files /dev/null and b/CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/CertificateSDK differ diff --git a/CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestBase.h b/CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/Headers/CertificateRequestBase.h similarity index 51% rename from CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestBase.h rename to CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/Headers/CertificateRequestBase.h index 217b488..0c84dd9 100644 --- a/CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestBase.h +++ b/CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/Headers/CertificateRequestBase.h @@ -1,31 +1,9 @@ -/* - CertificateRequestBase.h - - https://github.com/jamf/CertificateSDK - - MIT License - - Copyright (c) 2019 Jamf Open Source Community - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. -*/ - +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// #ifndef CertificateRequestBase_h #define CertificateRequestBase_h diff --git a/CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/Headers/CertificateRequestDelegate.h b/CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/Headers/CertificateRequestDelegate.h similarity index 69% rename from CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/Headers/CertificateRequestDelegate.h rename to CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/Headers/CertificateRequestDelegate.h index 620d4dd..b2cc645 100644 --- a/CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/Headers/CertificateRequestDelegate.h +++ b/CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/Headers/CertificateRequestDelegate.h @@ -1,31 +1,9 @@ -/* - CertificateRequestDelegate.h - - https://github.com/jamf/CertificateSDK - - MIT License - - Copyright (c) 2019 Jamf Open Source Community - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. -*/ - +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// #ifndef CertificateRequestDelegate_h #define CertificateRequestDelegate_h diff --git a/CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/Headers/CertificateRequestEmbeddedP12.h b/CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/Headers/CertificateRequestEmbeddedP12.h similarity index 53% rename from CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/Headers/CertificateRequestEmbeddedP12.h rename to CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/Headers/CertificateRequestEmbeddedP12.h index 8cdde57..7374c7c 100644 --- a/CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/Headers/CertificateRequestEmbeddedP12.h +++ b/CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/Headers/CertificateRequestEmbeddedP12.h @@ -1,31 +1,9 @@ -/* - CertificateRequestEmbeddedP12.h - - https://github.com/jamf/CertificateSDK - - MIT License - - Copyright (c) 2019 Jamf Open Source Community - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. -*/ - +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// #ifndef CertificateRequestEmbeddedP12_h #define CertificateRequestEmbeddedP12_h diff --git a/CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestErrorDomain.h b/CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/Headers/CertificateRequestErrorDomain.h similarity index 54% rename from CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestErrorDomain.h rename to CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/Headers/CertificateRequestErrorDomain.h index 4dc9789..8629429 100644 --- a/CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestErrorDomain.h +++ b/CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/Headers/CertificateRequestErrorDomain.h @@ -1,31 +1,9 @@ -/* - CertificateRequestErrorDomain.h - - https://github.com/jamf/CertificateSDK - - MIT License - - Copyright (c) 2019 Jamf Open Source Community - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. -*/ - +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// #ifndef CertificateErrorDomain_h #define CertificateErrorDomain_h diff --git a/CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/Headers/CertificateRequestProtocol.h b/CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/Headers/CertificateRequestProtocol.h new file mode 100644 index 0000000..99d316a --- /dev/null +++ b/CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/Headers/CertificateRequestProtocol.h @@ -0,0 +1,41 @@ +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// +#ifndef CertificateRequestProtocol_h +#define CertificateRequestProtocol_h + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + This is the protocol used for requesting and renewing certificates from Jamf Pro. + */ +@protocol CertificateRequestProtocol + +/** + This is the maximum number of steps in the progress of a certificate request. + May be approximate until the actual call of -startNewCertificateRequest + */ +@property (assign, readonly) NSUInteger maxNumberOfSteps; + +/** + This will start a request to the Jamf Pro server for a new certificate. + The delegate will be called with progress, errors, and the new identity. + NOTE: Only one such request should be in progress at a given time for a single CertificateRequest object. + */ +- (void)startNewCertificateRequest; + +/** + Cancels the current request, if any. The completion handler WILL be called on the delegate. + */ +- (void)cancelRequest; + +@end + +NS_ASSUME_NONNULL_END + +#endif /* CertificateRequestProtocol_h */ diff --git a/CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/Headers/CertificateRequestWorkflow.h b/CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/Headers/CertificateRequestWorkflow.h similarity index 64% rename from CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/Headers/CertificateRequestWorkflow.h rename to CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/Headers/CertificateRequestWorkflow.h index 0ca3d0d..21ba1b8 100644 --- a/CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/Headers/CertificateRequestWorkflow.h +++ b/CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/Headers/CertificateRequestWorkflow.h @@ -1,31 +1,9 @@ -/* - CertificateRequestWorkflow.h - - https://github.com/jamf/CertificateSDK - - MIT License - - Copyright (c) 2019 Jamf Open Source Community - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. -*/ - +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// #ifndef CertificateRequestWorkflow_h #define CertificateRequestWorkflow_h diff --git a/CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/Headers/CertificateSDK.h b/CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/Headers/CertificateSDK.h new file mode 100644 index 0000000..095605c --- /dev/null +++ b/CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/Headers/CertificateSDK.h @@ -0,0 +1,22 @@ +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// +#import + +//! Project version number for CertificateSDK. +FOUNDATION_EXPORT double CertificateSDKVersionNumber; + +//! Project version string for CertificateSDK. +FOUNDATION_EXPORT const unsigned char CertificateSDKVersionString[]; + + +#import +#import +#import + +#import +#import +#import diff --git a/CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/Info.plist b/CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/Info.plist new file mode 100644 index 0000000..bccb6fd Binary files /dev/null and b/CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/Info.plist differ diff --git a/CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/Modules/module.modulemap b/CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/Modules/module.modulemap similarity index 100% rename from CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/Modules/module.modulemap rename to CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/Modules/module.modulemap index e61c38a..1cc4fd5 100644 --- a/CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/Modules/module.modulemap +++ b/CertificateSDK.xcframework/ios-arm64/CertificateSDK.framework/Modules/module.modulemap @@ -1,6 +1,6 @@ framework module CertificateSDK { umbrella header "CertificateSDK.h" - export * + module * { export * } } diff --git a/CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/CertificateSDK b/CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/CertificateSDK deleted file mode 100755 index 849b588..0000000 Binary files a/CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/CertificateSDK and /dev/null differ diff --git a/CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/Headers/CertificateRequestProtocol.h b/CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/Headers/CertificateRequestProtocol.h deleted file mode 100644 index d82b998..0000000 --- a/CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/Headers/CertificateRequestProtocol.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - CertificateRequestProtocol.h - - https://github.com/jamf/CertificateSDK - - MIT License - - Copyright (c) 2019 Jamf Open Source Community - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. -*/ - -#ifndef CertificateRequestProtocol_h -#define CertificateRequestProtocol_h - -#import - -NS_ASSUME_NONNULL_BEGIN - -/** - This is the protocol used for requesting and renewing certificates from Jamf Pro. - */ -@protocol CertificateRequestProtocol - -/** - This is the maximum number of steps in the progress of a certificate request. - May be approximate until the actual call of -startNewCertificateRequest - */ -@property (assign, readonly) NSUInteger maxNumberOfSteps; - -/** - This will start a request to the Jamf Pro server for a new certificate. - The delegate will be called with progress, errors, and the new identity. - NOTE: Only one such request should be in progress at a given time for a single CertificateRequest object. - */ -- (void)startNewCertificateRequest; - -/** - Cancels the current request, if any. The completion handler WILL be called on the delegate. - */ -- (void)cancelRequest; - -@end - -NS_ASSUME_NONNULL_END - -#endif /* CertificateRequestProtocol_h */ diff --git a/CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/Headers/CertificateSDK.h b/CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/Headers/CertificateSDK.h deleted file mode 100644 index 06dbb8f..0000000 --- a/CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/Headers/CertificateSDK.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - CertificateSDK.h - - https://github.com/jamf/CertificateSDK - - MIT License - - Copyright (c) 2019 Jamf Open Source Community - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. -*/ - -#import - -//! Project version number for CertificateSDK. -FOUNDATION_EXPORT double CertificateSDKVersionNumber; - -//! Project version string for CertificateSDK. -FOUNDATION_EXPORT const unsigned char CertificateSDKVersionString[]; - - -#import -#import -#import - -#import -#import -#import diff --git a/CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/CertificateSDK b/CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/CertificateSDK deleted file mode 100755 index fbb024a..0000000 Binary files a/CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/CertificateSDK and /dev/null differ diff --git a/CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestProtocol.h b/CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestProtocol.h deleted file mode 100644 index d82b998..0000000 --- a/CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestProtocol.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - CertificateRequestProtocol.h - - https://github.com/jamf/CertificateSDK - - MIT License - - Copyright (c) 2019 Jamf Open Source Community - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. -*/ - -#ifndef CertificateRequestProtocol_h -#define CertificateRequestProtocol_h - -#import - -NS_ASSUME_NONNULL_BEGIN - -/** - This is the protocol used for requesting and renewing certificates from Jamf Pro. - */ -@protocol CertificateRequestProtocol - -/** - This is the maximum number of steps in the progress of a certificate request. - May be approximate until the actual call of -startNewCertificateRequest - */ -@property (assign, readonly) NSUInteger maxNumberOfSteps; - -/** - This will start a request to the Jamf Pro server for a new certificate. - The delegate will be called with progress, errors, and the new identity. - NOTE: Only one such request should be in progress at a given time for a single CertificateRequest object. - */ -- (void)startNewCertificateRequest; - -/** - Cancels the current request, if any. The completion handler WILL be called on the delegate. - */ -- (void)cancelRequest; - -@end - -NS_ASSUME_NONNULL_END - -#endif /* CertificateRequestProtocol_h */ diff --git a/CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/Headers/CertificateSDK.h b/CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/Headers/CertificateSDK.h deleted file mode 100644 index 06dbb8f..0000000 --- a/CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/Headers/CertificateSDK.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - CertificateSDK.h - - https://github.com/jamf/CertificateSDK - - MIT License - - Copyright (c) 2019 Jamf Open Source Community - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. -*/ - -#import - -//! Project version number for CertificateSDK. -FOUNDATION_EXPORT double CertificateSDKVersionNumber; - -//! Project version string for CertificateSDK. -FOUNDATION_EXPORT const unsigned char CertificateSDKVersionString[]; - - -#import -#import -#import - -#import -#import -#import diff --git a/CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/CertificateSDK b/CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/CertificateSDK new file mode 100755 index 0000000..2781672 Binary files /dev/null and b/CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/CertificateSDK differ diff --git a/CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/Headers/CertificateRequestBase.h b/CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestBase.h similarity index 51% rename from CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/Headers/CertificateRequestBase.h rename to CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestBase.h index 217b488..0c84dd9 100644 --- a/CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/Headers/CertificateRequestBase.h +++ b/CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestBase.h @@ -1,31 +1,9 @@ -/* - CertificateRequestBase.h - - https://github.com/jamf/CertificateSDK - - MIT License - - Copyright (c) 2019 Jamf Open Source Community - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. -*/ - +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// #ifndef CertificateRequestBase_h #define CertificateRequestBase_h diff --git a/CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestDelegate.h b/CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestDelegate.h similarity index 69% rename from CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestDelegate.h rename to CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestDelegate.h index 620d4dd..b2cc645 100644 --- a/CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestDelegate.h +++ b/CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestDelegate.h @@ -1,31 +1,9 @@ -/* - CertificateRequestDelegate.h - - https://github.com/jamf/CertificateSDK - - MIT License - - Copyright (c) 2019 Jamf Open Source Community - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. -*/ - +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// #ifndef CertificateRequestDelegate_h #define CertificateRequestDelegate_h diff --git a/CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestEmbeddedP12.h b/CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestEmbeddedP12.h similarity index 53% rename from CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestEmbeddedP12.h rename to CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestEmbeddedP12.h index 8cdde57..7374c7c 100644 --- a/CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestEmbeddedP12.h +++ b/CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestEmbeddedP12.h @@ -1,31 +1,9 @@ -/* - CertificateRequestEmbeddedP12.h - - https://github.com/jamf/CertificateSDK - - MIT License - - Copyright (c) 2019 Jamf Open Source Community - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. -*/ - +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// #ifndef CertificateRequestEmbeddedP12_h #define CertificateRequestEmbeddedP12_h diff --git a/CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/Headers/CertificateRequestErrorDomain.h b/CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestErrorDomain.h similarity index 54% rename from CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/Headers/CertificateRequestErrorDomain.h rename to CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestErrorDomain.h index 4dc9789..8629429 100644 --- a/CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/Headers/CertificateRequestErrorDomain.h +++ b/CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestErrorDomain.h @@ -1,31 +1,9 @@ -/* - CertificateRequestErrorDomain.h - - https://github.com/jamf/CertificateSDK - - MIT License - - Copyright (c) 2019 Jamf Open Source Community - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. -*/ - +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// #ifndef CertificateErrorDomain_h #define CertificateErrorDomain_h diff --git a/CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestProtocol.h b/CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestProtocol.h new file mode 100644 index 0000000..99d316a --- /dev/null +++ b/CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestProtocol.h @@ -0,0 +1,41 @@ +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// +#ifndef CertificateRequestProtocol_h +#define CertificateRequestProtocol_h + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + This is the protocol used for requesting and renewing certificates from Jamf Pro. + */ +@protocol CertificateRequestProtocol + +/** + This is the maximum number of steps in the progress of a certificate request. + May be approximate until the actual call of -startNewCertificateRequest + */ +@property (assign, readonly) NSUInteger maxNumberOfSteps; + +/** + This will start a request to the Jamf Pro server for a new certificate. + The delegate will be called with progress, errors, and the new identity. + NOTE: Only one such request should be in progress at a given time for a single CertificateRequest object. + */ +- (void)startNewCertificateRequest; + +/** + Cancels the current request, if any. The completion handler WILL be called on the delegate. + */ +- (void)cancelRequest; + +@end + +NS_ASSUME_NONNULL_END + +#endif /* CertificateRequestProtocol_h */ diff --git a/CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestWorkflow.h b/CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestWorkflow.h similarity index 64% rename from CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestWorkflow.h rename to CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestWorkflow.h index 0ca3d0d..21ba1b8 100644 --- a/CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestWorkflow.h +++ b/CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestWorkflow.h @@ -1,31 +1,9 @@ -/* - CertificateRequestWorkflow.h - - https://github.com/jamf/CertificateSDK - - MIT License - - Copyright (c) 2019 Jamf Open Source Community - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE. -*/ - +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// #ifndef CertificateRequestWorkflow_h #define CertificateRequestWorkflow_h diff --git a/CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateSDK.h b/CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateSDK.h new file mode 100644 index 0000000..095605c --- /dev/null +++ b/CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateSDK.h @@ -0,0 +1,22 @@ +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// +#import + +//! Project version number for CertificateSDK. +FOUNDATION_EXPORT double CertificateSDKVersionNumber; + +//! Project version string for CertificateSDK. +FOUNDATION_EXPORT const unsigned char CertificateSDKVersionString[]; + + +#import +#import +#import + +#import +#import +#import diff --git a/CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/Info.plist b/CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/Info.plist similarity index 56% rename from CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/Info.plist rename to CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/Info.plist index fa7ebe5..f2add75 100644 Binary files a/CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/Info.plist and b/CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/Info.plist differ diff --git a/CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/Modules/module.modulemap b/CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/Modules/module.modulemap similarity index 100% rename from CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/Modules/module.modulemap rename to CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/Modules/module.modulemap index e61c38a..1cc4fd5 100644 --- a/CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/Modules/module.modulemap +++ b/CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/Modules/module.modulemap @@ -1,6 +1,6 @@ framework module CertificateSDK { umbrella header "CertificateSDK.h" - export * + module * { export * } } diff --git a/CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/_CodeSignature/CodeResources b/CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/_CodeSignature/CodeResources similarity index 72% rename from CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/_CodeSignature/CodeResources rename to CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/_CodeSignature/CodeResources index 689c334..255d3ef 100644 --- a/CertificateSDK.xcframework/ios-arm64_i386_x86_64-simulator/CertificateSDK.framework/_CodeSignature/CodeResources +++ b/CertificateSDK.xcframework/ios-arm64_x86_64-simulator/CertificateSDK.framework/_CodeSignature/CodeResources @@ -6,129 +6,97 @@ Headers/CertificateRequestBase.h - gAlLQb9Mg9BJDv37B+fcK6iM+R8= + hLjW9WyUJS+8jyVUmK1qoWpduqk= Headers/CertificateRequestDelegate.h - t2Lu6hSmoIBisYLkyJnTrAcR00I= + PTnCyZx+ZVpYX9ezPirk0yCgMGQ= Headers/CertificateRequestEmbeddedP12.h - M7Ng9rUqfKfHsQ6eX//YnCTHINo= + Cxit1w7Rs2j/lOoaxM5/ZMF4ZFo= Headers/CertificateRequestErrorDomain.h - A2josM5GpTK0H4yKjgYtSD6/cc8= + 0tufHVLiYUxzA4jOkXxCA6DSSi4= Headers/CertificateRequestProtocol.h - HrrEFKkTzdEHw5IhTZ3L/f78kf0= + j4gMIOdnBKmA7QBIbZpPbbDo/88= Headers/CertificateRequestWorkflow.h - 63BK/0w8Os5fG5hgXnd82Ejw+9o= + qVckvekXlnjMDZ4JZkYtrKr1nO0= Headers/CertificateSDK.h - 4y2AaoAeQ5x/4WXK4Mobh9L4bfU= + mawIEG5HK+qAG8KcrxXRcf0DMJo= Info.plist - x0vydHDHo2HnbzWm6jQ3Y9y6Jjs= + tJ0p1LHzNaEsfKD75+Y/tMnH58I= Modules/module.modulemap - Okt3WKgLOeLqLPPyFALrePQEDQs= + tClFj0ge1TQaXuYCRNTIZQgBu0s= files2 Headers/CertificateRequestBase.h - hash - - gAlLQb9Mg9BJDv37B+fcK6iM+R8= - hash2 - 9SthsHYJbXH/wFiS5K8Up5+Lj3HDjZAhb330mZWrdaM= + wWe6CUg0N7yw17b+1oZ67WShom4s6cGio8ARlP092kc= Headers/CertificateRequestDelegate.h - hash - - t2Lu6hSmoIBisYLkyJnTrAcR00I= - hash2 - cDkVWcJZElnCD8D/Bcdnm3umMx88rFdLKhcx6dznqjc= + 6BiT30OcqvhG5O8xPcpo89ExV6G891XxueC7xvJdb8k= Headers/CertificateRequestEmbeddedP12.h - hash - - M7Ng9rUqfKfHsQ6eX//YnCTHINo= - hash2 - AtWaWwISsYMSajZerCPstF4ox8B3jtoC7UHH/fi+sSs= + Ey9h/I+0/TdWScu0y5k1YfKmLx1k19EIK4tPo9Fw7LA= Headers/CertificateRequestErrorDomain.h - hash - - A2josM5GpTK0H4yKjgYtSD6/cc8= - hash2 - pk/xL0cC4O271jkYhuMxWKEeLzPyf1v6uLZwdqEnMxs= + qCZ8nkXt16gpFrdGDk8r2voWrInPz4Hor6gZF0MKM48= Headers/CertificateRequestProtocol.h - hash - - HrrEFKkTzdEHw5IhTZ3L/f78kf0= - hash2 - D25n9//yO1XrrBcXNCBWr9abPdIKbWDAPB1JxhPwSI4= + vOWSTNnIP0yyaCAt0KDj0sqoyjD2iULx8fHkjtodZQI= Headers/CertificateRequestWorkflow.h - hash - - 63BK/0w8Os5fG5hgXnd82Ejw+9o= - hash2 - WMpm1qSZ3eeF2InrHQMedBTJAo3pSTloo4WzPKry/4Y= + 3IscKjIVIEqC6diwnqoA3s81mpnxisYcjGtZszckgzE= Headers/CertificateSDK.h - hash - - 4y2AaoAeQ5x/4WXK4Mobh9L4bfU= - hash2 - BMnJETQFljB0Y0mlq/pPGHzOiYu/IXMTaAGSfan8vjo= + 7EsaVvw/RMWKN9VKOjlPQeqYmA92YPANzRtScsxjKcA= Modules/module.modulemap - hash - - Okt3WKgLOeLqLPPyFALrePQEDQs= - hash2 - +w/0sYILFq3Jg+dPEjILJ4+6ryCSvZYk+XFyMbQKzzM= + AIqQ0e5V5b6Cgro6ipCHJOTtDg3nX/JyMVH8HgxHpck= diff --git a/CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/CertificateSDK b/CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/CertificateSDK new file mode 100755 index 0000000..6393032 Binary files /dev/null and b/CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/CertificateSDK differ diff --git a/CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/Headers/CertificateRequestBase.h b/CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/Headers/CertificateRequestBase.h new file mode 100644 index 0000000..0c84dd9 --- /dev/null +++ b/CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/Headers/CertificateRequestBase.h @@ -0,0 +1,46 @@ +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// +#ifndef CertificateRequestBase_h +#define CertificateRequestBase_h + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + This class is the base class for all CertificateRequestProtocol objects. + Subclasses will have a concrete implementation of requesting certificates. + */ +NS_CLASS_AVAILABLE_IOS(10_0) +@interface CertificateRequestBase : NSObject + +/** + The object that will be called back with progress, errors, and completion. + */ +@property (weak, readonly) id delegate; + +/** + This is the maximum number of steps in the progress of a certificate request. + May be approximate until the actual call of -startNewCertificateRequest + */ +@property (assign, readonly) NSUInteger maxNumberOfSteps; + +/** + Create an object. + + @param delegate Your delegate that will be called as the certificate request workflow proceeds + @return An initialized object; may be nil if memory is full + */ +- (nullable instancetype)initWithDelegate:(id)delegate NS_DESIGNATED_INITIALIZER; + +@end + +NS_ASSUME_NONNULL_END + +#endif /* CertificateRequestBase_h */ diff --git a/CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/Headers/CertificateRequestDelegate.h b/CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/Headers/CertificateRequestDelegate.h new file mode 100644 index 0000000..b2cc645 --- /dev/null +++ b/CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/Headers/CertificateRequestDelegate.h @@ -0,0 +1,75 @@ +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// +#ifndef CertificateRequestDelegate_h +#define CertificateRequestDelegate_h + +NS_ASSUME_NONNULL_BEGIN + +@protocol CertificateRequestProtocol; + +/** + Third party apps should have a class that implements these methods for notification on progress, errors, and completion. + */ +@protocol CertificateRequestDelegate + +@required +/** + When any kind of error occurs in the process for requesting certificates, this delegate method will be called. + + @param request The object that initiated the request + @param error An error object + */ +- (void)certificateRequest:(id)request errorOccurred:(NSError *)error NS_SWIFT_NAME(certificate(request:error:)); + +@required +/** + When the request to Jamf Pro is completed, this method will be called. If there were errors, the identity will be nil. + + @param request The object that started the request. + @param identity An identity that encapsulates the info from the server. + */ +- (void)certificateRequest:(id)request completedWithIdentity:(nullable SecIdentityRef)identity +NS_SWIFT_NAME(certificate(request:completedWith:)); + +@optional +/** + As the steps are completed during the request to Jamf Pro, this method can be called. The current progress can be checked + against the request.maxNumberOfSteps to show progress percentage. + NOTE: Each step may take a different (unknown) amount of time as the actual request will be using network resources. + + @param request The object that started the request. + @param current The current progress + */ +- (void)certificateRequest:(id)request progress:(NSUInteger)current; + +@optional +/** + When the CertificateRequest SDK begins accessing the network and when it ends accessing the network, this method + is called if implemented. + + @param request The object that started the request. + @param isUsingNetwork Whether or not the request is currently using the network. + */ +- (void)certificateRequest:(id)request isUsingNetwork:(BOOL)isUsingNetwork; + + +@optional +/** + When the CertificateRequest SDK detects no settings in the Managed App Config key, or if the invitation in the + Managed App Config has expired this will be called to let you know that it is waiting for a new MAC to be delivered + from the Jamf Pro server. Will be called again when the MAC comes in; the timing on this can vary greatly. + + @param request The object that started the request. + @param waitingForMAC Whether or not the request is currently waiting for settings in the Managed App Config. + */ +- (void)certificateRequest:(id)request isWaitingForMAC:(BOOL)waitingForMAC; + +@end + +NS_ASSUME_NONNULL_END + +#endif /* CertificateRequestDelegate_h */ diff --git a/CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/Headers/CertificateRequestEmbeddedP12.h b/CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/Headers/CertificateRequestEmbeddedP12.h new file mode 100644 index 0000000..7374c7c --- /dev/null +++ b/CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/Headers/CertificateRequestEmbeddedP12.h @@ -0,0 +1,45 @@ +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// +#ifndef CertificateRequestEmbeddedP12_h +#define CertificateRequestEmbeddedP12_h + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + This class reads the certificate from an embedded p12 file, and can force errors for testing. + */ +NS_CLASS_AVAILABLE_IOS(10_0) +@interface CertificateRequestEmbeddedP12 : CertificateRequestBase + +/** + Create an object. + + @param delegate Your delegate that will be called as the certificate request workflow proceeds + @param p12URL A URL to a file with a .p12 certificate that will be returned + @param pwd The password for the .p12 file + @return An initialized object; may be nil if memory is full + */ +- (nullable instancetype)initWithDelegate:(id)delegate + p12File:(NSURL *)p12URL + p12Password:(NSString *)pwd; + +/** + Use this option to artificially delay the completion of each step. Each step up to maxNumberOfSteps will take this many seconds. + This allows you to test things that are hard to test otherwise, such as progress. + Defaults to zero (full speed). + */ +@property (assign) NSUInteger secondsBetweenSteps; + +@end + +NS_ASSUME_NONNULL_END + +#endif /* CertificateRequestEmbeddedP12_h */ diff --git a/CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/Headers/CertificateRequestErrorDomain.h b/CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/Headers/CertificateRequestErrorDomain.h new file mode 100644 index 0000000..8629429 --- /dev/null +++ b/CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/Headers/CertificateRequestErrorDomain.h @@ -0,0 +1,34 @@ +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// +#ifndef CertificateErrorDomain_h +#define CertificateErrorDomain_h + +/** + The error domain specific to the Jamf Certificate SDK. + */ +extern NSString * const kCertificateRequestErrorDomain; + +/** + Errors specific to the Jamf Certificate SDK + + - kErrorBadInitializationParams: A CertificateRequestEmbeddedP12 object was initialized with bad parameters. + - kErrorCertificateMalformed: Unlikely to happen. The certificate coming from Jamf Pro has been mangled in transit. + - kErrorCertificateWrongAutomaticPassword: Unlikely to happen. Occurs when the .p12 from the server was encrypted with a different password than the SDK has chosen. + - kErrorIncorrectManagedAppConfigData: The Managed App Config info does not contain enough information to contact Jamf Pro. + - kErrorInvalidResponseFromJamfProServer: Unlikely to happen. The Jamf Pro server responded with info that the SDK does not understand. + - kErrorTestingP12LoadFailed: Unlikely to happen. When using the testing class CertificateRequestEmbeddedP12 this is a generic error that the p12 failed to load. + */ +NS_ERROR_ENUM(kCertificateRequestErrorDomain) { + kErrorBadInitializationParams = 1, + kErrorCertificateMalformed = 2, + kErrorCertificateWrongAutomaticPassword = 3, + kErrorIncorrectManagedAppConfigData = 4, + kErrorInvalidResponseFromJamfProServer = 5, + kErrorTestingP12LoadFailed = 6 +}; + +#endif /* CertificateErrorDomain_h */ diff --git a/CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/Headers/CertificateRequestProtocol.h b/CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/Headers/CertificateRequestProtocol.h new file mode 100644 index 0000000..99d316a --- /dev/null +++ b/CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/Headers/CertificateRequestProtocol.h @@ -0,0 +1,41 @@ +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// +#ifndef CertificateRequestProtocol_h +#define CertificateRequestProtocol_h + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + This is the protocol used for requesting and renewing certificates from Jamf Pro. + */ +@protocol CertificateRequestProtocol + +/** + This is the maximum number of steps in the progress of a certificate request. + May be approximate until the actual call of -startNewCertificateRequest + */ +@property (assign, readonly) NSUInteger maxNumberOfSteps; + +/** + This will start a request to the Jamf Pro server for a new certificate. + The delegate will be called with progress, errors, and the new identity. + NOTE: Only one such request should be in progress at a given time for a single CertificateRequest object. + */ +- (void)startNewCertificateRequest; + +/** + Cancels the current request, if any. The completion handler WILL be called on the delegate. + */ +- (void)cancelRequest; + +@end + +NS_ASSUME_NONNULL_END + +#endif /* CertificateRequestProtocol_h */ diff --git a/CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/Headers/CertificateRequestWorkflow.h b/CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/Headers/CertificateRequestWorkflow.h new file mode 100644 index 0000000..21ba1b8 --- /dev/null +++ b/CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/Headers/CertificateRequestWorkflow.h @@ -0,0 +1,65 @@ +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// +#ifndef CertificateRequestWorkflow_h +#define CertificateRequestWorkflow_h + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + This class is the main class that should be instantiated to make a certificate request. + */ +NS_CLASS_AVAILABLE_IOS(10_0) +@interface CertificateRequestWorkflow : CertificateRequestBase + +/** + Create an object. + + @param delegate Your delegate that will be called as the certificate request workflow proceeds + @return An initialized object; may be nil if memory is full + */ +- (nullable instancetype)initWithDelegate:(id)delegate; + +/** + Create an object with given settings instead of relying on Managed App Config. This is a testing method. + + @param delegate Your delegate that will be called as the certificate request workflow proceeds + @param testSettings The settings that would otherwise be provided by Managed App Config. + @return An initialized object; may be nil if memory is full + */ +- (nullable instancetype)initWithDelegate:(id)delegate testSettings:(NSDictionary *)testSettings; + +/** + Use this option to specify a custom timeout in seconds for individual network requests. + Defaults to 30 seconds. + */ +@property (assign) NSUInteger networkingTimeout; + +/** + Use this option to specify a custom interval in seconds to poll for certificate creation. + The first retrieval will happen after this interval, which means this also specifies the minimum + amount of time required for the certificate request. Minimum value is one second. + Defaults to 5 seconds. + */ +@property (assign) NSUInteger pollingInterval; + +/** + Use this option to specify an overall timeout in seconds to poll for certificate creation. + After this much time, if the server has still not returned a certificate then the certificate request + will fail with a timeout error. + Defaults to 180 seconds. + */ +@property (assign) NSUInteger pollingTimeout; + +@end + +NS_ASSUME_NONNULL_END + +#endif /* CertificateRequestWorkflow_h */ diff --git a/CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/Headers/CertificateSDK.h b/CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/Headers/CertificateSDK.h new file mode 100644 index 0000000..095605c --- /dev/null +++ b/CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/Headers/CertificateSDK.h @@ -0,0 +1,22 @@ +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// +#import + +//! Project version number for CertificateSDK. +FOUNDATION_EXPORT double CertificateSDKVersionNumber; + +//! Project version string for CertificateSDK. +FOUNDATION_EXPORT const unsigned char CertificateSDKVersionString[]; + + +#import +#import +#import + +#import +#import +#import diff --git a/CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/Info.plist b/CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/Info.plist similarity index 56% rename from CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/Info.plist rename to CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/Info.plist index efd54e1..fdc71e6 100644 Binary files a/CertificateSDK.xcframework/ios-arm64_armv7/CertificateSDK.framework/Info.plist and b/CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/Info.plist differ diff --git a/CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/Modules/module.modulemap b/CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/Modules/module.modulemap new file mode 100644 index 0000000..1cc4fd5 --- /dev/null +++ b/CertificateSDK.xcframework/xros-arm64/CertificateSDK.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module CertificateSDK { + umbrella header "CertificateSDK.h" + export * + + module * { export * } +} diff --git a/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/CertificateSDK b/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/CertificateSDK new file mode 100755 index 0000000..0f9f767 Binary files /dev/null and b/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/CertificateSDK differ diff --git a/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestBase.h b/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestBase.h new file mode 100644 index 0000000..0c84dd9 --- /dev/null +++ b/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestBase.h @@ -0,0 +1,46 @@ +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// +#ifndef CertificateRequestBase_h +#define CertificateRequestBase_h + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + This class is the base class for all CertificateRequestProtocol objects. + Subclasses will have a concrete implementation of requesting certificates. + */ +NS_CLASS_AVAILABLE_IOS(10_0) +@interface CertificateRequestBase : NSObject + +/** + The object that will be called back with progress, errors, and completion. + */ +@property (weak, readonly) id delegate; + +/** + This is the maximum number of steps in the progress of a certificate request. + May be approximate until the actual call of -startNewCertificateRequest + */ +@property (assign, readonly) NSUInteger maxNumberOfSteps; + +/** + Create an object. + + @param delegate Your delegate that will be called as the certificate request workflow proceeds + @return An initialized object; may be nil if memory is full + */ +- (nullable instancetype)initWithDelegate:(id)delegate NS_DESIGNATED_INITIALIZER; + +@end + +NS_ASSUME_NONNULL_END + +#endif /* CertificateRequestBase_h */ diff --git a/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestDelegate.h b/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestDelegate.h new file mode 100644 index 0000000..b2cc645 --- /dev/null +++ b/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestDelegate.h @@ -0,0 +1,75 @@ +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// +#ifndef CertificateRequestDelegate_h +#define CertificateRequestDelegate_h + +NS_ASSUME_NONNULL_BEGIN + +@protocol CertificateRequestProtocol; + +/** + Third party apps should have a class that implements these methods for notification on progress, errors, and completion. + */ +@protocol CertificateRequestDelegate + +@required +/** + When any kind of error occurs in the process for requesting certificates, this delegate method will be called. + + @param request The object that initiated the request + @param error An error object + */ +- (void)certificateRequest:(id)request errorOccurred:(NSError *)error NS_SWIFT_NAME(certificate(request:error:)); + +@required +/** + When the request to Jamf Pro is completed, this method will be called. If there were errors, the identity will be nil. + + @param request The object that started the request. + @param identity An identity that encapsulates the info from the server. + */ +- (void)certificateRequest:(id)request completedWithIdentity:(nullable SecIdentityRef)identity +NS_SWIFT_NAME(certificate(request:completedWith:)); + +@optional +/** + As the steps are completed during the request to Jamf Pro, this method can be called. The current progress can be checked + against the request.maxNumberOfSteps to show progress percentage. + NOTE: Each step may take a different (unknown) amount of time as the actual request will be using network resources. + + @param request The object that started the request. + @param current The current progress + */ +- (void)certificateRequest:(id)request progress:(NSUInteger)current; + +@optional +/** + When the CertificateRequest SDK begins accessing the network and when it ends accessing the network, this method + is called if implemented. + + @param request The object that started the request. + @param isUsingNetwork Whether or not the request is currently using the network. + */ +- (void)certificateRequest:(id)request isUsingNetwork:(BOOL)isUsingNetwork; + + +@optional +/** + When the CertificateRequest SDK detects no settings in the Managed App Config key, or if the invitation in the + Managed App Config has expired this will be called to let you know that it is waiting for a new MAC to be delivered + from the Jamf Pro server. Will be called again when the MAC comes in; the timing on this can vary greatly. + + @param request The object that started the request. + @param waitingForMAC Whether or not the request is currently waiting for settings in the Managed App Config. + */ +- (void)certificateRequest:(id)request isWaitingForMAC:(BOOL)waitingForMAC; + +@end + +NS_ASSUME_NONNULL_END + +#endif /* CertificateRequestDelegate_h */ diff --git a/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestEmbeddedP12.h b/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestEmbeddedP12.h new file mode 100644 index 0000000..7374c7c --- /dev/null +++ b/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestEmbeddedP12.h @@ -0,0 +1,45 @@ +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// +#ifndef CertificateRequestEmbeddedP12_h +#define CertificateRequestEmbeddedP12_h + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + This class reads the certificate from an embedded p12 file, and can force errors for testing. + */ +NS_CLASS_AVAILABLE_IOS(10_0) +@interface CertificateRequestEmbeddedP12 : CertificateRequestBase + +/** + Create an object. + + @param delegate Your delegate that will be called as the certificate request workflow proceeds + @param p12URL A URL to a file with a .p12 certificate that will be returned + @param pwd The password for the .p12 file + @return An initialized object; may be nil if memory is full + */ +- (nullable instancetype)initWithDelegate:(id)delegate + p12File:(NSURL *)p12URL + p12Password:(NSString *)pwd; + +/** + Use this option to artificially delay the completion of each step. Each step up to maxNumberOfSteps will take this many seconds. + This allows you to test things that are hard to test otherwise, such as progress. + Defaults to zero (full speed). + */ +@property (assign) NSUInteger secondsBetweenSteps; + +@end + +NS_ASSUME_NONNULL_END + +#endif /* CertificateRequestEmbeddedP12_h */ diff --git a/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestErrorDomain.h b/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestErrorDomain.h new file mode 100644 index 0000000..8629429 --- /dev/null +++ b/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestErrorDomain.h @@ -0,0 +1,34 @@ +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// +#ifndef CertificateErrorDomain_h +#define CertificateErrorDomain_h + +/** + The error domain specific to the Jamf Certificate SDK. + */ +extern NSString * const kCertificateRequestErrorDomain; + +/** + Errors specific to the Jamf Certificate SDK + + - kErrorBadInitializationParams: A CertificateRequestEmbeddedP12 object was initialized with bad parameters. + - kErrorCertificateMalformed: Unlikely to happen. The certificate coming from Jamf Pro has been mangled in transit. + - kErrorCertificateWrongAutomaticPassword: Unlikely to happen. Occurs when the .p12 from the server was encrypted with a different password than the SDK has chosen. + - kErrorIncorrectManagedAppConfigData: The Managed App Config info does not contain enough information to contact Jamf Pro. + - kErrorInvalidResponseFromJamfProServer: Unlikely to happen. The Jamf Pro server responded with info that the SDK does not understand. + - kErrorTestingP12LoadFailed: Unlikely to happen. When using the testing class CertificateRequestEmbeddedP12 this is a generic error that the p12 failed to load. + */ +NS_ERROR_ENUM(kCertificateRequestErrorDomain) { + kErrorBadInitializationParams = 1, + kErrorCertificateMalformed = 2, + kErrorCertificateWrongAutomaticPassword = 3, + kErrorIncorrectManagedAppConfigData = 4, + kErrorInvalidResponseFromJamfProServer = 5, + kErrorTestingP12LoadFailed = 6 +}; + +#endif /* CertificateErrorDomain_h */ diff --git a/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestProtocol.h b/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestProtocol.h new file mode 100644 index 0000000..99d316a --- /dev/null +++ b/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestProtocol.h @@ -0,0 +1,41 @@ +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// +#ifndef CertificateRequestProtocol_h +#define CertificateRequestProtocol_h + +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + This is the protocol used for requesting and renewing certificates from Jamf Pro. + */ +@protocol CertificateRequestProtocol + +/** + This is the maximum number of steps in the progress of a certificate request. + May be approximate until the actual call of -startNewCertificateRequest + */ +@property (assign, readonly) NSUInteger maxNumberOfSteps; + +/** + This will start a request to the Jamf Pro server for a new certificate. + The delegate will be called with progress, errors, and the new identity. + NOTE: Only one such request should be in progress at a given time for a single CertificateRequest object. + */ +- (void)startNewCertificateRequest; + +/** + Cancels the current request, if any. The completion handler WILL be called on the delegate. + */ +- (void)cancelRequest; + +@end + +NS_ASSUME_NONNULL_END + +#endif /* CertificateRequestProtocol_h */ diff --git a/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestWorkflow.h b/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestWorkflow.h new file mode 100644 index 0000000..21ba1b8 --- /dev/null +++ b/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateRequestWorkflow.h @@ -0,0 +1,65 @@ +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// +#ifndef CertificateRequestWorkflow_h +#define CertificateRequestWorkflow_h + +#import +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +/** + This class is the main class that should be instantiated to make a certificate request. + */ +NS_CLASS_AVAILABLE_IOS(10_0) +@interface CertificateRequestWorkflow : CertificateRequestBase + +/** + Create an object. + + @param delegate Your delegate that will be called as the certificate request workflow proceeds + @return An initialized object; may be nil if memory is full + */ +- (nullable instancetype)initWithDelegate:(id)delegate; + +/** + Create an object with given settings instead of relying on Managed App Config. This is a testing method. + + @param delegate Your delegate that will be called as the certificate request workflow proceeds + @param testSettings The settings that would otherwise be provided by Managed App Config. + @return An initialized object; may be nil if memory is full + */ +- (nullable instancetype)initWithDelegate:(id)delegate testSettings:(NSDictionary *)testSettings; + +/** + Use this option to specify a custom timeout in seconds for individual network requests. + Defaults to 30 seconds. + */ +@property (assign) NSUInteger networkingTimeout; + +/** + Use this option to specify a custom interval in seconds to poll for certificate creation. + The first retrieval will happen after this interval, which means this also specifies the minimum + amount of time required for the certificate request. Minimum value is one second. + Defaults to 5 seconds. + */ +@property (assign) NSUInteger pollingInterval; + +/** + Use this option to specify an overall timeout in seconds to poll for certificate creation. + After this much time, if the server has still not returned a certificate then the certificate request + will fail with a timeout error. + Defaults to 180 seconds. + */ +@property (assign) NSUInteger pollingTimeout; + +@end + +NS_ASSUME_NONNULL_END + +#endif /* CertificateRequestWorkflow_h */ diff --git a/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateSDK.h b/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateSDK.h new file mode 100644 index 0000000..095605c --- /dev/null +++ b/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/Headers/CertificateSDK.h @@ -0,0 +1,22 @@ +// +// SPDX-License-Identifier: MIT +// https://github.com/jamf/CertificateSDK +// +// Copyright 2024, Jamf +// +#import + +//! Project version number for CertificateSDK. +FOUNDATION_EXPORT double CertificateSDKVersionNumber; + +//! Project version string for CertificateSDK. +FOUNDATION_EXPORT const unsigned char CertificateSDKVersionString[]; + + +#import +#import +#import + +#import +#import +#import diff --git a/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/Info.plist b/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/Info.plist new file mode 100644 index 0000000..10b14e2 Binary files /dev/null and b/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/Info.plist differ diff --git a/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/Modules/module.modulemap b/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/Modules/module.modulemap new file mode 100644 index 0000000..1cc4fd5 --- /dev/null +++ b/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module CertificateSDK { + umbrella header "CertificateSDK.h" + export * + + module * { export * } +} diff --git a/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/_CodeSignature/CodeResources b/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..90bb6d2 --- /dev/null +++ b/CertificateSDK.xcframework/xros-arm64_x86_64-simulator/CertificateSDK.framework/_CodeSignature/CodeResources @@ -0,0 +1,190 @@ + + + + + files + + Headers/CertificateRequestBase.h + + hLjW9WyUJS+8jyVUmK1qoWpduqk= + + Headers/CertificateRequestDelegate.h + + PTnCyZx+ZVpYX9ezPirk0yCgMGQ= + + Headers/CertificateRequestEmbeddedP12.h + + Cxit1w7Rs2j/lOoaxM5/ZMF4ZFo= + + Headers/CertificateRequestErrorDomain.h + + 0tufHVLiYUxzA4jOkXxCA6DSSi4= + + Headers/CertificateRequestProtocol.h + + j4gMIOdnBKmA7QBIbZpPbbDo/88= + + Headers/CertificateRequestWorkflow.h + + qVckvekXlnjMDZ4JZkYtrKr1nO0= + + Headers/CertificateSDK.h + + mawIEG5HK+qAG8KcrxXRcf0DMJo= + + Info.plist + + uUXAmHu9X6NKYJFOJJPqzFtzx1w= + + Modules/module.modulemap + + tClFj0ge1TQaXuYCRNTIZQgBu0s= + + + files2 + + Headers/CertificateRequestBase.h + + hash2 + + wWe6CUg0N7yw17b+1oZ67WShom4s6cGio8ARlP092kc= + + + Headers/CertificateRequestDelegate.h + + hash2 + + 6BiT30OcqvhG5O8xPcpo89ExV6G891XxueC7xvJdb8k= + + + Headers/CertificateRequestEmbeddedP12.h + + hash2 + + Ey9h/I+0/TdWScu0y5k1YfKmLx1k19EIK4tPo9Fw7LA= + + + Headers/CertificateRequestErrorDomain.h + + hash2 + + qCZ8nkXt16gpFrdGDk8r2voWrInPz4Hor6gZF0MKM48= + + + Headers/CertificateRequestProtocol.h + + hash2 + + vOWSTNnIP0yyaCAt0KDj0sqoyjD2iULx8fHkjtodZQI= + + + Headers/CertificateRequestWorkflow.h + + hash2 + + 3IscKjIVIEqC6diwnqoA3s81mpnxisYcjGtZszckgzE= + + + Headers/CertificateSDK.h + + hash2 + + 7EsaVvw/RMWKN9VKOjlPQeqYmA92YPANzRtScsxjKcA= + + + Modules/module.modulemap + + hash2 + + AIqQ0e5V5b6Cgro6ipCHJOTtDg3nX/JyMVH8HgxHpck= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/Integrating the Jamf Certificate SDK into Your iOS App.pdf b/Integrating the Jamf Certificate SDK into Your iOS App.pdf deleted file mode 100644 index 78cb48f..0000000 Binary files a/Integrating the Jamf Certificate SDK into Your iOS App.pdf and /dev/null differ diff --git a/LICENSE b/LICENSE index e5a1208..6322e94 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019 Jamf Open Source Community +Copyright (c) 2024 Jamf Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Package.swift b/Package.swift index ab7b923..4dc3231 100644 --- a/Package.swift +++ b/Package.swift @@ -1,20 +1,20 @@ -// swift-tools-version:5.3 +// swift-tools-version:5.9 import PackageDescription let package = Package( name: "CertificateSDK", platforms: [ - .iOS(.v10) + .iOS(.v12), + .visionOS(.v1) ], products: [ .library( - name: "CertificateSDK", - targets: ["CertificateSDK"]) + name: "CertificateSDK", targets: ["CertificateSDK"] + ) ], targets: [ .binaryTarget( - name: "CertificateSDK", - path: "CertificateSDK.xcframework" + name: "CertificateSDK", path: "CertificateSDK.xcframework" ) ] ) diff --git a/README.md b/README.md index 4f9f53e..9525f30 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,12 @@ ## Jamf Certificate SDK +When the Jamf Certificate SDK is integrated with your iOS or visionOS app, it provides a secure process +that allows the app to request a certificate from a certificate authority (CA) via Jamf Pro. Certificates +can be used to establish identities that support certificate-based authentication to perform Single Sign-On +(SSO) or other actions specific to your environment. + +See [Distributing an In-House App Developed with the Jamf Certificate SDK](https://learn.jamf.com/en-US/bundle/technical-paper-integrating-ad-cs-current/page/Distributing_an_In-House_App_Developed_with_the_Jamf_Certificate_SDK.html) for more details. + -------- ### Installation @@ -9,33 +16,32 @@ Jamf Certificate SDK is available through the [Swift Package Manager](https://sw To install via the Swift Package Manager add the following line to your `Package.swift` file's `dependencies`: ```swift -.package(url: "https://github.com/jamf/CertificateSDK.git", from: "1.1.0") +.package(url: "https://github.com/jamf/CertificateSDK.git", from: "2.0.0") ``` -------- #### Framework Architectures -The included XCFramework ships with three simulator architectures (arm64, i386, and x86_64) and two device architectures -(armv7 and arm64). This allows third-party app developers to use the framework both in their own simulators -running on their development Macs (including Apple Silicon), and on actual devices. +The included XCFramework ships with support for the iOS and visionOS simulators on Apple Silicon and Intel-based Mac computers, and iOS and visionOS devices using the arm64 architecture. This allows app developers to use the +framework on actual iOS and visionOS devices and in the simulators while developing and testing their apps. -------- -### Managed App Config Required Settings +### Managed App Configuration Required Settings -To ensure proper use of the SDK, the iOS app is required to be distributed by Jamf Pro. During distribution, an App Configuration -can be specified that will let the SDK communicate with Jamf Pro and request the proper certificate. Here is a sample App Configuration -that can be used as a basis for your own app. +To ensure proper use of the SDK, the app is required to be distributed by Jamf Pro. During distribution, +a managed app configuration can be specified that will let the SDK communicate with Jamf Pro and request +the proper certificate. Here is a sample managed app configuration that can be used as a basis for your own app. -*Note that you can add your own key/value pairs to the App Configuration to configure other parts of your app.* Jamf's keys are all prefixed +*Note that you can add your own key/value pairs to the managed app configuration to configure other parts of your app.* Jamf's keys are all prefixed with `com.jamf.config.` so they will not clash with your own naming conventions for keys. com.jamf.config.jamfpro.invitation $MOBILEDEVICEAPPINVITE com.jamf.config.device.udid - $UDID + $MANAGEMENTID com.jamf.config.jamfpro.url https://the_jamf_pro_server_url_goes_here/ com.jamf.config.certificate-request.pkiId @@ -54,18 +60,26 @@ with `com.jamf.config.` so they will not clash with your own naming conventions ###### MAC key discussion -com.jamf.config.jamfpro.url: The value should be filled in with your Jamf Pro Server's URL. +`com.jamf.config.device.udid`: The device identifier of the device the app is installed on. Starting with +Jamf Pro 11.5.1, the value must be `$MANAGEMENTID` to support both company-owned and BYOD devices. In Jamf +Pro 11.5.0 and earlier, the value must instead be `$UDID` and only company-owned devices are supported. + +`com.jamf.config.jamfpro.url`: The value should be filled in with your Jamf Pro Server's URL. + +The keys prefixed with `com.jamf.config.certificate-request` are used during certificate generation. They +will be specific to your organization. You should confer with those responsible for Jamf Pro and your +Certificate Authority to ensure the proper settings are configured for your app. + +* `pkiId`: (an integer but typed as string in the MAC) Jamf Pro ID of the PKI Integration/Certificate Authority to be used; find this in the Jamf Pro +web UI at Settings > PKI Certificates > Your ADCS CA settings and then look in the URL bar for the number after "id=". You should have a URL something like "adcsSettings.html?id=3" and enter the number `3` in the MAC +* `template`: (string) Certificate template name as defined in your CA +* `subject`: (string) Subject to include in the certificate signing request +* `sanType`: (string) One of 'rfc822Name', 'dNSName', or 'uniformResourceIdentifier' +* `sanValue`: (string) Subject Alternative Name to include in the certificate signing request -The keys prefixed with `com.jamf.config.certificate-request` are used during certificate generation. They will -be specific to your organization. You should confer with those responsible for Jamf Pro and your Certificate Authority to ensure -the proper settings are configured for your app. +With the `subject` and `sanValue` fields, variable substitution is available as discussed under [Payload Variables for Configuration Profiles](https://learn.jamf.com/en-US/bundle/jamf-pro-documentation-current/page/Mobile_Device_Configuration_Profiles.html#ariaid-title3). -* pkiId: (an integer but typed as string in the MAC) Jamf Pro ID of the PKI Integration/Certificate Authority to be used; find this in the Jamf Pro -web UI at Settings > PKI Certificates > Your ADCS CA settings and then look in the URL bar for the number after "id=". You should have a URL something like "adcsSettings.html?id=3" -* template: (string) Certificate template name as defined in your CA -* subject: (string) Subject to include in the certificate signing request -* sanType: (string) One of 'rfc822Name', 'dNSName', or 'uniformResourceIdentifier' -* sanValue: (string) Subject Alternative Name to include in the certificate signing request +-- -With the subject and sanValue fields, variable substitution is available as discussed under "Payload Variables for Mobile Device Configuration Profiles" at -http://docs.jamf.com/jamf-pro/administrator-guide/Mobile_Device_Configuration_Profiles.html +Additional reference documentation is available in +[Integrating the Jamf Certificate SDK with Mobile Device Apps Deployed by Jamf Pro](https://learn.jamf.com/bundle/jamf-certificate-sdk/page/Overview.html). diff --git a/sample-app-specfile.xml b/sample-app-specfile.xml index 84f8937..5aedc1d 100644 --- a/sample-app-specfile.xml +++ b/sample-app-specfile.xml @@ -14,7 +14,7 @@ - UDID + $MANAGEMENTID