Skip to content

Commit

Permalink
Merge b7cf6c9 into 081bb3b
Browse files Browse the repository at this point in the history
  • Loading branch information
tylernappy committed Oct 22, 2019
2 parents 081bb3b + b7cf6c9 commit 06bb2d9
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 15 deletions.
4 changes: 2 additions & 2 deletions ButtonMerchant.xcodeproj/project.pbxproj
Expand Up @@ -1534,7 +1534,7 @@
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;
SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
Expand Down Expand Up @@ -1567,7 +1567,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.usebutton.merchant;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;
SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -30,7 +30,7 @@ pod 'ButtonMerchant'

Or, add this to your Cartfile:
```
github "button/button-merchant-ios" ~> 1.0
github "button/button-merchant-ios" "trainline-button"
```

## Author
Expand Down
1 change: 0 additions & 1 deletion Source/ButtonMerchant.swift
Expand Up @@ -189,7 +189,6 @@ extension ButtonMerchant {
This method is deprecated and will be removed in a future version. It is safe to remove your usage of this method.
*/
@available(*, deprecated, message: "No longer supported. You can safely remove your usage of this method.")
@objc public static func trackOrder(_ order: Order, completion: ((Error?) -> Void)? = nil) {
core.trackOrder(order, completion)
}
Expand Down
1 change: 0 additions & 1 deletion Source/Core.swift
Expand Up @@ -140,7 +140,6 @@ final internal class Core: CoreType {
}
}

@available(*, deprecated)
func trackOrder(_ order: Order, _ completion: ((Error?) -> Void)?) {
guard let appId = applicationId, !appId.isEmpty else {
if let completion = completion {
Expand Down
2 changes: 0 additions & 2 deletions Source/Order.swift
Expand Up @@ -211,15 +211,13 @@ final public class Order: NSObject, Codable {
This field is no longer supported and will be removed in a future release.
*/
@available(*, deprecated)
private(set) var amount: Int64 = 0

/**
Deprecated.
If you're migrating to client side order reporting, please use init(id:purchaseDate:lineItems:) instead.
*/
@available(*, deprecated, message: "Use init(id:purchaseDate:lineItems:) instead")
@objc public init(id: String, amount: Int64 = 0, currencyCode: String = "USD") {
self.id = id
self.amount = amount
Expand Down
1 change: 0 additions & 1 deletion Source/TrackOrderBody.swift
Expand Up @@ -44,7 +44,6 @@ internal struct TrackOrderBody: Codable {
case source
}

@available(*, deprecated)
init(system: SystemType,
applicationId: String,
attributionToken: String?,
Expand Down
1 change: 0 additions & 1 deletion Tests/UnitTests/ButtonMerchantTests.swift
Expand Up @@ -146,7 +146,6 @@ class ButtonMerchantTests: XCTestCase {
XCTAssertTrue(testCore.didCallFetchPostInstallURL)
}

@available(*, deprecated)
func testTrackOrderInvokesCoreWithOrder() {
// Arrange
let testSystem = TestSystem()
Expand Down
3 changes: 0 additions & 3 deletions Tests/UnitTests/CoreTests.swift
Expand Up @@ -283,7 +283,6 @@ class CoreTests: XCTestCase {
XCTAssertFalse(core.shouldFetchPostInstallURL)
}

@available(*, deprecated)
func testTrackOrder() {
// Arrange
let expectation = XCTestExpectation(description: "track order")
Expand Down Expand Up @@ -318,7 +317,6 @@ class CoreTests: XCTestCase {
self.wait(for: [expectation], timeout: 2.0)
}

@available(*, deprecated)
func testTrackOrderWithoutAttributionToken() {
// Arrange
let expectation = XCTestExpectation(description: "track order")
Expand Down Expand Up @@ -352,7 +350,6 @@ class CoreTests: XCTestCase {
self.wait(for: [expectation], timeout: 2.0)
}

@available(*, deprecated)
func testTrackOrderError() {
// Arrange
let expectation = XCTestExpectation(description: "track order error")
Expand Down
1 change: 0 additions & 1 deletion Tests/UnitTests/OrderTests.swift
Expand Up @@ -100,7 +100,6 @@ class OrderTests: XCTestCase {
XCTAssertEqual(order.customer, customer)
}

@available(*, deprecated)
func testDictionaryRepresentationIsCorrect_deprecatedInit() {
// Arrange
let id = "derp123"
Expand Down
2 changes: 0 additions & 2 deletions Tests/UnitTests/TrackOrderBodyTests.swift
Expand Up @@ -27,7 +27,6 @@ import XCTest

class TrackOrderBodyTests: XCTestCase {

@available(*, deprecated)
func testInitialization() {
let order = Order(id: "order-abc", amount: 99)
let body = TrackOrderBody(system: TestSystem(),
Expand All @@ -43,7 +42,6 @@ class TrackOrderBodyTests: XCTestCase {
XCTAssertEqual(body.source, "merchant-library")
}

@available(*, deprecated)
func testSerializationToDictionary() {
let order = Order(id: "order-abc", amount: 99)
let body = TrackOrderBody(system: TestSystem(),
Expand Down

0 comments on commit 06bb2d9

Please sign in to comment.