Cupcakes: Preheat the oven to 180 degrees C. Line a cupcake tray with patty cups.
Mix the flour with the baking powder in a bowl. Mix the milk and rum in a measuring cup.
In a large bowl whisk the softened butter with a mixer until creamy. Gradually add the sugar and continue to whisk for 3 minutes.
Add the eggs one at a time mixing well after each one.
Stir in the dry ingredients 1/3 at a time alternating with the liquids. Add the pineapple.
Fill the patty cups 2/3 high the bake in the oven for 20 minutes.
Coconut Buttercream: Add the softened butter into the bowl of your food processor with the milk, vanilla essence and 2 cups of icing sugar. Whisk at medium speed for 3-5 minutes then gradually add the remaining icing sugar 1/2 a cup at a time.
Continue to whisk for about 2 minutes then add the desiccated coconut.
Keep the buttercream at room temperature or it will harden.
Remove the cupcakes from the oven and completely cool. Top the cupcakes with the buttercream then dip them in desiccated coconut.