Skip to content

Commit

Permalink
Merge pull request #13 from adincebic/adin/modernize-package
Browse files Browse the repository at this point in the history
Add 'ProvisionsAllDevices key' to provisioning profile and raise swift-tools version to 5.5.
  • Loading branch information
Sherlouk authored Mar 2, 2025
2 parents 0503ca4 + 7b2f463 commit a892ff0
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
10 changes: 2 additions & 8 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
// swift-tools-version:4.0
// swift-tools-version:5.5
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "SwiftyProvisioningProfile",
platforms: [.macOS(.v10_13)],
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "SwiftyProvisioningProfile",
targets: ["SwiftyProvisioningProfile"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "SwiftyProvisioningProfile",
dependencies: []),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public struct ProvisioningProfile: Codable, Equatable {
case expirationDate = "ExpirationDate"
case name = "Name"
case provisionedDevices = "ProvisionedDevices"
case provisionsAllDevices = "ProvisionsAllDevices"
case teamIdentifiers = "TeamIdentifier"
case teamName = "TeamName"
case timeToLive = "TimeToLive"
Expand All @@ -39,7 +40,7 @@ public struct ProvisioningProfile: Codable, Equatable {
/// The array of Base64 encoded developer certificates
public var developerCertificates: [DeveloperCertificate]

/// The key value pair of entitlements assosciated with this profile
/// The key value pair of entitlements associated with this profile
public var entitlements: [String: PropertyListDictionaryValue]

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

/// A key indicating whether the profile provisions all devices. This is present when profile is generated for enterprise distribution.
public var provisionsAllDevices: Bool?

/// An array of team identifier of which this profile belongs to
public var teamIdentifiers: [String]

Expand Down
5 changes: 2 additions & 3 deletions Sources/SwiftyProvisioningProfile/SwiftyCertificate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@
//

import Foundation
import Security

public extension Certificate {

public enum ParseError: Error {
enum ParseError: Error {
case failedToCreateCertificate
case failedToCreateTrust
case failedToExtractValues
}

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

var error: Unmanaged<CFError>?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Foundation

public extension ProvisioningProfile {

public enum ParseError: Error {
enum ParseError: Error {
case failedToCreateDecoder
case failedToCreateData
}
Expand Down

0 comments on commit a892ff0

Please sign in to comment.