diff --git a/Sources/SignHereLibrary/Commands/CreateProvisioningProfileCommand.swift b/Sources/SignHereLibrary/Commands/CreateProvisioningProfileCommand.swift index d82c7dc..eae3027 100644 --- a/Sources/SignHereLibrary/Commands/CreateProvisioningProfileCommand.swift +++ b/Sources/SignHereLibrary/Commands/CreateProvisioningProfileCommand.swift @@ -286,7 +286,7 @@ internal struct CreateProvisioningProfileCommand: ParsableCommand { certificateSigningRequestSubject: try container.decode(String.self, forKey: .certificateSigningRequestSubject), bundleIdentifierName: try container.decodeIfPresent(String.self, forKey: .bundleIdentifierName), platform: try container.decode(String.self, forKey: .platform), - profileName: try container.decode(String.self, forKey: .profileName) + profileName: try container.decodeIfPresent(String.self, forKey: .profileName) ) } diff --git a/Tests/SignHereLibraryTests/CreateProvisioningProfileCommandTests.swift b/Tests/SignHereLibraryTests/CreateProvisioningProfileCommandTests.swift index 6ca9190..de10048 100644 --- a/Tests/SignHereLibraryTests/CreateProvisioningProfileCommandTests.swift +++ b/Tests/SignHereLibraryTests/CreateProvisioningProfileCommandTests.swift @@ -161,7 +161,8 @@ final class CreateProvisioningProfileCommandTests: XCTestCase { "opensslPath": "/opensslPath", "certificateSigningRequestSubject": "certificateSigningRequestSubject", "bundleIdentifierName": "bundleIdentifierName", - "platform": "platform" + "platform": "platform", + "profileName": "profileName" } """.utf8) @@ -181,6 +182,7 @@ final class CreateProvisioningProfileCommandTests: XCTestCase { XCTAssertEqual(subject.outputPath, "/outputPath") XCTAssertEqual(subject.bundleIdentifierName, "bundleIdentifierName") XCTAssertEqual(subject.platform, "platform") + XCTAssertEqual(subject.profileName, "profileName") } func test_execute_alreadyActiveCertificate() throws { diff --git a/Tests/SignHereLibraryTests/iTunesConnectServiceTests.swift b/Tests/SignHereLibraryTests/iTunesConnectServiceTests.swift index 26e0dea..cb59d5b 100644 --- a/Tests/SignHereLibraryTests/iTunesConnectServiceTests.swift +++ b/Tests/SignHereLibraryTests/iTunesConnectServiceTests.swift @@ -568,7 +568,7 @@ final class iTunesConnectServiceTests: XCTestCase { certificateId: "certificateId", deviceIDs: .init(["deviceId"]), profileType: "profileType", - profileName: "profileName" + profileName: nil ) // THEN @@ -598,7 +598,7 @@ final class iTunesConnectServiceTests: XCTestCase { certificateId: "certificateId", deviceIDs: .init(["deviceId"]), profileType: "IOS_APP_STORE", - profileName: "profileName" + profileName: nil ) // THEN @@ -627,7 +627,7 @@ final class iTunesConnectServiceTests: XCTestCase { certificateId: "certificateId", deviceIDs: .init(["deviceId"]), profileType: "profileType", - profileName: "profileName" + profileName: nil )) { if case iTunesConnectServiceImp.Error.unableToDecodeResponse = $0 { return