Apple has passed Samsung in most sold handsets, even though it is a declining market overall (for both Samsung, Apple and other makers).
IDC figures are estimates, but of course no solid real sales figures as those are not public information from all smartphone vendors.. (Apple do currently no longerreport these figures for example).
ref. https://www.idc.com/getdoc.jsp?containerId=prUS51776424