Post

Replies

Boosts

Views

Activity

Storekit 2: The subscription expired but the status is always subscribed.
Hello everyone, I'm trying to use Storekit 2 for my application. But I have an issue when checking the expired date. I cancelled the subscription in the setting (Sandbox). After few minutes, the subscription was expired (stop to renew). It's OK. But after I open my app, the status of the subscription still "Subscribed" although the expiredDate was expired. Why the status wouldn't be "Expired"? func updateSubscriptionStatus() async {     do {       guard let product = subscriptions.first,          let statuses = try await product.subscription?.status else {         return       }       for status in statuses {         switch status.state {         case .subscribed:           print("Always enter this case with expired date.")         case .expired:           print("Never enter this case.")         case .revoked:           break         case .inGracePeriod:           break         case .inBillingRetryPeriod:           break         default:           break         }       }     } catch {            }   }
3
0
1.9k
Mar ’22
SwiftUI - ColorPicker - Wheel Size
I'm using ColorPicker. I have a problem with the size of the Wheel. I couldn't change its size, I want it bigger. I'm using Xcode 12.1. Hope that someone can help me. Thank you. struct SwiftUIView: View { 		@State private var bgColor = Color.blue 		var body: some View { 				ColorPicker("Set the background color", selection: $bgColor) 						.frame(width: 300, height: 300, alignment: .center)             .background(bgColor)             .labelsHidden() 		} }
0
0
969
Nov ’20