Skip to main content
Solved

[Unity] [iOS] GetOfferings has no errors, but return empty dictionary on call

  • October 28, 2021
  • 3 replies
  • 192 views

Forum|alt.badge.img+1

Hello! I have an issue with fetching current offerings: callback object is always null

2021-10-28 09:32:32.072780+0300 MagicKids[2441:2439627] json = {"offerings":{"all":{}}}

However, on app launch (specifically 2 seconds BEFORE GetOfferings() call) I can see normal json with my product in logs (I’m not sure what function is calling this):

2021-10-28 09:32:30.328012+0300 MagicKids[2441:2439627] json = {"products":[{"description":"Full access to our app for a 3 month","introPrice":{"periodNumberOfUnits":1,"periodUnit":"WEEK","priceString":"0,00 RUB","price":0,"period":"P1W","cycles":1},"price_string":"2 650,00 RUB","intro_price_period_unit":"WEEK","currency_code":"RUB","title":"3 Month Subscription","price":2650,"identifier":"com.MagicKids.Go.tier5","intro_price":0,"intro_price_period_number_of_units":1,"intro_price_period":"P1W","intro_price_string":"0,00 RUB","discounts":[],"intro_price_cycles":1}]}

Also: 

  • I’ve checked API key
  • I’ve checked product ID
  • I’ve checked there are no any pending agreements in the AppStore
     

I think the wrong method causes this issue. I have an entitlement, not offering in my dashboard, however GetEntitlements() is marked as Obsolete. 
 


If I call GetProducts() instead of GetOfferings() everything is fine.

Best answer by RC Support

Hi @Marianna Alpatova,

You’ll need to attach your products to an offering in your RevenueCat dashboard in order to fetch and use offerings. You can follow our guide from our docs to set up an offering: 

https://docs.revenuecat.com/docs/entitlements#offerings

View original
Did this post help you find an answer to your question?

3 replies

RC Support
RevenueCat Staff
Forum|alt.badge.img+3
  • RevenueCat Staff
  • 4 replies
  • Answer
  • October 28, 2021

Hi @Marianna Alpatova,

You’ll need to attach your products to an offering in your RevenueCat dashboard in order to fetch and use offerings. You can follow our guide from our docs to set up an offering: 

https://docs.revenuecat.com/docs/entitlements#offerings


Forum|alt.badge.img+1
RC Support wrote:

Hi @Marianna Alpatova,

You’ll need to attach your products to an offering in your RevenueCat dashboard in order to fetch and use offerings. You can follow our guide from our docs to set up an offering: 

https://docs.revenuecat.com/docs/entitlements#offerings

 

So, the entitlement is some sort of useless thing?


cody
RevenueCat Staff
Forum|alt.badge.img+8
  • RevenueCat Staff
  • 497 replies
  • December 16, 2021

It looks like we lost track of this post, but I wanted to follow up here to clarify this behavior - Entitlements are activated after the purchase of a product that’s linked to the entitlement. To check for active entitlements, you’ll need to fetch PurchaserInfo, then check the user’s active entitlements (this is why the GetEntitlements method was deprecated, as it’s now included in PurchaserInfo). For more information, you can read our docs on checking subscription status: https://docs.revenuecat.com/docs/purchaserinfo


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings