Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct {
Name string `json:"name"`
TypeIdentifier string `json:"deviceTypeIdentifier"`
IsAvailable bool `json:"isAvailable,omitempty"`
AvailabilityError string `json:"availabilityError,omitempty"`
UDID string `json:"udid"`
State string `json:"state"`
Type string `json:"-"`
Platform string `json:"-"`
OS string `json:"-"`
Arch string `json:"-"`
}
Device ...
"devices" : {
"com.apple.CoreSimulator.SimRuntime.watchOS-7-4" : [
{
"availabilityError" : "runtime profile not found",
"dataPath" : "\/Users\/lpusok\/Library\/Developer\/CoreSimulator\/Devices\/6503EC5B-2393-46F1-A947-B32677A3360F\/data",
"dataPathSize" : 0,
"logPath" : "\/Users\/lpusok\/Library\/Logs\/CoreSimulator\/6503EC5B-2393-46F1-A947-B32677A3360F",
"udid" : "6503EC5B-2393-46F1-A947-B32677A3360F",
"isAvailable" : false,
"deviceTypeIdentifier" : "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-5-40mm",
"state" : "Shutdown",
"name" : "Apple Watch Series 5 - 40mm"
}, ... ],
"com.apple.CoreSimulator.SimRuntime.iOS-16-0" : [
{
"lastBootedAt" : "2022-06-07T11:34:18Z",
"dataPath" : "\/Users\/lpusok\/Library\/Developer\/CoreSimulator\/Devices\/D64FA78C-5A25-4BF3-9EE8-855761042DEE\/data",
"dataPathSize" : 311848960,
"logPath" : "\/Users\/lpusok\/Library\/Logs\/CoreSimulator\/D64FA78C-5A25-4BF3-9EE8-855761042DEE",
"udid" : "D64FA78C-5A25-4BF3-9EE8-855761042DEE",
"isAvailable" : true,
"logPathSize" : 57344,
"deviceTypeIdentifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-8",
"state" : "Shutdown",
"name" : "iPhone 8"
}, ... ]
}
func (Device) XcodebuildDestination ¶
XcodebuildDestination returns the required xcodebuild -destination flag value for a device
type DeviceFinder ¶
type DeviceFinder interface {
FindDevice(destination Simulator) (Device, error)
ListDevices() (*DeviceList, error)
}
DeviceFinder is an interface that find a matching device for a given destination
func NewDeviceFinder ¶
func NewDeviceFinder(log log.Logger, commandFactory command.Factory, xcodeVersion xcodeversion.Version) DeviceFinder
NewDeviceFinder retruns the default implementation of DeviceFinder
type DeviceList ¶
type DeviceList struct {
DeviceTypes []DeviceType `json:"deviceTypes"`
Runtimes []DeviceRuntime `json:"runtimes"`
Devices map[string][]Device `json:"devices"`
}
DeviceList ...
type DeviceRuntime ¶
type DeviceRuntime struct {
Identifier string `json:"identifier"`
Platform string `json:"platform"`
Version string `json:"version"`
IsAvailable bool `json:"isAvailable"`
Name string `json:"name"`
SupportedDeviceTypes []DeviceType `json:"supportedDeviceTypes"`
}
DeviceRuntime ...
"runtimes" : [
{
"bundlePath" : "\/Library\/Developer\/CoreSimulator\/Profiles\/Runtimes\/iOS 12.4.simruntime",
"buildversion" : "16G73",
"platform" : "iOS",
"runtimeRoot" : "\/Library\/Developer\/CoreSimulator\/Profiles\/Runtimes\/iOS 12.4.simruntime\/Contents\/Resources\/RuntimeRoot",
"identifier" : "com.apple.CoreSimulator.SimRuntime.iOS-12-4",
"version" : "12.4",
"isInternal" : false,
"isAvailable" : true,
"name" : "iOS 12.4",
"supportedDeviceTypes" : [
{
"bundlePath" : "\/Applications\/Xcode-beta.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Library\/Developer\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone 5s.simdevicetype",
"name" : "iPhone 5s",
"identifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-5s",
"productFamily" : "iPhone"
}, ... ],
}, ... ]
type DeviceType ¶
type DeviceType struct {
Name string `json:"name"`
Identifier string `json:"identifier"`
ProductFamily string `json:"productFamily"`
}
DeviceType ...
"devicetypes" : [{
"productFamily" : "iPhone",
"bundlePath" : "\/Applications\/Xcode-beta.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Library\/Developer\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone 11.simdevicetype",
"maxRuntimeVersion" : 4294967295,
"maxRuntimeVersionString" : "65535.255.255",
"identifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-11",
"modelIdentifier" : "iPhone12,1",
"minRuntimeVersionString" : "13.0.0",
"minRuntimeVersion" : 851968,
"name" : "iPhone 11"
}, ... ]
type Platform ¶
type Platform string
Platform ...
const ( MacOS Platform = "macOS" IOS Platform = "iOS" IOSSimulator Platform = "iOS Simulator" WatchOS Platform = "watchOS" WatchOSSimulator Platform = "watchOS Simulator" TvOS Platform = "tvOS" TvOSSimulator Platform = "tvOS Simulator" DriverKit Platform = "DriverKit" VisionOS Platform = "visionOS" VisionOSSimulator Platform = "visionOS Simulator" )
Platforms ...
Click to show internal directories.
Click to hide internal directories.