StoreKit

RSS for tag

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

Posts under StoreKit tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Not receiving REFUND notifications in sandbox
Hi, I am following https://developer.apple.com/documentation/storekit/transaction/testing_refund_requests and trying to test refund requests. I am able to trigger refund requests from my app (in sandbox) using https://developer.apple.com/documentation/swiftui/view/refundrequestsheet(for:ispresented:ondismiss:) I do see that the notification URL receives a NotificationTypeV2.CONSUMPTION_REQUEST but it's not receiving NotificationTypeV2.REFUND The product for which the refund is triggered is a consumable type Is this expected behavior? How can I test REFUND without this? Thanks
4
0
743
Mar ’24
Transaction.currentEntitlements never returns if there are no entitlements?
I'm uncertain about the reason behind Transaction.currentEntitlements not returning nil when there are no current entitlements. The challenge I'm facing is that, in the scenario where a trial period concludes, Transaction.currentEntitlements seems to perpetually withhold any response, leaving me without a means to discern the conclusion of the trial. I'm puzzled as to why this method doesn't simply return nil when no entitlements are detected. It would be immensely helpful if someone could shed light on the rationale behind this behavior or point out any potential errors in my understanding. Your insights would be greatly appreciated. Thanks.
0
0
408
Dec ’23
Use of SubscriptionStoreView
I am developing my first app and having issues understanding how SubscriptionStoreView works. I used some business logic available from Apple, but I see other resources that insinuate the StoreKit views can handle all of the business logic itself, and all I need is the config file. Can anyone confirm? When I'm previewing SubscriptionStoreView, It just says, "The subscription is unavailable in the current storefront," and I cannot find what that means or what to fix.
1
0
1.1k
Dec ’23
StoreKit sample project from Apple fails concurrency checks
I am trying to use code from Apple's sample project on StoreKit (Implementing a store in your app using the StoreKit API). However, even if I don't make any changes to this sample project except enable "complete" concurrency checking in the build settings, I get warnings like Capture of 'self' with non-sendable type 'Store' in a '@Sendable' closure. How worried should I be about these warnings and how can I fix them?
1
0
575
Dec ’23
EXPIRED notification is no longer received
Hello, I have configured V2 server notifications for my applications. I am receiving different types of notifications (https://developer.apple.com/documentation/appstoreservernotifications/notificationtype) in my webhook. Something changed after November 18th. EXPIRED notifications are no longer received. Has something changed in the API? Other notification types still work.
2
0
520
Dec ’23
Not fetching auto-renewal subscription information (price) in China market
My app (Apple ID: 6473235939) first released on Dec 2 2023 to App Store for China market, and it has auto-renewal subscription. However, the user in China downloaded, installed and launched it, and he can't see the price, looks the app can't fetch the purchase product information, so the user can't subscribe. However, in the info section of app store the in-app purchase price is listed and right. The app was tested ok based in Canada, and the right subscription price is showing. Does the auto-subscription is blocked for China market? Any help? Thanks a lot.
0
0
309
Dec ’23
Swiftui - SKStoreProductViewController inside .sheet action open 2 views - why?
Hi, In my app, a button should be pressed and then the App Store product page of a specific app should be displayed within the application. My solution creates a UIViewControllerView of the Apple product page with .sheet. Unfortunately, an empty view appears first and a little later the App Store product page is displayed too and the empty view is in the background. If you then close the App Store page, you also have to close the empty view until you are back in the ContentView. Here are a screenshot. How can I prevent the blank page or what do I have to adjust in my code so that the page does not appear? Here is my code. import SwiftUI struct ContentView: View { @State private var showAppStore = false var body: some View { VStack { Image(systemName: "globe") .imageScale(.large) .foregroundStyle(.tint) .onTapGesture { self.showAppStore.toggle() } .sheet(isPresented: $showAppStore) { AppStoreProductView() } Text("Hello, world!") } .padding() } } import SwiftUI struct AppStoreProductView: UIViewControllerRepresentable { typealias UIViewControllerType = ViewController func makeUIViewController(context: Context) -> ViewController { return ViewController() } func updateUIViewController(_ uiViewController: ViewController, context: Context) { uiViewController.openAppStore() } } import StoreKit class ViewController: UIViewController { let appURL = URL(string: "https://itunes.apple.com/app/idxxxxxxxx")! let productID = xxxxxxxx func openAppStore() { let appStoreVC = SKStoreProductViewController() appStoreVC.delegate = self let parametersDictionary = [SKStoreProductParameterITunesItemIdentifier: productID] appStoreVC.loadProduct(withParameters: parametersDictionary) { loaded, error in guard error == nil, loaded else { return } self.present(appStoreVC, animated: true) } } } extension ViewController: SKStoreProductViewControllerDelegate { func productViewControllerDidFinish(_ viewController: SKStoreProductViewController) { viewController.dismiss(animated: true) } } Many thanks in advance for any help to eliminate the blank view. Sven
2
0
794
Dec ’23
Subscription Payment Sheet Issue
We've implemented subscriptions in our app, but a few users are reporting that the payment sheet isn't opening its keep loading, we also checked with them that the permission for in app purchases is allowed in device settings and in all other apps purchases working fine only facing issue in our app side. This issue isn't replicable on our end, and we're unable to debug it. Can you please assist us in resolving this?
0
0
242
Dec ’23
WWDC2023-10013
Studying this session and trying to add code to add in- App purchases to my App, currently free in the App Store. Referring to the Code at 14:10 - 19:37 the code references await BirdBrain.shared.xxxxxxx Where is explanation of the declaration of BirdBrain struct/class or function?
1
0
332
Dec ’23
DID_RENEW notification with cancellation_date field completed
Hello, We have a few FAMILY_SHARED subscriptions which received a DID_RENEW notification, with all the cancellation fields completed, the expiration date in the future and no pending_renewal_info array in it. We are not sure why did we get the DID_RENEW notification with the cancelation details, shouldn't we get a REVOKE notification? We found this in the Apple documentation: The pending_renewal_info array is returned only for app receipts that contain auto-renewable subscriptions. If customers voluntarily cancel a subscription renewal while in the grace period, the App Store pauses billing retry, and removes the transaction from pending_renewal_info. The subscription is in the grace period if the key grace_period_expires_date_ms is present and the expiration date hasn't passed. We do not handle any cancelation related logic for the DID_RENEW notification. Should we adjust the logic for this scenario or there should be a different notification type sent out. This is how the latest element looks like from the lattest_recipt_info: "auto_renew_status": "true", "unified_receipt": { "status": 0, "environment": "Production", "latest_receipt_info": [{ "quantity": "1", "product_id": "product_id", "transaction_id": "transaction_id", "purchase_date": "2023-11-07 23:01:41 Etc/GMT", "purchase_date_ms": "1699398101000", "purchase_date_pst": "2023-11-07 15:01:41 America/Los_Angeles", "original_purchase_date": "2021-10-07 22:01:42 Etc/GMT", "original_purchase_date_ms": "1633644102000", "original_purchase_date_pst": "2021-10-07 15:01:42 America/Los_Angeles", "expires_date": "2024-11-07 23:01:41 Etc/GMT", "expires_date_ms": "1731020501000", "expires_date_pst": "2024-11-07 15:01:41 America/Los_Angeles", "web_order_line_item_id": "web_order_line_item_id", "is_trial_period": "false", "is_in_intro_offer_period": "false", "original_transaction_id": "original_transaction_id", "cancellation_date": "2023-11-07 15:37:03 Etc/GMT", "cancellation_date_ms": "1699371423020", "cancellation_date_pst": "2023-11-07 07:37:03 America/Los_Angeles", "cancellation_reason": "0", "in_app_ownership_type": "FAMILY_SHARED", "subscription_group_identifier": "subscription_group_identifier" }
1
0
461
Dec ’23
In App Payment compliant support for a service offered via phone call / Zoom
Hi Team, When offering services involving one-on-one consultations conducted outside the app (e.g., via phone calls or Zoom), is it required to implement Apple's in-app purchase system as a consumable for these services, or can we utilize a third-party payment method compliant with current App Store guidelines?
0
0
270
Nov ’23
Promo code redemption error (not found)
I have a production app (since Feb 2023) that has in-app subscriptions (working fine). Now I want to give offer codes to my new users so they can get free trials (2 months free trial + annual subscription). The offer code is set up like this: https://photos.app.goo.gl/V42fZWRpECnbUQsv6 I waited for 2 days for it to be available. When I redeem this code, it shows error "The code you entered could not be found". See https://photos.app.goo.gl/sGKvuw9thFFkoJWv5, https://photos.app.goo.gl/kctoWPbNu6k4JkZp6 Please help!
1
2
352
Nov ’23
SKPaymentTransaction With Transaction State Incorrect
Hi, I'm receiving an incorrect returning state from SKPaymentTransaction. I have a subscription plan that users can purchase and have access to new features in my app, but, for some reason, even if it's a new app account or new appstore account, when it reaches the SKPaymentTransaction.TransactionState, it always says that the state is SKPaymentTransactionStatePurchased. This code haven't been changed since 2018 and this error started about 1 week ago. This is the full code: - (void)createPaymentWithProduct:(SKProduct *)product { SKMutablePayment *payment = [SKMutablePayment paymentWithProduct:product]; payment.quantity = 1; [[SKPaymentQueue defaultQueue] addTransactionObserver:self]; [[SKPaymentQueue defaultQueue] addPayment:payment]; } - (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions { for (SKPaymentTransaction *transaction in transactions) { switch (transaction.transactionState) { // Call the appropriate custom method for the transaction state. case SKPaymentTransactionStatePurchasing: [self purchasingTransaction:transaction]; break; case SKPaymentTransactionStateDeferred: [self failedTransaction:transaction]; break; case SKPaymentTransactionStateFailed: [self failedTransaction:transaction]; break; case SKPaymentTransactionStatePurchased: { //It reaches this case but never reaches Purchasing [self purchasedTransaction:transaction]; break; } case SKPaymentTransactionStateRestored: [self restoredTransaction:transaction]; break; default: // For debugging NSLog(@"Unexpected transaction state %@", @(transaction.transactionState)); [self failedTransaction:transaction]; break; } } } After the queue, it calls this functions that ask for the payment receipt, which returns me an error because it's not purchased, so it doesn't have a receipt. - (void)purchasedTransaction:(SKPaymentTransaction *)transaction { [self sendReceiptToServerForTransaction:transaction]; if (self.purchasedNotification) { self.purchasedNotification(); } }
0
0
400
Nov ’23
In app reviews not received.
A couple of months ago I released an app made with react-native expo in the app store. In the app i use a library called expo-store-review, which uses the SKStoreReviewController from swift. The in app review modal shows up as expected, but when users leave a review, I don't receive it. I've tested it with multiple friends and family, standing next to them while they where leaving the review, and everything on their end went correct and no errors show up. It looks like the only reviews I do receive is when users also leave a text with the review or do it in the appstore directly. I've tried using a different library for the in app review, but that also didn't fix the problem. Has anyone had a similar issue and if so, knows how to fix it?
1
0
459
Feb ’24
Requesting review of main app from helper app using SKStoreReviewController
We have an app on the Mac AppStore that has the following nested structure A.app |-- Contents/MacOS |-- A |-- B.app |-- C.app A.app is a launcher application that acts as a hub to launch B.app and C.app. We would like to use [SKStoreReviewController requestReview] to increase the number of users that rate the app. When the API is called from B.app or C.app, the rating dialog shows up for B.app and C.app respectively, but these apps don't independently exist on the AppStore (only A.app does). Is it possible to request a review for A.app from B.app/C.app using SkStoreKitReviewController?
0
0
228
Nov ’23
There is no information for In-App Purchases 21102
Hi there I have a problem testing IAP's in my App. I'm able to handle purchases perfectly fine in xcode previewes, using storekit 2 with a configuration File. Now in the Testflight Beta version (Internal Testing) I get the following Error: "There's no information available for In-App Purchases issue. Try again later 21102" My Storekit implementation is very similar to this tutorial: https://www.revenuecat.com/blog/engineering/ios-in-app-subscription-tutorial-with-storekit-2-and-swift/#h-implementing-on-device-subscriptions-with-storekit-2-in-swift All The IAP prerequisits should be met acording to: (https://developer.apple.com/help/app-store-connect/configure-in-app-purchase-settings/overview-for-configuring-in-app-purchases) https://developer.apple.com/help/app-store-connect/configure-in-app-purchase-settings/overview-for-configuring-in-app-purchases I'd appreciate it, if someone could help me with this issue. Chris
16
3
1.5k
Nov ’23