Skip to content

Commit a892ff0

Browse files
authored
Merge pull request #13 from adincebic/adin/modernize-package
Add 'ProvisionsAllDevices key' to provisioning profile and raise swift-tools version to 5.5.
2 parents 0503ca4 + 7b2f463 commit a892ff0

File tree

4 files changed

+10
-13
lines changed

4 files changed

+10
-13
lines changed

Package.swift

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,17 @@
1-
// swift-tools-version:4.0
1+
// swift-tools-version:5.5
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33

44
import PackageDescription
55

66
let package = Package(
77
name: "SwiftyProvisioningProfile",
8+
platforms: [.macOS(.v10_13)],
89
products: [
9-
// Products define the executables and libraries produced by a package, and make them visible to other packages.
1010
.library(
1111
name: "SwiftyProvisioningProfile",
1212
targets: ["SwiftyProvisioningProfile"]),
1313
],
14-
dependencies: [
15-
// Dependencies declare other packages that this package depends on.
16-
// .package(url: /* package url */, from: "1.0.0"),
17-
],
1814
targets: [
19-
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
20-
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
2115
.target(
2216
name: "SwiftyProvisioningProfile",
2317
dependencies: []),

Sources/SwiftyProvisioningProfile/Model/ProvisioningProfile.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public struct ProvisioningProfile: Codable, Equatable {
1717
case expirationDate = "ExpirationDate"
1818
case name = "Name"
1919
case provisionedDevices = "ProvisionedDevices"
20+
case provisionsAllDevices = "ProvisionsAllDevices"
2021
case teamIdentifiers = "TeamIdentifier"
2122
case teamName = "TeamName"
2223
case timeToLive = "TimeToLive"
@@ -39,7 +40,7 @@ public struct ProvisioningProfile: Codable, Equatable {
3940
/// The array of Base64 encoded developer certificates
4041
public var developerCertificates: [DeveloperCertificate]
4142

42-
/// The key value pair of entitlements assosciated with this profile
43+
/// The key value pair of entitlements associated with this profile
4344
public var entitlements: [String: PropertyListDictionaryValue]
4445

4546
/// The date in which this profile will expire
@@ -51,6 +52,9 @@ public struct ProvisioningProfile: Codable, Equatable {
5152
/// An array of device UUIDs that are provisioned on this profile
5253
public var provisionedDevices: [String]?
5354

55+
/// A key indicating whether the profile provisions all devices. This is present when profile is generated for enterprise distribution.
56+
public var provisionsAllDevices: Bool?
57+
5458
/// An array of team identifier of which this profile belongs to
5559
public var teamIdentifiers: [String]
5660

Sources/SwiftyProvisioningProfile/SwiftyCertificate.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,16 @@
66
//
77

88
import Foundation
9-
import Security
109

1110
public extension Certificate {
1211

13-
public enum ParseError: Error {
12+
enum ParseError: Error {
1413
case failedToCreateCertificate
1514
case failedToCreateTrust
1615
case failedToExtractValues
1716
}
1817

19-
public static func parse(from data: Data) throws -> Certificate {
18+
static func parse(from data: Data) throws -> Certificate {
2019
let certificate = try getSecCertificate(data: data)
2120

2221
var error: Unmanaged<CFError>?

Sources/SwiftyProvisioningProfile/SwiftyProvisioningProfile.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Foundation
66

77
public extension ProvisioningProfile {
88

9-
public enum ParseError: Error {
9+
enum ParseError: Error {
1010
case failedToCreateDecoder
1111
case failedToCreateData
1212
}

0 commit comments

Comments
 (0)