StoreKit

RSS for tag

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

StoreKit Documentation

Post

Replies

Boosts

Views

Activity

Implementing Premium Services for Users Upgraded via Website in iOS App
Hello, I am seeking advice on integrating a feature in our iOS app related to user subscriptions and account upgrades. Our current setup allows users to upgrade their subscription to a premium account level exclusively through our website. The app, as it stands, does not support in-app account upgrades. However, we aim to offer advanced services within the app to users who have upgraded their accounts through the website. I'm interested in understanding the guidelines and best practices to follow for this scenario to ensure compliance with App Store policies. Any insights, experiences, or suggestions from the community would be greatly appreciated. Thank you!
0
0
359
Feb ’24
Sandbox Testing Problems (StoreKit works fine)
I have a problem with submitting my app to the AppStore. I have an app in the AppStore with currently OneTime Purchase. Now I want to add an InApp purchase to this app. I have tested the app with a local StoreKit file (with synchronised AppStore In App Products) and everything works fine. But when I submitted this file to the store, it was not accepted. So I found out that I need to remove the local StoreKit file so that it uses the real AppStore data. But my problem is, once I remove the StoreKit file, my purchase process gets stuck in the transaction process. So when I click on the in-app purchase button, I get the payment overlay and everything about the in-app purchase is displayed there. Name, price, details. Also a sandbox title says I am not in production. As soon as I click on the "Buy" button, I have to log in with my sandbox user account that I have previously created in AppStore connect and also verify the email address by clicking on the link in the e-mail. Then the confirmation tone sounds, but after 4-5 seconds the overlay appears again (and again and again). The transaction remains in "in progress" status. My question now, since everything worked fine with StoreKit? What could be the problem. I need to submit a new appVersion (which I am working on) with my first new in-app purchase. Could it be that the payment process is not working because the IAP is still in "under review" or "submitted for review"? Where could be a difference that StoreKit IAP works just fine, but sandbox does not work. Thanks in advance for your help.
2
0
676
Feb ’24
Reward Distribution to users
Hello, I am looking forward to a really quick help. Thank you for taking time. I have an app where I give my users monetary rewards based on the game of skills. I have integrated in-app purchases for users when they want to add an amount to my app to play this game of skill. Now after the results, I would like to send them their monetary rewards to their Apple wallet based on the performance and rules. Is there any way to pass these rewards to users' Apple wallets through in-app purchases?
0
0
246
Feb ’24
Calendar Month Pricing / Periodic Month Pricing
Hello, After processing the data I received from another source in my new application, I will offer it for sale as a monthly subscription. However, pricing for my data source is based on calendar month, but subscription flows start from the purchase date and I could not find such a subscription flow in the store kit. How can I draw this flow in a way that doesn't violate app store rules regarding pricing?
0
0
328
Feb ’24
Issues with preserved pricing
After scheduling price changes for November 23 and selecting to "Preserve current price for existing subscribers", we are seeing around 31% "renewals" coming through at the new price on later app versions following the price change. Has anyone else experienced this? Could this be something to do with a payment being marked as a renewal in the summary sales report but not actually being a renewal (and perhaps a reactivation instead?) Thanks
0
0
312
Feb ’24
'availableInAllTerritories' is not an attribute on the resource 'inAppPurchases'
I'm using the API to update and create in-app purchases. Up until now, the https://api.appstoreconnect.apple.com/v2/inAppPurchases endpoint would allow me to set the availableInAllTerritories attribute to true, but as of this week the API is returning this error: ENTITY_ERROR.ATTRIBUTE.UNKNOWN - 'availableInAllTerritories' is not an attribute on the resource 'inAppPurchases' It appears availableInAllTerritories has been removed from the class definition, but not the sample code. The 3.2 release notes state that the enum "is no longer available for pricing related endpoints", but this isn't a pricing endpoint. Anyone else having this issue? I guess the only workaround would be to send a separate request to the inAppPurchaseAvailabilities endpoint.
1
2
903
Feb ’24
Receipt Verification 21004 code for Consumable Item on Production
Hello, One of our customer's purchases of IAP consumable product have issue on its receipt verification. Verification via "https://buy.itunes.apple.com/verifyReceipt" returns {"environment": "Production", "status": 21004}. He purchased 3 consumable items and only verification of 3rd purchase successfully got verified. All of other purchases in our app before and after had no problem with same secret, same server. I once heard 21004 is for auto renewable subscription, not for consumable. Can it be returned for consumable purchase? Is there any other known issue for receipt verification? We have no change of code, server, secret at that time and all other verification succeeded but two failed. Thanks in advance. Regards,
2
0
772
Feb ’24
How do you request a review in a volumetric app?
I have a volumetric app. I am trying to present a review prompt using SKStoreReviewController's requestReview(in:) I'm using the code below: if let scene = UIApplication.shared.connectedScenes.first(where: { $0.activationState == .foregroundActive }) as? UIWindowScene { SKStoreReviewController.requestReview(in: scene) } When this code executes, though, I get a crash with the error: Presentations are not permitted within volumetric window scenes. What is the proper way to do this for a volumetric app?
1
2
390
Feb ’24
Error Code 21107 - There's no information available for In-App Purchases. Try again later.
Hello, Over the past couple weeks we have been getting increased reports from our users who are unable to purchase IAPs within our app. Every time they go to make a purchase they are getting the 21107 error code. I haven't been able to find any concrete information about why users might be getting this error. The only thing that I have been able to find in the Apple documentation is: Status codes 21100-21199 are various internal data access errors. I did see some threads with this error code for people in sandbox accounts, but note that these are live users in our production environment. This is not internal testing. Users load the app, attempt to make an IAP purchase and they immediately get this OS error popup on the client and the purchase fails. We are using the Unity IAP package 4.10.0 If anyone has any information or suggestions it would be much appreciated.
5
0
1.5k
Feb ’24
Publishing an app with in-app purchase with webview (PWA)
Hello, I'm trying to publish a PWA application. I got a refusal to publish the app because of the in-app purchase. I asked for more information I need some clarification regarding in-app purchases. The application is a PWA that displays the content of the url https://revisions-crpe.app . The purchase is made on the following site: https://maitresse-jero.com Do you mean that if I make the in-app purchase available by staying on the url https://revisions-crpe.app the application will be approved? I can't use services like StoreKit or Swift development because the application is a PWA. How do other PWA applications with paid services work? Apple's response Hello, We are not able to provide feedback on app concepts or features, but we recommend evaluating your suggestions against the App Store Review Guidelines, as well as the Apple Developer Program License Agreement, and the Human Interface Guidelines. Additionally, if you are considering implementing any of the following functionality, we recommend reviewing all associated reference material and other resources available on Apple Developer for any additional requirements. Apple Developer Apple Copyright and Trademark Guidelines Game Center iCloud In-App Purchase You may also choose to post a question in the Apple Developer Forums. Best regards, My questions So I wonder if offering direct purchase from https://revisions-crpe.app would be enough to get my pwa app published? If not, I don't see how I can do it any other way, as I don't develop in Swift. I use PWABuilder. Thanks for your help! :)
0
0
515
Feb ’24
The store kit review pop up appears hidden behind UI
The store review alert is shown hidden behind UI, I'm 100% sure it shows up, and I can see it when the current view is empty/transparent. I tried using various ways to find the current window, launching on different threads but nothing works. I have no idea what else to try the library doesn't really provide any documentation or anything. If it matters we are using the unity framework in the app, and it is a multi-window app. if let scene = UIApplication.shared.connectedScenes.first as? UIWindowScene { serviceProvider.reviewService.requestReview(in: scene) } this is the invocation, the service then calls func requestReview(in scene: UIWindowScene) { SKStoreReviewController.requestReview(in: scene) } the result is that the prompt is shown, but it is hidden behind ui elements, if the view is empty, the prompt is visible and interactable.
0
0
320
Feb ’24
Get all Products for in a subscription group
If I use SubscriptionStoreView.init(groupID), it seems to be able to look up all the Products that have that subscription group ID. But I don't see any public method for doing that myself. Am I missing something, or is SubscriptionStoreView using a private method to do this lookup? I know that historically it has always been necessary to know the product IDs of all the products you want to sell; you have never been able to ask Store Kit to give you a list. SubscriptionStoreView doesn't seem to have this limitation, which is a bit surprising.
0
3
528
Feb ’24
TLS_ISSUE with IAP Server Setup on AppStore Connect
Hi colleagues! I've encountered a technical issue during the setup of my In-App Purchase (IAP) server for my app (com.forgetmenuts) on AppStore Connect. In the "Info" section of my app's page on AppStore Connect, I've configured the "App Store Server Notifications" endpoints to: https://sys-conf.com/hooks/subscription/ios/debug. Here's the challenge I'm facing: When I initiate a "Request a Test Notification," everything seems to function as expected. I successfully receive the "testNotificationToken." However, the issue arises when I attempt to request the status of this token. At this stage, I encounter an error with the firstSendAttemptResult indicating a TLS_ISSUE. the error is described here: app store docs. I have verified the TLS configurations of my domain (sys-conf.com). Both TLS 1.2 and 1.3 are active and functioning correctly (verified through this TLS Checker: site24x7.com/tools/tls-checker.html I am looking for guidance on how to resolve this TLS issue. Any insights or suggestions from the community would be greatly appreciated, especially from those who might have faced and resolved similar challenges.
1
0
666
Feb ’24
Transaction.updates and purchases made on this device
The docs for Transaction.updates say: Use updates to receive new transactions while the app is running. This sequence receives transactions that occur outside of the app, such as Ask to Buy transactions, subscription offer code redemptions, and purchases that customers make in the App Store. It also emits transactions that customers complete in your app on another device. Note that after a successful in-app purchase on the same device, StoreKit returns the transaction through Product.PurchaseResult.success(_:). So Transaction.updates isn't supposed to include transactions for purchases that are made in this instance of the app, right? I have this code to get those transactions: SubscriptionStoreView(groupID: group_id) { } .onInAppPurchaseCompletion() { product, result in ..... } But when I make a purchase using this SubscriptionStoreView, I see that both this .onInAppPurchaseCompletion code and my code observing Transaction.updates is called. Is this expected? Will it work reliably without the .onInAppPurchaseCompletion ? Thanks.
0
0
582
Feb ’24
Does StoreKit2 not reliably report available purchases shortly after login?
My app is a login item that gets registered as a background agent using SMAppService. On launch it checks to see that the user has an active subscription, and when I run it from Xcode, this works fine. But it seems that if I restart my machine and it is run from launchd right at login, StoreKit doesn't return any purchases. This results in my app throwing up a window to tell the user to subscribe. It’s hard to be sure this is the behavior, because I can't really use a debugger, and for whatever reason, OSLog is not persisting messages (despite being configured to do so). Does anyone know if it takes a while after restart or login for Store Kit to reliably return purchases?
1
0
490
Feb ’24
Several subscriptions although I only need 2
Hello everyone, I have developed an app and actually only have 2 subscription models, one for a monthly subscription and one for a yearly subscription. For the start I created these two subscriptions as an offer, then my customer wanted to create the actual price, so I created 2 more subscription models (monthly and annual). At first I thought that I would change the price of the first two subscriptions, but since I wasn't sure whether the first buyers would have to pay the new price, I created 2 new subscriptions. I let the respective subscriptions appear through a third party provider as I need them. But unfortunately you could simply change the subscription to the subscription with the lowest price in the store yourself. I would like to avoid that. My question now is, could I simply change the price and the new buyers pay the new price but the previous buyers continue to pay the old price? And if so, could I deactivate all other subscriptions and would the buyers of the deactivated subscriptions continue to pay this price and not the price of the active subscriptions? It would be really great if you could answer these questions for me. Thank you very much.
0
0
234
Feb ’24