plist

package
v0.0.0-...-eab66a8 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrMissingRequiredProperty is the error returned for missing properties
	ErrMissingRequiredProperty = errors.New("Missing property")
)

Functions

This section is empty.

Types

type ATSExceptionDomain

type ATSExceptionDomain struct {
	// contains filtered or unexported fields
}

ATSExceptionDomain specifies the custom configurations for App Transport Security named domains.

func (*ATSExceptionDomain) AllowsInsecureHTTPLoads

func (e *ATSExceptionDomain) AllowsInsecureHTTPLoads(v bool)

AllowsInsecureHTTPLoads specified as `true` allows insecure HTTP loads for the given domain, or to be able to loosen the server trust evaluation requirements for HTTPS connections to the domain, as described in Performing

Manual Server Trust Authentication.

This key is optional. The default value is NO. **NOTE**: You must supply a justification during App Store review if you set the key’s value to `true`, as described in https://developer.apple.com/documentation/security/preventing_insecure_network_connections#3138036.

func (*ATSExceptionDomain) IncludesSubdomains

func (e *ATSExceptionDomain) IncludesSubdomains(v bool)

IncludesSubdomains allows you to apply the ATS exceptions for the given domain to all subdomains of the domain. This key is optional. The default value is NO.

func (*ATSExceptionDomain) MinimumTLSVersion

func (e *ATSExceptionDomain) MinimumTLSVersion(v string)

MinimumTLSVersion specifies the minimum Transport Layer Security (TLS) version for network connections. This key is optional. The value is a string, with a default value of TLSv1.2. Possible values are:

TLSv1.0
TLSv1.1
TLSv1.2
TLSv1.3

**NOTE**: You must supply a justification during App Store review if you use this key to set a protocol version lower than 1.2, as described in https://developer.apple.com/documentation/security/preventing_insecure_network_connections#3138036.

func (*ATSExceptionDomain) RequiresCertificateTransparency

func (e *ATSExceptionDomain) RequiresCertificateTransparency(v bool)

RequiresCertificateTransparency allows you to specify `true` so that ATS can use the Certificate Transparency (CT) protocol to identify mistakenly or maliciously issued X.509 certificates. This key is optional. The default value is NO.

func (*ATSExceptionDomain) RequiresForwardSecrecy

func (e *ATSExceptionDomain) RequiresForwardSecrecy(v bool)

RequiresForwardSecrecy allows you set the value for this key to `false` to override the requirement that a server support perfect forward secrecy (PFS) for the given domain. This key is optional. The default value is `true`, which limits the accepted ciphers to those that support PFS through Elliptic Curve Diffie-Hellman Ephemeral (ECDHE) key exchange.

type AppTransportSecurity

type AppTransportSecurity struct {
	// contains filtered or unexported fields
}

AppTransportSecurity allows you to specify a description of changes made to the default security for HTTP connections. See https://developer.apple.com/documentation/bundleresources/information_property_list/NSAppTransportSecurity for more information.

func (*AppTransportSecurity) AllowArbitraryLoadForLocalNetworking

func (s *AppTransportSecurity) AllowArbitraryLoadForLocalNetworking(v bool)

AllowArbitraryLoadForLocalNetworking specifies a boolean value indicating whether to allow loading of local resources. See https://developer.apple.com/documentation/bundleresources/information_property_list/nsapptransportsecurity/NSAllowsLocalNetworking for more information.

func (*AppTransportSecurity) AllowArbitraryLoadForMedia

func (s *AppTransportSecurity) AllowArbitraryLoadForMedia(v bool)

AllowArbitraryLoadForMedia specifies a boolean value indicating whether all App Transport Security restrictions are disabled for requests made using the AV Foundation framework. https://developer.apple.com/documentation/bundleresources/information_property_list/nsapptransportsecurity/nsallowsarbitraryloadsformedia for more information.

func (*AppTransportSecurity) AllowArbitraryLoadForWebContent

func (s *AppTransportSecurity) AllowArbitraryLoadForWebContent(v bool)

AllowArbitraryLoadForWebContent specifies a boolean value indicating whether all App Transport Security restrictions are disabled for requests made from web views. See https://developer.apple.com/documentation/bundleresources/information_property_list/nsapptransportsecurity/NSAllowsArbitraryLoadsInWebContent for more information.

func (*AppTransportSecurity) AllowArbitraryLoads

func (s *AppTransportSecurity) AllowArbitraryLoads(v bool)

