react-native-quick-actions icon indicating copy to clipboard operation
react-native-quick-actions copied to clipboard

Quick action -> custom icon issue

Open Pranay2019 opened this issue 4 years ago • 4 comments

Hi, I am facing an issue while setting up custom icon in iOS. Please let me know if anyone having the idea how to fix this .

My code: QuickActions.setShortcutItems([ { type: "Invoices", title: "Invoices", icon: Platform.OS == "ios" ? "Invoices" : "invoices", userInfo: { url: "", }, },

I have created Images.xcassets folder and added Invoices imageset but still no luck.

Pranay2019 avatar Sep 16 '20 06:09 Pranay2019

Try deleting the application and installing again on your device

zzdravkin avatar Jul 10 '22 19:07 zzdravkin

I also do have this problem, even after clean install. Would be nice, if there would exist some example repo that would use custome icons in dynamically set quick actions.

MCervenka avatar Sep 15 '22 07:09 MCervenka

I now noticed even stranger behaviour. It actually copies the shape of the image I want to use but makes it all black. So my circle image is just black circle, and my credit card icon is just black rectangle. And when I put a non-existent name, it is small black dot.

MCervenka avatar Sep 26 '22 13:09 MCervenka

@Pranay2019 so I finally figured it out. For ios are acceptable only svg (in assets you need to add Symbol Image set) or png that is single color on transparent background. So basically the ios would use just your shape and provide the color that matches other quick actions

MCervenka avatar Sep 27 '22 05:09 MCervenka