Issue: Streamlined purchasing cannot be turned off because your latest approved binary doesn’t include the required StoreKit APIs.
For this, I tried selecting the option "Turn Off Streamlined Purchasing" in App Store Connect, and I received this error.
What I’ve Done So Far:
- I have added the StoreKit file in Xcode.
- Still, I get the error when submitting my app binary.
- In app capability added in xcode
My Setup:
- React Native
- Xcode version
- StoreKit2 integration using React Native IAP sdk (react-native-iap)
Code: Here is the code I am using to set up the in-app purchase system:
RNIap.setup({ storekitMode: 'STOREKIT_HYBRID_MODE' });
const connection = await RNIap.initConnection();
if (connection) {
if (isAndroid) {
await RNIap.flushFailedPurchasesCachedAsPendingAndroid();
} else {
await RNIap.clearTransactionIOS();
}
if (isIos) {
await RNIap.IapIosSk2.sync()
.then(() => {})
.catch((error) => {
console.log('Error IapIosSk2 IAP:', error);
});
}
await getAllSubscriptionList();
await getPlanStructure();
//For Subscription
await RNIap.requestSubscription({
sku: sku,
subscriptionOffers: [{ sku, offerToken }],
});
//For Consumable Products
await RNIap.requestPurchase({
sku: sku,
andDangerouslyFinishTransactionAutomaticallyIOS: false,
});
}
Steps I’ve Taken to Troubleshoot:
- Cleaned and rebuilt the project.
- Checked App Store Connect settings for in-app purchases.
Question: How can I resolve this error? Are there additional steps required to correctly enable StoreKit2 in a React Native project?
Additional Info: Any advice or guidance on this issue would be greatly appreciated.
Streamlined purchasing cannot be turned off because your latest approved binary doesn’t include the required StoreKit APIs
From Manage Streamlined Purchasing:
Streamlined purchasing is enabled by default. If your subscription requires steps at the time of purchase, such as signing into the app, you can choose to turn off streamlined purchasing. When turned off, customers will have to go into your app to complete subscription purchases.
Before you can turn off streamlined purchasing, your latest approved binary must include the necessary StoreKit APIs. Turning off streamlined purchasing will apply to all subscriptions in your app, and is not supported for subscription offer codes or promo codes for in-app purchases.
Are there additional steps required to correctly enable StoreKit2 in a React Native project?
Turning it off will require your latest approved binary to include the PurchaseIntent API. Please contact the support channel for React Native to inquire how you can implement StoreKit 2 in your React Native project.