diff --git a/Package.swift b/Package.swift index f2a93ec..07e0e23 100644 --- a/Package.swift +++ b/Package.swift @@ -8,13 +8,13 @@ let package = Package( platforms: [ .macOS(SupportedPlatform.MacOSVersion.v10_10), .iOS(SupportedPlatform.IOSVersion.v9), - .tvOS(SupportedPlatform.TVOSVersion.v9), + .tvOS(SupportedPlatform.TVOSVersion.v9) ], products: [ // Products define the executables and libraries a package produces, and make them visible to other packages. .library( name: "MobileProvision", - targets: ["MobileProvision"]), + targets: ["MobileProvision"]) ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. @@ -25,7 +25,7 @@ let package = Package( .testTarget( name: "MobileProvisionTests", dependencies: ["MobileProvision"], - resources: [.process("Test.mobileprovision")]), + resources: [.process("Test.mobileprovision")]) ], swiftLanguageVersions: [.v5] ) diff --git a/Sources/MobileProvision/Entitlements.swift b/Sources/MobileProvision/Entitlements.swift index e2c2103..52cca77 100644 --- a/Sources/MobileProvision/Entitlements.swift +++ b/Sources/MobileProvision/Entitlements.swift @@ -20,102 +20,102 @@ extension MobileProvision { // MARK: - Topic: Authentication /// A Boolean value that indicates whether the app may, with user permission, provide user names and passwords for AutoFill in Safari and other apps. - public var developerAuthenticationServicesAutofillCredentialProvider: Bool? = nil + public var developerAuthenticationServicesAutofillCredentialProvider: Bool? /// An entitlement that lets your app use Sign in with Apple. - public var developerApplesignin: Array? = nil + public var developerApplesignin: Array? // MARK: - Topic: App Clips /// A list of parent application identifiers for an app clip with exactly one entry. - public var developerParentApplicationIdentifiers: Array? = nil + public var developerParentApplicationIdentifiers: Array? /// A Boolean value that indicates whether a bundle represents an app clip. - public var developerOnDemandInstallCapable: Bool? = nil + public var developerOnDemandInstallCapable: Bool? // MARK: - Topic: Contacts /// A Boolean value that indicates whether the app may access the notes stored in contacts. - public var developerContactsNotes: Bool? = nil + public var developerContactsNotes: Bool? // MARK: - Topic: Education /// The ClassKit development or production environment for an education app that works with the Schoolwork app. - public var developerClasskitEnvironment: String? = nil + public var developerClasskitEnvironment: String? /// A Boolean value that indicates whether an app may create an assessment session. - public var developerAutomaticAssessmentConfiguration: Bool? = nil + public var developerAutomaticAssessmentConfiguration: Bool? // MARK: - Topic: Exposure Notification /// A Boolean value that indicates whether the app may use exposure notification. - public var developerExposureNotification: Bool? = nil + public var developerExposureNotification: Bool? // MARK: - Topic: Games /// A Boolean value that indicates whether users of the app may see and compare achievements on a leaderboard, invite friends, and start multiplayer games. - public var developerGameCenter: Bool? = nil + public var developerGameCenter: Bool? // MARK: - Topic: Health /// A Boolean value that indicates whether the app may request user authorization to access health and activity data that appears in the Health app. - public var developerHealthkit: Bool? = nil + public var developerHealthkit: Bool? /// Health data types that require additional permission. - public var developerHealthkitAccess: Array? = nil + public var developerHealthkitAccess: Array? // MARK: - Topic: Home Automation /// A Boolean value that indicates whether users of the app may manage HomeKit-compatible accessories. - public var developerHomekit: Bool? = nil + public var developerHomekit: Bool? // MARK: - Topic: Hypervisor /// A boolean that indicates whether the app creates and manages virtual machines. - public var vmHypervisor: Bool? = nil + public var vmHypervisor: Bool? /// A boolean that indicates whether the app captures USB devices and uses them in the guest operating system. - public var vmDeviceAccess: Bool? = nil + public var vmDeviceAccess: Bool? /// A boolean that indicates whether the app manages virtual network interfaces without escalating privileges to the root user. - public var vmNetworking: Bool? = nil + public var vmNetworking: Bool? // MARK: - Topic: iCloud /// The container identifiers for the iCloud development environment. - public var developerIcloudContainerDevelopmentContainerIdentifiers: Array? = nil + public var developerIcloudContainerDevelopmentContainerIdentifiers: Array? /// The development or production environment to use for the iCloud containers. /// Note. Apple's documentation says that the type of value is `String`, which is actually an `Array of strings`. /// https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_icloud-container-environment - public var developerIcloudContainerEnvironment: Array? = nil + public var developerIcloudContainerEnvironment: Array? /// The container identifiers for the iCloud production environment. - public var developerIcloudContainerIdentifiers: Array? = nil + public var developerIcloudContainerIdentifiers: Array? /// The iCloud services used by the app. /// Note. Apple's documentation: `Array of strings`,Test result: `String`. /// https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_icloud-container-environment - public var developerIcloudServices: String? = nil + public var developerIcloudServices: String? /// The container identifier to use for iCloud key-value storage. - public var developerUbiquityKvstoreIdentifier: String? = nil + public var developerUbiquityKvstoreIdentifier: String? // MARK: - Topic: Networking /// The APIs an app can use to customize networking features. - public var developerNetworkingNetworkextension: Array? = nil + public var developerNetworkingNetworkextension: Array? /// The API an app can use to create and control a custom system VPN configuration. - public var developerNetworkingVpnApi: Array? = nil + public var developerNetworkingVpnApi: Array? /// The associated domains for specific services, such as shared web credentials and universal links. /// Note. Apple's document: `Array of strings`; Test result: `String` /// https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_associated-domains - public var developerAssociatedDomains: String? = nil + public var developerAssociatedDomains: String? /// DESC - public var developerAssociatedDomainsApplinksReadWrite: Bool? = nil + public var developerAssociatedDomainsApplinksReadWrite: Bool? // MARK: - Topic: Push Notifications @@ -123,105 +123,105 @@ extension MobileProvision { public var apsEnvironment: Environment /// The environment for push notifications in macOS apps. - public var developerApsEnvironment: String? = nil + public var developerApsEnvironment: String? // MARK: - Topic: Essentials /// A Boolean value that indicates whether the app may use access control technology to contain damage to the system and user data if an app is compromised. - public var securityAppSandbox: Bool? = nil + public var securityAppSandbox: Bool? // MARK: - Topic: Network /// A Boolean value indicating whether your app may listen for incoming network connections. - public var securityNetworkServer: Bool? = nil + public var securityNetworkServer: Bool? /// A Boolean value indicating whether your app may open outgoing network connections. - public var securityNetworkClient: Bool? = nil + public var securityNetworkClient: Bool? // MARK: - Topic: Hardware /// A Boolean value that indicates whether the app may capture movies and still images using the built-in camera. - public var securityDeviceCamera: Bool? = nil + public var securityDeviceCamera: Bool? /// A Boolean value that indicates whether the app may use the microphone. - public var securityDeviceMicrophone: Bool? = nil + public var securityDeviceMicrophone: Bool? /// A Boolean value indicating whether your app may interact with USB devices. - public var securityDeviceUsb: Bool? = nil + public var securityDeviceUsb: Bool? /// A Boolean value indicating whether your app may print a document. - public var securityPrint: Bool? = nil + public var securityPrint: Bool? /// A Boolean value indicating whether your app may interact with Bluetooth devices. - public var securityDeviceBluetooth: Bool? = nil + public var securityDeviceBluetooth: Bool? // MARK: - Topic: App Data /// A Boolean value that indicates whether the app may have read-write access to contacts in the user's address book. - public var securityPersonalInformationAddressbook: Bool? = nil + public var securityPersonalInformationAddressbook: Bool? /// A Boolean value that indicates whether the app may access location information from Location Services. - public var securityPersonalInformationLocation: Bool? = nil + public var securityPersonalInformationLocation: Bool? /// A Boolean value that indicates whether the app may have read-write access to the user's calendar. - public var securityPersonalInformationCalendars: Bool? = nil + public var securityPersonalInformationCalendars: Bool? // MARK: - Topic: File Access /// A Boolean value that indicates whether the app may have read-write access to files the user has selected using an Open or Save dialog. - public var securityFilesUserSelectedReadWrite: Bool? = nil + public var securityFilesUserSelectedReadWrite: Bool? /// A Boolean value that indicates whether the app may have read-only access to the Downloads folder. - public var securityFilesDownloadsReadOnly: Bool? = nil + public var securityFilesDownloadsReadOnly: Bool? /// A Boolean value that indicates whether the app may have read-write access to the Downloads folder. - public var securityFilesDownloadsReadWrite: Bool? = nil + public var securityFilesDownloadsReadWrite: Bool? /// A Boolean value that indicates whether the app may have read-only access to the Pictures folder. - public var securityAssetsPicturesReadOnly: Bool? = nil + public var securityAssetsPicturesReadOnly: Bool? /// A Boolean value that indicates whether the app may have read-write access to the Pictures folder. - public var securityAssetsPicturesReadWrite: Bool? = nil + public var securityAssetsPicturesReadWrite: Bool? /// A Boolean value that indicates whether the app may have read-only access to the Music folder. - public var securityAssetsMusicReadOnly: Bool? = nil + public var securityAssetsMusicReadOnly: Bool? /// A Boolean value that indicates whether the app may have read-write access to the Music folder. - public var securityAssetsMusicReadWrite: Bool? = nil + public var securityAssetsMusicReadWrite: Bool? /// A Boolean value that indicates whether the app may have read-only access to the Movies folder. - public var securityAssetsMoviesReadOnly: Bool? = nil + public var securityAssetsMoviesReadOnly: Bool? /// A Boolean value that indicates whether the app may have read-write access to the Movies folder. - public var securityAssetsMoviesReadWrite: Bool? = nil + public var securityAssetsMoviesReadWrite: Bool? /// A Boolean value that indicates whether the app may have access to all files. - public var securityFilesAll: Bool? = nil + public var securityFilesAll: Bool? // MARK: - Topic: Runtime Exceptions /// A Boolean value that indicates whether the app may create writable and executable memory using the MAP_JIT flag. - public var securityCsAllowJit: Bool? = nil + public var securityCsAllowJit: Bool? /// A Boolean value that indicates whether the app may create writable and executable memory without the restrictions imposed by using the MAP_JIT flag. - public var securityCsAllowUnsignedExecutableMemory: Bool? = nil + public var securityCsAllowUnsignedExecutableMemory: Bool? /// A Boolean value that indicates whether the app may be affected by dynamic linker environment variables, which you can use to inject code into your app’s process. - public var securityCsAllowDyldEnvironmentVariables: Bool? = nil + public var securityCsAllowDyldEnvironmentVariables: Bool? /// A Boolean value that indicates whether the app may load arbitrary plug-ins or frameworks, without requiring code signing. - public var securityCsDisableLibraryValidation: Bool? = nil + public var securityCsDisableLibraryValidation: Bool? /// A Boolean value that indicates whether to disable all code signing protections while launching an app, and during its execution. - public var securityCsDisableExecutablePageProtection: Bool? = nil + public var securityCsDisableExecutablePageProtection: Bool? /// A Boolean value that indicates whether the app is a debugger and may attach to other processes or get task ports. - public var securityCsDebugger: Bool? = nil + public var securityCsDebugger: Bool? // MARK: - Topic: Resource Access /// A Boolean value that indicates whether the app may record audio using the built-in microphone and access audio input using Core Audio. - public var securityDeviceAudioInput: Bool? = nil + public var securityDeviceAudioInput: Bool? /* The following cases are defined in other sections. @@ -240,119 +240,119 @@ extension MobileProvision { */ /// A Boolean value that indicates whether the app has read-write access to the user's Photos library. - public var securityPersonalInformationPhotosLibrary: Bool? = nil + public var securityPersonalInformationPhotosLibrary: Bool? /// A Boolean value that indicates whether the app may prompt the user for permission to send Apple events to other apps. - public var securityAutomationAppleEvents: Bool? = nil + public var securityAutomationAppleEvents: Bool? // MARK: - Topic: Security /// A list of identifiers specifying the groups your app belongs to. - public var securityApplicationGroups: Array? = nil + public var securityApplicationGroups: Array? /// The identifiers for the keychain groups that the app may share items with. - public var keychainAccessGroups: Array? = nil + public var keychainAccessGroups: Array? /// The level of data protection that encrypts sensitive user data when accessed on some devices. - public var developerDefaultDataProtection: String? = nil + public var developerDefaultDataProtection: String? /// The level of data protection that encrypts sensitive user data when accessed on some devices. - public var developerDevicecheckAppattestEnvironment: String? = nil + public var developerDevicecheckAppattestEnvironment: String? // MARK: - Topic: Siri /// A Boolean value that indicates whether the app handles Siri requests. - public var developerSiri: Bool? = nil + public var developerSiri: Bool? // MARK: - Topic: Essentials /// A Boolean value that indicates whether your app has permission to activate or deactivate system extensions. - public var developerSystemExtensionInstall: Bool? = nil + public var developerSystemExtensionInstall: Bool? /// A Boolean value that indicates whether other development teams may distribute a system extension you create. - public var developerSystemExtensionRedistributable: Bool? = nil + public var developerSystemExtensionRedistributable: Bool? // MARK: - Topic: Endpoint Security /// The entitlement required to monitor system events for potentially malicious activity. - public var developerEndpointSecurityClient: Bool? = nil + public var developerEndpointSecurityClient: Bool? // MARK: - Topic: DriverKit Device Drivers /// A Boolean value that indicates whether your extension has permission to run as a user-space driver. - public var developerDriverkit: Bool? = nil + public var developerDriverkit: Bool? /// A Boolean value indicating whether to match the driver against devices that communicate using networking protocols. - public var developerDriverkitFamilyNetworking: Bool? = nil + public var developerDriverkitFamilyNetworking: Bool? /// A Boolean value that indicates whether to match the driver against devices with serial communication interfaces. - public var developerDriverkitFamilySerial: Bool? = nil + public var developerDriverkitFamilySerial: Bool? /// An array of PCI device descriptors that your custom driver supports. - public var developerDriverkitTransportPci: Array>? = nil + public var developerDriverkitTransportPci: Array>? /// An array of dictionaries that identify the USB devices the driver supports. - public var developerDriverkitTransportUsb: Array>? = nil + public var developerDriverkitTransportUsb: Array>? /// An array of strings that represent driver extensions which may communicate with other DriverKit services. - public var developerDriverkitUserclientAccess: Array? = nil + public var developerDriverkitUserclientAccess: Array? // MARK: - Topic: Human Interface Device Drivers /// A Boolean value that indicates whether the driver provides a HID-related service to the system. - public var developerDriverkitFamilyHidDevice: Bool? = nil + public var developerDriverkitFamilyHidDevice: Bool? /// A Boolean value that indicates whether the driver provides a HID-related event service to the system. - public var developerDriverkitFamilyHidEventservice: Bool? = nil + public var developerDriverkitFamilyHidEventservice: Bool? /// A Boolean value that indicates whether the driver communicates with human interface devices. - public var developerDriverkitTransportHid: Bool? = nil + public var developerDriverkitTransportHid: Bool? /// A Boolean value that indicates whether the driver creates a virtual HID device. - public var developerHidVirtualDevice: Bool? = nil + public var developerHidVirtualDevice: Bool? // MARK: - Topic: System // MARK: - Topic: TV /// The entitlement for distinguishing between multiple user accounts on Apple TV. - public var developerUserManagement: Array? = nil + public var developerUserManagement: Array? // MARK: - Topic: Wallet /// A list of identifiers that specify pass types that your app can access in Wallet. - public var developerPassTypeIdentifiers: Array? = nil + public var developerPassTypeIdentifiers: Array? /// A list of merchant IDs your app uses for Apple Pay support. - public var developerInAppPayments: Array? = nil + public var developerInAppPayments: Array? // MARK: - Topic: NAME /// A Boolean value indicating whether your app can access information about the connected Wi-Fi network. - public var developerNetworkingWifiInfo: Bool? = nil + public var developerNetworkingWifiInfo: Bool? /// A Boolean value indicating whether your app may configure MFi Wi-Fi accessories. - public var externalAccessoryWirelessConfiguration: Bool? = nil + public var externalAccessoryWirelessConfiguration: Bool? /// A Boolean value indicating whether your app may use Multipath protocols to seamlessly transition between Wi-Fi and cellular networks. - public var developerNetworkingMultipath: Bool? = nil + public var developerNetworkingMultipath: Bool? /// A Boolean value indicating whether your app can use the hotspot manager to configure Wi-Fi networks. - public var developerNetworkingHotspotconfiguration: Bool? = nil + public var developerNetworkingHotspotconfiguration: Bool? /// The Near Field Communication data formats an app can read. - public var developerNfcReadersessionFormats: Array? = nil + public var developerNfcReadersessionFormats: Array? // MARK: - Topic: Deprecated Entitlements /// A Boolean value that indicates whether the app may provide directions beyond what Maps supports, such as subway routes, hiking trails, and bike paths. - public var developerMaps: Bool? = nil + public var developerMaps: Bool? /// A Boolean value that indicates whether the app may exchange audio with other Inter-App Audio-enabled apps. - public var interAppAudio: Bool? = nil + public var interAppAudio: Bool? // MARK: - Topic: Network /// A Boolean value indicating whether an app can send or receive IP multicast traffic. - public var developerNetworkingMulticast: Bool? = nil + public var developerNetworkingMulticast: Bool? private enum CodingKeys: String, CodingKey { case developerAuthenticationServicesAutofillCredentialProvider = "com.apple.developer.authentication-services.autofill-credential-provider" diff --git a/Sources/MobileProvision/MobileProvision.swift b/Sources/MobileProvision/MobileProvision.swift index 9d92a34..26734d6 100644 --- a/Sources/MobileProvision/MobileProvision.swift +++ b/Sources/MobileProvision/MobileProvision.swift @@ -74,7 +74,7 @@ extension MobileProvision { } else { var nsExtractedPlist: NSString? guard scanner.scanUpTo(plistEnd, into: &nsExtractedPlist), - let _extractedPlist = nsExtractedPlist as String? else { + let _extractedPlist = nsExtractedPlist as String? else { return nil } diff --git a/Tests/MobileProvisionTests/MobileProvisionTests.swift b/Tests/MobileProvisionTests/MobileProvisionTests.swift index e9008ab..980490c 100644 --- a/Tests/MobileProvisionTests/MobileProvisionTests.swift +++ b/Tests/MobileProvisionTests/MobileProvisionTests.swift @@ -25,6 +25,6 @@ final class MobileProvisionTests: XCTestCase { static var allTests = [ ("testRead", testRead), - ("testReadWith", testReadWith), + ("testReadWith", testReadWith) ] } diff --git a/Tests/MobileProvisionTests/XCTestManifests.swift b/Tests/MobileProvisionTests/XCTestManifests.swift index a23d2d4..8ab5fdc 100644 --- a/Tests/MobileProvisionTests/XCTestManifests.swift +++ b/Tests/MobileProvisionTests/XCTestManifests.swift @@ -3,7 +3,7 @@ import XCTest #if !canImport(ObjectiveC) public func allTests() -> [XCTestCaseEntry] { return [ - testCase(MobileProvisionTests.allTests), + testCase(MobileProvisionTests.allTests) ] } #endif