Skip to content

Commit

Permalink
Fixes #534
Browse files Browse the repository at this point in the history
RecieptItem now conforms to Codable
  • Loading branch information
Sam-Spencer committed May 29, 2020
1 parent e3c7e77 commit 4d81f4e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions SwiftyStoreKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@
};
658A083D1E2EC5120074A98F = {
CreatedOnToolsVersion = 8.2.1;
LastSwiftMigration = 1000;
LastSwiftMigration = 1150;
ProvisioningStyle = Automatic;
TestTargetID = 6502F5FD1B985833004E342D;
};
Expand Down Expand Up @@ -1183,8 +1183,8 @@
PRODUCT_BUNDLE_IDENTIFIER = com.musevisions.iOS.SwiftyStoreKitTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.2;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftyStoreKit_iOSDemo.app/SwiftyStoreKit_iOSDemo";
};
name = Debug;
Expand All @@ -1200,8 +1200,8 @@
PRODUCT_BUNDLE_IDENTIFIER = com.musevisions.iOS.SwiftyStoreKitTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.2;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SwiftyStoreKit_iOSDemo.app/SwiftyStoreKit_iOSDemo";
};
name = Release;
Expand Down
2 changes: 1 addition & 1 deletion SwiftyStoreKit/SwiftyStoreKit+Types.swift
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public enum SubscriptionType {
case nonRenewing(validDuration: TimeInterval)
}

public struct ReceiptItem: Purchased {
public struct ReceiptItem: Purchased, Codable {
// The product identifier of the item that was purchased. This value corresponds to the productIdentifier property of the SKPayment object stored in the transaction’s payment property.
public let productId: String
// The number of items purchased. This value corresponds to the quantity property of the SKPayment object stored in the transaction’s payment property.
Expand Down
2 changes: 1 addition & 1 deletion SwiftyStoreKitTests/InAppReceiptTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import XCTest
import SwiftyStoreKit

// swiftlint:disable file_length
private extension TimeInterval {
var millisecondsNSString: NSString {
return String(format: "%.0f", self * 1000) as NSString
Expand Down Expand Up @@ -107,6 +106,7 @@ extension VerifyPurchaseResult: Equatable {
}
}

// swiftlint:disable file_length
class InAppReceiptTests: XCTestCase {

// MARK: Verify Purchase
Expand Down

0 comments on commit 4d81f4e

Please sign in to comment.