AllowArbitraryLoads specifies a boolean value indicating whether App Transport Security restrictions are disabled for all network connections. In iOS 10 and later and macOS 10.12 and later, the value of the NSAllowsArbitraryLoads key is ignored—and the default value of NO used instead—if any of the following keys are present in your app’s Information Property List file:

NSAllowsArbitraryLoadsForMedia
NSAllowsArbitraryLoadsInWebContent
NSAllowsLocalNetworking

See https://developer.apple.com/documentation/bundleresources/information_property_list/nsapptransportsecurity/nsallowsarbitraryloads for more information.

func (*AppTransportSecurity) Apply

func (s *AppTransportSecurity) Apply(p *PropertyList)

Apply will apply AppTransportSecurity against the specified PropertyList.

func (*AppTransportSecurity) ExceptionDomain

func (s *AppTransportSecurity) ExceptionDomain(domain string, f func(d *ATSExceptionDomain))

ExceptionDomain allows you tp specify a custom configuration for App Transport Security named domains. See https://developer.apple.com/documentation/bundleresources/information_property_list/nsapptransportsecurity/nsexceptiondomains for more information.

type DeviceCapabilities

type DeviceCapabilities struct {
	// contains filtered or unexported fields
}

DeviceCapabilities allows you to specify required device capabilities. See https://developer.apple.com/documentation/bundleresources/information_property_list/uirequireddevicecapabilities for more information.

func (*DeviceCapabilities) ARKit

ARKit ensures the support for ARKit. Available in iOS 11.0 and later.

func (*DeviceCapabilities) ARM64

ARM64 ensures compilation for the arm64 instruction set. Include this key for all 64-bit apps and embedded bundles, like extensions and frameworks. Available in iOS 8.0 and later.

func (*DeviceCapabilities) ARMv7

ARMv7 ensures compilation for the armv7 instruction set, or as a 32/64-bit universal app. Available in iOS 3.1 and later.

func (*DeviceCapabilities) Accelerometer

func (c *DeviceCapabilities) Accelerometer() *DeviceCapabilities

Accelerometer ensure the presence of accelerometers. Available in iOS 3.0 and later.

func (*DeviceCapabilities) Apply

func (c *DeviceCapabilities) Apply(p *PropertyList)

Apply will apply the device capabilities to the specified property list

func (*DeviceCapabilities) AutoFocusCamera

func (c *DeviceCapabilities) AutoFocusCamera() *DeviceCapabilities

AutoFocusCamera ensures autofocus capabilities in the device’s still camera. You might need to include this value if your app supports macro photography

or requires sharper images to perform certain image-processing tasks.

Available in iOS 3.0 and later.

func (*DeviceCapabilities) Bluetooth

func (c *DeviceCapabilities) Bluetooth() *DeviceCapabilities

Bluetooth ensures the presence of bluetooth low-energy hardware. Available in iOS 5.0 and later.

func (*DeviceCapabilities) CameraFlash

func (c *DeviceCapabilities) CameraFlash() *DeviceCapabilities

CameraFlash ensures the presence of a camera flash. Available in iOS 3.0 and later.

func (*DeviceCapabilities) FrontFacingCamera

func (c *DeviceCapabilities) FrontFacingCamera() *DeviceCapabilities

FrontFacingCamera ensures the presence of a front-facing camera. Available in iOS 3.0 and later.

func (*DeviceCapabilities) GPS

GPS ensures the device has GPS (or AGPS) hardware for tracking locations. If you include this value, you should also include the location-services value. Available in iOS 3.0 and later.

func (*DeviceCapabilities) GameKit

func (c *DeviceCapabilities) GameKit() *DeviceCapabilities

GameKit ensures the device has access to the Game Center service. Available in iOS 4.1 and later.

func (*DeviceCapabilities) Gyroscope

func (c *DeviceCapabilities) Gyroscope() *DeviceCapabilities

Gyroscope ensures hardware access to a gyroscope. Available in iOS 3.0 and later.

func (*DeviceCapabilities) HealthKit

func (c *DeviceCapabilities) HealthKit() *DeviceCapabilities

HealthKit ensures the device has support for HealthKit. Available in iOS 8.0 and later.

func (*DeviceCapabilities) LocationServices

func (c *DeviceCapabilities) LocationServices() *DeviceCapabilities

LocationServices ensures access to the device’s current location using the Core Location framework. This value refers to the general location services feature. If you specifically need GPS-level accuracy, also include the GPS feature. Available in iOS 3.0 and later.

func (*DeviceCapabilities) Magnetometer

func (c *DeviceCapabilities) Magnetometer() *DeviceCapabilities

