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

Paywall error when setting fontFamily option #1153

Open
5 tasks done
vendramini opened this issue Dec 27, 2024 · 4 comments
Open
5 tasks done

Paywall error when setting fontFamily option #1153

vendramini opened this issue Dec 27, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@vendramini
Copy link

vendramini commented Dec 27, 2024

Describe the bug
Showing Paywall gives an error if fontFamily option is set. This wasn't happening some days ago. I think that it has started after I updated Expo from 51 to 52 - I'm unsure, I had to update so many libraries and I figure out this error today. I tried downgrading react-native-purchases-ui to previous versions (which I knew it was working) but still erroring. If I remove it, it works.

import RevenueCatUI from 'react-native-purchases-ui';

<RevenueCatUI.Paywall
  options={{
    fontFamily: fontFamily.Poppins_300Light,
  }}
/>

image

  1. Environment
    1. Platform: Expo
    2. SDK version: 8.5.0
    3. OS version: macOS Sequoia 15.2
    4. Xcode/Android Studio version: Android Studio Koala 2024.1.1
    5. React Native version: 0.76.5
    6. SDK installation (CocoaPods + version or manual):
    7. How widespread is the issue. Percentage of devices affected.
  2. Debug logs that reproduce the issue
  3. Steps to reproduce, with a description of expected vs. actual behavior
  4. Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)

Additional context
Add any other context about the problem here.

@vendramini vendramini added the bug Something isn't working label Dec 27, 2024
@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!

@kmurphy-rc
Copy link

Hey @vendramini,
Sorry for the delay here! If this was working properly prior to upgrading Expo to 51, could you try (if you haven't already) re-running npx react-native-asset to ensure that your font families are added to the native components?

@colaquecez
Copy link

Same issue here using expo 52,

  "react-native-purchases": "^8.5.2",
    "react-native-purchases-ui": "^8.5.2",

@daklin2
Copy link

daklin2 commented Feb 14, 2025

Hi there @colaquecez @vendramini ,
Experiencing same issue on Android Expo v52 and purchases v8.6.0.

As it seems issue overall with options props of RevenueCatUI.Paywall, I would say somewhere in between of RN and Native.
I managed to just use presentPaywall instead, but if you absolutely need to work with component - you can make small changes on native side and make a patch for library to persist them. (works fine in mine case as well)

Component which you would need to update - PaywallViewManager.
Mine example with close button:

// PaywallViewManager \\
...
 override fun createViewInstance(themedReactContext: ThemedReactContext): PaywallView {
        return PaywallView(themedReactContext).also { view ->
            view.setPaywallListener(createPaywallListenerWrapper(themedReactContext, view))
            view.setDismissHandler(getDismissHandler(themedReactContext, view))

            // New code
            view.setDisplayDismissButton(true) // as example, to display dismiss button instead of using options
            view.setFontProvider(customFontProvider) // to manage fonts 
        }
    }
...

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

5 participants