Jobeso / react-native-whatsapp-stickers

Integrate sticker packs for WhatsApp with your react-native app
Other
81 stars 30 forks source link

Sending multiple sticker packs on iOS overwrite each others in Whatsapp #10

Closed ReactNativeFan closed 5 years ago

ReactNativeFan commented 5 years ago

Environment

Environment: OS: Windows 7 Node: 10.9.0 Yarn: 1.9.4 npm: 6.2.0 Watchman: Not Found Xcode: N/A Android Studio: Version 3.2.0.0 AI-181.5540.7.32.5056338

Packages: (wanted => installed) react: 16.3.1 => 16.3.1 react-native: 0.55.4 => 0.55.4

Describtion

Send sticker pack A then sticker pack B. Whatsapp will overwrite stickers of pack A by stickers of pack B.

Reproducible Demo

I suggest the following fix: In RNWhatsAppStickers.swift: i think the following line stickerPack = try StickerPack(identifier: "identifier", should be replaced with stickerPack = try StickerPack(identifier: RCTConvert.nsString(config["identifier"]),

because all packs now have the same identifier "identifier"

Jobeso commented 5 years ago

@ReactNativeFan for sure. I created a PR https://github.com/Jobeso/react-native-whatsapp-stickers/pull/12. Are you currently available to test it?

ReactNativeFan commented 5 years ago

Works fine now.!

pandanr1 commented 5 years ago

Is this published to NPM? Everytime i install react-native-whatsapp-stickers from npm i get version 1.2.0 but without the changes from PR #12:

I see: try StickerPack(identifier: "identifier", ...

But it has to be: try StickerPack(identifier: RCTConvert.nsString(config["identifier"]),

So it keeps overwriting packs on iOS...

Jobeso commented 5 years ago

@pandanr1 Yes, you are right. The newest version contains these changes now.

pandanr1 commented 5 years ago

@Jobeso Awesome! Thank you!!!