-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds purchase(_:) and restorePurchases()
- Loading branch information
Showing
16 changed files
with
333 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,5 +18,5 @@ let sdkVersion = """ | |
*/ | ||
|
||
let sdkVersion = """ | ||
3.9.1 | ||
3.10.0 | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
Sources/SuperwallKit/StoreKit/Purchases/ExternalPurchasing.swift
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
Sources/SuperwallKit/StoreKit/Transactions/Purchasing/PurchaseSource.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// PurchaseSource.swift | ||
// SuperwallKit | ||
// | ||
// Created by Yusuf Tör on 01/10/2024. | ||
// | ||
|
||
/// The source of the purchase initiation. | ||
enum PurchaseSource { | ||
/// The purchase was initiated internally by the SDK. | ||
case `internal`(String, PaywallViewController) | ||
|
||
/// The purchae was initiated externally by the user calling ``Superwall/purchase(_:)-7gwwe``. | ||
case external(StoreProduct) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
Sources/SuperwallKit/StoreKit/Transactions/Purchasing/SavedTransaction.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// | ||
// SavedTransaction.swift | ||
// SuperwallKit | ||
// | ||
// Created by Yusuf Tör on 01/10/2024. | ||
// | ||
|
||
import Foundation | ||
|
||
/// The transaction to save to storage. | ||
struct SavedTransaction: Codable, Hashable { | ||
/// The transaction id. | ||
let id: String | ||
|
||
/// The date the transaction was created. | ||
let date: Date | ||
|
||
/// Whether or not the developer is using a purchase controller. | ||
let hasExternalPurchaseController: Bool | ||
|
||
/// Indicates whether the purchase was initiated externally via the | ||
/// developer rather than internally via the SDK. | ||
let isExternal: Bool | ||
} |
Oops, something went wrong.