protocol
ManagedAppConfigurationDecodingError
NewmacOSpublic protocol ManagedAppConfigurationDecodingError : Decodable, Encodable, Error
A protocol for an error that describes an issue with decoding the configuration.
For more information, see configurations(_:).
Declaration
public protocol ManagedAppConfigurationDecodingError : Decodable, Encodable, Error {
/// An app-specific error code that identifies a configuration issue.
///
/// The system reserves values equal to or greater than `ManagedAppConfigurationDecodingErrorCodes.firstReserved`.
var code: ManagedAppConfigurationDecodingErrorCode { get set }
/// A human-readable message that describes the configuration issue.
var message: String { get set }
}
struct
ManagedAppConfigurationDecodingErrorCode
NewmacOSpublic struct ManagedAppConfigurationDecodingErrorCode : RawRepresentable, Hashable, Codable, Sendable
A code for an error that occurs during configuration decoding.
The system reserves some codes for its use only. Reserved codes are equal to or greater than firstReserved. Codes less than the firstReserved value are app-specific. For more information, see code.
Declaration
public struct ManagedAppConfigurationDecodingErrorCode : RawRepresentable, Hashable, Codable, Sendable {
/// The error code's value in its underlying type.
public let rawValue: Int
/// Initializes a configuration decoding error code.
public init?(rawValue: Int)
/// An error code for the start of the range of reserved error codes.
public static let firstReserved: Int
/// A reserved error that indicates the decoder threw an unknown custom error.
public static let generic: Int
/// An error code that indicates the decoder encountered corrupt data.
public static let dataCorrupted: Int
/// An error code that indicates the decoder encountered an unknown coding key.
public static let keyNotFound: Int
/// An error code that indicates the decoder encountered a type mismatch.
public static let typeMismatch: Int
/// An error code that indicates a coding key yields no value.
public static let valueNotFound: Int
/// An error code that indicates the decoder timed out.
public static let timeout: Int
/// The raw type that can be used to represent all values of the conforming
/// type.
///
/// Every distinct value of the conforming type has a corresponding unique
/// value of the `RawValue` type, but there may be values of the `RawValue`
/// type that don't have a corresponding value of the conforming type.
@available(macOS 27.0, iOS 18.4, visionOS 2.4, *)
public typealias RawValue = Int
}
enum
ManagedAppError
NewmacOSpublic enum ManagedAppError : Error, LocalizedError
Errors that functions in the ManagedApp framework can throw.
Declaration
public enum ManagedAppError : Error, LocalizedError {
/// An error that indicates a failure finding an identifier.
///
/// This error indicates that the MDM admin hasn't provisioned a secret with the given identifier for this instance of your app.
case invalidIdentifier
/// An error that indicates a failure requesting a secret from the asset server.
///
/// This error can also indicate a problem communicating with a subsequent server, such as ACME or SCEP.
case serverError
/// An error that indicates a failure at the system level.
case internalError
/// Returns a Boolean value indicating whether two values are equal.
///
/// Equality is the inverse of inequality. For any values `a` and `b`,
/// `a == b` implies that `a != b` is `false`.
///
/// - Parameters:
/// - lhs: A value to compare.
/// - rhs: Another value to compare.
public static func == (a: ManagedAppError, b: ManagedAppError) -> Bool
/// Hashes the essential components of this value by feeding them into the
/// given hasher.
///
/// Implement this method to conform to the `Hashable` protocol. The
/// components used for hashing must be the same as the components compared
/// in your type's `==` operator implementation. Call `hasher.combine(_:)`
/// with each of these components.
///
/// - Important: In your implementation of `hash(into:)`,
/// don't call `finalize()` on the `hasher` instance provided,
/// or replace it with a different instance.
/// Doing so may become a compile-time error in the future.
///
/// - Parameter hasher: The hasher to use when combining the components
/// of this instance.
public func hash(into hasher: inout Hasher)
/// The hash value.
///
/// Hash values are not guaranteed to be equal across different executions of
/// your program. Do not save hash values to use during a future execution.
///
/// - Important: `hashValue` is deprecated as a `Hashable` requirement. To
/// conform to `Hashable`, implement the `hash(into:)` requirement instead.
/// The compiler provides an implementation for `hashValue` for you.
public var hashValue: Int { get }
}
extension
ManagedAppError
NewmacOSextension ManagedAppError : Equatable
Declaration
extension ManagedAppError : Equatable {
}
extension
ManagedAppError
NewmacOSextension ManagedAppError : Hashable
Declaration
extension ManagedAppError : Hashable {
}
typealias
ManagedAppConfigurationDecodingErrorCode.RawValue
NewmacOSpublic typealias RawValue = Int
The raw type that can be used to represent all values of the conforming type.
Every distinct value of the conforming type has a corresponding unique value of the RawValue type, but there may be values of the RawValue type that don't have a corresponding value of the conforming type.