Magnetometer ensures the presence of magnetometer hardware. Apps use this hardware to receive heading-related events through the Core Location framework. Available in iOS 3.0 and later.

func (*DeviceCapabilities) Metal

Metal ensures the device has support for graphics processing with Metal. Available in iOS 8.0 and later.

func (*DeviceCapabilities) Microphone

func (c *DeviceCapabilities) Microphone() *DeviceCapabilities

Microphone ensures the device has access to the built-in microphone or accessories that provide a microphone. Available in iOS 3.0 and later.

func (*DeviceCapabilities) MinimumPerformanceA12

func (c *DeviceCapabilities) MinimumPerformanceA12() *DeviceCapabilities

MinimumPerformanceA12 ensures the performance and capabilities of the A12 Bionic and later chips. Available in iOS 12.0 and later.

func (*DeviceCapabilities) NFC

NFC ensures the device has support Near Field Communication (NFC) tag detection and access to messages that contain NFC Data Exchange Format data. Use the Core NFC framework to detect and read NFC tags. Available in iOS 11.0 and later.

func (*DeviceCapabilities) OpenGLES1

func (c *DeviceCapabilities) OpenGLES1() *DeviceCapabilities

OpenGLES1 ensures the device has support for OpenGL ES 1.1. Available in iOS 3.0 and later.

func (*DeviceCapabilities) OpenGLES2

func (c *DeviceCapabilities) OpenGLES2() *DeviceCapabilities

OpenGLES2 ensures the device has support for OpenGL ES 2.0. Available in iOS 3.0 and later.

func (*DeviceCapabilities) OpenGLES3

func (c *DeviceCapabilities) OpenGLES3() *DeviceCapabilities

OpenGLES3 ensures the device has support for OpenGL ES 3.0. Available in iOS 7.0 and later.

func (*DeviceCapabilities) PeerToPeerConnectivity

func (c *DeviceCapabilities) PeerToPeerConnectivity() *DeviceCapabilities

PeerToPeerConnectivity ensures support for peer-to-peer connectivity over a Bluetooth network. Available in iOS 3.1 and later.

func (*DeviceCapabilities) SMS

SMS ensures the device has the Messages app. You might require this feature

if your app opens URLs with the sms scheme. Available in iOS 3.0 and later.

func (*DeviceCapabilities) StillCamera

func (c *DeviceCapabilities) StillCamera() *DeviceCapabilities

StillCamera ensures the device has a camera. Available in iOS 3.0 and later.

func (*DeviceCapabilities) Telephony

func (c *DeviceCapabilities) Telephony() *DeviceCapabilities

Telephony ensures the device has the Phone app. Available in iOS 3.0 and later.

func (*DeviceCapabilities) VideoCamera

func (c *DeviceCapabilities) VideoCamera() *DeviceCapabilities

VideoCamera ensures the device a camera with video capabilities on the device. Available in iOS 3.0 and later.

func (*DeviceCapabilities) WiFi

WiFi ensures the device has access to networking features related to Wi-Fi

access. Available in iOS 3.0 and later.

type Orientations

type Orientations struct {
	// contains filtered or unexported fields
}

Orientations contains device orientation related data.

func (*Orientations) Apply

func (d *Orientations) Apply(p *PropertyList, modifier string)

Apply will apply the interface orientations to the Propertylist.

func (*Orientations) LandscapeLeft

func (d *Orientations) LandscapeLeft()

LandscapeLeft specifies the landscape left device orientation.

func (*Orientations) LandscapeRight

func (d *Orientations) LandscapeRight()

LandscapeRight specifies the landscape right device orientation.

func (*Orientations) Portrait

func (d *Orientations) Portrait()

Portrait specifies the portrait device orientation.

func (*Orientations) UpsideDown

func (d *Orientations) UpsideDown()

UpsideDown specifies the upside down device orientation.

func (*Orientations) Validate

func (d *Orientations) Validate() error

Validate will verify that you have specified valid device orientations.

type Platform

type Platform string

Platform represents the targeted platform

const (
	// PlatformIOS is for validating the plist against the iOS plaftform
	PlatformIOS Platform = "ios"

	// PlatformMac is for validating the plist against the Mac/OSX plaftform
	PlatformMac Platform = "mac"
)

type Privacy

type Privacy struct {
	// contains filtered or unexported fields
}

Privacy allows you to specify privacy request text for a variety of device permissions. See https://iosdevcenters.blogspot.com/2016/09/infoplist-privacy-settings-in-ios-10.html#comment-3531316086 for details.

func (*Privacy) AppleEvents

