StoreKit

RSS for tag

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

StoreKit Documentation

Posts under StoreKit tag

294 results found
Sort by:
Post not yet marked as solved
13 Views

IAPs to be Included in future versions

Hie, so we're working on an app that should have IAPs, but due to a few holdbacks, we have decided to release the app without IAPs. The issue is that we would like to keep our products on App Store Connect (STATUS: Ready to Submit) whilst we continue to build the IAP functionality into our App. That means the app we submit for review won't have any IAPs until we're done fully implementing them. I wanted to find out how can we go about that because the app is being rejected on the basis that we have unused IAP products on App Store Connect, whereas we're using them internally as developers to test various purchasing scenarios, and obviously as mentioned, they won't be visible to the public as we continue building the IAP functionality.
Asked Last updated
.
Post not yet marked as solved
32 Views

StoreKit 2 currentEntitlements without internet

Hello, I am implementing StoreKit2. My app uses Transaction.currentEntitlements to load the user's purchased subscriptions after the app is launched, how the transactions are loaded? (from the AppStore/Internet or from the local receipt) currentEntitlements doesn't throw any exception, and I'm not sure how to handle the offline case.
Asked Last updated
.
Post not yet marked as solved
44 Views

IAP: get Product Information just before the purchase or once at app launch?

Hi, as you need to get product information before you can initiate a purchase, I wonder if its ok doing it once when the app launches, or do I have to do it just before the purchase - like it will get invalid after a while...
Asked
by Niano.
Last updated
.
Post not yet marked as solved
492 Views

sandbox not working for new "offer codes" for Subscriptions (In-App purchase)

I've implemented the new offer code feature, but when I redeem an offer, locally on a develop cert, it pulls the wrong apple id. The confirmation is always showing the apple id of the user signed into the phone, not the sandbox user. So I went ahead and tested against apple ids and it redeemed an offer, but there was a problem. According to here When an existing customer redeems an offer code, your app receives a transaction on the payment queue (paymentQueue(_:updatedTransactions:)  in the SKPaymentTransactionState.purchased state.  I got all that wired up to pick up transactions on the payment queue and I know it works, but when I redeem an offer code no transaction on the payment queue is fired. Without this event, this feature cannot be implemented. Does anyone have this feature working locally on development? If so, please Let me know. Thanks!
Asked Last updated
.
Post not yet marked as solved
428 Views

How to detect close button action for default manage subscription in iOS 15?

I have used showManageSubscriptions function to show the subscription sheet with subscription options within the application but there is a close button in the sheet in which action is not detected, the button is clickable though. @available(iOS 15.0.0, *) func showManageSubscription(_ windowScene: UIWindowScene) async { do { try await StoreKit.AppStore.showManageSubscriptions(in: windowScene) print("Sheet is closed") } catch { print("Sheet can not be opened") } } Please check Developer Documentation
Asked Last updated
.
Post not yet marked as solved
19 Views

manageSubscriptionsSheet usage

I'm trying to figure out how to use manageSubscriptionsSheet and got stuck on likely a bozo thing. I am able to do the usual thing to show it on change to a binded boolean, but cannot figure out how to respond to it being dismissed. Put another way, the subscription management sheet pops up as expected, I can manage the subscriptions, but I can't get the sheet to go away.
Asked
by dgarvey.
Last updated
.
Post not yet marked as solved
58 Views

Lost in Tiers

Hello, I'm lost in the different Tiers for my in-app purchases. I'd like to set the price of my in-app to $1.99 / 1.99€. For sure, Tier 2 looks appropriate. But when fetching the real price, when trying to pay this in-app, price is 2,29€ and not 1,99€. So I tried Alternate Tier 2. Price is then 2,99€ !!! Alternate Tier 1 will set the price to 1,99€ but the price will also be $0.99, and I'd like to have $1.99 too. So, I'm confused and don't know what to do. Any idea for me? Thanks in advance. Regards, Alexandre
Asked
by Alx.
Last updated
.
Post marked as solved
46 Views

