Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getCurrentOfferingForPlacement not working for the first app use. #1190

Open
5 tasks done
PierreCapo opened this issue Feb 24, 2025 · 1 comment
Open
5 tasks done
Labels
bug Something isn't working

Comments

@PierreCapo
Copy link

PierreCapo commented Feb 24, 2025

Describe the bug
Faced a "funny" bug. When calling getCurrentOfferingForPlacement it didn't work and returned null on Android although I had everything set up (it worked well on iOS).
It turns out, when I debugged, I called one time getOfferings to communicate to my RevenueCat Android app platform. And suddenly it unlocked all my calls to getCurrentOfferingForPlacement. getCurrentOfferingForPlacement started to proprely return values although I didn't change anything. I could then get rid of getOfferings call without any issue

I am not sure if this happens only on Android, I suspect this may also happen with iOS apps.

TLDR: before calling getCurrentOfferingForPlacement it seems you need to be sure that getOfferings has been called one time during the entire lifecycle of your RevenueCat app.

  1. Environment
    1. Platform: Android
    2. SDK version: 8.6.1
    3. OS version: Android 14
    4. Xcode/Android Studio version: Android Studio Ladybug Feature Drop | 2024.2.2
    5. React Native version: 0.76.7
    6. SDK installation (CocoaPods + version or manual): COCOAPODS: 1.16.2
    7. How widespread is the issue. Percentage of devices affected.
@PierreCapo PierreCapo added the bug Something isn't working label Feb 24, 2025
@RCGitBot
Copy link
Contributor

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants