Giphy / giphy-react-native-sdk

GIPHY React Native SDK
https://developers.giphy.com
Apache License 2.0
67 stars 25 forks source link

GiphyDialog not reproduce gifs #160

Closed bsjaramillo closed 8 months ago

bsjaramillo commented 8 months ago

🐛 Bug Report

When GiphyDialog is showing, no one gif reproduce, all items looks like static images, not gifs.

To Reproduce

  1. Import GiphySDK and configure apiKey
  2. Import GiphyDialog and add onDismiss and onMediaSelect events in useEffect
  3. Add button to call GiphyDialog.show()
  4. Press the button

Expected behavior

I expect open GiphyDialog and see gifs, not static images.

Actual Behavior

After apply to production apiKey, GiphyDialog shows static images, not gifs. In development apiKey mode, GiphyDialog was showing gifs.

Additional, I upgraded react-native, before I was using 0.70, now I'm in 0.73.

Your Environment

ALexanderLonsky commented 8 months ago

Hey @bsjaramillo, Thanks for flagging this! It seems that as of RN version 0.73, they force using the latest Fresco version, which is 3.1.3. The Giphy SDK currently uses Fresco version 2.5.0 due to past dependency issues with Fresco 3.1.3 and older RN versions. To fix your problem, you need to explicitly use Giphy Android SDK version 2.3.13. To do this, just add the following block to your android build.gradle(:app) right before the dependencies section:

configurations.all {
       resolutionStrategy {
           forcedModules = ['com.giphy.sdk:ui:2.3.13']
       }
   }
bsjaramillo commented 8 months ago

ok, thanks, I'll try