My iOS SwiftUI app has 2 subscription options: Individual and Family. The level of access is the same, the only difference is that Family enables family sharing.
Because the package length cannot be the same for multiple packages, I worked around it by having the Individual subscription on a RC standard Annual length, and Family subscription on a custom length (for more on that, see my other post).
Everything seemed to work fine, but recently (RC update?) I started having the following problem with the Family subscription.
When a user purchases a subscription, I expect the following subscriptionActive value to update, as per RC documentation and sample apps:
class UserViewModel: NSObject, ObservableObject {
static let shared = UserViewModel()
@Published var subscriptionActive: Bool = false
@Published var customerInfo: CustomerInfo? {
didSet {
subscriptionActive = customerInfo?.entitlements[Constants.entitlementID]?.isActive == true
}
}
I could just check if subscriptionActive to control what content to show.
However, the value now ONLY updates when the Individual subscription is purchased (or restored). When the Family subscription is purchased (or restored), subscriptionActive remains FALSE, and the app subsequently behaves as if nothing was purchased. Meanwhile, the App Store sandbox account correctly shows the Family subscription.
Any ideas would be very helpful!