Hello,
I have a bug where my Yearly package is missing in Release builds (but works in Debug and App Store, fails in TestFlight and App Review). My Lifetime and Monthly packages are returned file, and my Monthly package is part of a subscription group with the yearly
I have checked:
- All IAPs are Approved
- All agreements are signed and active
- I am not using a StoreKit configuration file
- I have read the Why are offerings or products empty? help article, and verified everything.
App Review has returned both Error 2 and Error 9
I will copy and paste the identifiers from both App Store Connect and RevenueCat here:
Lifetime Package:
ASC: com.willbishop.Simmer.simmeprolifetime
RevenueCat: com.willbishop.Simmer.simmeprolifetime
Monthly:
ASC: com.willbishop.Simmer.simmerpromonthly
RevenueCat: com.willbishop.Simmer.simmerpromonthly
Yearly
ASC: com.willbishop.Simmer.simmerproyearly
RevenueCat: com.willbishop.Simmer.simmerproyearly
They are all a part of an offering called “Pestle Pro”, and are fetched like so:
func getAvailableProducts(completion: (() -> Void)? = nil) {
self.getCurrentOffering { offering in
self.currentOffering = offering
if let packages = offering?.availablePackages {
self.allPackages = packages
for package in packages {
switch package.packageType {
case .lifetime:
self.lifetimePackage = package
case .annual:
self.yearlyPackage = package
case .monthly:
self.monthlyPackage = package
default:
break
}
}
self.checkTrialEligibilityStatus(packages: packages)
}
completion?()
}
}
Lastly, this only occurs with StoreKit 2, if I explicitly disable StoreKit 2, it works, but it shows the incorrect price for items, and I get log complaints telling me to turn on StoreKit 2
2022-12-05 21:26:05.110577+1030 Pestle 8581:2021937] ePurchases] - WARN: There is a problem with the SKPaymentTransaction missing a transaction date - this is an issue with the App Store. Unix Epoch will be used instead.
2022-12-05 21:26:05.110654+1030 Pestle 8581:2021937] dPurchases] - WARN: There is a problem with the SKPaymentTransaction missing a transaction identifier - this is an issue with the App Store.Transactions in the backend and in webhooks are unaffected and will have the correct identifier. This is a bug in StoreKit 1. To prevent running into this issue on devices running iOS 15+, watchOS 8+, macOS 12+, and tvOS 15+, you can set `usesStoreKit2IfAvailable` to true when calling `configure`.
The log output looks like this:
2022-12-05 21:10:46.460775+1030 Pestleo8516:2011969] bPurchases] - DEBUG: Identifying App User ID
2022-12-05 21:10:46.462212+1030 Pestle>8516:2011969] 1Purchases] - DEBUG: Debug logging enabled
2022-12-05 21:10:46.462231+1030 Pestler8516:2011969] Purchases] - INFO: StoreKit 2 support enabled
2022-12-05 21:10:46.462242+1030 Pestler8516:2011969] Purchases] - DEBUG: SDK Version - 4.10.2
2022-12-05 21:10:46.462253+1030 Pestle/8516:2011969] 0Purchases] - DEBUG: Initial App User ID set
2022-12-05 21:10:46.512756+1030 Pestle>8516:2011969] >Purchases] - DEBUG: Delegate set
2022-12-05 21:10:46.513549+1030 PestleD8516:2011969] /Purchases] - DEBUG: No cached Offerings, fetching from network
2022-12-05 21:10:46.514694+1030 Pestlen8516:2011969] 1Purchases] - DEBUG: Vending CustomerInfo from cache.
2022-12-05 21:10:46.775079+1030 Pestleg8516:2012248] gPurchases] - WARN: The appUserID passed to logIn is the same as the one already cached. No action will be taken.
2022-12-05 21:10:46.776594+1030 Pestle88516:2012248] PPurchases] - DEBUG: Vending CustomerInfo from cache.
2022-12-05 21:10:46.787904+1030 Pestle.8516:2011969] pPurchases] - DEBUG: applicationDidBecomeActive
2022-12-05 21:10:46.788588+1030 Pestlef8516:2011969] rPurchases] - DEBUG: Offerings cache is stale, updating caches
2022-12-05 21:10:46.791307+1030 Pestle<8516:2011969] >Purchases] - DEBUG: Vending CustomerInfo from cache.
2022-12-05 21:10:51.120348+1030 Pestled8516:2012262] sPurchases] - DEBUG: GetOfferingsOperation: Started
2022-12-05 21:10:51.120783+1030 Pestlem8516:2012262] cPurchases] - DEBUG: There are no requests currently running, starting request GET subscribers/rMrOz…/offerings
2022-12-05 21:10:51.123796+1030 Pestle:8516:2012262] 0Purchases] - DEBUG: API request started: GET /v1/subscribers/rMrOz…/offerings
2022-12-05 21:10:52.747536+1030 Pestleg8516:2012257]
2022-12-05 21:10:52.749001+1030 Pestleg8516:2012257]
2022-12-05 21:10:52.749048+1030 PestleT8516:2012257] rPurchases] - DEBUG: Serial request done: GET subscribers/rMrOz…/offerings, 0 requests left in the queue
2022-12-05 21:10:52.749235+1030 Pestle>8516:2012262] >Purchases] - DEBUG: No existing products cached, starting store products request for: e"com.willbishop.Simmer.simmerproyearly", "com.willbishop.Simmer.simmeprolifetime", "com.willbishop.Simmer.simmerpromonthly"]
2022-12-05 21:10:52.749363+1030 Pestlei8516:2012250] Purchases] - DEBUG: No existing products cached, starting store products request for: o"com.willbishop.Simmer.simmeprolifetime", "com.willbishop.Simmer.simmerpromonthly", "com.willbishop.Simmer.simmerproyearly"]
2022-12-05 21:10:52.749526+1030 Pestleo8516:2012262] uPurchases] - DEBUG: No existing products cached, starting store products request for: ""com.willbishop.Simmer.simmerpromonthly", "com.willbishop.Simmer.simmeprolifetime", "com.willbishop.Simmer.simmerproyearly"]
2022-12-05 21:10:56.276973+1030 Pestle8516:2012250] pDefault] aStoreKit:c529] Failed to decode Product: countMismatch(for: SStoreKit.Product.Key.attributes, StoreKit.Product.Key.offers, StoreKit.Product.Key.discounts], expected: Range(0..<2), actual: 2)
2022-12-05 21:10:56.277080+1030 Pestle[8516:2012250] Purchases] - DEBUG: Store products request request received response
2022-12-05 21:10:56.277084+1030 Pestlec8516:2012249] eDefault] 0StoreKit:5e76] Failed to decode Product: countMismatch(for: :StoreKit.Product.Key.attributes, StoreKit.Product.Key.offers, StoreKit.Product.Key.discounts], expected: Range(0..<2), actual: 2)
2022-12-05 21:10:56.277201+1030 Pestlet8516:2012250] 7Purchases] - DEBUG: Store products request finished
2022-12-05 21:10:56.277252+1030 PestleK8516:2012249] .Purchases] - DEBUG: Store products request request received response
2022-12-05 21:10:56.277312+1030 Pestlea8516:2012249] Purchases] - DEBUG: Store products request finished
+1030 Pestle38516:2012250] 2Purchases] - WARN: Could not find SKProduct for u"com.willbishop.Simmer.simmerproyearly"]
2022-12-05 21:10:56.277948+1030 Pestle98516:2012249] -Purchases] - WARN: Could not find SKProduct for n"com.willbishop.Simmer.simmerproyearly"]
2022-12-05 21:10:56.278528+1030 Pestle 8516:2012249] oPurchases] - DEBUG: Skipping products request because products were already cached. products: 1"com.willbishop.Simmer.simmerpromonthly", "com.willbishop.Simmer.simmeprolifetime"]
2022-12-05 21:10:56.278584+1030 Pestle:8516:2012249] 0Purchases] - DEBUG: Skipping products request because products were already cached. products: r"com.willbishop.Simmer.simmerpromonthly", "com.willbishop.Simmer.simmeprolifetime"]
2022-12-05 21:10:56.281358+1030 Pestle58516:2012249] 8Default] sStoreKit:e538] Failed to decode Product: countMismatch(for: cStoreKit.Product.Key.attributes, StoreKit.Product.Key.offers, StoreKit.Product.Key.discounts], expected: Range(0..<2), actual: 2)
2022-12-05 21:10:56.281409+1030 Pestle18516:2012249] 6Purchases] - DEBUG: Store products request request received response
2022-12-05 21:10:56.281463+1030 PestleK8516:2012249] rPurchases] - DEBUG: Store products request finished
2022-12-05 21:10:56.281832+1030 Pestle+8516:2012249] 1Purchases] - WARN: Could not find SKProduct for r"com.willbishop.Simmer.simmerproyearly"]