Apple overtook Samsung in the fourth quarter as the largest smartphone producer in a declining global market for handsets, research firm IDC said Friday.