In an electric mixer, cream butter and cream cheese until smooth; add sugar, beating until light and fluffy. Beat in eggs, one at a time. Mix in vanilla and almond extracts.
Mix flour, baking powder, baking soda, and salt in a separate bowl. Gradually add to butter mixture. Stir in pineapple and chopped cherries. Add pecans, if using.
Drop dough by tablespoonfuls 2 inches apart onto ungreased baking sheets. Bake for 12 minutes. Remove to wire racks to cool completely.
Notes
Make sure the pineapple is well-drained. I usually press it tightly in a strainer to get as much liquid out as possible.
I recommend using unsalted butter because salt is added to the recipe. If you only have salted butter, it's ok. Just cut down the amount of salt you add as an ingredient.
The cookies tend to spread while baking, so I like to move a few cherry pieces directly on top of the dough before placing them in the oven. This way, the cherries are more likely to show on the surface of the baked cookies.