StoreKit

RSS for tag

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

StoreKit Documentation

Post

Replies

Boosts

Views

Activity

Testing in-app purchases
I need to test my app's in-app purchases and I am having a very difficult time with it. I created a "Sandbox" account in App Store connect. Doing so was very frustrating. It told me multiple times that my password was "too simple", without ever explaining what the password rules are. Then it emailed me something so I could "validate" the account. Luckily I used an actual email address that I can receive mail on. I was expecting I could use any fake address since this is a Sandbox account. After that I started an iOS simulator and tried to log in. It immediately asked me to turn on two-factor authentication. I declined, and then it just said "User name or password is incorrect". I tried a couple more times, then I went back and actually turned on the two factor auth. But that didn't solve the problem. I still cannot log in. Can someone explain what I'm doing wrong here?
0
0
542
Mar ’24
How to detect when auto-renewing subscription expires?
Hi all, I've implemented in-app purchases to have auto-renewing subscriptions. However, when I use Xcode's Transaction Manager to expire a subscription, there seems to be no callback Transaction.updates or Transaction.currentEntitlements I can see an expiry through Transaction.all but I can't imagine the intention is to poll that while the app is running. What am I missing here?
1
0
586
Mar ’24
Physical or Digital Service for Competition Entry Fee?
I'm trying to figure out if my app will be required to use apple pay or not. My app features cycling competitions that take place over a month. There is no single race day so there is no physical event taking place. Instead, you're considered to be "in the event" every time you ride specific sections of road for that period of time. Unlike with, say, a telemedicine appointment, or a day-of race that you can't join if you don't have a ticket, there is no stopping you from riding your bike if you don't buy a ticket. The only difference is in whether you were riding as part of the event or not. The answer to this question will inform whether I take in-app payments or go with a 3rd party processor. Any guidance would be super helpful. Thank you!
0
0
278
Mar ’24
My Order on individual Apple Developer Membership reviewing 1 month and I didn't get an answer
My order reviewing 1 month and I didn't get an answer at all. During this period I have been trying different ways to get the subscription. I have tried different cards, different addresses and also I have tried to contact with Apple Support but I don't really understand why I can't complete this. there is an example what Apple Support answered me on message to help: Open this email on an iOS, iPadOS, or macOS device. Tap here to open the Apple Developer app from the App Store. Sign in to the app and follow in-app guidance to enroll. So when I download the app and follow the guidence I face grayed out button that didn't works and subtext: "Enrollment through the Apple Developer app is not available for this Apple ID. Visit: https://developer.apple.com/programs/enroll/" So this site is the site which answers me that my order will be reviewing during 2 business days. I am in the dead cycle where I can't pay my Program. Why? Pleas help me
0
0
444
Mar ’24
Status notification reception transition
We received a notification DID_FAIL_TO_RENEW(subtype:(Empty)) from App Store when the subscription failed to renew because of a billing issue. After this case, we predict that we will receive the notifications based on the following two cases. If the user resolves a billing issue: Receives notification DID_RENEW(subtype:(BILLING_RECOVERY)) If the user does not resolve the billing issue and cancels the subscription: Receives notification EXPIRED(subtype:BILLING_RETRY) Based on the above, I would like to ask two questions Are the above two cases and the notification types we expected correct? If wrong, please tell me what is wrong. If there are other than the above two cases, please tell me the case and notification type.
0
0
480
Mar ’24
2-sided marketplace/digital service/app store fee
My app enables dancers to monetize their work. Dances can be accessed through the app and learned with the features that we build (slow a video down, audio instructions). The majority of the revenue goes to the dancer, as it is typical for 2-sided marketplaces, and the business takes a 10-20% cut. Currently, we use IAP and users pay to unlock per dance. However, our business model is not feasible with the app store taking 15% and then 30% of the revenue in the long run. Are there exceptions for 2-sided marketplaces where the app store fee is being deducted from the business revenue, and not the overall revenue? If we have people purchase a subscription or credits on our website, what can we do to heighten our chances of that being approved by apple? I know that reader apps are allowed to do that. The app should largely classify as a reader app, since the users access content through it, but we also offer some functionality (such as slowing down the video or using the camera), so I am worried that the app store is going to be difficult about this after we build the system.
0
0
340
Mar ’24
Third party payment gateeway instead of In-app purchase
Our application facilitates doctors in storing patient records, including essential documents and images. However, a subscription is required for users to store images on a monthly or yearly basis. Considering we also have an Android application, we're considering using the same payment gateway for both platforms. Is it acceptable to integrate a third-party payment gateway instead of relying on an in-app purchase system? Thanks in advance.
0
0
310
Mar ’24
How to test subscriptions through Storekit 2 in Sandbox?
Hey all, Tl;dr: In debug-build using a .storekit file, all is good. When uploading a release build to testflight, purchasing follow the expected flow, but it does not seem the subscription status is reflected. Full description I've implemented auto-renewable subscriptions in my app. In debug, I've setup a scheme to use products.storekit. When I run this scheme on my device, I can subscrbe, cancel etc, and it all works as expected. When I upload my release scheme to testflight, purchasing can be done, but changes do not seem to be reflected inside the app (i.e.e no features get unlocked). Same thing when I run this scheme on my device. This scheme has None set for Storekit configuration. When I set 'Storekit configuration' to the Products.storekit, file I can't make a purches at all: SubscriptionStoreView shows Subscription unavailable. The subscription is unavailable in the current storefront'. I've watched a number of WWDC sessions on the topic, read most (all?) of the documentation, and I just can't seem to find out what it is that needs to be done. Unfortunately, debugging has been rather cumbersome and sometimes impossible lately, especially when trying to debug a release build. Anyone can tell me what it is I am overlooking, or what piece of information or link I missed? Here is the relevant code (which works OK in debug) private func listenForTransactions() -> Task<Void, Error> { return Task.detached { for await anUpdate in Transaction.updates { do { let transaction = try self.checkVerified(anUpdate) await self.checkSubscriptionStatus() await transaction.finish() } } } } And here's checkSubscriptionStatus(): @MainActor private func checkSubscriptionStatus() async { var hasActiveSubscription = false do { for aStatus in try await Product.SubscriptionInfo.status(for: "718A7488") { let state = aStatus.state hasActiveSubscription = (state == .inGracePeriod) || (state == .subscribed) } } catch { print(error) } self.hasActiveSubscription = hasActiveSubscription }
0
1
798
Mar ’24
App Only Crashes on Launch in iOS 17.4 for Production Version
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.
1
1
3k
Mar ’24
Get originalTransactionId in app after completed purchase
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
0
0
334
Mar ’24
app transfer encountered subscription verification and login issues
For V1 used for internal purchase verification, when will the exclusive shared key regenerated after transfer be replaced? Will it affect in-app purchases and subscriptions by online users? The V2 used for internal purchase verification uses the key ID instead of the dedicated shared key. In this case, what should we pay attention to before and after the transfer? Do I need to regenerate the key ID for the new account? Is the private shared key still useful? Do I need to generate a dedicated shared key again in the transferred App? What will be the impact on existing subscriptions after the transfer? What do I need to do with the current existing subscriptions? We have used universalLink, do we need to add a new TeamId to the apple-app-site-assn. txt file? { "applinks": { "apps": [], "details": [ { "appID": “TeamIdA.com.***.***”, "paths": [""] }, { "appID": “TeamIdB.com.***.***”, "paths": [""] } ] } } We have stored the login information in Keychain Sharing, is there no way to get the original stored information after transfer? Is there a reasonable solution?
0
0
461
Mar ’24
What will happen if an existing subscriber redeem the offer code which is only eligible to new and expired subscribers?
I am working on an iOS app. I have created an annual offer code which is only eligible to new users and expired subscribers. May I know what will happen if an existing subscriber tries to redeem the offer using the offer code url? Then they would finish the whole process through the App Store. There are no ways for my app to block it. Would Apple not allow them to do this? If yes, would the existing subscribers have to cancel their subscription in order to redeem this annual offer code? If yes, will they then immediately see the offer? Or will they have to wait until their entitlement expires? Thanks.
1
0
437
Mar ’24
In-App Purchase error Invalid status code
On March 8, multiple users reported invalid status codes when using our app to make payments. By night, it was back to normal. Has anyone encountered the same problem? Error Domain=SKErrorDomain Code=0 "发生未知错误" UserInfo={NSLocalizedDescription=发生未知错误, NSUnderlyingError=0x283f71740 {Error Domain=ASDErrorDomain Code=500 "Unhandled exception" UserInfo={NSUnderlyingError=0x283f71d10 {Error Domain=AMSErrorDomain Code=100 "Authentication Failed" UserInfo={NSLocalizedDescription=Authentication Failed, NSMultipleUnderlyingErrorsKey=( "Error Domain=AMSErrorDomain Code=301 "Invalid Status Code" UserInfo={NSLocalizedFailureReason=The response has an invalid status code, AMSURL=https://auth.itunes.apple.com/auth/v1/native, AMSStatusCode=403, NSLocalizedDescription=Invalid Status Code}", "Error Domain=AMSErrorDomain Code=301 "Invalid Status Code" UserInfo={NSLocalizedFailureReason=The response has an invalid status code, AMSURL=https://auth.itunes.apple.com/auth/v1/native, AMSStatusCode=403, NSLocalizedDescription=Invalid Status Code}"), AMSURL=https://p42-buy.itunes.apple.com/WebObjects/MZBuy.woa/wa/inAppBuy?guid=00008120-001E64823A0BC01E, AMSStatusCode=200, AMSServerPayload={ "cancel-purchase-batch" = 1; customerMessage = "使用 Apple ID 登录"; dialog = { cancelButtonString = "取消"; defaultButton = Buy; explanation = "输入 %%appleId%% 的密码以授权此交易。"; initialCheckboxValue = 1; kind = authorization; "m-allowed" = 0; message = "使用 Apple ID 登录"; okButtonAction = {.........
0
0
518
Mar ’24
How to set a price for in-app purchases so I get a specific amount after taxes and fees?
Hello, My app was just approved and it is a marketplace app for self-guided tours. The tours are digital products and hence we use in-app purchases. We are allowing people to buy worldwide because it is a travel-related product but I’m struggling to figure out how to set the price. The tour creators have a price in mind and we have a commission. We are able to calculate what price to set in US keeping in mind the 15% Apple fee and tax. However, once I set a price on the App Store in USD, there is a large variation in the amount I will be paid from other countries and currencies as each country levies its own tax. Managing 100+ countries manually is not feasible. Any workarounds or ways in which I can tell the App Store what I want to be paid after taxes so that prices are adjusted in each country accordingly???
2
0
709
Mar ’24
StoreKit2 - How to get actual price paid for subscription via Transaction?
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.
2
0
544
Mar ’24
SKProducts api Error while connecting api.sandbox.apple.com/v1/catalog/us/in-apps
{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);}
0
0
329
Mar ’24