1. Put the pineapple in a wide skillet (preferable nonstick) with the sugar and a pinch of salt.
2. Cook the pineapple until the liquid is evaporated, then continue to cook, stirring constantly, until the pineapple gets thick and sticky, and just begins to brown. Remove from heat and scrape the caramelized pineapple into a large bowl. Then mix in the coconut into the pineapple, then the egg whites and vanilla.
(The mixture may be rather difficult to mix with a spatula. You can mix it with a stand mixer fitted with the paddle attachment or use your clean hands.)
3. Preheat the oven to 350ºF (180ºC). Line a baking sheet with parchment paper.
4. Use your hands to gather a bit of the batter, about the size of an unshelled walnut, and form it into a round or a pyramid-like shape, onto the prepared baking sheet. Continue forming all the cookies then bake them for about 30 minutes, rotating the baking sheet midway during baking. The cookies are done when they are nicely browned up the sides.