Fix subscription screen hanging on "Loading Subscription"
The .containerRelativeFrame(.horizontal) on the marketing content caused an infinite layout loop inside SubscriptionStoreView's scroll container. Replaced with .frame(maxWidth: .infinity). Also fixes leading space in StoreKit config display name, adds debug logging to product loading, and reverts to groupID initializer. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -266,11 +266,17 @@ class IAPManager: ObservableObject {
|
||||
// MARK: - Private Methods
|
||||
|
||||
private func loadProducts() async {
|
||||
AppLogger.iap.info("loadProducts() called — requesting: \(Self.productIdentifiers.sorted().joined(separator: ", "))")
|
||||
do {
|
||||
let products = try await Product.products(for: Self.productIdentifiers)
|
||||
AppLogger.iap.info("loadProducts() returned \(products.count) products total")
|
||||
for product in products {
|
||||
AppLogger.iap.info(" Product: \(product.id) — type: \(product.type.rawValue), displayName: \(product.displayName), price: \(product.displayPrice)")
|
||||
}
|
||||
availableProducts = products.filter { $0.type == .autoRenewable }
|
||||
AppLogger.iap.info("loadProducts() filtered to \(self.availableProducts.count) autoRenewable products")
|
||||
} catch {
|
||||
AppLogger.iap.error("Failed to load products: \(error.localizedDescription)")
|
||||
AppLogger.iap.error("loadProducts() FAILED: \(error.localizedDescription) — full error: \(String(describing: error))")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user