Pending purchases in StoreKit 2

Hi, I'm looking for a way to get the list of pending purchases, i.e. the purchases made when the "Ask to buy" feature is enabled and which have yet to be approved. I need this in order to update the UI of my store and disable the possibility to buy products when they are pending for approval. I tried to look into Transaction.all but pending transactions seems to be missing. How can we get the list of pending purchases? Thank you
Asked
by DaleOne.
Last updated
.
Post marked as solved
57 Views

Does Family Sharing for IAP and subscriptions work in TestFlight?

If an app has a subscription (or IAP) with family sharing enabled, will beta testers in TestFlight be able to test that functionality? I’m working on an app that includes family sharing for IAP, and I highlight family sharing in the paywall. However, my testers are reporting that they do not get the entitlement when a family member purchases the IAP. I’m trying to determine if I’m making an error in my code. The family sharing tech talk indicates that no special treatment is required in the app, so I’m wondering if this is just a limitation of the TestFlight store environment.
Asked Last updated
.
Post not yet marked as solved
50 Views

StoreKit 2 Transaction.currentEntitlements questions

Hi, I'm starting using StoreKit 2 and I have some questions regarding transactions. To check which non-consumable in-app purchases the user has purchased, immediately after starting the app I look at Transaction.currentEntitlements. That's working fine, but I have some questions about it. Question 1: What happens if the user is not connected to the internet? Will Transaction.currentEntitlements still return data? Question 2: What happens if the user sign out from the AppStore? Will Transaction.currentEntitlements be empty? Question 3: What happens if the user sign in AppStore with different credentials? Transaction.currentEntitlements will return the transaction of the new AppStore user? Thank you
Asked
by DaleOne.
Last updated
.
Post marked as solved
96 Views

IAP incorrect price tier fetched

Hey all, I'm currently trying to setup IAP products for my app. I've selected Tier 13 (12,99), but when fetching the product in my code, I'm receiving a price of 13,99. The response from this function is incorrect: func productsRequest(_ request: SKProductsRequest, didReceive response: SKProductsResponse) Does anyone have a clue on how to fix this issue?
Asked Last updated
.
Post not yet marked as solved
1.7k Views

Error thrown when querying for Subscription Products

Hi, I have been testing StoreKit 2. I'm trying to query for available subscription products by using the following query code as per the document. I have configured the in-app purchases with subscriptions in appstoreconnect. The request query keeps throwing an error. Would appreciate some help. Query Code let productIdentifiers: Set = ["monthly_subscription", "yearly_subscription", "family_monthly_subscription", "family_yearly_subscription"]         async {             do {                 let _subscribableProducts = try await Product.request(with: productIdentifiers)                 self.subscribableProducts = _subscribableProducts             }             catch {                 print("Something went wronge \(error)")             }         } Error thrown systemError(Error Domain=ASDErrorDomain Code=507 "Error decoding response" UserInfo={NSLocalizedDescription=Error decoding response, NSLocalizedFailureReason=Could not decode media products response})
Asked Last updated
.
Post not yet marked as solved
269 Views

StoreKit 2 • Purchase Result wrong when Ask to Buy is cancelled (no tap on Ask)

Hello, When 'Ask To Buy' is enabled, and the user cancels the request (left button on the provided screenshot below), the purchaseResult in iOS 15 is set to .pending when we call try await product.purchase(). It's wrong, it should be set to .userCancelled because the parent will never receive any approval request in this case. It breaks the logic in my app because tracking real pending requests is then not possible. I also think that a declined transaction should be made available to the app in the transactions observer: how can we remove a pending transaction that had been declined? We can't for the moment. Thanks, Axel
Asked
by alpennec.
Last updated
.
Post not yet marked as solved
40 Views

No Response StoreKit

Hi I'm programming an iMessage app with in app purchases. My problem is that when I fetch the products the response is nil. I could imagine that there is a problem because of the targets but I have no idea. Does anyone know a solution?
Asked Last updated
.