Documentation
¶
Overview ¶
Package systemextensions provides Go bindings for the SystemExtensions framework.
Install and manage user space code that extends the capabilities of macOS.
Extend the capabilities of macOS by installing and managing system extensions—drivers and other low-level code—in user space rather than in the kernel. By running in user space, system extensions can’t compromise the security or stability of macOS. The system grants these extensions a high level of privilege, so they can perform the kinds of tasks previously reserved for kernel extensions (KEXTs).
Essentials ¶
- Implementing drivers, system extensions, and kexts: Create drivers and system extensions to communicate with hardware and provide low-level services, and only use kernel extensions for a few tasks.
- Debugging and testing system extensions: Debug your system extensions by temporarily disabling the security checks that macOS performs during the installation process.
- System Extension Entitlement: A Boolean value that indicates whether your app has permission to activate or deactivate system extensions.
Usage descriptions ¶
- NSSystemExtensionUsageDescriptionKey: A message that tells the user why the app is trying to install a system extension bundle.
- OSBundleUsageDescriptionKey: A message that tells the user why the app is trying to install a driver extension bundle.
Extension activation and deactivation ¶
- Installing System Extensions and Drivers: Activate system extensions and drivers to make them available to the system, and update or deactivate them as needed.
- OSSystemExtensionManager: A type that facilitates activation and deactivation of system extensions. (OSSystemExtensionRequest)
- OSSystemExtensionRequest: A request to activate or deactivate a system extension. (OSSystemExtensionRequestDelegate)
- System Extension Redistributable Entitlement: A Boolean value that indicates whether other development teams may distribute a system extension you create.
Errors ¶
- OSSystemExtensionError: An error that describes a failed extension manager request.
- OSSystemExtensionError.Code: Error codes for system extensions.
- OSSystemExtensionErrorDomain: The error domain identifying system extension errors.
Classes ¶
- OSSystemExtensionInfo
- OSSystemExtensionsWorkspace
Protocols ¶
- OSSystemExtensionsWorkspaceObserver
Key Types ¶
- OSSystemExtensionProperties - Properties that identify a specific version of a system extension.
- OSSystemExtensionRequest - A request to activate or deactivate a system extension.
- OSSystemExtensionsWorkspace
- OSSystemExtensionInfo
- OSSystemExtensionManager - A type that facilitates activation and deactivation of system extensions.
Code generated from Apple documentation. DO NOT EDIT.
Index ¶
- Variables
- type IOSSystemExtensionInfo
- type IOSSystemExtensionManager
- type IOSSystemExtensionProperties
- type IOSSystemExtensionRequest
- type IOSSystemExtensionsWorkspace
- type OSSystemExtensionErrorCode
- type OSSystemExtensionInfo
- type OSSystemExtensionInfoClass
- type OSSystemExtensionManager
- func (o OSSystemExtensionManager) Autorelease() OSSystemExtensionManager
- func (o OSSystemExtensionManager) Delegate() OSSystemExtensionRequestDelegate
- func (o OSSystemExtensionManager) Init() OSSystemExtensionManager
- func (o OSSystemExtensionManager) SetDelegate(value OSSystemExtensionRequestDelegate)
- func (o OSSystemExtensionManager) SubmitRequest(request IOSSystemExtensionRequest)
- type OSSystemExtensionManagerClass
- type OSSystemExtensionProperties
- func (o OSSystemExtensionProperties) Autorelease() OSSystemExtensionProperties
- func (o OSSystemExtensionProperties) BundleIdentifier() string
- func (o OSSystemExtensionProperties) BundleShortVersion() string
- func (o OSSystemExtensionProperties) BundleVersion() string
- func (o OSSystemExtensionProperties) Init() OSSystemExtensionProperties
- func (o OSSystemExtensionProperties) IsAwaitingUserApproval() bool
- func (o OSSystemExtensionProperties) IsEnabled() bool
- func (o OSSystemExtensionProperties) IsUninstalling() bool
- func (o OSSystemExtensionProperties) URL() foundation.INSURL
- type OSSystemExtensionPropertiesClass
- type OSSystemExtensionReplacementAction
- type OSSystemExtensionRequest
- func (o OSSystemExtensionRequest) Autorelease() OSSystemExtensionRequest
- func (o OSSystemExtensionRequest) Delegate() OSSystemExtensionRequestDelegate
- func (o OSSystemExtensionRequest) Identifier() string
- func (o OSSystemExtensionRequest) Init() OSSystemExtensionRequest
- func (o OSSystemExtensionRequest) SetDelegate(value OSSystemExtensionRequestDelegate)
- type OSSystemExtensionRequestClass
- func (_OSSystemExtensionRequestClass OSSystemExtensionRequestClass) ActivationRequestForExtensionQueue(identifier string, queue dispatch.Queue) OSSystemExtensionRequest
- func (oc OSSystemExtensionRequestClass) Alloc() OSSystemExtensionRequest
- func (oc OSSystemExtensionRequestClass) Class() objc.Class
- func (_OSSystemExtensionRequestClass OSSystemExtensionRequestClass) DeactivationRequestForExtensionQueue(identifier string, queue dispatch.Queue) OSSystemExtensionRequest
- func (_OSSystemExtensionRequestClass OSSystemExtensionRequestClass) PropertiesRequestForExtensionQueue(identifier string, queue dispatch.Queue) OSSystemExtensionRequest
- type OSSystemExtensionRequestDelegate
- type OSSystemExtensionRequestDelegateConfig
- type OSSystemExtensionRequestDelegateObject
- func (o OSSystemExtensionRequestDelegateObject) BaseObject() objectivec.Object
- func (o OSSystemExtensionRequestDelegateObject) RequestActionForReplacingExtensionWithExtension(request IOSSystemExtensionRequest, existing IOSSystemExtensionProperties, ...) OSSystemExtensionReplacementAction
- func (o OSSystemExtensionRequestDelegateObject) RequestDidFailWithError(request IOSSystemExtensionRequest, error_ foundation.INSError)
- func (o OSSystemExtensionRequestDelegateObject) RequestDidFinishWithResult(request IOSSystemExtensionRequest, result OSSystemExtensionRequestResult)
- func (o OSSystemExtensionRequestDelegateObject) RequestFoundProperties(request IOSSystemExtensionRequest, properties []OSSystemExtensionProperties)
- func (o OSSystemExtensionRequestDelegateObject) RequestNeedsUserApproval(request IOSSystemExtensionRequest)
- type OSSystemExtensionRequestResult
- type OSSystemExtensionsWorkspace
- func (o OSSystemExtensionsWorkspace) AddObserverError(observer OSSystemExtensionsWorkspaceObserver) (bool, error)
- func (o OSSystemExtensionsWorkspace) Autorelease() OSSystemExtensionsWorkspace
- func (o OSSystemExtensionsWorkspace) Init() OSSystemExtensionsWorkspace
- func (o OSSystemExtensionsWorkspace) RemoveObserver(observer OSSystemExtensionsWorkspaceObserver)
- type OSSystemExtensionsWorkspaceClass
- type OSSystemExtensionsWorkspaceObserver
- type OSSystemExtensionsWorkspaceObserverObject
- func (o OSSystemExtensionsWorkspaceObserverObject) BaseObject() objectivec.Object
- func (o OSSystemExtensionsWorkspaceObserverObject) SystemExtensionWillBecomeDisabled(systemExtensionInfo IOSSystemExtensionInfo)
- func (o OSSystemExtensionsWorkspaceObserverObject) SystemExtensionWillBecomeEnabled(systemExtensionInfo IOSSystemExtensionInfo)
- func (o OSSystemExtensionsWorkspaceObserverObject) SystemExtensionWillBecomeInactive(systemExtensionInfo IOSSystemExtensionInfo)
Constants ¶
This section is empty.
Variables ¶
var ( // SystemExtensionUsageDescriptionKey is a message that tells the user why the app is trying to install a system extension bundle. // // See: https://developer.apple.com/documentation/SystemExtensions/NSSystemExtensionUsageDescriptionKey SystemExtensionUsageDescriptionKey string // OSBundleUsageDescriptionKey is a message that tells the user why the app is trying to install a driver extension bundle. // // See: https://developer.apple.com/documentation/SystemExtensions/OSBundleUsageDescriptionKey OSBundleUsageDescriptionKey string // See: https://developer.apple.com/documentation/SystemExtensions/OSRelatedKernelExtensionKey OSRelatedKernelExtensionKey string )
var ( // OSSystemExtensionErrorDomain is the error domain identifying system extension errors. // // See: https://developer.apple.com/documentation/SystemExtensions/OSSystemExtensionErrorDomain OSSystemExtensionErrorDomain foundation.NSErrorDomain )
Functions ¶
This section is empty.
Types ¶
type IOSSystemExtensionInfo ¶
type IOSSystemExtensionInfo interface {
objectivec.IObject
BundleIdentifier() string
BundleShortVersion() string
BundleVersion() string
}
An interface definition for the OSSystemExtensionInfo class.
Instance Properties ¶
- [IOSSystemExtensionInfo.BundleIdentifier]
- [IOSSystemExtensionInfo.BundleShortVersion]
- [IOSSystemExtensionInfo.BundleVersion]
See: https://developer.apple.com/documentation/SystemExtensions/OSSystemExtensionInfo
type IOSSystemExtensionManager ¶
type IOSSystemExtensionManager interface {
objectivec.IObject
// Submits a system extension request to the manager.
SubmitRequest(request IOSSystemExtensionRequest)
// A delegate to receive updates about the progress of a request.
Delegate() OSSystemExtensionRequestDelegate
SetDelegate(value OSSystemExtensionRequestDelegate)
}
An interface definition for the OSSystemExtensionManager class.
Submitting Requests ¶
- [IOSSystemExtensionManager.SubmitRequest]: Submits a system extension request to the manager.
See: https://developer.apple.com/documentation/SystemExtensions/OSSystemExtensionManager
type IOSSystemExtensionProperties ¶
type IOSSystemExtensionProperties interface {
objectivec.IObject
// The bundle identifier of the extension.
BundleIdentifier() string
// The bundle version of the extension.
BundleVersion() string
// The bundle short version string of the extension.
BundleShortVersion() string
// The file URL of the extension bundle.
URL() foundation.INSURL
IsAwaitingUserApproval() bool
IsEnabled() bool
IsUninstalling() bool
}
An interface definition for the OSSystemExtensionProperties class.
Identifying the Extension ¶
- [IOSSystemExtensionProperties.BundleIdentifier]: The bundle identifier of the extension.
- [IOSSystemExtensionProperties.BundleVersion]: The bundle version of the extension.
- [IOSSystemExtensionProperties.BundleShortVersion]: The bundle short version string of the extension.
Locating the Extension’s Installed Location ¶
- [IOSSystemExtensionProperties.URL]: The file URL of the extension bundle.
Instance Properties ¶
- [IOSSystemExtensionProperties.IsAwaitingUserApproval]
- [IOSSystemExtensionProperties.IsEnabled]
- [IOSSystemExtensionProperties.IsUninstalling]
See: https://developer.apple.com/documentation/SystemExtensions/OSSystemExtensionProperties
type IOSSystemExtensionRequest ¶
type IOSSystemExtensionRequest interface {
objectivec.IObject
// A delegate to receive updates about the progress of a request.
Delegate() OSSystemExtensionRequestDelegate
SetDelegate(value OSSystemExtensionRequestDelegate)
// The bundle identifier of the target extension.
Identifier() string
}
An interface definition for the OSSystemExtensionRequest class.
Working with a Delegate ¶
- [IOSSystemExtensionRequest.Delegate]: A delegate to receive updates about the progress of a request.
- [IOSSystemExtensionRequest.SetDelegate]
Identifying the Target Extension ¶
- [IOSSystemExtensionRequest.Identifier]: The bundle identifier of the target extension.
See: https://developer.apple.com/documentation/SystemExtensions/OSSystemExtensionRequest
type IOSSystemExtensionsWorkspace ¶
type IOSSystemExtensionsWorkspace interface {
objectivec.IObject
AddObserverError(observer OSSystemExtensionsWorkspaceObserver) (bool, error)
RemoveObserver(observer OSSystemExtensionsWorkspaceObserver)
}
An interface definition for the OSSystemExtensionsWorkspace class.
Instance Methods ¶
- [IOSSystemExtensionsWorkspace.AddObserverError]
- [IOSSystemExtensionsWorkspace.RemoveObserver]
See: https://developer.apple.com/documentation/SystemExtensions/OSSystemExtensionsWorkspace
type OSSystemExtensionErrorCode ¶
type OSSystemExtensionErrorCode int
See: https://developer.apple.com/documentation/SystemExtensions/OSSystemExtensionError/Code
const ( // OSSystemExtensionErrorAuthorizationRequired: An error code that indicates the system was unable to obtain the proper authorization. OSSystemExtensionErrorAuthorizationRequired OSSystemExtensionErrorCode = 13 // OSSystemExtensionErrorCodeSignatureInvalid: An error code that indicates the extension’s signature is invalid. OSSystemExtensionErrorCodeSignatureInvalid OSSystemExtensionErrorCode = 8 // OSSystemExtensionErrorDuplicateExtensionIdentifer: An error code that indicates the extension identifier duplicates an existing identifier. OSSystemExtensionErrorDuplicateExtensionIdentifer OSSystemExtensionErrorCode = 6 // OSSystemExtensionErrorExtensionMissingIdentifier: An error code that indicates the extension identifier is missing. OSSystemExtensionErrorExtensionMissingIdentifier OSSystemExtensionErrorCode = 5 // OSSystemExtensionErrorExtensionNotFound: An error code that indicates the manager can’t find the system extension. OSSystemExtensionErrorExtensionNotFound OSSystemExtensionErrorCode = 4 // OSSystemExtensionErrorForbiddenBySystemPolicy: An error code that indicates the system policy prohibits activating the system extension. OSSystemExtensionErrorForbiddenBySystemPolicy OSSystemExtensionErrorCode = 10 // OSSystemExtensionErrorMissingEntitlement: An error code that indicates the system extension lacks a required entitlement. OSSystemExtensionErrorMissingEntitlement OSSystemExtensionErrorCode = 2 // OSSystemExtensionErrorRequestCanceled: An error code that indicates the system extension manager request was canceled. OSSystemExtensionErrorRequestCanceled OSSystemExtensionErrorCode = 11 // OSSystemExtensionErrorRequestSuperseded: An error code that indicates the system extension request failed because the system already has a pending request for the same identifier. OSSystemExtensionErrorRequestSuperseded OSSystemExtensionErrorCode = 12 // OSSystemExtensionErrorUnknown: An error code that indicates an unknown error occurred. OSSystemExtensionErrorUnknown OSSystemExtensionErrorCode = 1 // OSSystemExtensionErrorUnknownExtensionCategory: An error code that indicates the extension manager can’t recognize the extension’s category identifier. OSSystemExtensionErrorUnknownExtensionCategory OSSystemExtensionErrorCode = 7 // OSSystemExtensionErrorUnsupportedParentBundleLocation: An error code that indicates the extension’s parent app isn’t in a valid location for activation. OSSystemExtensionErrorUnsupportedParentBundleLocation OSSystemExtensionErrorCode = 3 // OSSystemExtensionErrorValidationFailed: An error code that indicates the manager can’t validate the extension. OSSystemExtensionErrorValidationFailed OSSystemExtensionErrorCode = 9 )
func (OSSystemExtensionErrorCode) String ¶
func (e OSSystemExtensionErrorCode) String() string
type OSSystemExtensionInfo ¶
type OSSystemExtensionInfo struct {
objectivec.Object
}
Instance Properties ¶
- OSSystemExtensionInfo.BundleIdentifier
- OSSystemExtensionInfo.BundleShortVersion
- OSSystemExtensionInfo.BundleVersion
See: https://developer.apple.com/documentation/SystemExtensions/OSSystemExtensionInfo
func NewOSSystemExtensionInfo ¶
func NewOSSystemExtensionInfo() OSSystemExtensionInfo
NewOSSystemExtensionInfo creates a new OSSystemExtensionInfo instance.
func OSSystemExtensionInfoFromID ¶
func OSSystemExtensionInfoFromID(id objc.ID) OSSystemExtensionInfo
OSSystemExtensionInfoFromID constructs a OSSystemExtensionInfo from an objc.ID.
func (OSSystemExtensionInfo) Autorelease ¶
func (o OSSystemExtensionInfo) Autorelease() OSSystemExtensionInfo
Autorelease adds the receiver to the current autorelease pool.
func (OSSystemExtensionInfo) BundleIdentifier ¶
func (o OSSystemExtensionInfo) BundleIdentifier() string
Discussion ¶
The bundle identifier of the extension (CFBundleIdentifier)
See: https://developer.apple.com/documentation/SystemExtensions/OSSystemExtensionInfo/bundleIdentifier
func (OSSystemExtensionInfo) BundleShortVersion ¶
func (o OSSystemExtensionInfo) BundleShortVersion() string
Discussion ¶
The bundle short version string of the extension (CFBundleShortVersionString)
See: https://developer.apple.com/documentation/SystemExtensions/OSSystemExtensionInfo/bundleShortVersion
func (OSSystemExtensionInfo) BundleVersion ¶
func (o OSSystemExtensionInfo) BundleVersion() string
Discussion ¶
The bundle version of the extension (CFBundleVersion)
See: https://developer.apple.com/documentation/SystemExtensions/OSSystemExtensionInfo/bundleVersion
func (OSSystemExtensionInfo) Init ¶
func (o OSSystemExtensionInfo) Init() OSSystemExtensionInfo
Init initializes the instance.
type OSSystemExtensionInfoClass ¶
type OSSystemExtensionInfoClass struct {
// contains filtered or unexported fields
}
func GetOSSystemExtensionInfoClass ¶
func GetOSSystemExtensionInfoClass() OSSystemExtensionInfoClass
GetOSSystemExtensionInfoClass returns the class object for OSSystemExtensionInfo.
func (OSSystemExtensionInfoClass) Alloc ¶
func (oc OSSystemExtensionInfoClass) Alloc() OSSystemExtensionInfo
Alloc allocates memory for a new instance of the class.
func (OSSystemExtensionInfoClass) Class ¶
func (oc OSSystemExtensionInfoClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type OSSystemExtensionManager ¶
type OSSystemExtensionManager struct {
objectivec.Object
}
A type that facilitates activation and deactivation of system extensions.
Overview ¶
Create an instance of OSSystemExtensionRequest with the class methods on that type, and submit it to the shared instance of the extension manager with OSSystemExtensionManager.SubmitRequest. Set the OSSystemExtensionManager.Delegate on the request to receive the result of the activation or deactivation. The delegate also receives notifications if the user needs to authorize the extension or if a version conflict occurs.
Submitting Requests ¶
- OSSystemExtensionManager.SubmitRequest: Submits a system extension request to the manager.
See: https://developer.apple.com/documentation/SystemExtensions/OSSystemExtensionManager
func NewOSSystemExtensionManager ¶
func NewOSSystemExtensionManager() OSSystemExtensionManager
NewOSSystemExtensionManager creates a new OSSystemExtensionManager instance.
func OSSystemExtensionManagerFromID ¶
func OSSystemExtensionManagerFromID(id objc.ID) OSSystemExtensionManager
OSSystemExtensionManagerFromID constructs a OSSystemExtensionManager from an objc.ID.
A type that facilitates activation and deactivation of system extensions.
func (OSSystemExtensionManager) Autorelease ¶
func (o OSSystemExtensionManager) Autorelease() OSSystemExtensionManager
Autorelease adds the receiver to the current autorelease pool.
func (OSSystemExtensionManager) Delegate ¶
func (o OSSystemExtensionManager) Delegate() OSSystemExtensionRequestDelegate
A delegate to receive updates about the progress of a request.
See: https://developer.apple.com/documentation/systemextensions/ossystemextensionrequest/delegate
func (OSSystemExtensionManager) Init ¶
func (o OSSystemExtensionManager) Init() OSSystemExtensionManager
Init initializes the instance.
func (OSSystemExtensionManager) SetDelegate ¶
func (o OSSystemExtensionManager) SetDelegate(value OSSystemExtensionRequestDelegate)
func (OSSystemExtensionManager) SubmitRequest ¶
func (o OSSystemExtensionManager) SubmitRequest(request IOSSystemExtensionRequest)
Submits a system extension request to the manager.
request: The request to process.
type OSSystemExtensionManagerClass ¶
type OSSystemExtensionManagerClass struct {
// contains filtered or unexported fields
}
func GetOSSystemExtensionManagerClass ¶
func GetOSSystemExtensionManagerClass() OSSystemExtensionManagerClass
GetOSSystemExtensionManagerClass returns the class object for OSSystemExtensionManager.
func (OSSystemExtensionManagerClass) Alloc ¶
func (oc OSSystemExtensionManagerClass) Alloc() OSSystemExtensionManager
Alloc allocates memory for a new instance of the class.
func (OSSystemExtensionManagerClass) Class ¶
func (oc OSSystemExtensionManagerClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
func (OSSystemExtensionManagerClass) SharedManager ¶
func (_OSSystemExtensionManagerClass OSSystemExtensionManagerClass) SharedManager() OSSystemExtensionManager
The shared instance of the extension manager.
See: https://developer.apple.com/documentation/SystemExtensions/OSSystemExtensionManager/shared
type OSSystemExtensionProperties ¶
type OSSystemExtensionProperties struct {
objectivec.Object
}
Properties that identify a specific version of a system extension.
Identifying the Extension ¶
- OSSystemExtensionProperties.BundleIdentifier: The bundle identifier of the extension.
- OSSystemExtensionProperties.BundleVersion: The bundle version of the extension.
- OSSystemExtensionProperties.BundleShortVersion: The bundle short version string of the extension.
Locating the Extension’s Installed Location ¶
- OSSystemExtensionProperties.URL: The file URL of the extension bundle.
Instance Properties ¶
- OSSystemExtensionProperties.IsAwaitingUserApproval
- OSSystemExtensionProperties.IsEnabled
- OSSystemExtensionProperties.IsUninstalling
See: https://developer.apple.com/documentation/SystemExtensions/OSSystemExtensionProperties
func NewOSSystemExtensionProperties ¶
func NewOSSystemExtensionProperties() OSSystemExtensionProperties
NewOSSystemExtensionProperties creates a new OSSystemExtensionProperties instance.
func OSSystemExtensionPropertiesFromID ¶
func OSSystemExtensionPropertiesFromID(id objc.ID) OSSystemExtensionProperties
OSSystemExtensionPropertiesFromID constructs a OSSystemExtensionProperties from an objc.ID.
Properties that identify a specific version of a system extension.
func (OSSystemExtensionProperties) Autorelease ¶
func (o OSSystemExtensionProperties) Autorelease() OSSystemExtensionProperties
Autorelease adds the receiver to the current autorelease pool.
func (OSSystemExtensionProperties) BundleIdentifier ¶
func (o OSSystemExtensionProperties) BundleIdentifier() string
The bundle identifier of the extension.
Discussion ¶
This is the CFBundleIdentifier of the extension bundle.
func (OSSystemExtensionProperties) BundleShortVersion ¶
func (o OSSystemExtensionProperties) BundleShortVersion() string
The bundle short version string of the extension.
Discussion ¶
This is the CFBundleShortVersionString of the extension bundle.
func (OSSystemExtensionProperties) BundleVersion ¶
func (o OSSystemExtensionProperties) BundleVersion() string
The bundle version of the extension.
Discussion ¶
This is the CFBundleVersion of the extension bundle.
See: https://developer.apple.com/documentation/SystemExtensions/OSSystemExtensionProperties/bundleVersion
func (OSSystemExtensionProperties) Init ¶
func (o OSSystemExtensionProperties) Init() OSSystemExtensionProperties
Init initializes the instance.
func (OSSystemExtensionProperties) IsAwaitingUserApproval ¶
func (o OSSystemExtensionProperties) IsAwaitingUserApproval() bool
func (OSSystemExtensionProperties) IsEnabled ¶
func (o OSSystemExtensionProperties) IsEnabled() bool
See: https://developer.apple.com/documentation/SystemExtensions/OSSystemExtensionProperties/isEnabled
func (OSSystemExtensionProperties) IsUninstalling ¶
func (o OSSystemExtensionProperties) IsUninstalling() bool
func (OSSystemExtensionProperties) URL ¶
func (o OSSystemExtensionProperties) URL() foundation.INSURL
The file URL of the extension bundle.
See: https://developer.apple.com/documentation/SystemExtensions/OSSystemExtensionProperties/url
type OSSystemExtensionPropertiesClass ¶
type OSSystemExtensionPropertiesClass struct {
// contains filtered or unexported fields
}
func GetOSSystemExtensionPropertiesClass ¶
func GetOSSystemExtensionPropertiesClass() OSSystemExtensionPropertiesClass
GetOSSystemExtensionPropertiesClass returns the class object for OSSystemExtensionProperties.
func (OSSystemExtensionPropertiesClass) Alloc ¶
func (oc OSSystemExtensionPropertiesClass) Alloc() OSSystemExtensionProperties
Alloc allocates memory for a new instance of the class.
func (OSSystemExtensionPropertiesClass) Class ¶
func (oc OSSystemExtensionPropertiesClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type OSSystemExtensionReplacementAction ¶
type OSSystemExtensionReplacementAction int
const ( // OSSystemExtensionReplacementActionCancel: An action that tells the manager to cancel replacement of a system extension. OSSystemExtensionReplacementActionCancel OSSystemExtensionReplacementAction = 0 // OSSystemExtensionReplacementActionReplace: An action that tells the manager to replace an existing system extension. OSSystemExtensionReplacementActionReplace OSSystemExtensionReplacementAction = 1 )
func (OSSystemExtensionReplacementAction) String ¶
func (e OSSystemExtensionReplacementAction) String() string
type OSSystemExtensionRequest ¶
type OSSystemExtensionRequest struct {
objectivec.Object
}
A request to activate or deactivate a system extension.
Working with a Delegate ¶
- OSSystemExtensionRequest.Delegate: A delegate to receive updates about the progress of a request.
- OSSystemExtensionRequest.SetDelegate
Identifying the Target Extension ¶
- OSSystemExtensionRequest.Identifier: The bundle identifier of the target extension.
See: https://developer.apple.com/documentation/SystemExtensions/OSSystemExtensionRequest
func NewOSSystemExtensionRequest ¶
func NewOSSystemExtensionRequest() OSSystemExtensionRequest
NewOSSystemExtensionRequest creates a new OSSystemExtensionRequest instance.
func OSSystemExtensionRequestFromID ¶
func OSSystemExtensionRequestFromID(id objc.ID) OSSystemExtensionRequest
OSSystemExtensionRequestFromID constructs a OSSystemExtensionRequest from an objc.ID.
A request to activate or deactivate a system extension.
func (OSSystemExtensionRequest) Autorelease ¶
func (o OSSystemExtensionRequest) Autorelease() OSSystemExtensionRequest
Autorelease adds the receiver to the current autorelease pool.
func (OSSystemExtensionRequest) Delegate ¶
func (o OSSystemExtensionRequest) Delegate() OSSystemExtensionRequestDelegate
A delegate to receive updates about the progress of a request.
See: https://developer.apple.com/documentation/SystemExtensions/OSSystemExtensionRequest/delegate
func (OSSystemExtensionRequest) Identifier ¶
func (o OSSystemExtensionRequest) Identifier() string
The bundle identifier of the target extension.
See: https://developer.apple.com/documentation/SystemExtensions/OSSystemExtensionRequest/identifier
func (OSSystemExtensionRequest) Init ¶
func (o OSSystemExtensionRequest) Init() OSSystemExtensionRequest
Init initializes the instance.
func (OSSystemExtensionRequest) SetDelegate ¶
func (o OSSystemExtensionRequest) SetDelegate(value OSSystemExtensionRequestDelegate)
type OSSystemExtensionRequestClass ¶
type OSSystemExtensionRequestClass struct {
// contains filtered or unexported fields
}
func GetOSSystemExtensionRequestClass ¶
func GetOSSystemExtensionRequestClass() OSSystemExtensionRequestClass
GetOSSystemExtensionRequestClass returns the class object for OSSystemExtensionRequest.
func (OSSystemExtensionRequestClass) ActivationRequestForExtensionQueue ¶
func (_OSSystemExtensionRequestClass OSSystemExtensionRequestClass) ActivationRequestForExtensionQueue(identifier string, queue dispatch.Queue) OSSystemExtensionRequest
Creates a request to activate a System Extension.
identifier: The bundle identifier of the target extension.
queue: The dispatch queue to use when calling delegate methods.
Return Value ¶
A new extension request.
Discussion ¶
Create and submit an activation request whenever you want to use a given extension. If the extension is inactive, the system may need to prompt the user for approval. The request succeeds only after the user gives their approval.
If the extension is already active, the request succeeds in short order, without significant delay or user interaction. If you request activation of a new version of an already-active extension, the system prompts the user to resolve the conflict before proceeding.
An activation request may succeed, but also indicate that the extension requires a restart to become active. This can occur when replacing an extension that required a restart to deactivate. The most recently activated extension becomes active when the user restarts their Mac.
func (OSSystemExtensionRequestClass) Alloc ¶
func (oc OSSystemExtensionRequestClass) Alloc() OSSystemExtensionRequest
Alloc allocates memory for a new instance of the class.
func (OSSystemExtensionRequestClass) Class ¶
func (oc OSSystemExtensionRequestClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
func (OSSystemExtensionRequestClass) DeactivationRequestForExtensionQueue ¶
func (_OSSystemExtensionRequestClass OSSystemExtensionRequestClass) DeactivationRequestForExtensionQueue(identifier string, queue dispatch.Queue) OSSystemExtensionRequest
Creates a request to deactivate a System Extension.
identifier: The bundle identifier of the extension to deactivate.
queue: The dispatch queue to use when calling delegate methods.
Discussion ¶
The system discovers existing system extensions in the `Contents/Library/SystemExtensions` directory of the main app bundle.
A deactivation request may require a restart before deactivating the extension. If the request succeeds but requires a restart to complete, the extension may still appear operational until the next restart.
func (OSSystemExtensionRequestClass) PropertiesRequestForExtensionQueue ¶
func (_OSSystemExtensionRequestClass OSSystemExtensionRequestClass) PropertiesRequestForExtensionQueue(identifier string, queue dispatch.Queue) OSSystemExtensionRequest
type OSSystemExtensionRequestDelegate ¶
type OSSystemExtensionRequestDelegate interface {
objectivec.IObject
// Tells the delegate that the manager completed the request.
//
// See: https://developer.apple.com/documentation/SystemExtensions/OSSystemExtensionRequestDelegate/request(_:didFinishWithResult:)
RequestDidFinishWithResult(request IOSSystemExtensionRequest, result OSSystemExtensionRequestResult)
// Tells the delegate the manager failed to complete the request.
//
// See: https://developer.apple.com/documentation/SystemExtensions/OSSystemExtensionRequestDelegate/request(_:didFailWithError:)
RequestDidFailWithError(request IOSSystemExtensionRequest, error_ foundation.INSError)
// Tells the delegate that the user must grant approval before the manager can activate the extension.
//
// See: https://developer.apple.com/documentation/SystemExtensions/OSSystemExtensionRequestDelegate/requestNeedsUserApproval(_:)
RequestNeedsUserApproval(request IOSSystemExtensionRequest)
// Tells the delegate that the user has a different version of the extension installed on their system.
//
// See: https://developer.apple.com/documentation/SystemExtensions/OSSystemExtensionRequestDelegate/request(_:actionForReplacingExtension:withExtension:)
RequestActionForReplacingExtensionWithExtension(request IOSSystemExtensionRequest, existing IOSSystemExtensionProperties, ext IOSSystemExtensionProperties) OSSystemExtensionReplacementAction
}
A type that receives updates about the progress of a request.
See: https://developer.apple.com/documentation/SystemExtensions/OSSystemExtensionRequestDelegate
type OSSystemExtensionRequestDelegateConfig ¶
type OSSystemExtensionRequestDelegateConfig struct {
// Handling Success and Failure
// RequestDidFinishWithResult — Tells the delegate that the manager completed the request.
RequestDidFinishWithResult func(request OSSystemExtensionRequest, result OSSystemExtensionRequestResult)
// RequestDidFailWithError — Tells the delegate the manager failed to complete the request.
RequestDidFailWithError func(request OSSystemExtensionRequest, error_ foundation.NSError)
// Handling Indeterminate Installs
// RequestNeedsUserApproval — Tells the delegate that the user must grant approval before the manager can activate the extension.
RequestNeedsUserApproval func(request OSSystemExtensionRequest)
// RequestActionForReplacingExtensionWithExtension — Tells the delegate that the user has a different version of the extension installed on their system.
RequestActionForReplacingExtensionWithExtension func(request OSSystemExtensionRequest, existing OSSystemExtensionProperties, ext OSSystemExtensionProperties) OSSystemExtensionReplacementAction
}
OSSystemExtensionRequestDelegateConfig holds optional typed callbacks for OSSystemExtensionRequestDelegate methods. Set non-nil fields to register the corresponding Objective-C delegate method. Methods with nil callbacks are not registered, so [NSObject.RespondsToSelector] returns false for them — matching the Objective-C delegate pattern exactly.
See Apple Documentation for protocol details.
type OSSystemExtensionRequestDelegateObject ¶
type OSSystemExtensionRequestDelegateObject struct {
objectivec.Object
}
OSSystemExtensionRequestDelegateObject wraps an existing Objective-C object that conforms to the OSSystemExtensionRequestDelegate protocol.
func NewOSSystemExtensionRequestDelegate ¶
func NewOSSystemExtensionRequestDelegate(config OSSystemExtensionRequestDelegateConfig) OSSystemExtensionRequestDelegateObject
NewOSSystemExtensionRequestDelegate creates an Objective-C object implementing the OSSystemExtensionRequestDelegate protocol.
Each call registers a unique Objective-C class containing only the methods set in config. This means [NSObject.RespondsToSelector] works correctly for optional delegate methods — only non-nil callbacks are registered.
The returned OSSystemExtensionRequestDelegateObject satisfies the OSSystemExtensionRequestDelegate interface and can be passed directly to SetDelegate and similar methods.
See Apple Documentation for protocol details.
func OSSystemExtensionRequestDelegateObjectFromID ¶
func OSSystemExtensionRequestDelegateObjectFromID(id objc.ID) OSSystemExtensionRequestDelegateObject
OSSystemExtensionRequestDelegateObjectFromID constructs a OSSystemExtensionRequestDelegateObject from an objc.ID. The object is determined to conform to the protocol at runtime.
func (OSSystemExtensionRequestDelegateObject) BaseObject ¶
func (o OSSystemExtensionRequestDelegateObject) BaseObject() objectivec.Object
func (OSSystemExtensionRequestDelegateObject) RequestActionForReplacingExtensionWithExtension ¶
func (o OSSystemExtensionRequestDelegateObject) RequestActionForReplacingExtensionWithExtension(request IOSSystemExtensionRequest, existing IOSSystemExtensionProperties, ext IOSSystemExtensionProperties) OSSystemExtensionReplacementAction
Tells the delegate that the user has a different version of the extension installed on their system.
request: The request that encountered a conflict.
existing: A properties object that describes the installed version of the extension.
ext: A properties object that describes the updated version of the extension.
Return Value ¶
A replacement action the manager should take to resolve the conflict.
Discussion ¶
The manager calls this method when it encounters an existing extension with the same team and bundle identifiers, but with different version identifiers. It uses the CFBundleVersion and CFBundleShortVersionString identifiers to determine if the existing and new versions differ. The delegate must make a decision on whether to replace the existing extension.
Implement this method to return an OSSystemExtensionRequest.ReplacementAction, which tells the manager what to do. If you return OSSystemExtensionReplacementActionCancel, the manager aborts the installation and calls [RequestDidFailWithError], with the OSSystemExtensionErrorRequestCanceled error code.
If the local system has System Extension developer mode enabled, the manager always calls this method when it finds an existing installation, even if the version identifiers match.
func (OSSystemExtensionRequestDelegateObject) RequestDidFailWithError ¶
func (o OSSystemExtensionRequestDelegateObject) RequestDidFailWithError(request IOSSystemExtensionRequest, error_ foundation.INSError)
Tells the delegate the manager failed to complete the request.
request: The request that failed.
error: The reason the request failed.
func (OSSystemExtensionRequestDelegateObject) RequestDidFinishWithResult ¶
func (o OSSystemExtensionRequestDelegateObject) RequestDidFinishWithResult(request IOSSystemExtensionRequest, result OSSystemExtensionRequestResult)
Tells the delegate that the manager completed the request.
request: The request that completed.
result: Additional information about the completion state.
Discussion ¶
If the request completes with the OSSystemExtensionRequestWillCompleteAfterReboot result, then the extension isn’t active until after the next restart. After restarting, the most recently-processed request determines the extension’s state. Consider the following scenarios:
- Activate extension and restart: the extension is active upon restarting. - Activate extension, deactivate extension, and restart: the extension is inactive upon restarting.
func (OSSystemExtensionRequestDelegateObject) RequestFoundProperties ¶
func (o OSSystemExtensionRequestDelegateObject) RequestFoundProperties(request IOSSystemExtensionRequest, properties []OSSystemExtensionProperties)
func (OSSystemExtensionRequestDelegateObject) RequestNeedsUserApproval ¶
func (o OSSystemExtensionRequestDelegateObject) RequestNeedsUserApproval(request IOSSystemExtensionRequest)
Tells the delegate that the user must grant approval before the manager can activate the extension.
Discussion ¶
Activating an extension may require explicit user approval to proceed. For example, this occurs when the user hasn’t approved the extension. The manager calls this method to notify the delegate. Activation remains pending until the user grants or denies permission, or until the app quits.
type OSSystemExtensionRequestResult ¶
type OSSystemExtensionRequestResult int
See: https://developer.apple.com/documentation/SystemExtensions/OSSystemExtensionRequest/Result
const ( // OSSystemExtensionRequestCompleted: The request completed successfully. OSSystemExtensionRequestCompleted OSSystemExtensionRequestResult = 0 // OSSystemExtensionRequestWillCompleteAfterReboot: The request requires a restart to complete successfully. OSSystemExtensionRequestWillCompleteAfterReboot OSSystemExtensionRequestResult = 1 )
func (OSSystemExtensionRequestResult) String ¶
func (e OSSystemExtensionRequestResult) String() string
type OSSystemExtensionsWorkspace ¶
type OSSystemExtensionsWorkspace struct {
objectivec.Object
}
Overview ¶
Instance Methods ¶
See: https://developer.apple.com/documentation/SystemExtensions/OSSystemExtensionsWorkspace
func NewOSSystemExtensionsWorkspace ¶
func NewOSSystemExtensionsWorkspace() OSSystemExtensionsWorkspace
NewOSSystemExtensionsWorkspace creates a new OSSystemExtensionsWorkspace instance.
func OSSystemExtensionsWorkspaceFromID ¶
func OSSystemExtensionsWorkspaceFromID(id objc.ID) OSSystemExtensionsWorkspace
OSSystemExtensionsWorkspaceFromID constructs a OSSystemExtensionsWorkspace from an objc.ID.
func (OSSystemExtensionsWorkspace) AddObserverError ¶
func (o OSSystemExtensionsWorkspace) AddObserverError(observer OSSystemExtensionsWorkspaceObserver) (bool, error)
Discussion ¶
Start observing changes to System Extension(s) which are enabled or ready to be enabled.
func (OSSystemExtensionsWorkspace) Autorelease ¶
func (o OSSystemExtensionsWorkspace) Autorelease() OSSystemExtensionsWorkspace
Autorelease adds the receiver to the current autorelease pool.
func (OSSystemExtensionsWorkspace) Init ¶
func (o OSSystemExtensionsWorkspace) Init() OSSystemExtensionsWorkspace
Init initializes the instance.
func (OSSystemExtensionsWorkspace) RemoveObserver ¶
func (o OSSystemExtensionsWorkspace) RemoveObserver(observer OSSystemExtensionsWorkspaceObserver)
Discussion ¶
Stop observing changes to System Extension(s).
type OSSystemExtensionsWorkspaceClass ¶
type OSSystemExtensionsWorkspaceClass struct {
// contains filtered or unexported fields
}
func GetOSSystemExtensionsWorkspaceClass ¶
func GetOSSystemExtensionsWorkspaceClass() OSSystemExtensionsWorkspaceClass
GetOSSystemExtensionsWorkspaceClass returns the class object for OSSystemExtensionsWorkspace.
func (OSSystemExtensionsWorkspaceClass) Alloc ¶
func (oc OSSystemExtensionsWorkspaceClass) Alloc() OSSystemExtensionsWorkspace
Alloc allocates memory for a new instance of the class.
func (OSSystemExtensionsWorkspaceClass) Class ¶
func (oc OSSystemExtensionsWorkspaceClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
func (OSSystemExtensionsWorkspaceClass) SharedWorkspace ¶
func (_OSSystemExtensionsWorkspaceClass OSSystemExtensionsWorkspaceClass) SharedWorkspace() OSSystemExtensionsWorkspace
See: https://developer.apple.com/documentation/SystemExtensions/OSSystemExtensionsWorkspace/shared
type OSSystemExtensionsWorkspaceObserver ¶
type OSSystemExtensionsWorkspaceObserver interface {
objectivec.IObject
}
OSSystemExtensionsWorkspaceObserver protocol.
See: https://developer.apple.com/documentation/SystemExtensions/OSSystemExtensionsWorkspaceObserver
type OSSystemExtensionsWorkspaceObserverObject ¶
type OSSystemExtensionsWorkspaceObserverObject struct {
objectivec.Object
}
OSSystemExtensionsWorkspaceObserverObject wraps an existing Objective-C object that conforms to the OSSystemExtensionsWorkspaceObserver protocol.
func OSSystemExtensionsWorkspaceObserverObjectFromID ¶
func OSSystemExtensionsWorkspaceObserverObjectFromID(id objc.ID) OSSystemExtensionsWorkspaceObserverObject
OSSystemExtensionsWorkspaceObserverObjectFromID constructs a OSSystemExtensionsWorkspaceObserverObject from an objc.ID. The object is determined to conform to the protocol at runtime.
func (OSSystemExtensionsWorkspaceObserverObject) BaseObject ¶
func (o OSSystemExtensionsWorkspaceObserverObject) BaseObject() objectivec.Object
func (OSSystemExtensionsWorkspaceObserverObject) SystemExtensionWillBecomeDisabled ¶
func (o OSSystemExtensionsWorkspaceObserverObject) SystemExtensionWillBecomeDisabled(systemExtensionInfo IOSSystemExtensionInfo)
Discussion ¶
This delegate method will be called when the user disables an already enabled system extension, or when the system extension is first installed and is in the disabled state.
func (OSSystemExtensionsWorkspaceObserverObject) SystemExtensionWillBecomeEnabled ¶
func (o OSSystemExtensionsWorkspaceObserverObject) SystemExtensionWillBecomeEnabled(systemExtensionInfo IOSSystemExtensionInfo)
Discussion ¶
This delegate method will be called when a system extension has been validated and allowed by the user to run.
func (OSSystemExtensionsWorkspaceObserverObject) SystemExtensionWillBecomeInactive ¶
func (o OSSystemExtensionsWorkspaceObserverObject) SystemExtensionWillBecomeInactive(systemExtensionInfo IOSSystemExtensionInfo)
Discussion ¶
This delegate method will be called when a system extension is deactivated and is about to get uninstalled. The extension may still be running until the system is rebooted.
Source Files
¶
- delegate_class_counter.gen.go
- doc.gen.go
- enums.gen.go
- functions.gen.go
- generate.go
- global_vars.gen.go
- os_system_extension_info.gen.go
- os_system_extension_manager.gen.go
- os_system_extension_properties.gen.go
- os_system_extension_request.gen.go
- os_system_extension_request_delegate_protocol.gen.go
- os_system_extensions_workspace.gen.go
- os_system_extensions_workspace_observer_protocol.gen.go
- types.gen.go
- undefined_types.gen.go