StoreKit

RSS for tag

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

StoreKit Documentation

Posts under StoreKit tag

306 Posts
Sort by:
Post not yet marked as solved
0 Replies
94 Views
In the all the example code I see that it is recommended to keep track of the last version of your app when you called requestReviewInScene in StoreKit so that you don't call this function more than once for any particular version of your app. But I also see that the StoreKit itself enforces this requirement by only presenting the user with a request for a review once for any version of an app. So I wonder why the redundancy? When we call requestReviewInScene, the StoreKit may or may not show the user a request. Furthermore, we have no way of knowing in the code if the request was presented or not. If the request was made when the device happened to be offline (such as out of range of cell service or wi-fi or in airplane mode) then the StoreKit knows that the request was not passed along to the user, but our code does not. If we count that request and don't ever request again, the user will never see a request for a review. On the other hand, I can see some justification for limiting unnecessary internet access by not making our requests too often. How are we supposed to balance the goal of not requesting reviews too often with the goal of not wanting to miss the opportunity to request a review just because the one and only time we made our request was when the user was off-line? Would it make sense to check for internet connectivity before making our request?
Posted
by
Post not yet marked as solved
5 Replies
380 Views
I encountered the following issue without App or Server update. As the result (SKProductsResponse) of SKProductsRequest with my Product IDs, empty request.products was returned in the delegate of requestDidFinish. These subscription items are valid, so it will not be returned empty, but the error has occured during the following OS versions. Also, there was no notification in didFailWithError of SKProductsRequest. Details Billing failure (>= iOS 15.4) SKProductsResponse.products: empty SKProductsResponse.invalidProductIdentifiers: contain the requested Product IDs Billing success (<= iOS 15.3) SKProductsResponse.products: contain the requested Product IDs SKProductsResponse.invalidProductIdentifiers: empty OS versions The issue occurs with the following OS versions. iOS 15.4.x iOS 15.5.x note: cannot confirmed the issue with iOS 15.3 or lower so far. Anyone can help?
Posted
by
Post not yet marked as solved
1 Replies
160 Views
We are makers of a tvOS app that is in the App Store for over 5 years now. Recently we were not able to test In-App purchases at all. Whether it's sandbox or Xcode testing there is always somthing wrong. This starts at not being able to load products from Xcode. On tvOS 15.x we just get an empty array when loading products from the Xcode configuration file. On tvOS 16 Beta we at least get the products from Sandbox. But that is not what we wanted, since we explitlity configured the schema to connect to Xcode for testing. Transaction renewals are simply ignored. We are able to purchase a subscription once. Any renewals after that are not broadcast to the update listener and our app has no chance of knowing. We created a simple test app that runs on both iOS and tvOS. The same simple UI code and StoreKit code. The result speaks for itself: On iOS everything works fine. On tvOS all the above errors are happening. We tried this with various combinations: Different Xcode version, different development Macs, different Apple TVs, simulators, tvOS version (even Beta), resetting Apple TVs, different sandbox accounts... So my question is: Did you guys give up on tvOS?
Posted
by
Post not yet marked as solved
1 Replies
128 Views
My app is almost done and now in the step of adding the subscriptions. I offer two subscriptions both annual but different functionality I created them in appstore but am confused about submit for review. Quering my products with Storekit not returning anything. How should i make my first one active so it returns for testing?
Posted
by
Post not yet marked as solved
1 Replies
137 Views
Good morning! Quick question regarding receipt validation when doing subscription restore. I do restore for subscription. My receipt has 10 transactions... after the restore obviously it will have 20 transactions in it. Do I need to sync the receipt with our backend for every new transactions created by restore operation or I can finish n-1 transaction and just send the receipt once for the last transaction? Will the receipt be the same for every transaction created by restore operation?
Post not yet marked as solved
2 Replies
176 Views
I am running subscription purchase tests on different apps, but I get the message "maximum number of free accounts", why am I showing this message when I use the test sandbox users? but more important! How I can solve having to use different test sandbox accounts anyway? Thanks Danilo
Posted
by
Post not yet marked as solved
0 Replies
127 Views
Hello! We had to update the subscription data for our users: the subscription dates and the original transaction identifiers. We can do it by sending receipts to verifyReceipt endpoints to Apple. We have about 10 thousand subscribers. I assume if we send that many requests in a day, we can get blocked. We want to split this operation over several days. Could you please let us know how many requests to this endpoint we can make from our server in order not to be blocked and feel safe?
Posted
by
Post not yet marked as solved
4 Replies
274 Views
I'm working on an app that uses Auto renewable subscriptions. The app uses StoreKit (not StoreKit2). It is pre-release. I was under the assumption that if the user subscribes via in app purchase on Device 1, and then installs the same app on Device 2 (logged in with the same Apple ID) that the receipt on Device 2 would include the in app purchase receipt on initial install, and therefore by inspecting the receipt locally I could determine that showing onboarding UI on Device 2 is not necessary (and all this could be done locally). Is this not true? I just watched the WWDC 2022 session 110404 "Implement proactive in-app purchase restore" which seems to indicate that this is not the case?
Post not yet marked as solved
1 Replies
179 Views
Hi, I have encoutered problem while testing in app purchases on Test Flight using production environment. I have created two non reniewing subscriptions and one auto renewable subscription. When I query products from store using storekit, it returns wrong price for any location using euro. It works fine for US Dollar or czech crown. Correct price is also displayed for auto-renewing subscription. Example: I have chosen Tier 59 and expected to see price 94.99 €, but price 104.99 € is returned.
Posted
by
Post not yet marked as solved
0 Replies
112 Views
I'm trying to sign into a Sandbox account which is visible in App Store Connect from an iPhone 6 running iOS 12.5.5. After submitting Sandbox account or Apple ID credentials, a gear wheel appears but when it disappears the Sign In prompt reappears. If I enter invalid credentials, immediate feedback they they are invalid is shown.
Posted
by
Post not yet marked as solved
0 Replies
139 Views
I'm trying to add Non-Consumable Titles to our Apple and I have been getting strange errors. Then I came across this on the Apple Forum "We’re reaching out to let you know about upcoming changes to in-app purchase content hosting. In Xcode 13.3, we’ve removed the option to upload non-consumable in-app purchase assets for Apple to host. In addition, support for managing these assets in App Store Connect will be removed starting in April 2022. " They suggest for us to use ODR? Is this for real? We can't use ITMSTransporter to upload new Non-Consumable Titles to our App? This is the command I been using after I create the itmsp package: /Applications/Transporter.app/Contents/itms/bin/iTMSTransporter -m upload -f /Users/abc/Desktop/2022-06-10-13-58-27.itmsp -u xyz@abc.com -p ******** But I'm able to create Non-Consumable titles when I log into the https://appstoreconnect.apple.com/ Is Apple really expecting us to change to ODR?
Posted
by
Post not yet marked as solved
0 Replies
131 Views
Hi I implement In-app-Purchas on ios. and verify the plan on Xcode using the stotrKit configuration. Works fine on Xcode. I create the same subscription group and plan on AppstoreConnect (it is not validated by apple yet), but I can not see the subscription plan on the test flight yet. And when trying to submit the app to get approval for the subscription plan, the Apple reviewer commented that the list came empty. How can I test the subscription on Testflight?
Posted
by
Post not yet marked as solved
1 Replies
203 Views
We are trying to integrate StoreKit Testing into our unit and UI testing flow on Mac and iOS. The basic idea is bypassing the paywall so that the specific test can do its job without interference. In our subclass of XCUIApplication, we've overridden the launch method to simulate the purchase of the app's full version: import XCTest import StoreKitTest class OurCustomApp : XCUIApplication { private var _storeKitSession : AnyObject? = nil override func launch() { super.launch() do { _storeKitSession = try SKTestSession(configurationFileNamed: "iap_desktop") (_storeKitSession as! SKTestSession).disableDialogs = true (_storeKitSession as! SKTestSession).clearTransactions() try (_storeKitSession as! SKTestSession).buyProduct(productIdentifier: "<our product identifier>") } catch { XCTFail("Can't setup StoreKit test. \(error)") } } } However, we faced a weird runtime issue: UITests-Runner[53387:25779369] Error in XPC connection when checking Xcode Test app: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.storekitagent was invalidated: failed at lookup with error 159 - Sandbox restriction." UserInfo={NSDebugDescription=The connection to service named com.apple.storekitagent was invalidated: failed at lookup with error 159 - Sandbox restriction.} We use the proper certificate for StoreKit Testing and follow all the steps from Setting Up StoreKit Testing in Xcode. The problem reproduces on all our machines, including Intel-based and M1 Macs. We'd appreciate any hints or clues that will help us resolve this issue.
Posted
by
Post not yet marked as solved
0 Replies
143 Views
We want to test auto renewable subscription in the sandbox. On my personal iPhone is my personal production account. On my personal iPhone is a sandbox account. But: When I want to buy subscription in the sandbox on the watch, then the watch shows the error: "Buying the app is not possible. Login with your iPhone with the Apple Watch App with your Apple-ID." When I take a look in the watchApp --&gt; General --&gt; AppleId then I see my production account. QUESTION: How can I use the sandbox Account to test subscription?
Posted
by
Post not yet marked as solved
2 Replies
218 Views
According to the documentation and WWDC sessions, as long as we create a SKPayment with applicationUsername to be a UUID string. This value should be persistent when the transactions are updated. However, when we tested it with XCode 14 and iOS 15 device, when we receive the SKPaymentTransaction for the auto renewals. The SKPaymentTransaction.payment.applicationUsername is nil. Is this expected? Or it's a feature that will come in the future Xcode releases?
Posted
by