Preheat the oven to 350°F.
Spread coconut flakes on a rimmed baking sheet and bake until lightly browned and fragrant, stirring occasionally, 10 to 12 minutes.
Transfer coconut from the baking sheet to a plate and let cool.
Heat a wok or large sauté pan over high heat.
When hot, add a teaspoon of oil.
Swirl to coat pan with oil.
Add ginger and stir-fry until fragrant, about 1 minute.
Add pineapple and a pinch of salt.
Stir constantly, spreading the pineapple over the surface of the pan, for about 2 minutes.
Transfer pineapple and ginger to a large bowl and set aside.
Add the remaining oil to the pan, then add mango and a pinch of salt.
Cook, stirring often, for about 2 minutes.
Transfer mango to bowl with pineapple.
Add butter and toss gently until melted.
To finish, scoop ice cream into bowls.
Add a few tablespoons of stir-fried fruit and toasted coconut to each serving. Serve immediately.