StoreKit

RSS for tag

Support in-app purchases and interactions with the App Store using StoreKit.

StoreKit Documentation

Posts under StoreKit tag

344 Posts
Sort by:
Post not yet marked as solved
0 Replies
14 Views
If an in-app purchase is made when my app is not running, the next time the app launches Transaction.updates will emits a transaction for the purchase. That's great. But if an in-app purchase is refunded when my app is not running, the next time the app launches Transaction.updates will NOT emits a transaction for the refund. Is that the expected behaviour? If yes, in order to check for refunds at app launch, are we supposed to cycle trough Transaction.all and search for them? Thank you
Posted
by DaleOne.
Last updated
.
Post not yet marked as solved
0 Replies
62 Views
Below, I have a button designed to facilitate the purchase of a subscription, which depends on the availability of the subscription in App Store Connect. This button is visible when testing locally using a StoreKit Configuration File synced from App Store Connect, and I have linked my subscription to my app in the information section. Currently, my app is in a "waiting for review" status, and the subscription is marked as "developer action needed - rejected." However, this issue of the button not appearing persisted even when the subscription was previously in the "waiting for review" status, indicating that the problem may not be related to the subscription status. I'm encountering an issue where the 'request products' function returns no results in the TestFlight environment, even when using a sandbox Apple ID. This problem has led to repeated rejections of my app, as testers are unable to verify its functionality. What could be causing these issues? VStack { if storeVM.subscriptions.isEmpty { if storeVM.isLoading { ProgressView("Loading subscriptions...") .progressViewStyle(.circular) .scaleEffect(2.0) .padding() } else if let errorMessage = storeVM.errorMessage { Text("Error: \(errorMessage)") .foregroundColor(.red) .padding() } else { Text("No subscriptions available") .padding() } } else { ForEach(storeVM.subscriptions, id: \.id) { product in Button(action: { Task { await buy(product: product) } }) { HStack { Spacer() Text("Unlock 3-day free trial. \nThen $23.99 per year. Cancel anytime.") .font(.custom("Lora-VariableFont_wght", size: 20)) .foregroundColor(.white) .lineSpacing(5) Spacer() } } .padding() .background(Color.black.opacity(0.6)) .cornerRadius(10) .padding(.horizontal, 10) } } .onAppear { Task { await storeVM.requestProducts() } } func requestProducts() async { isLoading = true errorMessage = nil do { subscriptions = try await Product.products(for: productIds) isLoading = false } catch { print("Failed product request from App Store server: \(error)") isLoading = false errorMessage = "Failed to load products" } }
Posted Last updated
.
Post not yet marked as solved
5 Replies
1.8k Views
I would like to programmatically keep track of offer codes that have been used. I just configured a Test Offer Code (Reference name), which contains 500 codes (Offer Codes) to buy a 1-month subscription for 0,49€. I was able to redeem the code and everything works, but I was expecting to receive the used code. Instead I received the Reference name in the payload from the App Store Server Notification in the field offer_code_ref_name="Test Offer Code". (expected was sth like offer_code_ref_name="JFFDS61SBJDBJ5BXJS4BX") I would be able to identify the Reference name by the code, if it was provided, because I have the following table in my app's backend: reference_name | code | url | expires_at | used | reserved Test Offer Code | xadz | zzz | 31-07-2022 | t | f Test Offer Code | asdf | *** | 31-07-2022 | f | f The used code doesn't seem to be included in the latest receipt. How can I obtain it? Can I somehow call App Store Connect API? Thanks
Posted Last updated
.
Post not yet marked as solved
0 Replies
60 Views
I am not sure if this is just Xcode and Storekit2 behaving weird. I am getting all products every time during my testing, even though I have pricing enabled for US and non-US in the same subscription group. How do I handle this scenario? Isn't SubscriptionStoreView supposed to handle this by itself depending on media and purchases country? Thanks in advance for your response!
Posted Last updated
.
Post not yet marked as solved
1 Replies
128 Views
I need user installed app information like first install time (purchase to install) last time use "Bundle.main.appStoreReceiptURL" to request Receipt was successful but when i Reinstall the app by Xcode has ERROR:"Error reading receipt data: Error Domain=NSCocoaErrorDomain Code=260" what wrong with ERROR?
Posted Last updated
.
Post not yet marked as solved
0 Replies
147 Views
Im building a small iphone app with StoreKit and currently testing it in testflight right on my mac, not on iphone. StoreKit part almost exactly copied from SKDemo from one of the Apple's WWDC. For some users and for myself Transaction.currentEntitlements always returns .unverified results. I double-checked Apple Connect settings, i checked my internet connection and everything is fine. Is there some pitfalls for testflight on mac? How can I find out what is causing this problem?
Posted
by kbkmn.
Last updated
.
Post not yet marked as solved
7 Replies
249 Views
As an indy developer, it's prohibitive to start developing backend receipt validation services. Is there anything else in Apple's technologies that we can use to verify whether the person who is using my app, has paid for it? The first thing I thought of when Apple rolled out Sign in with Apple ID, was hopefully, it would include some API that would allow me to ask a simply question: did this Apple ID pay for my app? As an indy developer, this is the one feature that would keep my paid app on the Mac App Store. Anyone have any good suggestions for solving this as an indy developer?
Posted Last updated
.
Post not yet marked as solved
2 Replies
433 Views
I Implement a 'SubscriptionStoreView' using 'groupID' into a project (iOS is targeting 17.2 and macOS is targeting 14.1).Build/run the application locally (both production and development environments will work fine), however once the application is live on the AppStore in AppStoreConnect, SubscriptionStoreView no longer shows products and only shows 'Subscription Unavailable' and 'The subscription is unavailable in the current storefront.' - this message is shown live in production for both iOS and macOS targets. There is no log messages shown in the Console that indicate anything going wrong with StoreKit 2, but I haven't made any changes to my code and noticed this first start appearing about 5 days ago. I expect the subscription store to be visible to all users and for my products to display. My application is live on both the iOS and macOS AppStores, it passed App Review and I have users who have previously been able to subscribe and use my application, I have not pushed any new changes, so something has changed in StoreKit2 which is causing unexpected behaviour and for this error message to display. As 'SubscriptionStoreView' is a view provided by Apple, I'm really not sure on the pathway forward other than going back to StoreKit1 which I really don't want to do. Is there any further error information that can be provided on what might be causing this and how I can fix it? (I have created a feedback ticket FB13658521)
Posted
by Lukesrad.
Last updated
.
Post not yet marked as solved
1 Replies
271 Views
Apple automatically refunds the prorated amount on the original subscription after it is upgraded. Since upgrades happen immediately and start a new billing cycle beginning from the day of upgrade, the previous original subscription is refunded for the prorated amount. Is there any way to retrieve the amount that was refunded by Apple? The transaction that was upgraded is marked with isUpgraded flag to true but the price field on it still shows the full amount and there is no App Store Server Notification that tells us how much was the refund. How do I get the refunded amount?
Posted
by kalehv.
Last updated
.
Post not yet marked as solved
0 Replies
139 Views
In StoreKit 1 and Objective-C, how do I obtain currently active subscriptions? I'm trying to obtain this information: The currently active (i.e. valid and not refunded) subscription in a subscription group A "pending" subscription, if any (when changing subscription types mid-period), and its starting date Sadly, all StoreKit 1 documents are buried deep under StoreKit 2 docs. Using StoreKit 2 is not an option.
Posted
by LIJI32.
Last updated
.
Post not yet marked as solved
2 Replies
181 Views
Hi, I am processing both REFUNDED and REVOKED transactions on the client-side and on the server using Apple's App Store Server Notifications (V2). For transactions with an inAppOwnershipType of FAMILY_SHARED, I receive REVOKE notifications that (sometimes) do not include a revocationDate. What does this imply, and what actions should I take? Additionally, when I query their transaction IDs using the App Store API, they also lack a revocationDate and do not appear in the results when I filter for revoked transactions. Is it appropriate to block these users? Why are server-to-server REVOKE notifications sent in the first place if the transaction does not appear as revoked in the API? Thanks
Posted
by nktbcc.
Last updated
.
Post not yet marked as solved
0 Replies
157 Views
I have been trying to enable in app purchase in sandbox environment but instead it keeps performing transactions in Xcode. Also Apple says in its docs to set up sandbox tester account in Settings > App store without signing out from the non sandbox account, and says the sign in will appear as soon as we perform a transaction on device, but it does not worked for me I have ensured and tried following things: Created sand box tester id Storekit configured , all the plans fetched Has development team Tried signing in Sandbox account Checked whether I am testing in production or development build by if else (It was in development) Tested on real device Please help me get through this
Posted Last updated
.
Post not yet marked as solved
0 Replies
140 Views
After the 'present' method is called in SKOverlay, the system will first load the SKOverlay and do the present animation after loading is complete. However, the user may leave the page during the loading process. At this time, we will call the 'dismiss' method (at this time, SKO may not have appeared, or SKO may be doing the appearance animation). According to my online statistics, there are some situations. a. SKO did not display (this is as expected) b. SKO suddenly appeared quickly and then disappeared after leaving the page for a while c. SKO displayed after leaving the page and did not disappear automatically. Do we have a way to completely solve problems b and c? Why can't dismissOverlayInScene completely stop the previous SKO's present task now? I would greatly appreciate it if I could get more information here to deal with this problem.
Posted Last updated
.
Post marked as solved
5 Replies
3.7k Views
Dear all, This is my first post in this forum - and, in fact, my first app, too! I'm glad to be here, and thanks in advance for your help. I'm looking to offer an app for a one-time payment. I'd also like people to be able to try the app for a week. It seems that the "Pricing and Availability" section in App Store Connect is not the right place to configure this kind of offer. It does allow me to set a one-time price, but I cannot find a trial-period there (or am I missing something?) Two different strategies seem possible here: Using in-app-purchases: make the actual app free, but ask users after a week to buy a non-consumable IAP. The problem with that: I need to verify that the app has been installed for seven days ... even if it has been uninstalled at some point. Using subscriptions: There is a "free trial" option for subscriptions. But after that free trial, subscriptions are being payed periodically. I'd rather have the user only pay once for lifetime-access. Some apps seem to use strategy 1 - I believe the "Lap swim" app does. But still it seems like a bit of a hack - is there a more elegant way to achieve this?
Posted Last updated
.
Post not yet marked as solved
0 Replies
194 Views
Hi all, first post ever here so apologies if information are not enough and thanks in advance for your help. PRODUCT & TECH INFO Ionic + Angular app with subscription plans to be activated via IAP with newly enabled third party subscriptions management platform (Recurly). CONTEXT After activating and migrating our clients to the new platform, the users with IAP subscriptions could not be linked with the platform but their Apple subscription remained active. QUESTIONS What will happen if we ask users to retry the purchase of their exact active subscription through our mobile app checkout when coming to the Apple subscription panel? If the plan is the same, is Apple gonna be smart enough to reconnect the active subscription to the purchase without processing a new payment? The issue is that - at the moment - some users are paying their subscription with Apple but are not active in our Recurly platform so they look like not-subscribed users. Hope I could explain our issue properly! Thanks again in advance for the help!
Posted Last updated
.
Post not yet marked as solved
0 Replies
214 Views
I'm an Apple developer but I'm currently trying to test someone else's app that uses StoreKit for in-app purchases. The app is being tested using TestFlight. When I run the app, I always get a StoreKit error. On the screen, I see: "App Store communication failure, please try later" (with a close button to dismiss it) In the app's console I see: "StoreKit: Unable to Complete Request" This happens with 3 different apps that the company is currently testing. No one else that is testing is getting this issue. StoreKit is working fine for them. I suspect the problem has to do with the fact that I'm an Apple Developer as well. There must be something about my account that is tripping up StoreKit. I don't currently have any Sandbox test accounts. None of my apps are currently in testing. Anyone have any thoughts? I did capture a log from the Console App, filtering on StoreKit: StoreKitFailure.txt If you search the log for my email address "bill at otherwise dot com" you will see some errors that may mean something to someone.
Posted Last updated
.
Post not yet marked as solved
1 Replies
247 Views
Struggling for weeks to publish a new update of my app, which includes the first-time submission of a subscription with auto-renewal. It's constantly being rejected due to the following issue: We have started the review of your app, but we are still not able to continue because we cannot locate the in-app purchases within your app at this time. Next Steps To help us proceed with the review of your app, please reply to this message providing the steps for locating the in-app purchases in your app. If you are restricting access to in-app purchases based on factors such as storefront or device configurations, please include this information in your reply along with steps to enable the in-app purchases for our review. No further information is provided, no communication on the steps being taken by Apple. Additionally, I have already provided a comprehensive description during submission on how to access the In-App Purchase (IAP) as text and video. What's kind of interesting: the app got rejected, but the related subscription is still in state "waiting for review". Has anyone else experienced a similar issue?
Posted Last updated
.