executionpolicy

package
v0.7.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

Constants

This section is empty.

Variables

Functions

func BindFunc

func BindFunc(fptr any, name string) (err error)

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

func SymbolAddress(name string) (uintptr, error)

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) Autorelease

func (e EPDeveloperTool) Autorelease() EPDeveloperTool

Autorelease adds the receiver to the current autorelease pool.

func (EPDeveloperTool) Init

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.

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

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

const (
	EPErrorGeneric           EPError = 1
	EPErrorNotADeveloperTool EPError = 2
)

func (EPError) String

func (e EPError) String() string

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) Autorelease

func (e EPExecutionPolicy) Autorelease() EPExecutionPolicy

Autorelease adds the receiver to the current autorelease pool.

func (EPExecutionPolicy) Init

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL