Subscriptions

RSS for tag

Give users access to content, services, or premium features in your app on an ongoing basis with subscriptions, a type of in-app purchase.

Posts under Subscriptions tag

170 Posts

Post

Replies

Boosts

Views

Activity

Sandbox user can't see StoreKit subscriptions
Hi everyone, I’m struggling to get StoreKit 2 to fetch products in my SwiftUI app while using a sandbox user. I think I’ve followed all necessary setup steps in Xcode, App Store Connect, and my physical test device, but Product.products(for:) always returns an empty array. I’d appreciate any insights! What I’ve Done Local App Setup (Xcode 16.2) Created a blank SwiftUI Xcode project. Enabled In-App Purchase capability under Signing & Capabilities. Implemented minimal StoreKit 2 code to fetch available products (see below). Using the correct bundle identifier, which matches App Store Connect. App Store Connect Configuration Registered the app with the same bundle identifier. Created an Auto-Renewable Subscription with: Product ID: v1 (matches my code). All fields filled (pricing, localization, etc.). Status: Ready for Review. Linked the subscription to the latest app version in App Store Connect. Sandbox User & Testing Setup Created a sandbox tester account. Logged in with the sandbox user under Settings → Developer → Sandbox Apple ID. This was on my physical device (iOS 18.2). Installed and ran the app directly from Xcode (⌘+R). Issue: StoreKit Returns No Products Product.products(for:) does not return any products. There are no errors thrown, just an empty array. I confirmed that StoreKit Configuration is set to None in Xcode. No StoreKit-related logs appear in the Console. Code Snippets //StoreKitManager.swift import StoreKit import SwiftUI @MainActor class StoreKitManager: ObservableObject { @Published var products: [Product] = [] @Published var errorMessage: String? func fetchProducts() async { do { let productIDs: Set<String> = ["v1"] // Matches App Store Connect let fetchedProducts = try await Product.products(for: productIDs) print(fetchedProducts) // Debug output DispatchQueue.main.async { self.products = fetchedProducts } } catch { DispatchQueue.main.async { self.errorMessage = "Failed to fetch products: \(error.localizedDescription)" } } } } //ContentView.swift import SwiftUI struct ContentView: View { @StateObject private var storeKitManager = StoreKitManager() var body: some View { VStack { if let errorMessage = storeKitManager.errorMessage { Text(errorMessage).foregroundColor(.red) } else if storeKitManager.products.isEmpty { Text("No products available") } else { List(storeKitManager.products, id: \.id) { product in VStack(alignment: .leading) { Text(product.displayName).font(.headline) Text(product.description).font(.subheadline) Text("\(product.price.formatted(.currency(code: product.priceFormatStyle.currencyCode ?? "USD")))") .bold() } } } Button("Fetch Products") { Task { await storeKitManager.fetchProducts() } } } .padding() .onAppear { Task { await storeKitManager.fetchProducts() } } } } #Preview { ContentView() } Additional Information iOS Version: 18.2 Xcode Version: 16.2 macOS Version: 15.3.1 Device: Physical iPhone (not simulator) TestFlight Build: Not used (app is run directly from Xcode) StoreKit Configuration: Set to None
2
0
382
Mar ’25
IAP StoreKit2 Can Not Fectch Products
I am currently using StoreKit2 to set up the in-app purchase subscription flow, and I have already configured the subscription products in App Connect. I created a StoreKit Configuration file in Xcode and used it in the scheme. However, after completing the purchase, the transaction.jsonRepresentation data returns a transactionId of 0. After checking the documentation, I found that I need to disable the StoreKit Configuration and enable Sandbox Testing. But after disabling the StoreKit Configuration, I can't retrieve the real product data using Product.products(for: productIds). I can confirm that the ProductId I provided is real and matches the data configured in App Connect. Could you please help me identify the issue? Thank you
1
0
274
Mar ’25
Problems testing in-app subscriptions
Hello. I’m having some issues testing my in app subscriptions. when I request the products from my subscription ID I get no errors but get an empty array. the subscriptions show as ‘waiting for review’. is this why they aren’t appearing? Do I need to submit a version of the app for review in order to test them? That seem strange! Thanks for any help
1
0
239
Mar ’25
Is a free dating app acceptable?
We are currently developing a dating app. Considering that the number of users will be relatively small at the initial launch, we are thinking of offering subscription features for free, such as flight mode and read receipts. This means that our initial version will be a completely free product with no in-app purchases or subscriptions. However, we are concerned that this might lead to rejection during the App Store review process. We would greatly appreciate any guidance from the Apple review team on whether this approach is acceptable. Thank you very much!
2
0
385
Mar ’25
How to validate Streamlined Purchasing with storekit 2
users download app with Streamlined Purchasing ,but the logic of checking subscription doesn't work. there the code: func checkSubscriptionStatus() async { for await entitlement in Transaction.currentEntitlements { guard case .verified(let transaction) = entitlement else { continue } if transaction.productID == monthlyProductID || transaction.productID == yearlyProductID { if transaction.revocationDate == nil && !transaction.isUpgraded { let activeSubscribed = transaction.expirationDate ?? .distantFuture > .now if activeSubscribed { hasActiveSubscription = activeSubscribed // other operation } } } } }
0
0
237
Mar ’25
IOs App In App Fees
Hi, We have built a Web App that allows small clubs (such as gymnastics or cheerleading clubs) to manage their members, maintain a small store and allows members to subscribe to and pay for courses, classes and other such in-person events. We are starting to build an IOs App that will allow Club Members to book and pay for in-person events and buy physical items from a Club's online store (such as uniforms etc.). We would like to use Stripe to take payments from within the app. The app itself will be free. I want to be sure about the rules around In App purchases, more specifically the fees for taking such payments. If Clubs have to pay Apple's 30% payment fees for In App purchases, it makes payment through the IOs apps not viable. Can anyone confirm that this app would be allowed to use Stripe for payments and not have to use StoreKit? Also that this app would not be subject to the 30% fees for purchases of in-person events and physical products?
3
0
292
Mar ’25
Renewal Info never contains offerType
Signed renewal info from 'Get Subscription Statuses' or in server notifications never has the offerType or offerDiscountType even when the corresponding transaction does have those values set. Our offer is a free trial. Do these properties refer to something different in JWSRenewalInfoDecodedPayload than they do in transactions? I'm trying to determine whether a subscription (identified by originalTransactionId) is currently in a free trial based on server notifications. The status doesn't tell us if the subscription is currently in free trial and the signedTransactionInfo may be for an older transaction.
1
0
628
Feb ’25
App Store Server Notification sends old transactions
I've noticed that CONSUMPTION_REQUEST notifications sometimes have a signedTransactionInfo which corresponds not to the latest transaction, but to an earlier transaction in a subscription. Is this expected? I thought signedTransactionInfo was always the latest subscription information? Are there any other notification types for which signedTransactionInfo can be out of date?
2
0
345
Feb ’25
No Verification Code - Agreement
I am in Apple Connect and in order to sell my Subsricptions in my mobile app i need to agree to the DSA and fill in my contact information. i do so, but only my email gets a verification code meanwhile my phone does not get one! I tried sms and call but both did not work. because i cant verify i cant agree and because of that i cant sell my subsription?!! *** is this clown show???
1
0
265
Feb ’25
App Store Connect API - Can't modify subscription price that's close to its effective date
Hello, I'm using the App Store Connect API to check and modify subscription prices. I know there can be only 1 outstanding future price change for subscription pricing, so I check for any scheduled future price changes (after today's date) and then delete them before setting new ones. This works 95% of the time -- except in the last little bit before the date changes. For example, if it is 1 hour before midnight and tomorrow's date is when the scheduled price change goes into effect, when I try to delete, I'll get something like this: The request failed with response code 409 ENTITY_ERROR. There is a problem with the request entity. Cannot delete Subscription Price with id . Only future price changes can be deleted. If I look at the same subscription in App Store Connect, it will still show it as a future price change, and won't show the usual buttons to modify or delete it. However, in App Store Connect, I can still hit the "+" button to create a new price change and it will successfully delete and replace the pending price change, which will then appear with the usual Delete and Edit buttons. My first thought was that maybe it was a timezone issue, but if I go to put the new pricing into effect, that request fails with an error like this: "errors" : [ { "id" : "5a51c570-1f38-4fa0-b490-9fa979f4aecf", "status" : "409", "code" : "STATE_ERROR", "title" : "The request cannot be fulfilled because of the state of another resource.", "detail" : "Must delete future price change before creating a new price change." } ] So... my questions are: Is this expected behavior? How can App Store Connect replace the pending price change in the final hours but I can't do it with the API? As a workaround, is there a set amount of time before the price change goes into effect where the prices should no longer be editable? Thanks!
0
0
327
Feb ’25
In App Purchase does not work
I read the documentation and it told I had to prepare the product on App Store connect and once it is at the state "Ready to submit" I could access it on a phone where I am connected with an Icloud account in the developper list of the apple development account. This is what I've done but when I try to fetch in my flutter code the product with the id I set in App Store connect it says "No product found" Here is where I fetch the product: Future purchaseProduct(String productId) async { try { Set<String> _pIds = {productId}; final ProductDetailsResponse response = await _iap.queryProductDetails(_pIds); if (response.productDetails.isEmpty) { throw 'Product not found'; } final ProductDetails productDetails = response.productDetails.first; final PurchaseParam purchaseParam = PurchaseParam(productDetails: productDetails); _iap.buyConsumable(purchaseParam: purchaseParam); } catch (e) { Services.debugLog('Error purchasing product: $e'); throw e; } } I checked the product ID and it does not seems to be the problem. Is there some other steps I need to do ?
2
0
355
Feb ’25
IAP Can not Use Sand Box Test
I am currently using StoreKit2 to set up the in-app purchase subscription flow, and I have already configured the subscription products in App Connect. I created a StoreKit Configuration file in Xcode and used it in the scheme. However, after completing the purchase, the transaction.jsonRepresentation data returns a transactionId of 0. After checking the documentation, I found that I need to disable the StoreKit Configuration and enable Sandbox Testing. But after disabling the StoreKit Configuration, I can't retrieve the real product data using Product.products(for: productIds). I can confirm that the ProductId I provided is real and matches the data configured in App Connect. Could you please help me identify the issue?
0
0
165
Feb ’25
Verify Receipt is not found - After successful payment for Annual subscription.
The application is developed with Xamarin Framework and it is live now. The customer installed the app and purchased the annual subscription. And for some reason, they uninstall and reinstall the application on the same device. Now user wants to restore the subscription. In the application, there is an option to Restore the subscription. But restore API not return purchase details. But when clicking the subscription button instead of restoring the subscription, it says you subscribed to this plan". is there any possibility of not getting VerifyRecipt even after a successful purchase?
0
0
264
Feb ’25
Delete subscription data and buy data
Please create the feature to be able to delete subscription data. I want to delete all my subscription data and buy history from the Icloud/ IPhone. You have all the permissions needed from me to do so. There must be a better way than creating a new apple account on a new email address. And having to shift everything to a new email address to have a clean account regarding subscription data and purchases?!
1
0
192
Feb ’25
Subscription still not approved after app update
Hello Apple Team, We have recently updated our app and followed all the required steps for approving auto-renewable subscriptions. Our app update (Version 1.0.4, Build 5) has been reviewed and released on the App Store, but our subscription is still in “Waiting for Review” status. We have made the necessary corrections: ✔️ Clearly indicated the subscription duration in the app UI (“Lite plan: Full access for 1 month. Auto-renewing.”) ✔️ Added the Terms of Use link in App Store Connect metadata ✔️ Updated our Privacy Policy link However, when users attempt to subscribe, they receive an error. Could you clarify why the subscription has not been reviewed along with the app? Thank you for your assistance!
1
0
250
Feb ’25