Hello!
We are tryign to test refund notifications and we've implemented a debug button trigger the refund of a purchase done with a sandbox account. The problem is that the refund view displays a Cannot Connect message and nothing happens. No error messages appear in the console. Anything we are doing wrong?
StoreKit
RSS for tagSupport in-app purchases and interactions with the App Store using StoreKit.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Created
I am experiencing an issue with my iOS app where StoreKit 2 in-app subscriptions are not appearing when using Product.products(for:). I have done all the necessary configurations, but the products still return an empty array ([]).
Here are the details of my setup:
• App ID / Bundle ID: com.tstore.vocabely
• Product IDs:
• com.tstore.vocabely.base
• com.tstore.vocabely.pro
• com.tstore.vocabely.ultimate
• Paid Apps Agreement: Active
• IAP Status in App Store Connect: Ready to Submit / Approved
• Testing Environment:
• Device: iPhone (real device)
• iOS Version: [insert your iOS version]
• Xcode Version: [insert your Xcode version]
• Sandbox Tester Account used
• Code Snippet: Using Product.products(for: productIDs) in StoreKitManager to fetch products
I have verified:
• Product IDs match exactly with App Store Connect
• Paid Apps Agreement is Active
• Using a real device, not a simulator
• Sandbox account is properly signed in
Despite all of this, fetchProducts() still returns an empty array.
Could you please assist me in troubleshooting why my subscriptions are not appearing in the Sandbox environment?
Thank you for your support.
Topic:
App & System Services
SubTopic:
StoreKit
When I added the ExcelIO library to my app and compiled it, the following error occurred:
Framework 'SwiftSpreadsheet' not found
Linker command failed with exit code 1 (use -v to see invocation)
I added the following to my Podfile and installed it, but the error persists. (No errors occurred during pod install.)
platform :ios, '9.0'
Pods for medical_expense
target 'medical_expense' do
Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
pod 'SwiftyTesseract', '~ 2.0'
pod 'SwiftSpreadsheet'
end
Pods for Petty_staff
target 'Petty_staffTests' do
inherit! :search_paths
pod 'ReachabilitySwift'
Pods for testing
end
target 'Petty_staffUITests' do
inherit! :search_paths
Pods for testing
end
Note that "SwiftSpreadsheet" exists in
/Users/ymdakr/MyAppli/Medical_Expense/Pods/Target Support Files/Pods-medical_expense/Pods-medical_expense.debug.xcconfig
and
/Users/ymdakr/MyAppli/Medical_Expense/Pods/Target Support Files/Pods-medical_expense/Pods-medical_expense.release.xcconfig
Only in [Files/Pods-medical_expense/Pods-medical_expense.debug.xcconfig]
What should I do?
Hello, Our app supports family sharing skus, we successfully ran tests on family sharing features in sandbox, we noticed the feature does not work on live builds.
The family member (child account) do see the subscription as "Shared with you". We attempted to restore multiple time and there is nothing to restore.
Topic:
App & System Services
SubTopic:
StoreKit
We distribute apps that offer auto-renewing subscriptions.
In order to test a new service, we would like to create a new subscription group and subscription product (hereinafter referred to as “test subscription”) for this app.
If the “In-app purchase statuses” of the test subscription is “Ready to Submit” is the following behavior correct?
・General end users cannot purchase the test subscription.
・Users with SANDBOX Apple accounts can purchase the test subscription.
I’m seeing an issue with subscriptions in TestFlight builds on iOS 26. Running from Xcode works as expected, and the App Store build looks fine. But when I install the same build via TestFlight, transaction.subscriptionStatus is nil.
The identical binary behaves correctly on an iOS 18 device.
Is this expected behavior on iOS 26 TestFlight, or am I missing something?
Thanks!
I want to build an app for ios using react native. preferably expo.
The app will be for recording user experiences with technology. the SLUDGE that they face while navigating through technology.
I want to have basic login, signup.
The main feature would be to have 2 recording modes.
First is record the screen and the front camera simultaneously.
Second is to record the back camera and the front camera simultaneously.
I can then patch the two outputs later on that is the screen recording and the front camera clip in post processing.
I want to know if this is possible as I was told that react native and expo does not have the support yet. if not is there any library or another approach to make this app come alive.
We’re testing SKAN postbacks via AdAttributionKit but aren’t receiving any requests on our server even after generating development impressions and triggering a postback.
Setup:
Domain: https://linkrunner-skan.com
Configured in Info.plist as:
<key>NSAdvertisingAttributionReportEndpoint</key>
<string>https://linkrunner-skan.com</string>
<key>AttributionCopyEndpoint</key>
<string>https://linkrunner-skan.com</string>
Apple automatically appends the .well-known paths:
/.well-known/private-click-measurement/report-attribution/
/.well-known/skadnetwork/report-attribution/
ATS diagnostics for the domain: PASS for all tests (TLS 1.0–1.3, PFS disabled, arbitrary loads allowed, etc.)
Both .well-known paths are publicly accessible and return 200 OK
Testing Flow:
Enabled Developer → AdAttributionKit Developer Mode on iOS (15+)
Followed Apple’s official guide: Testing AdAttributionKit with Developer Mode
Generated test impression using:
createAdAttributionKitDevelopmentImpression implemented in SKANManager.swift
Called Postback.updateConversionValue with lockPostback: true
Created Development Postback from Developer Settings
Waited 30+ minutes while intercepting server requests (proxy + backend logs)
What We’ve Tried So Far:
Confirmed ATS compliance with nscurl --ats-diagnostics (all PASS)
Verified .well-known paths are accessible publicly without redirects
Tested endpoints manually with a POST request – server responds 200 OK
Confirmed Info.plist entries exactly match Apple’s required keys
Double-checked iOS device is running iOS 15+ with Developer Mode enabled
Repeated test flow multiple times with fresh impressions and postbacks
Waited up to 1 hour for postback (in case of delays)
Issue:
No POST requests are being received from Apple to either .well-known endpoint, even though the setup appears correct and ATS tests pass.
References Used:
Configuring an Advertised App
Generating JWS Impressions
Question:
Has anyone faced a similar issue where AdAttributionKit Development Postbacks are not firing despite correct Info.plist setup, ATS compliance, and reachable .well-known endpoints?
Any insight into possible missing configuration steps or testing nuances would be greatly appreciated.
I have using the internal testflight testers to test the app and IAP everyting is working once i created the Beta link for external testers who all are not able to get the IAP and similarly who all are I added as internal testers after beta link was created they are alos not able to purchase
It was showing in the app as "Unable to process your request" and i am getting the error as followsPurchase did not return a transaction: Error Domain=ASDErrorDomain Code=500 "(null)" UserInfo={NSUnderlyingError=0x28291ebb0 {Error Domain=AMSErrorDomain Code=305 "Purchase Failed" UserInfo={NSLocalizedDescription=Purchase Failed, AMSStatusCode=200, AMSServerPayload={
"cancel-purchase-batch" = 1;
customerMessage = "Unable to process your request.";
dialog = {
defaultButton = ok;
explanation = "Please try again later.";
initialCheckboxValue = 1;
isFree = 1;
"m-allowed" = 0;
message = "Unable to process your request.";
okButtonString = OK;
};
failureType = "";
"m-allowed" = 0;
metrics = {
actionUrl = "sandbox.itunes.apple.com/WebObjects/MZBuy.woa/wa/inAppBuy";
asnState = 0;
dialogId = "MZCommerce.SystemError";
eventType = dialog;
message = "Unable <…>
Topic:
App & System Services
SubTopic:
StoreKit
I have three questions about verify receipt
I use this api (https://buy.itunes.apple.com/verifyReceipt)to verify receipt is success or not. But since last month, this interface has started to return an error(21002). I see this document (https://developer.apple.com/documentation/appstorereceipts/verifyreceipt) say its Deprecated. My question is, is the error suddenly returned recently because the interface has been deprecated or for some other reason? (I haven't modified my code about this recently)
I can not understand this document: (https://developer.apple.com/documentation/appstorereceipts/validating_receipts_on_the_device) Does this mean that in the new version, as long as the app returns a payment success (purchaseDetails.status == PurchaseStatus.purchased), the payment is guaranteed to be successful, and my server does not need to request payment result verification from Apple's server?
I try to use this (https://github.com/apple/app-store-server-library-java) to get TransactionInfo, but I dont konw to get Transaction status to know is success or not.
my java server code :
AppStoreServerAPIClient client = new AppStoreServerAPIClient(encodedKey, keyId, issuerId, bundleId, environment); TransactionInfoResponse response = client.getTransactionInfo(transactionId);
(bug i can note get transaction status, how do i konw this Transaction is success or not)
I have three questions about verify receipt
I use this api (https://buy.itunes.apple.com/verifyReceipt)to verify receipt is success or not. But since last month, this interface has started to return an error(21002).
I see this document (https://developer.apple.com/documentation/appstorereceipts/verifyreceipt) say its Deprecated.
My question is, is the error suddenly returned recently because the interface has been deprecated or for some other reason? (I haven't modified my code about this recently)
2. I can not understand this document: (https://developer.apple.com/documentation/appstorereceipts/validating_receipts_on_the_device)
Does this mean that in the new version, as long as the app returns a payment success (purchaseDetails.status == PurchaseStatus.purchased), the payment is guaranteed to be successful, and my server does not need to request payment result verification from Apple's server?
3. I try to use this (https://github.com/apple/app-store-server-library-java) to get TransactionInfo, but I dont konw to get Transaction status to know is success or not.
my java server code :
AppStoreServerAPIClient client = new AppStoreServerAPIClient(encodedKey, keyId, issuerId, bundleId, environment);
TransactionInfoResponse response = client.getTransactionInfo(transactionId);
(bug i can note get transaction status, how do i konw this Transaction is success or not)
Hi,
I've been unable to successfully test in the sandbox environment for a StoreKit 2 subscription group and can't seem to find the missing piece.
I am calling the following line of code:
let products = try await Product.products(for: [subscriptionID])
Expected behavior: The product is returned in the products array.
Actual result: The array is empty
I have done the following:
Successfully tested our logic using a storekit configuration file locally in Xcode.
Created the Subscription group in App Store Connect. The subscription product is currently "Waiting for Review", but it is our first so will not be approved without being attached to a distribution build review.
Created a Sandbox user account in App Store Connect -> Users -> Sandbox
Signed into the sandbox user account in Settings -> Developer -> Sandbox Apple Account
Signed the Paid Apps Agreement for our organization
A few debugging notes:
I deleted all apps before installing from Xcode
I've tried both locally and in TestFlight builds
Restarted my device
Verified productID matches the productID in App Store Connect
I'm not sure if I'm missing something, but any help would be appreciated.
Thanks
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
Subscriptions
StoreKit
App Store Connect
In-App Purchase
We are considering a price change for the auto-renewing subscriptions we currently offer in a Production environment and have made system modifications to our servers.
We would like to implement a price change for purchases made through our SANDBOX Apple account in order to test if our system is capable of handling the price change.
Our application is currently under review, and we are still facing issues because we receive a 401 Unauthorized response from the App Store Connect API when using the production environment.
Our app integrates with Chargebee for subscription management, and in production, Chargebee is unable to authenticate with the App Store Server API. This results in a 401 Unauthorized error, preventing the user’s subscription from being synced correctly into our system. Interestingly, the same configuration works in the sandbox environment, but fails in production.
We’ve tried authenticating using JWTs generated from multiple keys (including App Store Connect API / Team Keys with both Admin and App Manager access, and also In-App Purchase keys), all with the same result — sandbox access works, production does not.
Here is our example code for testing with JWT token:
const jwt = require('jsonwebtoken');
const fs = require('fs');
const https = require('https');
const config = {
keyId: '<key_id>',
issuerId: 'issuer_id',
bundleId: 'bundle_id',
privateKey: fs.readFileSync('path_to_key')
};
const { keyId, issuerId, bundleId, privateKey } = config;
const now = Math.floor(Date.now() / 1000);
const jwtToken = jwt.sign(
{
iss: issuerId,
iat: now,
exp: now + 60 * 10, // 10 minutes is fine for test
aud: 'appstoreconnect-v1',
bid: bundleId
},
privateKey,
{
algorithm: 'ES256',
header: {
alg: 'ES256',
kid: keyId,
typ: 'JWT'
}
}
);
console.log('Generated JWT:\n', jwtToken);
// prod
const originalTransactionId = '<prod_transaction_id>';
const hostname = 'api.storekit.itunes.apple.com';
// sandbox
// const originalTransactionId = '<sandbox_transaction_id>';
// const hostname = 'api.storekit-sandbox.itunes.apple.com'
const options = {
hostname,
port: 443,
path: `/inApps/v1/history/${originalTransactionId}`,
method: 'GET',
headers: {
Authorization: `Bearer ${jwtToken}`,
'Content-Type': 'application/json',
},
};
const callAppStoreConnectApi = async () => {
const req = https.request(options, (res) => {
console.log(`\nStatus Code: ${res.statusCode}`);
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
console.log('Response Body:\n', data || '[Empty]');
});
});
req.on('error', (e) => {
console.error('Request Error:', e);
});
req.end();
};
callAppStoreConnectApi();
With this code, we were able to authenticate successfully in the sandbox environment, but not in production.
I read in this discussion: https://developer.apple.com/forums/thread/711801 that the issue was resolved once the app was published to the App Store, but I haven’t found any official documentation confirming this.
Does anyone know what the issue could be?
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
StoreKit
App Store Connect
App Store Connect API
Hey everyone,
I'm currently preparing an older iOS app for App Store release that includes a non-consumable In‑App Purchase using StoreKit 2. Everything works perfectly in the StoreKitTest environment inside Xcode – the product loads, the purchase flow runs, the transaction verifies.
However, when I run the same app through TestFlight, I always get the error:
❌ Product not available - mapped to
Here’s what I’ve already checked:
✅ The product ID is correct and matches what’s in App Store Connect (case-sensitive).
✅ The IAP is created in App Store Connect and includes:
Title
Product ID
Price Tier
Screenshot for review
✅ The App Store "Paid Applications" agreement is active.
✅ The app is using the correct bundle ID.
✅ I'm using Product.products(for: [productID]) from StoreKit 2.
✅ I’ve implemented fallback and retry logic (e.g. reload after delay).
✅ All IAP logic is wrapped in @MainActor and async-safe.
As the App got Rejected on Review, the IAP is also now in the Rejected Status.
Now the IAP shows status:
🟠 "Developer Action Required"
And App Review rejected the IAP with the message:
"Your first In‑App Purchase must be submitted together with a new app version."
But if I add the App to the Test again and therefore the IAP, then the app will get Rejected again for App Completeness, IAP does not work...
What am I doing wrong here? :)
Thanks a lot in advance
Cheers,
Niklas
Topic:
App & System Services
SubTopic:
StoreKit
Tags:
StoreKit Test
App Review
StoreKit
In-App Purchase
My server is able to receive notifications for successful purchases. However, we are experiencing an issue where we do not receive any server notifications when a consumable product is refunded.
Could you please help us verify if this behavior is expected? Also, is there a way to trigger a test refund notification for consumable products in the sandbox environment, so we can ensure our server is correctly set up to handle it?
Topic:
App & System Services
SubTopic:
StoreKit
I have implemented IAP. The purchases are successful. The refresh receipt is working fine, which then calls the requestDidFinish(_ request: SKRequest) delegate. I'm fetching the receipt url through 'Bundle.main.appStoreReceiptURL'. When I convert the receipt data in base64 string and send it to app store's sandbox api and try to validate the receipt, it fails giving status code : 21002.
I’m implementing StoreKit External Purchase Custom Links (EU) and so far it is really painful. I am running into a strange, device-specific issue. On 3/4 devices it works. On one device I never get a token at launch nor before a transaction. isEligible is true everywhere. All devices have versions 18.5 and are located in Germany.
Info.plist: SKExternalPurchaseCustomLinkRegions is set to EU storefront codes and I have followed every step in the documentation: https://developer.apple.com/documentation/storekit/externalpurchasecustomlink
Good device: At launch → ACQUISITION = nil, SERVICES = token present. Works consistently.
Faulty device: At launch → ACQUISITION = nil, SERVICES = nil. Same before transaction. No token ever reaches my server from this device.
isEligible is true on both devices.
Any experts or help on the matter?
Topic:
App & System Services
SubTopic:
StoreKit
FB19377002
I am looking to improve and review my subscription purchase handling logic, for the best user experience.
Considering that StoreKit2 caches local raw transactions (in case user is offline), is it really necessary to persist "unlocked status" in UserDefaults or SwiftData Model or AppStorage? Are there significant delays when reading Transaction.currentEntitlements from locally stored cache, versus reading it from UserDefaults; or, as in the latest SKDemo example, even reading it from stored in SwiftData ?
https://developer.apple.com/forums/thread/706450
I only have subscriptions ( I don't have noncosumable or consubale products). Do I still need to persist subscription status?
FB19376771
Transactions monitoring. If I only have subscriptions, do I really need to "bother" with any sort of monitorTransactions() or just rely on subscription status (subscribed, revoked, cancelled ...) ?
This is in line with Apple SKDemo and recommendation:
// Only handle consumables and non consumables here. Check the subscription status each time
// before unlocking a premium subscription feature.
switch transaction.productType {
ref: [https://developer.apple.com/documentation/storekit/implementing-a-store-in-your-app-using-the-storekit-api)
The "Only handle consumables and non consumables here" recommendation by Apple in ref to the process transaction code above is nuanced and confusing if we know what was with other external experts recommendation saying when using only SK2 Views :
"This is where most developers trip up in trying to get an experience that App Review is happy" ...
continuing :
"Be careful: that Purchase View code alone isn’t enough, because one of the possible completion status is .pending: the purchase is in the process of happening but hasn’t completed yet, so you still need to watch the transaction queue manually to be absolutely sure of handling the process completely."
Does this holds true for the new SubscriptionStoreView ?
We are not sure with quite obscure Apple documentation what SubscriptionStoreView handles, other than purchase (and now subscribe) function, and we do not know what diverse type of error handling messages it can return. Moreover, Apple documents: "Only handle consumables and non consumables here" ?
@Apple can you please share more insights on Purchase button on SubscriptionStoreView e.g
A) does it close ( finish). the purchase transaction ?
B) What error results can it return ?
C) What .onInAppPurchaseCompletion can handle as result ?