Documentation
¶
Overview ¶
Package support queries generated platform, version, channel and enrollment-context metadata.
Design ¶
Generated packages register supportedOS tables. Lookup, Families and Paths expose those entries, and Check evaluates a Target with a reason and deprecation information. Generated validators and dmctl explain use the same metadata. Pointer booleans preserve the difference between an unspecified condition and an explicit prohibition.
The tables describe the pinned Apple schema. Missing support or target data limits what can be inferred; consumers must inspect the result reason rather than treat an unspecified target as verified compatibility.
References ¶
- Decision record 0003: https://github.com/deploymenttheory/go-apple-dm/blob/main/docs/research/decisions/0003-schema-generator.md
- Apple: https://github.com/apple/device-management/blob/release/docs/schema.md
- Apple: https://developer.apple.com/documentation/devicemanagement
- Schema: third_party/device-management/docs/schema.yaml (supportedOS)
Index ¶
Constants ¶
This section is empty.
Variables ¶
AllOS lists the operating systems in schema order.
var ErrVersion = errors.New("support: malformed version")
ErrVersion is returned by ParseVersion for malformed input.
Functions ¶
Types ¶
type Entry ¶
Entry is the support table row for one schema key path.
type Mode ¶
type Mode string
Mode is Apple's allowed/required/forbidden/ignored setting for shared iPad and user enrollment contexts. Empty means unspecified (allowed).
type OS ¶
type OS string
OS names as used in Apple's schema.
const ( IOS OS = "iOS" MacOS OS = "macOS" TvOS OS = "tvOS" VisionOS OS = "visionOS" WatchOS OS = "watchOS" )
Operating systems.
func OSFromProduct ¶
OSFromProduct maps a device product type (Authenticate's ProductName or MachineInfo's PRODUCT, for example "iPhone17,2", "Mac16,1", "iPad14,1", "AppleTV14,1", "RealityDevice14,1", "Watch7,1") to the OS family Apple's schema keys support on. iPadOS is keyed as iOS in the schema. Unknown prefixes return "".
type OSSupport ¶
type OSSupport struct {
// NotAvailable is set when Apple lists "introduced: n/a".
NotAvailable bool
Introduced Version
Deprecated Version
Removed Version
AccessRights string
Beta bool
// Tri-state booleans: nil means Apple did not say.
Multiple *bool
DeviceChannel *bool
UserChannel *bool
Supervised *bool
RequiresDEP *bool
UserApprovedMDM *bool
AllowManualInstall *bool
AlwaysSkippable *bool
AllowedEnrollments []string
AllowedScopes []string
UserEnrollmentMode Mode
UserEnrollmentBehavior string
}
OSSupport is the effective support block for one key on one OS after inheritance from the enclosing payload and parent keys.
type Target ¶
type Target struct {
OS OS
Version Version
Channel Channel
Supervised bool
UserEnrollment bool
DEP bool
UserApproved bool
}
Target describes the device a value is destined for. The zero Target disables every context check.
type Version ¶
type Version struct {
Major, Minor, Patch int
}
Version is a dotted OS version. The zero Version means "unspecified".
func MustVersion ¶
MustVersion parses or panics; for generated tables and tests.
func ParseVersion ¶
ParseVersion parses "26", "26.4", or "10.15.4".