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 {
}
}
Post
Replies
Boosts
Views
Activity
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()
		}
}