func (p *Privacy) AppleEvents(desc string) *Privacy

AppleEvents specifies a message that tells the user why the app is requesting the ability to send Apple events.

See https://developer.apple.com/documentation/bundleresources/information_property_list/nsappleeventsusagedescription for more information.

func (*Privacy) AppleMusic

func (p *Privacy) AppleMusic(desc string) *Privacy

AppleMusic specifies a message that tells the user why the app is requesting access to the user’s media library.

See https://developer.apple.com/documentation/bundleresources/information_property_list/NSAppleMusicUsageDescription for more information.

func (*Privacy) Apply

func (p *Privacy) Apply(pl *PropertyList)

Apply will apply the privacy configuration to the provider property list.

func (*Privacy) BluetoothAlways

func (p *Privacy) BluetoothAlways(desc string) *Privacy

BluetoothAlways specifies a message that tells the user why the app needs access to Bluetooth.

See https://developer.apple.com/documentation/bundleresources/information_property_list/NSBluetoothAlwaysUsageDescription for more information.

func (*Privacy) BluetoothPeripheral

func (p *Privacy) BluetoothPeripheral(desc string) *Privacy

BluetoothPeripheral specifies a message that tells the user why the app is requesting the ability to connect to Bluetooth peripherals.

DEPRECATED: For apps with a deployment target of iOS 13 and later, use `BluetoothAlways` instead.

See https://developer.apple.com/documentation/bundleresources/information_property_list/NSBluetoothPeripheralUsageDescription for more information.

func (*Privacy) Calendar

func (p *Privacy) Calendar(desc string) *Privacy

Calendar specifies a message that tells the user why the app is requesting access to the user’s calendar data.

See https://developer.apple.com/documentation/bundleresources/information_property_list/NSCalendarsUsageDescription for more information.

func (*Privacy) CallKit

func (p *Privacy) CallKit(desc string) *Privacy

CallKit specifies a message that tells the user why the app is requesting the ability use VoIP and/or CallKit.

No official Apple documentation was found for this preference.

func (*Privacy) Camera

func (p *Privacy) Camera(desc string) *Privacy

Camera specifies a message that tells the user why the app is requesting access to the device’s camera.

See https://developer.apple.com/documentation/bundleresources/information_property_list/NSCameraUsageDescription for more information..

func (*Privacy) Contacts

func (p *Privacy) Contacts(desc string) *Privacy

Contacts specifies a mmessage that tells the user why the app is requesting access to the user’s contacts.

See https://developer.apple.com/documentation/bundleresources/information_property_list/NSContactsUsageDescription for more information.

func (*Privacy) DesktopFolder

func (p *Privacy) DesktopFolder(desc string) *Privacy

DesktopFolder specifies a message that tells the user why the app needs access to the user’s Desktop folder.

See https://developer.apple.com/documentation/bundleresources/information_property_list/NSDesktopFolderUsageDescription for more information.

func (*Privacy) DocumentsFolder

func (p *Privacy) DocumentsFolder(desc string) *Privacy

DocumentsFolder specifies a message that tells the user why the app needs access to the user’s Documents folder.

See https://developer.apple.com/documentation/bundleresources/information_property_list/NSDocumentsFolderUsageDescription for more information.

func (*Privacy) DownloadsFolder

func (p *Privacy) DownloadsFolder(desc string) *Privacy

DownloadsFolder specifies a message that tells the user why the app needs access to the user’s Downloads folder.

See https://developer.apple.com/documentation/bundleresources/information_property_list/NSDownloadsFolderUsageDescription for more information.

func (*Privacy) DriverExtension

func (p *Privacy) DriverExtension(desc string) *Privacy

DriverExtension specifies a message that tells the user why the app needs access to implement a driver extension.

See https://developer.apple.com/documentation/driverkit for more information.

func (*Privacy) FaceID

func (p *Privacy) FaceID(desc string) *Privacy

FaceID specifies a message that tells the user why the app is requesting the ability to authenticate with Face ID.

See url for more information.

func (*Privacy) FileProviderDomain

func (p *Privacy) FileProviderDomain(desc string) *Privacy

FileProviderDomain specifies a message that tells the user why the app needs access to files managed by a file provider.

See https://developer.apple.com/documentation/bundleresources/information_property_list/nsappleeventsusagedescription for more information.

func (*Privacy) FileProviderPresence

func (p *Privacy) FileProviderPresence(desc string) *Privacy

FileProviderPresence specifies a message that tells the user why the app needs to be informed when other apps access files that it manages.

