Skip to content

Commit

Permalink
Merge pull request #5 from jamf/release-2-0-0
Browse files Browse the repository at this point in the history
Posting v2.0.0 code to GitHub.
  • Loading branch information
macblazer authored Jun 14, 2024
2 parents d616cb1 + 0ae8358 commit b5a692f
Show file tree
Hide file tree
Showing 108 changed files with 2,746 additions and 783 deletions.
24 changes: 21 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
272 changes: 237 additions & 35 deletions Certificate SDK Sample App.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1530"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97BE792E20AB6FF3009579E5"
BuildableName = "Certificate SDK Sample iOS.app"
BlueprintName = "Certificate SDK Sample iOS"
ReferencedContainer = "container:Certificate SDK Sample App.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97BE792E20AB6FF3009579E5"
BuildableName = "Certificate SDK Sample iOS.app"
BlueprintName = "Certificate SDK Sample iOS"
ReferencedContainer = "container:Certificate SDK Sample App.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97BE792E20AB6FF3009579E5"
BuildableName = "Certificate SDK Sample iOS.app"
BlueprintName = "Certificate SDK Sample iOS"
ReferencedContainer = "container:Certificate SDK Sample App.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1530"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C04D81722BEBC9130024FDFC"
BuildableName = "Certificate SDK Sample visionOS.app"
BlueprintName = "Certificate SDK Sample visionOS"
ReferencedContainer = "container:Certificate SDK Sample App.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C04D81722BEBC9130024FDFC"
BuildableName = "Certificate SDK Sample visionOS.app"
BlueprintName = "Certificate SDK Sample visionOS"
ReferencedContainer = "container:Certificate SDK Sample App.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C04D81722BEBC9130024FDFC"
BuildableName = "Certificate SDK Sample visionOS.app"
BlueprintName = "Certificate SDK Sample visionOS"
ReferencedContainer = "container:Certificate SDK Sample App.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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()
Expand All @@ -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 {
Expand All @@ -39,7 +36,7 @@ class CertificateRequestManager: NSObject {
p12Password: "a")
}

if setup.slowSpeed {
if configuration.slowSpeed {
localRequest?.secondsBetweenSteps = 2
}
certificateRequest = localRequest
Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Loading

0 comments on commit b5a692f

Please sign in to comment.