package
1.0.176
Repository: https://github.com/danielpaulus/go-ios.git
Documentation: pkg.go.dev

# Packages

Package appservice provides functions to Launch and Kill apps on an iOS devices for iOS17+.
Package openstdio is used to open a new socket connection that can be used to connect an app launched with appservice.
Package tunnel implements creating a TUN interface for iOS 17 devices.
Package xpc contains a connection stuct and the codec for the xpc protocol.

# Functions

CheckRoot checks if the current user is root or has elevated privileges on Windows.
ConnectToShimService opens a new connection of the tunnel interface of the provided device to the provided service.
ConnectToServiceTunnelIface connects to a service on an iOS17+ device using a XPC over HTTP2 connection It returns a new xpc.Connection.
ConnectTUNDevice creates a *net.TCPConn to the device at the given address and port.
CreateDERFormattedSupervisionCert is a convenience function to generate DER and PEM formatted private key and cert to be used for device supervision.
DeviceListfromBytes parses a DeviceList from a byte array.
FindDeviceInterfaceAddress tries to find the address of the device by browsing through all network interfaces.
FixWindowsPaths replaces backslashes with forward slashes and removes the X: style windows drive letters.
GenericSliceToType tries to convert a slice of interfaces to a slice of the given type.
GetDevice returns: the device for the udid if a valid udid is provided.
GetLanguage creates a new lockdown session for the device and retrieves the current language and locale as well as a list of all supported locales and languages.
GetProductVersion gets the iOS version of a device.
GetUsbmuxdSocket this is the default socket address for the platform to connect to.
GetValues returns all values of deviceInformation from lockdown.
GetValuesPlist returns the full lockdown values response as a map, so it can be converted to JSON easily.
GetWifiMac gets the static MAC address of the device WiFi.
DefaultHttpApiHost is the host on which the HTTP-Server runs, by default it is 127.0.0.1 if GO_IOS_AGENT_HOST is set, we use that host.
DefaultHttpApiPort is the port on which we start the HTTP-Server for exposing started tunnels if GO_IOS_AGENT_PORT is set, we use that port.
InterfaceToStringSlice casts an interface{} to []interface{} and then converts each entry to a string.
ListDevices returns a DeviceList containing data about all currently connected iOS devices using a new UsbMuxConnection.
MuxResponsefromBytes parses a MuxResponse struct from bytes.
NewDeviceConnection creates a new DeviceConnection pointing to the given socket waiting for a call to Connect().
NewDeviceConnectionWithConn create a DeviceConnection with a already connected network conn.
NewListen creates a new Listen Message for USBMUX.
NewLockDownConnection creates a new LockDownConnection with empty sessionId and a PlistCodec.
NewPlistCodec create a codec for PLIST based services with [4 byte big endian length][plist-payload] based messages.
NewPlistCodecReadWriter creates a new PlistCodecReadWriter.
NewReadDevices creates a struct containing a request for a device list that can be sent to UsbMuxD.
NewUsbMuxConnection creates a new UsbMuxConnection from an already initialized DeviceConnectionInterface.
NewUsbMuxConnectionSimple creates a new UsbMuxConnection with a connection to /var/run/usbmuxd.
NewWithAddrDevice creates a new RsdService with the given address and port 58783 using a HTTP2 based XPC connection.
NewWithAddrPort creates a new RsdService with the given address and port 58783 using a HTTP2 based XPC connection, connecting to an operating system level TUN device.
NewWithAddrPortDevice creates a new RsdService with the given address and port using a HTTP2 based XPC connection.
Ntohs is a re-implementation of the C function Ntohs.
Pair tries to pair with a device.
PairRecordfromBytes parsed a plist into a PairRecord.
PairSupervised uses an organization id from apple configurator so you can pair a supervised device without the need for user interaction (the trust popup) Arguments are the device, the p12 files raw contents and the password used for the p12 file.
ParsePlist tries to parse the given bytes, which should be a Plist, into a map[string]interface.
PathExists is used to determine whether the path folder exists True if it exists, false otherwise.
ReadPairRecord creates a new USBMuxConnection just to read the pair record and closes it right after than.
RsdCheckin sends a plist encoded message with the request 'RSDCheckin' to the device.
EnableAssistiveTouch creates a new lockdown session for the device and enables or disables AssistiveTouch (the on-screen software home button), by using the special key AssistiveTouchEnabledByiTunes.
SetLanguage creates a new lockdown session for the device and sets a new language and locale.
Enable24HourClock creates a new lockdown session for the device and enables or disables 24HourClock, by using the special key Uses24HourClock.
EnableVoiceOver creates a new lockdown session for the device and enables or disables VoiceOver (the on-screen software home button), by using the special key VoiceOverTouchEnabledByiTunes.
EnableZoomTouch creates a new lockdown session for the device and enables or disables ZoomTouch (the on-screen software home button), by using the special key ZoomTouchEnabledByiTunes.
StartService conveniently starts a service on a device and cleans up the used UsbMuxconnection.
ToPlist converts a given struct to a Plist using the github.com/DHowett/go-plist library.
ToPlistBytes converts a given struct to a Plist using the github.com/DHowett/go-plist library.
Unzip is code I copied from https://golangcode.com/unzip-files-in-go/ thank you guys for the cool helpful code examples :-D.
UseHttpProxy sets the default http transport to use the given proxy url.