See https://developer.apple.com/documentation/bundleresources/information_property_list/NSFileProviderPresenceUsageDescription for more information.

func (*Privacy) HealthKitRead

func (p *Privacy) HealthKitRead(desc string) *Privacy

HealthKitRead specifies a message to the user that explains why the app requested permission to read samples from the HealthKit store.

See https://developer.apple.com/documentation/bundleresources/information_property_list/NSHealthShareUsageDescription for more information.

func (*Privacy) HealthKitUpdate

func (p *Privacy) HealthKitUpdate(desc string) *Privacy

HealthKitUpdate specifies a message to the user that explains why the app requested permission to save samples to the HealthKit store.

See https://developer.apple.com/documentation/bundleresources/information_property_list/NSHealthUpdateUsageDescription for more information.

func (*Privacy) HomeKit

func (p *Privacy) HomeKit(desc string) *Privacy

HomeKit specifies a message that tells the user why the app is requesting

access to the user’s HomeKit configuration data.

See https://developer.apple.com/documentation/bundleresources/information_property_list/NSHomeKitUsageDescription for more information.

func (*Privacy) Location

func (p *Privacy) Location(desc string) *Privacy

Location specifies a message that tells the user why the app is requesting access to the user’s location information at all times.

See https://developer.apple.com/documentation/bundleresources/information_property_list/NSLocationAlwaysAndWhenInUseUsageDescription for more information.

func (*Privacy) LocationAlways

func (p *Privacy) LocationAlways(desc string) *Privacy

LocationAlways specifies a message that tells the user why the app is requesting access to the user's location at all times.

**NOTE**: Deprecated. This key is required if your iOS app uses APIs that access the user’s location at all times and deploys to targets earlier than iOS 11.

See https://developer.apple.com/documentation/bundleresources/information_property_list/NSLocationAlwaysUsageDescription for more information.

func (*Privacy) LocationUsage

func (p *Privacy) LocationUsage(desc string) *Privacy

LocationUsage specifies a message that tells the user why the app is requesting access to the user’s location information.

**NOTE**: Deprecated since iOS 8. This key is required if your macOS app uses APIs that access the user’s location information.

See https://developer.apple.com/documentation/bundleresources/information_property_list/NSLocationUsageDescription for more information.

func (*Privacy) MediaLibray

func (p *Privacy) MediaLibray(desc string) *Privacy

MediaLibray specifies a message for accessing the device media library.

No official documentation is known to exist for this key: `kTCCServiceMediaLibrary`.

func (*Privacy) Microphone

func (p *Privacy) Microphone(desc string) *Privacy

Microphone specifies a message that tells the user why the app is requesting access to the device’s microphone.

See https://developer.apple.com/documentation/bundleresources/information_property_list/NSMicrophoneUsageDescription for more information.

func (*Privacy) Motion

func (p *Privacy) Motion(desc string) *Privacy

Motion specifies a message that tells the user why your app is requesting access to the device’s motion data.

See https://developer.apple.com/documentation/bundleresources/information_property_list/NSMotionUsageDescription for more information.

func (*Privacy) NFCRead

func (p *Privacy) NFCRead(desc string) *Privacy

NFCRead specifies a message that tells the user why the app is requesting access to the device’s NFC hardware.

See https://developer.apple.com/documentation/bundleresources/information_property_list/NFCReaderUsageDescription for more information.

func (*Privacy) NetworkVolumes

func (p *Privacy) NetworkVolumes(desc string) *Privacy

NetworkVolumes specifies a message that tells the user why the app needs access to files on a network volume.

See https://developer.apple.com/documentation/bundleresources/information_property_list/NSNetworkVolumesUsageDescription for more information.

func (*Privacy) PhotoLibrary

func (p *Privacy) PhotoLibrary(desc string) *Privacy

PhotoLibrary specifies a message that tells the user why the app is requesting access to the user’s photo library.

See https://developer.apple.com/documentation/bundleresources/information_property_list/NSPhotoLibraryUsageDescription for more information.

func (*Privacy) PhotoLibraryWrite

func (p *Privacy) PhotoLibraryWrite(desc string) *Privacy

PhotoLibraryWrite specifies a message that tells the user why the app is requesting write-only access to the user’s photo library.

See https://developer.apple.com/documentation/bundleresources/information_property_list/NSPhotoLibraryAddUsageDescription for more information.

func (*Privacy) ReadClinicalHealthRecords

func (p *Privacy) ReadClinicalHealthRecords(desc string) *Privacy

ReadClinicalHealthRecords specifies a message to the user that explains why the app requested permission to read clinical records.

