74 questions
13
votes
4
answers
5k
views
StoreKit Configuration File doesn't sync for newly created App in Xcode 16
I created a new App in AppStoreConnect and set subscriptions informations for it.
Then
I open the corresponding project in Xcode 16
Create a new StoreKit Configuration File
Chose to sync with App ...
7
votes
2
answers
1k
views
StoreKit Unable to resubscribe (re-buy) expired subscription
I'm going a bit crazy trying to implement subscriptions into my app through StoreKit 2.
Everything generally works fine the first time, but after a subscription has expired, when I try and re-...
6
votes
1
answer
2k
views
How to deal with StoreKit 2 on Airplane mode or offline?
I'm trying to add/manage my first in-app purchase (non-consumable) on my iOS app and I just discovered that StoreKit 2 doesn't work well offline.
These past days, I used to display (or not) the ...
5
votes
1
answer
803
views
Listen to cancellation/expiration auto-renew Subscriptions with StoreKit 2
I'm implementing a local package for subscriptions with StoreKit 2 but I'm struggling to get my app updated with my latest subscription status when it's expired of cancelled.
I'm starting my manager ...
4
votes
1
answer
430
views
StoreKit2 subscriptionStorePolicyDestination popup view not rendering as expected
Have recently started adapting parts of my app to SwiftUI, and StoreKit2 is solving a lot of problems with its simplicity and ease of implementation.
I've hit an issue with the Privacy Policy and ...
4
votes
3
answers
5k
views
StoreKit 2: how to verify an active subscription?
Many the tutorials around StoreKit 2 and even Apple's own Sample Code reference "StoreKit testing in Xcode so you can build and run the sample app without completing any setup in App Store ...
4
votes
0
answers
1k
views
Not getting Swift StoreKit transaction updates when subscription expires
I'm implementing auto renewable subscriptions with StoreKit 2, but I'm getting transaction updates when a subscription expires. The idea is to update the purchased products when a subscription expires ...
4
votes
0
answers
531
views
StoreKit 2: `try await Product.products` does not finish and does not throw. Can watchOS fetch products on TestFlight builds? iOS works
I am using a class that targets both my iOS as well as my watchOS target - so both use the same code.
If I upload my code to TestFlight, my iPhone is able to fetch the products just fine. However, ...
3
votes
0
answers
343
views
AppTransaction.shared failing on iOS 17
I noticed on iOS 17 that calling AppTransaction.shared fails with following errors. Here is the code:
let result: VerificationResult<AppTransaction> = try await AppTransaction.shared
...
2
votes
0
answers
109
views
Apple IAP "You're All Set" alert doesn't always show
I haven't been able to determine a pattern for when it will show and when it won't. The purchases are all successful though. Behind the scenes, the StoreKit2 returns data showing they've made the ...
2
votes
1
answer
251
views
Storekit Product.products: Failed to decode Product error
I am using the StoreKit 2 Product.products() function to get the subscription products:
do {
let product = try await Product.products(for: ["product_id"])
} catch {
print(error)
}
...
2
votes
1
answer
273
views
StoreKit 2 Sandbox use can't buy the same subscription again
My StoreKit 2 tests flow looks like this:
Buy subscription lvl 1
Buy subscription lvl 2
Buy subscription lvl 1
The problem is that when trying to buy the same subscription again with Sandbox user - ...
1
vote
1
answer
2k
views
StoreKit's isEligibleForIntroOffer returns false
I have two problems:
Product.SubscriptionInfo.isEligibleForIntroOffer always returns true.
product.subscription!.isEligibleForIntroOffer always returns false.
(product is a random Product with ...
1
vote
1
answer
577
views
Deinit Task - Main actor-isolated property 'updateListenerTask' can not be referenced from a nonisolated context
I encountered an error during the deinit process of a class, and I suspect the issue stems from using the @Observable macro. Specifically, I’m getting the following error message:
// TODO: ERROR: Main ...
1
vote
1
answer
248
views
iOS StoreKit 2 how to find `autoRenewProductId` - Value of type 'Product.SubscriptionInfo.RenewalInfo' has no member 'autoRenewProductId'
How to get information about the next product SKU?
I want to get to this information autoRenewProductId, but I can't find any example of how to get there.
I tried to get there by this code:
if let ...
1
vote
0
answers
86
views
Subscription Unavailable in sandbox environment configuration
I'm trying to run app from Xcode on real device with sandbox mode. What I've tried so far:
Locally:
iPhone reset using: Reset All Settings
Developer mode on device is Enabled
Settings > My Name &...
1
vote
1
answer
153
views
Xcode StoreKit Subscription Dialog, how to accept?
I have a macOS app where I am testing the in app subscription purchase using Xcode.
When I trigger the purchase using this code, a dialog is shown in the upper right of my screen, which cannot be ...
1
vote
0
answers
53
views
Does StoreKit 2 cause a memory leak when listening for transactions?
My project currently uses StoreKit2 for in-app purchases, and I use a task to listen to background transactions according to the official guidance:
private func listenForTransactions() -> Task&...
1
vote
0
answers
26
views
Trouble connecting consumable In-App Purchases (IAP) to App Store Connect
Title: Trouble connecting consumable In-App Purchases (IAP) to App Store Connect
I am developing an app with support for In-App Purchases (IAP) for consumable products using StoreKit. I have defined ...
1
vote
0
answers
279
views
Transaction list for IAPs in StoreKit2 always shows two transaction after renewal. Why?
I have an app with one subscription to buy. Buying works fine and renewal seems to work fine, too.
I am observing transaction for this IAPin the background. To understand what is happening in the ...
1
vote
0
answers
476
views
How to interrupt the awaiting in a `for-await` loop / Swift
I'm wondering how to stop a for-await loop from "awaiting".
Here's the loop. I use it to listen to new Transactions with storekit2:
transactionListener = Task(priority: .background) { [...
0
votes
1
answer
251
views
How to check StoreKit 2 actual transaction on TestFlight?
I have consumable purchase in app where user can buy 100 tokens in $2 anytime. I want to test this with actual transaction in that way the money should be deducted from account while testing on ...
0
votes
1
answer
529
views
How to await for StoreKit2 product load?
how can I wait for the result of an async function that loads data for storekit2 in swiftui?
Swift UI Code:
struct SettingsForm : View {
@State var selectedRegion: Int = 0
@State var ...
0
votes
0
answers
29
views
appAccountToken not sent to backend during Apple coupon (reward) redemption using StoreKit 2
I'm integrating Apple In-App Purchases with StoreKit 2 in an iOS app.
The backend (Django) handles subscription verification and links each transaction to a user using appAccountToken.
Everything ...
0
votes
1
answer
68
views
App icon no longer displaying on .manageSubscriptionsSheet in TestFlight
I'm having an issue with my app icon no longer being displayed on my .manageSubscriptions sheet in Testflight. It displays fine on the .manageSubscriptionsSheet in Xcode. However, I've noticed that ...