# Constants

Lockdownport is the port of the always running lockdownd on the iOS device.

# Structs

AllValuesType contains all possible values that can be requested from LockDown.
AttachedMessage contains some info about when iOS devices are connected or disconnected from the host.
BasebandKeyHashInformationType containing some baseband related data directly from the ios device.
CaCertificate is a simple struct to hold a x509 cert and privateKey in DER and PEM formats as well as the CER should you need it.
DeviceConnection wraps the net.Conn to the ios Device and has support for switching Codecs and enabling SSL.
TODO: remove the need for this with some refactoring in a follow up PR.
DeviceEntry contains the DeviceID with is sometimes needed f.ex.
DeviceList is a simple wrapper for a array of DeviceEntry.
DeviceProperties contains important device related info like the udid which is named SerialNumber here.
GetAllValuesResponse just the wrapper for AllValuesType.
LanguageConfiguration is a simple struct encapsulating a language and locale string.
ListenType contains infos for creating a LISTEN message for USBMUX.
LockDownConnection allows you to interact with the Lockdown service on the phone.
MuxResponse is a generic response message sent by usbmuxd it contains a Number response code.
NonVolatileRAMType contains some internal device info and can be retrieved by getting all values.
PairRecord contains the HostID string, the SystemBUID string, the HostCertificate []byte and the HostPrivateKey []byte.
PairRecordData only holds a []byte containing the PairRecord data as a serialized Plist.
PlistCodec is a codec for PLIST based services with [4 byte big endian length][plist-payload] based messages.
PlistCodecReadWriter handles length encoded plist messages Each message starts with an uint32 value representing the length of the encoded payload followed by the binary encoded plist data.
ReadDevicesType contains all the data necessary to request a DeviceList from usbmuxd.
ReadPair contains all the Infos necessary to request a PairRecord from usbmuxd.
RsdHandshakeResponse is the response to the RSDCheckin request and contains the UDID and the services available on the device.
StartServiceResponse is sent by the phone after starting a service, it contains servicename, port and tells us whether we should enable SSL or not.
StartSessionResponse contains the information sent by the device as a response to a StartSessionRequest.
UsbMuxConnection can send and read messages to the usbmuxd process to manage pairrecors, listen for device changes and connect to services on the phone.
UsbMuxHeader contains the header for plist messages for the usbmux daemon.
UsbMuxMessage contains header and payload for a message to usbmux.
ValueResponse contains the response for a GetValue or SetValue Request.

# Interfaces

DeviceConnectionInterface contains a physical network connection to a usbmuxd socket.
RsdPortProvider is an interface to get a port for a service, or a service for a port from the Remote Service Discovery on the device.

# Type aliases