qonversion / react-native-sdk

React Native SDK for cross-platform in-app purchase and subscription infrastructure, revenue analytics, engagement automation, and integrations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

skProduct is null

kyle-ssg opened this issue · comments

Hello! Setting up a new iOS application I am seeing that skProduct is always null

Request:

const products = await Qonversion.getSharedInstance().products()

Response:

[
  {
    "qonversionID": "workout_annual",
    "storeID": "workout_annual",
    "type": "DIRECT_SUBSCRIPTION",
    "duration": "ANNUAL",
    "skuDetails": null,
    "skProduct": null,
    "prettyPrice": "",
    "trialDuration": "UNKNOWN"
  },
  {
    "qonversionID": "workout",
    "storeID": "workout",
    "type": "ONE_TIME",
    "skuDetails": null,
    "skProduct": null,
    "prettyPrice": "",
    "trialDuration": "UNKNOWN"
  },
  {
    "qonversionID": "workout_monthly",
    "storeID": "workout_monthly",
    "type": "DIRECT_SUBSCRIPTION",
    "duration": "MONTHLY",
    "skuDetails": null,
    "skProduct": null,
    "prettyPrice": "",
    "trialDuration": "UNKNOWN"
  }
]

Based on qonversion/qonversion-ios-sdk#101 I can validate the following:

Your in-app purchases are not configured correctly on the App Store Connect. Check the first point of this section.

I believe they are, here they are

image
image

Your app bundle ID does not match the bundle ID from App Store Connect where purchases were created.

It does:

image
image
image
image

You are using .storekit file which is configured with other IDs than you are trying to use.

We are not using a storekit file.

Hello! Thank you for contacting us. While we are investigating your problem, could you please clarify which version of Qonversion react-native SDK are you using? And also your project name or Qonversion user identifier so we can find your account.

"react-native-qonversion": "^4.0.0",

kyle@solidstategroup.com is the account with the project name Built by Becky

Thank you for the information! I'll return as soon as I get any details.

I've checked our sample app and everything works fine - I receive products on iOS with SKProduct data included.

Could you please check whether your application identifier in XCode is the same as in AppStoreConnect?
Снимок экрана 2023-01-19 в 13 38 26

Also, please, make sure, that you are testing on a real device, not a simulator, as App Store not working on simulators.

Hey @SpertsyanKM, I've been testing the app from TestFlight on an iPhone 14 pro so yeah it has to be. It's also worth noting we tested the same code on a pre-existing project and that works fine. I'll do some digging on the native calls to see where it's failing.

Also, please take a look at the app logs as there might be some useful information after initialization about fetching store products.

Ok so I get back the following, bit weird that workout isn't in quotes

Invalid store products identifiers: (
    "workout_monthly",
    workout,
    "workout_annual",
    "bbb_workout_quarterly"
)

image

Well, we were unable to load info about all your identifiers, which means that the problem is global. It could be one of the described in your start post or incorrect iOS bundle identifier (please, double check it - in most cases it is the problem). If you are sure, that everything is set up correctly, try to test on another real device.

I could be wrong but I'm wondering if every section in https://appstoreconnect.apple.com/agreements/#/ needs to be filled out and a bank account needs to be attached. Our other org has this which has a working example.
image

I'll report back here, if that's the case as silly as it seems it might catch the people out who are creating a new app.

Seems like it shouldn't be necessary for testing.

I'd have thought so too, but from reading around it seems like you have to enter tax and banking info.

You can try to do it. We don't have access to your App Store Connect

Yep of course, I'll report back if that's the issue. But reading around I have seen people report invalid product skus due to this.

Yes, let us know, please, if it helps.

That was the issue! Thanks very much for your prompt responses

@kyle-ssg @SpertsyanKM
can u help me i got same error what u received.

its must needed to fill all below data in app store account?
https://appstoreconnect.apple.com/agreements

Yes, you should fill it

@SpertsyanKM
Thanks... for quick answer.
will let u know if this works.