See https://developer.apple.com/documentation/bundleresources/information_property_list/NSHealthClinicalHealthRecordsShareUsageDescription for more information.

func (*Privacy) Reminders

func (p *Privacy) Reminders(desc string) *Privacy

Reminders specifies a message that tells the user why the app is requesting access to the user’s reminders.

See https://developer.apple.com/documentation/bundleresources/information_property_list/NSRemindersUsageDescription for more information.

func (*Privacy) RemovableStorage

func (p *Privacy) RemovableStorage(desc string) *Privacy

RemovableStorage specifies a message that tells the user why the app needs access to files on a removable volume.

See https://developer.apple.com/documentation/bundleresources/information_property_list/NSRemovableVolumesUsageDescription for more information.

func (*Privacy) Set

func (p *Privacy) Set(key string, value interface{})

Set a custom privacy related key. This can be used if no built-in method is provided for your key type.

func (*Privacy) Siri

func (p *Privacy) Siri(desc string) *Privacy

Siri specifies a message that tells the user why the app is requesting to send user data to Siri.

See https://developer.apple.com/documentation/bundleresources/information_property_list/NSSiriUsageDescription for more information.

func (*Privacy) SpeechRecognition

func (p *Privacy) SpeechRecognition(desc string) *Privacy

SpeechRecognition specifies a message that tells the user why the app is requesting to send user data to Apple’s speech recognition servers.

See https://developer.apple.com/documentation/bundleresources/information_property_list/NSSpeechRecognitionUsageDescription for more information.

func (*Privacy) SystemAdministration

func (p *Privacy) SystemAdministration(desc string) *Privacy

SystemAdministration specifies a message in macOS that tells the user why the app is requesting to manipulate the system configuration.

See https://developer.apple.com/documentation/bundleresources/information_property_list/NSSystemAdministrationUsageDescription for more information.

func (*Privacy) SystemExtension

func (p *Privacy) SystemExtension(desc string) *Privacy

SystemExtension specifies 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 for more information.

func (*Privacy) TVProviderAccess

func (p *Privacy) TVProviderAccess(desc string) *Privacy

TVProviderAccess specifies a message that tells the user why the app is requesting access to the user’s TV provider account.

See https://developer.apple.com/documentation/bundleresources/information_property_list/NSVideoSubscriberAccountUsageDescription for more information.

type PropertyList

type PropertyList struct {
	// contains filtered or unexported fields
}

PropertyList is a functional builder for your Info.plist. With a `PropertyList` struct you can easily declare your properties, device capabilities, privacy settings and more and quickly generate a string or write your property list to a file.

This struct also contains help methods to populate default properties to save you time. PropertyList implements `io.Writer`.

func New

func New(platform Platform) *PropertyList

New returns a new plist.PropertyList builder.

func (*PropertyList) AppTransportSecurity

func (p *PropertyList) AppTransportSecurity(f func(s *AppTransportSecurity)) *PropertyList

AppTransportSecurity allows you to specify App Transport Security (ATS). See https://developer.apple.com/documentation/bundleresources/information_property_list/NSAppTransportSecurity for more information.

func (*PropertyList) Build

func (p *PropertyList) Build() (string, error)

Build will build the Info.plist

func (*PropertyList) BundleID

func (p *PropertyList) BundleID(id string) *PropertyList

BundleID specifies an identifier string that specifies the app type of the bundle. The string should be in reverse DNS format using only the Roman alphabet in upper and lower case (A–Z, a–z), the dot (“.”), and the hyphen (“-”). See https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102070 for details.

func (*PropertyList) BundleName

func (p *PropertyList) BundleName(v string) *PropertyList

BundleName specifies a user-visible short name for the bundle. See https://developer.apple.com/documentation/bundleresources/information_property_list/CFBundleName for more information.

func (*PropertyList) Capabilities

func (p *PropertyList) Capabilities(f func(c *DeviceCapabilities)) *PropertyList

Capabilities specifies the device-related features that your app requires to run. This is a required field. See https://developer.apple.com/documentation/bundleresources/information_property_list/uirequireddevicecapabilities for more information.

func (*PropertyList) Defaults

func (p *PropertyList) Defaults()

Defaults specifies a set of property list defaults for mobile devices. A list of the specified defaults can be found below:

 plist.DevelopmentRegion("$(DEVELOPMENT_LANGUAGE)")
 plist.BundleID("$(PRODUCT_BUNDLE_IDENTIFIER)")
 plist.ExecutableFile("$(EXECUTABLE_NAME)")
 plist.InfoDictionaryVersion("6.0")
 plist.PackageType("APPLE")
 plist.VersionShort("$(MARKETING_VERSION)")
 plist.Version("1")
 plist.RequiresIOS()
 plist.MainStoryboard("Main")
 plist.ViewControllerBasedStatusBarAppearance(true)
 plist.StatusBarStyleDefault()
 plist.AppTransportSecurity(func(s *AppTransportSecurity) {
	 s.AllowArbitraryLoads(true)
 })

func (*PropertyList) DevelopmentRegion

func (p *PropertyList) DevelopmentRegion(v string) *PropertyList

DevelopmentRegion specifies the default language and region for the bundle, as a language ID. See https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundledevelopmentregion for more information.

func (*PropertyList) DisplayName

func (p *PropertyList) DisplayName(n string) *PropertyList

DisplayName specifies the user-visible name of the bundle; used by Siri and visible on the Home screen in iOS. See https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-110725 for details.

func (*PropertyList) ExecutableFile

func (p *PropertyList) ExecutableFile(v string) *PropertyList

ExecutableFile specifies the name of the bundle’s executable file. See https://developer.apple.com/documentation/bundleresources/information_property_list/CFBundleExecutable for more information.

func (*PropertyList) InfoDictionaryVersion

func (p *PropertyList) InfoDictionaryVersion(v string) *PropertyList

InfoDictionaryVersion sets the current version of the Information Property List structure. See https://developer.apple.com/documentation/bundleresources/information_property_list/CFBundleInfoDictionaryVersion for more information.

func (*PropertyList) LaunchScreenStoryboard

func (p *PropertyList) LaunchScreenStoryboard(storyboard string) *PropertyList

LaunchScreenStoryboard specifies the filename of the storyboard from which to generate the app’s launch image.

func (*PropertyList) MainStoryboard

func (p *PropertyList) MainStoryboard(storyboard string) *PropertyList

MainStoryboard specifies the name of the app's main storyboard file. See https://developer.apple.com/documentation/bundleresources/information_property_list/uimainstoryboardfile for more information.

func (*PropertyList) Orientations

func (p *PropertyList) Orientations(f func(o *Orientations)) *PropertyList

Orientations allows you to specify the initial orientation of the app’s user interface.

func (*PropertyList) PackageType

func (p *PropertyList) PackageType(v string) *PropertyList

PackageType specifies the type of bundle. See https://developer.apple.com/documentation/bundleresources/information_property_list/CFBundlePackageType for more information.

func (*PropertyList) Privacy

func (p *PropertyList) Privacy(f func(p *Privacy)) *PropertyList

Privacy allows you to specify privacy request text for a variety of device permissions.

func (*PropertyList) RequiresIOS

func (p *PropertyList) RequiresIOS() *PropertyList

RequiresIOS specifies a true boolean value indicating whether the app must run in iOS. See https://developer.apple.com/documentation/bundleresources/information_property_list/LSRequiresIPhoneOS for more information.

func (*PropertyList) SceneManifest

func (p *PropertyList) SceneManifest(f func(m *SceneManifest)) *PropertyList

SceneManifest specifies the scene manifest for the application.

func (*PropertyList) Set

func (p *PropertyList) Set(key string, value interface{}) *PropertyList

Set will set an arbitrary key-value pair in the Info.plist. Key set in this manner will override any keys set by any of the builder functions.

func (*PropertyList) SkipValidation

func (p *PropertyList) SkipValidation() *PropertyList

SkipValidation will skip validation of required fields.

func (*PropertyList) StatusBarHidden

func (p *PropertyList) StatusBarHidden(v bool) *PropertyList

StatusBarHidden specifies a boolean value indicating whether the status bar is initially hidden when the app launches.

func (*PropertyList) StatusBarStyleDarkContent

func (p *PropertyList) StatusBarStyleDarkContent() *PropertyList

StatusBarStyleDarkContent uses a light status bar, intended for use on light backgrounds.

func (*PropertyList) StatusBarStyleDefault

func (p *PropertyList) StatusBarStyleDefault() *PropertyList

StatusBarStyleDefault uses a dark status bar, intended for use on light backgrounds.

func (*PropertyList) StatusBarStyleLightContent

func (p *PropertyList) StatusBarStyleLightContent() *PropertyList

StatusBarStyleLightContent uses a light status bar, intended for use on dark backgrounds.

func (*PropertyList) TabletOrientations

func (p *PropertyList) TabletOrientations(f func(o *Orientations)) *PropertyList

