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
243 Views
I created a Bible app, and I am wondering if I am able to use In App Purchases to give users the opportunity to pay to sponsor a verse, within the app and their name would be be displayed in the app next to the verse they sponsored. Is that going against Apples Guidelines?
Posted
by
Post not yet marked as solved
0 Replies
210 Views
What I mean by "fake" here is some sort of button which will state "Buy a pass for 4.99$" and then, once you click it, it will tell you that the app is still in early phase and so the pass is actually free. Reason for wanting this: We'd like to test the willingness to pay without going through the hassle of setting up everything related to having real in-app purchases.
Posted
by
Post not yet marked as solved
1 Replies
210 Views
Hi, For a user who subscribed a product via In-App Purchase, how does the application backend know that the user is still subscribed? The initial purchase happens on the mobile app. Via receiving and validating the receipt of initial purchase, the backend of mobile app would be informed. However, what is the appropriate option for the subsequent subscription payments? How do I know whether the user is still paying? Thanks.
Posted
by
Post marked as solved
2 Replies
249 Views
**Question 1: ** Will ServerNotificationV2 be able to provide real-time notifications regarding Storekit1 contract renewals, and is receiving Storekit1 notifications in ServerNotificationV2 an expected use? (The documentation does not say that receiving Storekit1 notifications is not recommended, so we would like to confirm Apple's assumption.) **Question 2: ** If ServerNotificationV2 is not able to receive Storekit1 notifications in real time, what is the expected time lag?
Posted
by
Post not yet marked as solved
1 Replies
231 Views
I have an app in store which has in app subscription, while checking for renewal it is not providing me exact end date of subscription based on which I have to lock / unlock certain features. It never fetch right date to verify, this is seriously a little thing which seems to be too complicated.
Posted
by
Post not yet marked as solved
0 Replies
251 Views
I'm trying to test payments on an iOS app. I have a sandbox account and its worked previously. When I try and add a test credit card I get the error "Your Issuer Does Not Yet Offer Support For This Card" I'm using the cards here https://developer.apple.com/apple-pay/sandbox-testing/" What I have tried: Checking my Region is the UK Checking the card details Tried several cards Tried signing out of my iCloud completely I'm testing on an iPhone 12 mini using iOS 16.5.1
Posted
by
Post marked as solved
1 Replies
310 Views
Static content is things like unlocking more functionality within an app, that doesn't change over time. Very basic example: Let's say I have an app that displays the workload on the CPU as a percentage in the macOS menu bar. I might want to give the user an option to pay to unlock features that also displays the workload percentage for the GPU and RAM in the macOS menu bar. For this, automatically renewing subscription is not allowed. But would a non-renewing subscription be acceptable, or does it have to be a perpetual (pay one time own forever) in-app purchase for static content?
Posted
by
Post marked as solved
1 Replies
308 Views
I use StoreKit's StoreView to buy in-app purchases. The purchase is working in the simulator, but how can I restore purchases? I did not find a restore handler, there is only a onInAppPurchaseCompletion but I'm missing a onRestorePurchaseCompletion or similar. This is how it looks This is my code: StoreView(ids: ["my.product.id"]) .storeButton(.visible, for: .restorePurchases) .storeButton(.hidden, for: .cancellation) .onInAppPurchaseCompletion { product, result in if case .success(.success(let transaction)) = result { print("Purchased successfully: \(transaction.signedDate)") isPremium = true } else { print("Something went wrong") } }
Posted
by
Post not yet marked as solved
0 Replies
267 Views
I want to test the in-app purchase in visionOS Simulator. I logged in to the Sandbox account in Simulator and was prompted to send the verification code to the phone number I wrote in the previous step. I entered the verification code accurately, but I couldn't log in normally. It was wet many times.
Posted
by
Post not yet marked as solved
1 Replies
336 Views
StoreKit don't work with iOS 17.4. After updating to iOS 17.4 our users can't make any purchases in App. Its very critical bug that affected our App. <SKPaymentQueue: 0x302bb4670>: Error in remote proxy while checking server queue: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.storekitd" UserInfo={NSDebugDescription=connection to service named com.apple.storekitd} [df94_SK2] Failed in XPC product request products(IDs: ["report"]): Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.storekitd" UserInfo={NSDebugDescription=connection to service named com.apple.storekitd} Does anyone know what to do?
Posted
by
Post not yet marked as solved
0 Replies
256 Views
My company did an app for a customer 10 years ago. The app has in-app purchases (not subscriptions). It is an Objective-C code base. Over the years we've done minor updates to this app in order to keep it in compliance, but no major overhaul. The app has been pretty reliable in the past, but recently my customer is getting a flood of complaints from users who say their in-app purchases disappear and can't be restored. It's happening too often to just be a case of bad internet connection or similar issue. The only thing that seems to be consistent is that it's never US-based users. Whenever I test this app using sandbox accounts, I cannot reproduce the problems that are being reported. I'm always able to make purchases and restore them after reinstalling the app, or restore them to a different device. The content associated with the purchases always downloads correctly, even if I intentionally interrupt and restore internet access. What can I do to figure this out? Should an IAP based app from 2014 be expected to work correctly today? Are there new legal issues with non-US app stores that we need to be aware of? I realize there isn't a lot to go on here, but I don't have any more information. Thanks, Frank
Posted
by
Post not yet marked as solved
0 Replies
185 Views
{NSLocalizedDescription=Reached max retry count, AMSURL=https://amp-api.sandbox.apple.com/v1/catalog/us/in-apps?extend=hostedContent&amp;filter%5BappBundleId%5D=com.dazn.staging&amp;filter%5BofferName%5D=BR.AP.HO.01.STAG,BR.MP.HO.01.STAG,BR.NFL.APPLE.SPP.HO.01.STAG&amp;l=en-US&amp;omit%5Bresource%5D=autos&amp;platform=iphone&amp;with=adHocOffers, AMSStatusCode=401, NSLocalizedFailureReason=Task reached max retry count (0 / 0);}
Posted
by
Post marked as solved
2 Replies
237 Views
My app listens for transactions using: for await result in Transaction.updates { // check verification and process Transaction } The result coming from these updates has a jwsRepresentation field, which when decoded server-side reveals the price the user paid, discounted in the case of a custom offer code. How can I get this value without a server roundtrip? Transaction does not have price field, and the subscription product's price does not seem to include custom offer code pricing.
Posted
by
Post marked as solved
3 Replies
559 Views
After upgrading to iOS 17.4, when using SKProductsRequest to request product information from Apple, an error is returned. The error message is "4097 Couldn’t communicate with a helper application." At present, users who have upgraded to iOS 17.4 are unable to make payments. How can we solve this problem? Thank you!
Posted
by
Post marked as solved
2 Replies
342 Views
Hello, I'm trying to add in-app purchases to a macOS app but failing to load the local test products. From the docs and various examples I've found online, it should be pretty straightforward with StoreKit 2. So far, I've done the following: added in-app purchase capability created the local .storekit file added consumable and non-consumable products updated the scheme to use the test StoreKit configuration verified the products are present and can be purchase by using Debug > StoreKit > Manage Transactions to make direct purchases verified the product IDs are correct To simplify things I tried creating a barebones app. I created a new .storekit file and added a single non-consumable product with ID product1. I used the default view and just a task to retrieve the products: import SwiftUI import StoreKit struct ContentView: View { var body: some View { VStack { Image(systemName: "globe") .imageScale(.large) .foregroundStyle(.tint) Text("Hello, world!") } .task { let products = try? await Product.products(for: ["product1"]) print(products) } .padding() } } The print statement output is: Optional([]) I know I must be doing something wrong, but I'm completely missing it. I hope someone can help me. Thanks
Posted
by
Post not yet marked as solved
0 Replies
263 Views
Is it possible to have limited in-app quantity of an iap item? Let's say I have a premium gun which is limited to 100 quantity for the whole game. Is it possible to show the quantity remaining and hide once 100 quantity gets sold? Thanks!
Posted
by
Post not yet marked as solved
0 Replies
183 Views
Hi all, how do I get the originalTransactionId in an app after completed purchase. I use SubscriptionStoreView and onInAppPurchaseCompletion but I don't know how to extract the originalTransactionId. Any help would be appreciated. From https://developer.apple.com/documentation/appstoreserverapi/originaltransactionid I read "To get the original transaction identifier from your app, use the originalID property of the Transaction object that represents the in-app purchase. " So I assume I can extract the originalTransactionId in the code following onInAppPurchaseCompletion Regards Thomas S
Posted
by
Post not yet marked as solved
1 Replies
1.6k Views
Hello, I'm encountering an issue where my released app fails to launch only on iOS 17.4. The version of the app released through TestFlight works fine without any issues. Specifically, when the app installed from the App Store is launched on iOS 17.4, it immediately crashes. However, I've noticed the following: If I turn off the network connection, such as putting the device in Airplane Mode, the app launches successfully. Once the app is launched, I can re-enable the network connection, and the app continues to run without crashing. My app uses StoreKit2 for handling transactions and connections with the App Store. It initiates a connection to the App Store via StoreKit2 at launch. The primary difference between the TestFlight version and the production version is the App Store endpoint they connect to. This leads me to suspect that there might be an issue with the connection to the App Store. (Another possibility is that the app communicates with Firebase or Google Admob, so there could be an issue with these SDKs as well.) This issue only occurs in the production version, making it difficult to investigate. Are there any suggestions on what I can do to further diagnose this issue? You can download my app from here: https://apps.apple.com/us/app/repeatable-player-cut-loop/id616310281 I can provide the TestFlight URL if needed. Any help or guidance would be greatly appreciated.
Posted
by