Open tecomunico opened 1 week ago
Hello, thank you for the report in following days I will take a look. Till then please adjust code you provided in correct code-blocks (right now it is overflowing) so it is more readable
Thanks
I am looking at your code and I cant see there anything obviously wrong.
1) Try in SubscriptionPage
get IRevenueCatBilling
with the use of dependency injection
2) In our repo there is a demo app. Try to download it and use your revenueCatApiKey here. After that check if offerings contain your items. If it wont work you dont have RevenueCat properly setup or Apple didnt approve your subscriptions yet
@tecomunico were you able to resolve this problem ?
Description:
Hello, I'm experiencing issues integrating Maui.RevenueCat.InAppBilling into my .NET MAUI application. My goal is to retrieve subscription offerings and validate an annual subscription, but I am unable to establish a connection or retrieve the offerings even though my API key is correctly set up.
Environment Details:
Steps to Reproduce the Issue:
Code
Expected Behavior:
I expected RevenueCat to connect successfully and retrieve available offerings, specifically for the annual subscription. Additionally, I expected that I could make a purchase and activate the subscription.
Actual Behavior:
The application fails to retrieve offerings. The code stops at the line checking if (offerings == null || !offerings.Any()), showing an error message stating that offerings could not be retrieved due to a potential network or configuration issue.
What I Have Tried:
Additional Context or Potential Issue:
This may be a problem with the configuration or a specific issue with the Maui.RevenueCat.InAppBilling package and its compatibility with .NET MAUI. It would be helpful to know if there are any additional steps needed or any known issues with this setup.
Here's a detailed issue template for reporting your problem on GitHub:
Issue Title:
Issue with Maui.RevenueCat.InAppBilling: Unable to Retrieve Offerings Using Valid API Key
Description:
Hello, I'm experiencing issues integrating Maui.RevenueCat.InAppBilling into my .NET MAUI application. My goal is to retrieve subscription offerings and validate an annual subscription, but I am unable to establish a connection or retrieve the offerings even though my API key is correctly set up.
Environment Details:
Package Version: [Specify the exact version of Maui.RevenueCat.InAppBilling in use] .NET MAUI Version: [Specify the version of .NET MAUI] Visual Studio Version: [Specify the version of Visual Studio, and indicate if it’s on Mac or Windows] Test Devices: [List the OS and version of the physical devices or emulators you've tested on]
Steps to Reproduce the Issue:
Installed the Maui.RevenueCat.InAppBilling package in my .NET MAUI application and configured the API key provided by RevenueCat.
Configured the RevenueCat service in MauiProgram.cs as follows:
builder.Services.AddRevenueCatBilling();
Added code to initialize RevenueCat and retrieve offerings on my subscription page.
Attempted to execute the following code in the OnSubscribeClicked event to load the offerings and attempt a purchase:
Tested this code on both iOS and Android devices.
Expected Behavior:
I expected RevenueCat to connect successfully and retrieve available offerings, specifically for the annual subscription. Additionally, I expected that I could make a purchase and activate the subscription.
Actual Behavior:
The application fails to retrieve offerings. The code stops at the line checking if (offerings == null || !offerings.Any()), showing an error message stating that offerings could not be retrieved due to a potential network or configuration issue.
What I Have Tried:
Confirmed that the API key is correctly configured and verified its validity in the RevenueCat dashboard. Tested the implementation on different physical devices and emulators to rule out device-specific issues.
Additional Context or Potential Issue:
This may be a problem with the configuration or a specific issue with the Maui.RevenueCat.InAppBilling package and its compatibility with .NET MAUI. It would be helpful to know if there are any additional steps needed or any known issues with this setup.
Additional Code
XAML SubscriptionPage
App.cs
MauiProgram.cs
Thank you for your help in identifying a solution for this issue!