jordanbyron / react-native-quick-actions

A react-native interface for Touch 3D home screen quick actions
MIT License
1.06k stars 93 forks source link

Quick action -> custom icon issue #103

Open Pranay2019 opened 3 years ago

Pranay2019 commented 3 years ago

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.

zzdravkin commented 2 years ago

Try deleting the application and installing again on your device

MCervenka commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

@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