Fix IAP
This commit is contained in:
@@ -272,7 +272,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.1;
|
MARKETING_VERSION = 1.2;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = Team.bookstax;
|
PRODUCT_BUNDLE_IDENTIFIER = Team.bookstax;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
||||||
@@ -303,7 +303,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.1;
|
MARKETING_VERSION = 1.2;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = Team.bookstax;
|
PRODUCT_BUNDLE_IDENTIFIER = Team.bookstax;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
STRING_CATALOG_GENERATE_SYMBOLS = YES;
|
||||||
|
|||||||
@@ -283,8 +283,6 @@ struct SettingsView: View {
|
|||||||
|
|
||||||
@MainActor
|
@MainActor
|
||||||
private struct DonationSection: View {
|
private struct DonationSection: View {
|
||||||
@Environment(\.purchase) private var purchase
|
|
||||||
|
|
||||||
private struct Tier: Identifiable {
|
private struct Tier: Identifiable {
|
||||||
let id: String
|
let id: String
|
||||||
let titleKey: String
|
let titleKey: String
|
||||||
@@ -293,7 +291,7 @@ private struct DonationSection: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private let tiers: [Tier] = [
|
private let tiers: [Tier] = [
|
||||||
Tier(id: "donatepage", titleKey: "settings.donate.page", icon: "doc.text.fill", fallbackPrice: "€0.99"),
|
Tier(id: "doneatepage", titleKey: "settings.donate.page", icon: "doc.text.fill", fallbackPrice: "€0.99"),
|
||||||
Tier(id: "donatebook", titleKey: "settings.donate.book", icon: "book.closed.fill", fallbackPrice: "€4.99"),
|
Tier(id: "donatebook", titleKey: "settings.donate.book", icon: "book.closed.fill", fallbackPrice: "€4.99"),
|
||||||
Tier(id: "donateencyclopaedia", titleKey: "settings.donate.encyclopedia", icon: "books.vertical.fill", fallbackPrice: "€49.99"),
|
Tier(id: "donateencyclopaedia", titleKey: "settings.donate.encyclopedia", icon: "books.vertical.fill", fallbackPrice: "€49.99"),
|
||||||
]
|
]
|
||||||
@@ -348,7 +346,7 @@ private struct DonationSection: View {
|
|||||||
defer { purchasingID = nil }
|
defer { purchasingID = nil }
|
||||||
guard let product = products[productID] else { return }
|
guard let product = products[productID] else { return }
|
||||||
do {
|
do {
|
||||||
let result = try await purchase(product)
|
let result = try await product.purchase()
|
||||||
if case .success(let verification) = result {
|
if case .success(let verification) = result {
|
||||||
if case .verified(let transaction) = verification {
|
if case .verified(let transaction) = verification {
|
||||||
await transaction.finish()
|
await transaction.finish()
|
||||||
|
|||||||
Reference in New Issue
Block a user