Smiley didn't die over the apple, the apple was in the lab. There was a whole bag of apples.
The way it works, as I understood it, is if a devilfruit user dies the nearest fruit, so long as it's the correct type of fruit, becomes a devilfruit with the powers of the dead user. So Smiley's power comes from a fruit that looks like an apple, so when he dies the power goes to the nearest apple.
By keeping a bad of apples, probably the island's only apples, in the lab he was able to keep hold of the fruit without much effort.
Pretty much, he's probably got a bunch of different types just in case.