Documentation
¶
Overview ¶
Package executionpolicy provides Go bindings for the ExecutionPolicy framework.
Provide functionality so developer tools can manage execution policy exceptions.
This framework provides the ability for developer tools to manage execution policy exceptions for software that’s built locally.
Classes ¶
Key Types ¶
Code generated from Apple documentation. DO NOT EDIT.
Index ¶
- Variables
- func BindFunc(fptr any, name string) (err error)
- func NewBoolBlock(handler BoolHandler) (objc.ID, func())
- func SymbolAddress(name string) (uintptr, error)
- type BoolHandler
- type EPDeveloperTool
- func (e EPDeveloperTool) AuthorizationStatus() EPDeveloperToolStatus
- func (e EPDeveloperTool) Autorelease() EPDeveloperTool
- func (e EPDeveloperTool) Init() EPDeveloperTool
- func (e EPDeveloperTool) RequestDeveloperToolAccess(ctx context.Context) (bool, error)
- func (e EPDeveloperTool) RequestDeveloperToolAccessWithCompletionHandler(handler BoolHandler)
- type EPDeveloperToolClass
- type EPDeveloperToolStatus
- type EPError
- type EPExecutionPolicy
- type EPExecutionPolicyClass
- type IEPDeveloperTool
- type IEPExecutionPolicy
Constants ¶
This section is empty.
Variables ¶
var ( // See: https://developer.apple.com/documentation/ExecutionPolicy/EPErrorDomain EPErrorDomain foundation.NSErrorDomain )
Functions ¶
func BindFunc ¶
BindFunc binds the ExecutionPolicy symbol name into fptr, which must be a pointer to a func variable.
The caller supplies the signature, and nothing checks it. A dylib records no argument count or types for a C symbol, so a wrong signature here is not a type error: it is the wrong number of machine words moved on a live stack, and the failure surfaces somewhere else entirely. Prefer a generated binding, whose signature carries recorded evidence, and reach for this only for a symbol that has none. purego.RegisterFunc panics on a signature it cannot lower; that is recovered and returned, because an escape hatch that takes down the process on a mistyped experiment is not one anybody can experiment with.
func NewBoolBlock ¶
func NewBoolBlock(handler BoolHandler) (objc.ID, func())
NewBoolBlock wraps a Go BoolHandler as an Objective-C block. The caller must defer the returned cleanup function.
Used by:
func SymbolAddress ¶
SymbolAddress returns the address of name in ExecutionPolicy, whether or not this package generated a binding for it.
What is generated is bounded by what is documented, and for a private framework that is whatever a manifest happened to enumerate. The dylib usually exports far more. Without this, a symbol nobody wrote down is unreachable from a package that has already loaded the image holding it, and the generated surface becomes a ceiling instead of a floor.
The lookup is scoped to this framework's handle, not RTLD_DEFAULT, so a symbol some other loaded image exports is not reported as this one's.
Types ¶
type BoolHandler ¶
type BoolHandler = func(bool)
BoolHandler handles completion with a primitive value.
Used by:
type EPDeveloperTool ¶
type EPDeveloperTool struct {
objectivec.Object
}
Instance Properties ¶
Instance Methods ¶
See: https://developer.apple.com/documentation/ExecutionPolicy/EPDeveloperTool
func EPDeveloperToolFromID ¶
func EPDeveloperToolFromID(id objc.ID) EPDeveloperTool
EPDeveloperToolFromID constructs a EPDeveloperTool from an objc.ID.
func NewEPDeveloperTool ¶
func NewEPDeveloperTool() EPDeveloperTool
NewEPDeveloperTool creates a new EPDeveloperTool instance.
func (EPDeveloperTool) AuthorizationStatus ¶
func (e EPDeveloperTool) AuthorizationStatus() EPDeveloperToolStatus
See: https://developer.apple.com/documentation/ExecutionPolicy/EPDeveloperTool/authorizationStatus
func (EPDeveloperTool) Autorelease ¶
func (e EPDeveloperTool) Autorelease() EPDeveloperTool
Autorelease adds the receiver to the current autorelease pool.
func (EPDeveloperTool) Init ¶
func (e EPDeveloperTool) Init() EPDeveloperTool
Init initializes the instance.
func (EPDeveloperTool) RequestDeveloperToolAccess ¶
func (e EPDeveloperTool) RequestDeveloperToolAccess(ctx context.Context) (bool, error)
RequestDeveloperToolAccess is a synchronous wrapper around EPDeveloperTool.RequestDeveloperToolAccessWithCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
func (EPDeveloperTool) RequestDeveloperToolAccessWithCompletionHandler ¶
func (e EPDeveloperTool) RequestDeveloperToolAccessWithCompletionHandler(handler BoolHandler)
Discussion ¶
type EPDeveloperToolClass ¶
type EPDeveloperToolClass struct {
// contains filtered or unexported fields
}
func GetEPDeveloperToolClass ¶
func GetEPDeveloperToolClass() EPDeveloperToolClass
GetEPDeveloperToolClass returns the class object for EPDeveloperTool.
func (EPDeveloperToolClass) Alloc ¶
func (ec EPDeveloperToolClass) Alloc() EPDeveloperTool
Alloc allocates memory for a new instance of the class.
func (EPDeveloperToolClass) Class ¶
func (ec EPDeveloperToolClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type EPDeveloperToolStatus ¶
type EPDeveloperToolStatus int
See: https://developer.apple.com/documentation/ExecutionPolicy/EPDeveloperToolStatus
const ( EPDeveloperToolStatusAuthorized EPDeveloperToolStatus = 3 EPDeveloperToolStatusDenied EPDeveloperToolStatus = 2 EPDeveloperToolStatusNotDetermined EPDeveloperToolStatus = 0 EPDeveloperToolStatusRestricted EPDeveloperToolStatus = 1 )
func (EPDeveloperToolStatus) String ¶
func (e EPDeveloperToolStatus) String() string
type EPError ¶
type EPError int
See: https://developer.apple.com/documentation/ExecutionPolicy/EPError-swift.struct/Code
type EPExecutionPolicy ¶
type EPExecutionPolicy struct {
objectivec.Object
}
Instance Methods ¶
See: https://developer.apple.com/documentation/ExecutionPolicy/EPExecutionPolicy
func EPExecutionPolicyFromID ¶
func EPExecutionPolicyFromID(id objc.ID) EPExecutionPolicy
EPExecutionPolicyFromID constructs a EPExecutionPolicy from an objc.ID.
func NewEPExecutionPolicy ¶
func NewEPExecutionPolicy() EPExecutionPolicy
NewEPExecutionPolicy creates a new EPExecutionPolicy instance.
func (EPExecutionPolicy) AddPolicyExceptionForURLError ¶
func (e EPExecutionPolicy) AddPolicyExceptionForURLError(url foundation.NSURL) (bool, error)
See: https://developer.apple.com/documentation/ExecutionPolicy/EPExecutionPolicy/addException(for:)
func (EPExecutionPolicy) Autorelease ¶
func (e EPExecutionPolicy) Autorelease() EPExecutionPolicy
Autorelease adds the receiver to the current autorelease pool.
func (EPExecutionPolicy) Init ¶
func (e EPExecutionPolicy) Init() EPExecutionPolicy
Init initializes the instance.
type EPExecutionPolicyClass ¶
type EPExecutionPolicyClass struct {
// contains filtered or unexported fields
}
func GetEPExecutionPolicyClass ¶
func GetEPExecutionPolicyClass() EPExecutionPolicyClass
GetEPExecutionPolicyClass returns the class object for EPExecutionPolicy.
func (EPExecutionPolicyClass) Alloc ¶
func (ec EPExecutionPolicyClass) Alloc() EPExecutionPolicy
Alloc allocates memory for a new instance of the class.
func (EPExecutionPolicyClass) Class ¶
func (ec EPExecutionPolicyClass) Class() objc.Class
Class returns the underlying Objective-C class pointer.
type IEPDeveloperTool ¶
type IEPDeveloperTool interface {
objectivec.IObject
AuthorizationStatus() EPDeveloperToolStatus
RequestDeveloperToolAccessWithCompletionHandler(handler BoolHandler)
}
An interface definition for the EPDeveloperTool class.
Instance Properties ¶
Instance Methods ¶
See: https://developer.apple.com/documentation/ExecutionPolicy/EPDeveloperTool
type IEPExecutionPolicy ¶
type IEPExecutionPolicy interface {
objectivec.IObject
AddPolicyExceptionForURLError(url foundation.NSURL) (bool, error)
}
An interface definition for the EPExecutionPolicy class.
Instance Methods ¶
See: https://developer.apple.com/documentation/ExecutionPolicy/EPExecutionPolicy