Skip to content

Unable to get Subscriptions on IOS using getSubscriptions with Storekit file #2987

@Avamae-GarthvanBelkum

Description

@Avamae-GarthvanBelkum

Description

  • I am building a react native app and trying to test my in app purchases using an Iphone 16 Pro emulator on xcode 16.4
  • I have completed all relevant setup on AppStoreConnect
  • when calling the "getSubscriptions" function, the subs array returns empty
  • I also get the following error in my xcode terminal (Could not parse product: missingValue(for: [StoreKit.ProductResponse.Key.price], expected: StoreKit.BackingValue)
  • I have tried manually creating a StoreKit file, as well as automatically syncing one from AppStoreConnect with no luck

Expected Behavior

  • Upon creating a storekit file and linking it to the project for local testing via Product > Schemes > Edit Schemes > Run > Options I expect to see my subscriptions in my console log

Environment:

  • react-native-iap: 12.16.2
  • react-native: 0.73.6
  • xcode: (Tried the following versions 16.0, 16.4, 26.0 beta 7)
  • Platforms (iOS, Android, emulator, simulator, device): IOS Simulator

To Reproduce
Steps to reproduce the behavior:

Step 1 (Defining the function in RN App):
const initializeIAP = async () => {
setLoading(true);
try {
await initConnection();
console.log('[DEBUG] Connection now initiated - Manage Membership');
const subs = await getSubscriptions({
skus: ['MembershipTierOne', 'MembershipTierTwo'],
});
console.log(
'[DEBUG] Subscriptions successfully fetched - Manage Membership',
subs,
);
setProducts(subs);
} catch (err) {
console.warn(err);
} finally {
setLoading(false);
}
};

Step 2:

  • Create a Synced StoreKit File / Or alternatively create one manually paying special attention to the product IDs

Step 3:

  • Link the StoreKit file through xcode (Product > Schemas > Edit Schema > Run > Options
  • Then select the relevant StoreKit file

Step 4:

  • Run metro in vscode

Step 5:

  • Run IOS Simulator (Iphone 16 Pro -> IOS v18.6)

Step 6:

  • Navigate to relevant page and notice that the console log after "getSubscriptions" function returns an empty array

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions