diff --git a/SwiftyStoreKit-iOS-Demo/AppDelegate.swift b/SwiftyStoreKit-iOS-Demo/AppDelegate.swift index dead48c4..fdcc85b6 100644 --- a/SwiftyStoreKit-iOS-Demo/AppDelegate.swift +++ b/SwiftyStoreKit-iOS-Demo/AppDelegate.swift @@ -42,7 +42,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate { SwiftyStoreKit.completeTransactions(atomically: true) { purchases in for purchase in purchases { - // swiftlint:disable:next for_where if purchase.transaction.transactionState == .purchased || purchase.transaction.transactionState == .restored { if purchase.needsFinishTransaction { diff --git a/SwiftyStoreKit-macOS-Demo/AppDelegate.swift b/SwiftyStoreKit-macOS-Demo/AppDelegate.swift index 285e2bd3..e42af1cb 100644 --- a/SwiftyStoreKit-macOS-Demo/AppDelegate.swift +++ b/SwiftyStoreKit-macOS-Demo/AppDelegate.swift @@ -38,7 +38,6 @@ class AppDelegate: NSObject, NSApplicationDelegate { SwiftyStoreKit.completeTransactions(atomically: true) { purchases in for purchase in purchases { - // swiftlint:disable:next for_where if purchase.transaction.transactionState == .purchased || purchase.transaction.transactionState == .restored { if purchase.needsFinishTransaction { diff --git a/SwiftyStoreKitTests/InAppReceiptVerificatorTests.swift b/SwiftyStoreKitTests/InAppReceiptVerificatorTests.swift index f0c46aba..2a02f26a 100644 --- a/SwiftyStoreKitTests/InAppReceiptVerificatorTests.swift +++ b/SwiftyStoreKitTests/InAppReceiptVerificatorTests.swift @@ -81,9 +81,9 @@ class InAppReceiptVerificatorTests: XCTestCase { refreshCalled = true return TestInAppReceiptRefreshRequest(receiptProperties: properties, callback: callback) - }) { _ in + }, completion: { _ in - } + }) XCTAssertTrue(refreshCalled) } @@ -100,9 +100,9 @@ class InAppReceiptVerificatorTests: XCTestCase { refreshCalled = true return TestInAppReceiptRefreshRequest(receiptProperties: properties, callback: callback) - }) { _ in + }, completion: { _ in - } + }) XCTAssertTrue(refreshCalled) } @@ -120,9 +120,9 @@ class InAppReceiptVerificatorTests: XCTestCase { refreshCalled = true return TestInAppReceiptRefreshRequest(receiptProperties: properties, callback: callback) - }) { _ in + }, completion: { _ in - } + }) XCTAssertTrue(refreshCalled) } @@ -137,10 +137,10 @@ class InAppReceiptVerificatorTests: XCTestCase { callback(.error(e: refreshError)) return TestInAppReceiptRefreshRequest(receiptProperties: properties, callback: callback) - }) { result in + }, completion: { result in XCTAssertEqual(result, VerifyReceiptResult.error(error: ReceiptError.networkError(error: refreshError))) - } + }) } func testVerifyReceipt_when_appStoreReceiptURLIsNil_refreshCallbackSuccess_receiptDataNotWritten_then_errorNoReceiptData_validateNotCalled() { @@ -152,11 +152,11 @@ class InAppReceiptVerificatorTests: XCTestCase { callback(.success) return TestInAppReceiptRefreshRequest(receiptProperties: properties, callback: callback) - - }) { result in + + }, completion: { result in XCTAssertEqual(result, VerifyReceiptResult.error(error: ReceiptError.noReceiptData)) - } + }) XCTAssertFalse(validator.validateCalled) } @@ -173,10 +173,10 @@ class InAppReceiptVerificatorTests: XCTestCase { callback(.success) return TestInAppReceiptRefreshRequest(receiptProperties: properties, callback: callback) - }) { result in + }, completion: { result in XCTAssertEqual(result, VerifyReceiptResult.error(error: ReceiptError.noReceiptData)) - } + }) XCTAssertFalse(validator.validateCalled) removeReceiptData(at: testReceiptURL) } @@ -194,9 +194,9 @@ class InAppReceiptVerificatorTests: XCTestCase { callback(.success) return TestInAppReceiptRefreshRequest(receiptProperties: properties, callback: callback) - }) { _ in + }, completion: { _ in - } + }) XCTAssertTrue(validator.validateCalled) removeReceiptData(at: testReceiptURL) } @@ -215,9 +215,9 @@ class InAppReceiptVerificatorTests: XCTestCase { XCTFail("refresh should not be called if we already have a receipt") return TestInAppReceiptRefreshRequest(receiptProperties: properties, callback: callback) - }) { _ in + }, completion: { _ in - } + }) XCTAssertTrue(validator.validateCalled) removeReceiptData(at: testReceiptURL) } diff --git a/scripts/install_swiftlint.sh b/scripts/install_swiftlint.sh index 23282a1e..9b6690cf 100755 --- a/scripts/install_swiftlint.sh +++ b/scripts/install_swiftlint.sh @@ -7,7 +7,7 @@ set -e SWIFTLINT_PKG_PATH="/tmp/SwiftLint.pkg" -SWIFTLINT_PKG_URL="https://github.com/realm/SwiftLint/releases/download/0.21.0/SwiftLint.pkg" +SWIFTLINT_PKG_URL="https://github.com/realm/SwiftLint/releases/download/0.22.0/SwiftLint.pkg" wget --output-document=$SWIFTLINT_PKG_PATH $SWIFTLINT_PKG_URL