Jobeso / react-native-whatsapp-stickers

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

There's a problem with this sticker pack and it can't be added to WhatApp. #1

Closed ReactNativeFan closed 5 years ago

ReactNativeFan commented 5 years ago

Hi, Thank you for this quick nice integration work.!

I successfully integrated your module. I added 5 stickers to stickerConfig.js. The stickers are compliant with WhatsApp rules. I tested them on WhatsApp template and load fine in WhatsApp. When i send them using your code snippet. I got the following messages after WhatsApp opens:

  1. "Importing Sticker Pack"
  2. Then, "There's a problem with this sticker pack and it can't be added to WhatApp."

I spend some time debugging and noticed that inside imageDataIfComplaint the Bundle.main.url method successfully resolves the tray and first sticker url then report "fileNotFound" for the rest of the 4 stickers. All stickers are located in the same folder under ios folder which is dragged dropped in the project navigation pan and its content is shown in the bundle file and "Copy Bundle Resource" under project settings.

The url of the successfully loaded tray is "file:///var/containers/Bundle/Application/xxxxxx-xx-xxx-xxx-xxxxx/appName.app/tray_stickers.png"

the url of the failed loaded stickers are "nil" It looks like the remaining stickers are deleted from the temp location after reading the first 2 stickers. I am using:

Xcode 10 React-Native 0.55.4 React: 16.3.1

Do you have any suggestions? Thank you...!

ReactNativeFan commented 5 years ago

The problem disappeared after installing the latest Xcode 10 updates and clearing the DerivedData folder rm -rf ~/Library/Developer/Xcode/DerivedData