TabletOrientations allows you to specify the initial orientation of the app’s user interface when running on an iPad.

func (*PropertyList) Validate

func (p *PropertyList) Validate() error

Validate will validate the specified propery list configuration and return relevant and detailed errors for any issues discovered.

func (*PropertyList) Version

func (p *PropertyList) Version(v string) *PropertyList

Version specifies the version of the build that identifies an iteration of the bundle. Should follow semantic versioning. See https://developer.apple.com/documentation/bundleresources/information_property_list/CFBundleVersion for more information.

func (*PropertyList) VersionShort

func (p *PropertyList) VersionShort(v string) *PropertyList

VersionShort specifies the release or version number of the bundle. See https://developer.apple.com/documentation/bundleresources/information_property_list/CFBundleShortVersionString for more information.

func (*PropertyList) ViewControllerBasedStatusBarAppearance

func (p *PropertyList) ViewControllerBasedStatusBarAppearance(v bool) *PropertyList

ViewControllerBasedStatusBarAppearance specifies a boolean value indicating whether the status bar appearance is based on the style preferred for the current view controller. See https://developer.apple.com/documentation/bundleresources/information_property_list/uiviewcontrollerbasedstatusbarappearance for more information.

func (*PropertyList) Write

func (p *PropertyList) Write(w io.Writer) error

Write the property list to the specified io.Writer.

type SceneConfiguration

type SceneConfiguration struct {
	// contains filtered or unexported fields
}

SceneConfiguration describes a UISceneConfiguration which contains information about the objects and storyboard for UKit to use when creating a particular scene. See https://developer.apple.com/documentation/uikit/uisceneconfiguration for more information.

func (*SceneConfiguration) ClassName

func (c *SceneConfiguration) ClassName(v string)

ClassName specifies the name of the scene class you want UIKit to instantiate. See https://developer.apple.com/documentation/bundleresources/information_property_list/uiapplicationscenemanifest/uisceneconfigurations/uiwindowscenesessionroleapplication/uisceneclassname for more information.

func (*SceneConfiguration) DelegateClassName

func (c *SceneConfiguration) DelegateClassName(v string)

DelegateClassName specifies the name of the app-specific class that you want UIKit to instantiate and use as the scene delegate object. See https://developer.apple.com/documentation/bundleresources/information_property_list/uiapplicationscenemanifest/uisceneconfigurations/uiwindowscenesessionroleapplication/uiscenedelegateclassname for more information.

func (*SceneConfiguration) Storyboard

func (c *SceneConfiguration) Storyboard(v string)

Storyboard specifies the name of the storyboard file containing the scene's initial user interface. See https://developer.apple.com/documentation/bundleresources/information_property_list/uiapplicationscenemanifest/uisceneconfigurations/uiwindowscenesessionroleapplication/uiscenestoryboardfile for more information.

func (*SceneConfiguration) Validate

func (c *SceneConfiguration) Validate() error

Validate will validate the SceneConfiguration, returning any errors.

type SceneManifest

type SceneManifest struct {
	// contains filtered or unexported fields
}

SceneManifest contains configuration information about the app's scene-based life-cycle support.

func (*SceneManifest) Application

func (m *SceneManifest) Application(f func(c *SceneConfiguration))

Application specifies the scenes that you use to display content on the device's main screen and respond to user interactions. See https://developer.apple.com/documentation/bundleresources/information_property_list/uiapplicationscenemanifest/uisceneconfigurations/uiwindowscenesessionroleapplication for more information.

func (*SceneManifest) Apply

func (m *SceneManifest) Apply(p *PropertyList)

Apply will apply the scene manifest to the specified PropertyList.

func (*SceneManifest) ExternalDisplay

func (m *SceneManifest) ExternalDisplay(f func(c *SceneConfiguration))

ExternalDisplay specifies the scenes that you use to display content on an externally connected display. See https://developer.apple.com/documentation/bundleresources/information_property_list/uiapplicationscenemanifest/uisceneconfigurations/uiwindowscenesessionroleexternaldisplay for more information.

func (*SceneManifest) MultipleWindows

func (m *SceneManifest) MultipleWindows(v bool)

MultipleWindows specifies a boolean value indicating whether the app supports two or more scenes simultaneously. See https://developer.apple.com/documentation/bundleresources/information_property_list/uiapplicationscenemanifest/uiapplicationsupportsmultiplescenes for more information.

func (*SceneManifest) Validate

func (m *SceneManifest) Validate() error

Validate will validate the SceneManifest configuration and return any errors found.

Jump to

Keyboard shortcuts

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