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

购买订阅型商品 transactionIdentifier 不在 receiptDataText里面
购买订阅型商品,为什么回调给苹果客户端的 SKPaymentTransaction.transactionIdentifier 不在从票据验证返回的receiptDataText(票据字符串)数据集合里 苹果客户端获取到的: SKPaymentTransaction.transactionIdentifier 苹果支付回调返回的id NSURL *receiptURL = [[NSBundle mainBundle] appStoreReceiptURL]; // 票据URL NSData *receiptData = [NSData dataWithContentsOfURL:receiptURL]; //票据二进制 NSString *receiptDataText = [receiptData base64EncodedStringWithOptions:NSDataBase64EncodingEndLineWithLineFeed]; //票据字符串
0
0
28
3h
Tesflight eCommerce error, Beta testers outside the US, for our MacOS App, are being told their ID is not valid in the US Store
Beta testers outside the US, for our MacOS App, are being told their ID is not valid in the US Store and that they must switch to a store in their country. Yet the store switch fails Essentially beta testers outside the US cannot do testflight sandbox eCommerce for the Mac version of our app. Note that eCommerce on the Mac works for US based testers and eCommerce for the iOS/iPadOS works for testers in all territories. Many of these testers are in India, the UK and Canada. We believe that this is incorrect, that storeKit is not correctly detecting the AppStore Region for mac based testflight eCommerce. At this point we have 382 testers, most outside the US and we can only Beta Test our app with US users. Attached are images of the messages that are coming from storeKit: Here is a link to a video from a user in Canada who is demonstrating the problem (cut and paste into browser) https://youtu.be/kB818wfVld4 Here is another link to a video from a user in Canada who is demonstrating the problem (cut and paste into browser). https://youtu.be/7uAZKo8wpfU We see that there is another post with a similar problem. Similar eCommerce Problem Because eCommerce works in all territories on iOS/iPadOS but ONLY in the US for Mac we suspect that this is an error that either a DBA or a coder will need to fix. Any insights from anyone would be appreciated.
1
0
111
10h
Questions about ConsumptionRequest properties
Hello. platform: Please let me know which platform 'Non-Apple platform' is referring to. For example, Google or Amazon? And is it correct to mean the platform that consumed the products received due to in-app purchases? playTime: Does 'playTime' mean the time when the customer purchased the app and actually accessed the app? Or do you mean the time you accessed after the in-app purchase?
0
0
72
2d
How the app behaves when an AccountNotFoundError is returned by the App Store Server API.
We are currently implementing in-app purchases with auto-renewing subscriptions. If an AccountNotFoundError is returned from the App Store Server API, is it correct for the app to stop the service offered with that subscription? The documentation does not go into detail, so I am just checking to be sure. https://developer.apple.com/documentation/appstoreserverapi/accountnotfounderror
0
0
77
2d
“Account Not In This Store” error when trying to purchase non-consumable IAP within TestFlight
I have simple non-consumable IAPs set up for an app on macOS. Testing in development with a local .storekit configuration file, everything works as expected. Testing in development with a remote Sandbox, everything also seems to work fine. Product names and prices fetch correctly, I am able to make purchases with a Sandbox account (both US and UK). Once I upload a build into TestFlight, IAPs no longer work. The tester would download the Beta app from TestFlight. They open a license manager and can see all the product names, descriptions and prices are pulled from Apple servers correctly (with the correct local currency as well!). So far so good. When trying to purchase any of the IAP, the following error appears: This is TestFlight so testers are using their real Apple ID. My understanding is that they should continue using their production credentials and a TestFlight Sandbox would be configured behind the scenes automatically. This error always says the users cannot purchase from a US store and must switch to [whatever user’s actual store location is] store. For example, my account is based in the UK, has got a UK billing address and a UK payment method, and the error tells me to switch to the UK store. People in Canada get a similar error - you must switch from the US store to Canadian. The error makes no sense, the account is already in the desired country. Clicking on the “Change Store” button opens the App Store app and displays another error: “Cannot Connect to App Store”. Clicking Retry just results in this errors showing again and again. Clicking OK takes us back to the failed IAP purchase and the final error message appears: “Purchase Error - Unable to Complete Request”. Things I’ve done / checked: IAPs are configured in App Store Connect and available for all regions prices are set for all regions in App Store Connect IAP name and description localisation in English (UK) IAP status is Ready to Submit, I don’t think I can go past that unless I make a production release (which I can’t until we fix the problem) IAP capabilities added in xcode the problem is not account, machine, or location dependent - every beta tester testing my app on TestFlight has the same issue, they each use a different account and have accounts in different countries double checked the App Store account location in the App Store settings - it is definitely matching the store this error is asking to switch to application exits at startup with error 173 if app receipt cannot be found - this one was suggested by the review team, I could not really find any documentation for it review team also suggested I should add com.apple.security.network.client to enable IAP connectivity. I did add that to one of the builds and it did not help. I am not really convinced this is necessary Any suggestions on what to check and what to try? I have run out of ideas.
3
4
150
11h
Use personal Reduction Code in apple ios application ?
Good morning, I am in the process of setting up a new release of my application, in fact I recently submitted a release using stripe as a means of payment for subscriptions which was refused by telling me that it must go through Apple IAP. Currently everything has been migrated to IAP, my subscriptions are offered by period (1 month, 6 months, etc.), and with discount vouchers that I manage until now with my server (managarial/marketing choice). The approach used to manage this is to offer two subscriptions on Apple Connect for each period: for example 1 month => there is one subscription with $3 and one with $2. With respect to my server verifications (has the user validated their discount voucher or not), I display the appropriate subscription to them. Could you please tell me that this approach will not impact me on my next review? while knowing that currently all subscriptions now go through IAP Apple and my work on the server side only manages the display of the appropriate products and whether or not the user has validated their reduction voucher. Tank you.
0
0
179
1w
Subscription Unavailable - Strange Behavior with StoreKit
I added my first subscription to my app using StoreKit's SubscriptionStoreView. Everything worked as expected in the debug environment and also in TestFlight. So I submitted my app and subscriptions to App Store Connect, got everything Approved and released. After updating my app through App Store and checking the Subscription View, it just says "Subscription Unavailable. The subscription is unavailable in the current storefront." I waited around 3 days and still getting the same message. Now the very strange behavior starts. I went to App Store Connect, I made and edit to the subscription description, saved, removed the edit, saved, and submitted to review. 15 minutes later the subscriptions appear in my app and everything works as expected. After getting the edit approved, the Subscription View in my app again only showed the message "Subscription Unavailable. The subscription is unavailable in the current storefront." No user is able to see the subscriptions anymore, even though it worked as expected before the edit was approved. So I did the same as before. Again, make an edit to the subscription description, save, remove the edit, save, submit to review. 15 minutes later the subscriptions are again available in my app and it works as expected. This is definitely not the expected behavior and submitting the subscription edits every day is wasting the App Review Team's time as well as mine. I contacted Apple Developer Support but I didn't get any reply back (at least yet). I am not the only one experiencing this. I found a friend online who has the exact same issue, and is able to temporarily solve it by making an edit to the subscription description as well. So far it has been a huge headache, and we are losing customers this way. Please if anyone has experience with this problem, or has any suggestions, they will be greatly appreciated. Thank you so much, Tomas
5
4
274
1w
Test Flight build does not show Purchase Confirmation popup for IAP.
Hi, We are seeing a small issue on our app with a subscription in app purchase and wondering whether this should be a cause for concern. We have 2 subscription based IAPs and 1 consumable within the app. I recently noticed that after buying one of the subscriptions and cancelling it if I try to buy the product again, it skips the purchase flow on our Test Flight builds. I added some logs, and it appears that Product.purchase() returns right away and the resulting transaction also comes back as verified, but the new purchase is not added to current entitlements. I managed to get the flow working after I logged out from my Sandbox account from settings, but after I did another subscription cancellation, I could not purchase the product anymore. This only happens on our Test Flight builds. If I launch the app through Xcode and use a store kit configuration file at launch, I get the purchase popup every time I try to buy the product. It also appears to me that this only happens on a product that I have purchased previously. For the other subscription that I have not purchased before the popup shows up every time. Is this something that we should be concerned about and is there a way to make sure the purchase popup shows up every time? Thank you. Kind regards, Fardin
0
0
99
1w
"account not in this store" error when testing inApp purchase
I've already done my test on development signed app locally, all in-app purchase runs well with sandbox tester Apple ID. Errors happens when make a purchase in distribution app from TestFlight. Detail Info: in Apple Store connect , make app available to China Electron project, packaging by electron builder using distribution sign upload to TestFlight, invite myself to test using my Apple ID(not the sandbox tester) to login and purchase dialog appears and said "Account not in this store" VPN is off Apple Store shows Chinese language and Chinese apps, not llikely to be u.s. store I'm suspecting that: Maybe shouldn't use my developer Apple ID to run TestFlight test? TestFlight locked app to be in u.s. store ?
2
0
209
10h
Pay attention to StoreKit Configuration settings
It's not a question, I just want to share my experience of resolving a bug. We where adding a new product to the app and couldn't get why it's not loading. StoreKit 2 simply did not return the product, so we switched to StoreKit 1 to get invalidProductIdentifiers from the response. The product was there of course. So many time was spend... We checked App Store configuration, everything was approved. Checked id, localization, multiple devices. Everyone start to get mad, we filled issues for RevenueCat and Apple. Then we uploaded a TF build (because product wasn't loading when running from Xcode). And, suddenly the product did appear there! I understood that it can be connected to StoreKit Configuration, since it works only in debugger mode (Debug or Release), but not in TF. But there was no any .storekit files in the project folder. I search it many times - no success. And finally the bug was resolved when I checked Run Scheme. As you can see on the screenshot, it has red value under StoreKit Configuration. That means there where a file before, but than it was removed. So I changed it to None and the product started to work in debug. Great! I hope this post helps, don't fall to the same error as me! Related article: Setting up StoreKit Testing in Xcode
0
0
166
2w
[StoreKit2] Purchase completion is displayed even if it has not been completed.
StoreKit2 is being tested in a Sandbox environment for the purchase of consumable items. The code being implemented is below. let result = try? await product.purchase() switch result { case let .success(verification): switch verification { case let .verified(transaction): let jws = verification.jwsRepresentation let success = await purchaseItem(of: itemId, with: jws) if success { await transaction.finish() return (success: true, error: nil) } else { return (success: false, error: .serverError) } case .unverified: return (success: false, error: .unverified) } Assume that the verification was successful, but a server error occurred. in let success = await purchaseItem(of: itemId, with: jws), success = false When tested in Sandbox and local environment, the first alert of purchase completion is displayed. After that, a purchase failure alert is displayed. (The purchase failure alert is displayed by the result of return (success: false, error: .serverError)) Is it proper behavior to display purchase completion once? Is it appropriate behavior for the purchase completion to be displayed once in the production environment? Is the billing actually occurring at this time? Thank you in advance for your answers!
1
0
185
4d
Migrate from the verifyReceipt API to the new
Apple has deprecated the https://buy.itunes.apple.com/verifyReceipt API and encourages users to migrate to the new https://api.storekit.itunes.apple.com/inApps/v1/transactions/{transactionId} API. However, during the migration, a problem was discovered. Previously, with the verifyReceipt API, the 21007 status code could be used to distinguish between the sandbox and production environments. Now, with the new API, if the {transactionId} is from the sandbox environment, it will directly return {"errorCode":4040010,"errorMessage":"Transaction id not found."}. How can I distinguish whether a {transactionId} is generated in the sandbox environment or the production environment?
5
1
278
1w
The in-app purchase is not working
The in-app purchase is not working. I am trying to create auto-renewable subscriptions, but all I see is "The subscription is unavailable in the current storefront." I have checked and signed all agreements available to me in App Store Connect. They are all in "Active" status. I created subscriptions in App Store Connect (they are all in "Waiting for Review" status). All countries or regions are selected in the subscription. Subscription Prices, Tax Category, and App Store Localization are set. When building in Xcode, I set the StoreKit Configuration to None in the scheme. The app was installed via TestFlight. I submitted the app for review, but the reviewer also couldn't use the purchases. I've already watched all the videos on StoreKit v2. I don't know what else I can do.
1
0
139
2w
storekit configuration file Only for testing ?
I was using the storekit configuration file to test subscriptio renewals so set it to renew every 30 seconds. I have since shipped the App. Should I have set the storekit configuration file back to real time for the renewals, or the storekit configuration file is only for non release builds so anything I have changed in their won’t effect the released build ?
1
0
201
3w